List source objects
This endpoint returns a list of all the source objects (models, segments, and tables) that this source connection contains.
Request schema
Path parameters
ID of the source
Query parameters
Designates which page of results to return. Always starts at 1. If 0 is specified, it defaults to 1.
Determines the number of results on each page. It can't exceed 100.
Organizes the results based on their creation time, either ascending or descending.
Header parameters
HTTP: basicAuth
HTTP AuthorizationScheme: basic
GET /api/v1/sources/{source_id}/objects?page=SOME_NUMBER_VALUE&per_page=SOME_NUMBER_VALUE&order=SOME_STRING_VALUE HTTP/1.1 Authorization: Bearer REPLACE_BEARER_TOKEN Host: app.getcensus.com
Responses
200
The outcome of the request
An object to help you navigate the list of results.
Total records in the collection.
Records on each page.
The previous page number, or null for the first page.
The current page number.
The next page number, or null if it's the last page.
The number of the last page with records.
A list of source objects that this connection contains. May be either a Model, Segment, or Table.
The type of this source object, will always be model.
The id of this model.
The name of this model.
The identifier for the dataset that corresponds to this model. A model will always have a corresponding dataset unless the model belongs to a dbt, looker, sigma recipe that has not been used in Census
The description for this model.
The SQL query associated with this model.
When this model was created.
When this model was last updated.
The compiled query associated with this model if it is built atop a DBT instance.
A list of columns from this model.
The name of the column.
The data type of the column.
[Deprecated] Identical to dataset_id but with a typo. Will be removed in a future version.
[Deprecated] The source object ID for this model. You can typically ignore this.
The type of this source object, will always be segment.
The id of this segment.
The name of this segment.
The id of the model that this filter segment is related to (either directly from legacy segments or indirectly via the dataset)
The dataset ID that this segment is associated with.
The SQL query associated with this segment.
The cached size of the segment at that particular moment in time.
When this segment was created.
When this segment was last updated.
The unique identifier for this filter segment.
A list of Atomic Molecules, Related Segment Molecules, Relationship Molecules, Molecule Groups and at most one Operation Molecule.
A condition on an property of an entity. The property or column will belong to the entity described in the parent relationship molecule. If the basic molecule is top level, the condition is on the entity on which the segment is based on.
Represents the property name when attribute_type is property and the column name when attribute_type is column.
The type of the attribute for this condition. Options are:
- property for entity properties
- sql for sql conditions
- column for legacy segments
The operator for this molecule. Only certain operators will be valid for a given property type. For example, the greaterthan operator can only be applied to numeric values.
If the attribute_type is sql, then this is a SQL string. Otherwise the value being filtered on.
- a number for numerical operators
- a string for string operators
- a boolean for boolean operators
- an array for array operators
- for datetime operators, this could either be a datetime value, a number (for “morethandays” type operators), or a “between” value which is represented as a hash with the following structure { bound_one: X, bound_two: Y }. X and Y are either datetime values, blank (in which case they become the current datetime on the backend), or a string with the following structure "days_ago: Z" where Z is a number (can be decimal).
A condition based on including or excluding a related segment based off of the same entity.
The id of the related Segment
Condition to include or exclude members of the related filter segment
A condition or set of conditions on a related entity.
ID for the relationship object that connects both entities
Used only for creating conditions on event entities.
The type of constraint, will always be occurrences.
The operator to apply to the event constraint
The value to apply to the operator
Whether the constraint should be negated
A list of Atomic Molecules, Related Segment Molecules, Relationship Molecules, Molecule Groups and at most one Operation Molecule.
[Deprecated] The source object id for this segment. You can typically ignore this.
A list of cohorts (experiments) that are active for this segment
The id of this cohort.
The name of this cohort.
The percentage of users included in this cohort.
Will be true if this is the control cohort, false if it is a treatment.
When this cohort was created.
The unique identifier for this cohort.
The type of this source object, will always be table.
The id of this table.
The catalog associated with this table.
The schema associated with this table.
The name of this table.
A list of columns from this table.
The name of the column.
The data type of the column.
{ "status": "success", "pagination": { "total_records": 14, "per_page": 25, "prev_page": 1, "page": 2, "next_page": 3, "last_page": 10 }, "data": [ { "type": "model", "id": 18, "name": "New App Users", "dataset_id": 12, "description": "Users that have signed up for our product in the last week.", "query": "SELECT * FROM \"users\"", "created_at": "2021-10-20T02:43:07.120Z", "updated_at": "2021-10-20T02:50:35.477Z", "compiled_query": "string", "columns": [ { "name": "user_id", "type": "character varying (256)" }, { "name": "full_name", "type": "character varying (256)" } ], "dataset_id=": 12, "source_object_id": 20 } ] }