cURL
curl --request GET \ --url https://app.getcensus.com/api/v1/datasets/{dataset_id} \ --header 'Authorization: Bearer <token>'
{ "status": "success", "data": { "type": "sql", "query": "SELECT id, name, email FROM users WHERE active = true", "source_id": 123, "name": "Users", "id": 157, "resource_identifier": "dataset:users", "created_at": "2023-11-07T05:31:56Z", "updated_at": "2023-11-07T05:31:56Z", "description": "This dataset contains golden user records", "cached_record_count": 123, "columns": [ { "name": "email", "data_type": "string", "can_be_upsert_key": true } ] } }
Returns a single dataset. Supports SQL datasets.
Bearer token for the current workspace. Can be retrieved from the Workspace's settings page.
ID of the dataset
Successfully retrieved the dataset
Outcome of the operation.
success
not_found
error
"success"
Show child attributes
Type of dataset
sql
SQL query that defines the dataset
"SELECT id, name, email FROM users WHERE active = true"
ID of the source connection
123
The name of the dataset
"Users"
Unique identifier for the dataset
157
Resource identifier for the dataset
"dataset:users"
Timestamp when the dataset was created
Timestamp when the dataset was last updated
Optional description of the dataset
"This dataset contains golden user records"
Cached count of records in the dataset
List of columns in the dataset
The name of the column
"email"
The data type of the column
"string"
Indicates if the column can be used as an upsert key
true
Was this page helpful?