Fetch dataset Public Preview
Returns a single dataset. Supports SQL datasets.
Request schema
Path parameters
dataset_id
integerrequired
ID of the dataset
Header parameters
Authorization
stringrequired
HTTP: basicAuth
HTTP AuthorizationScheme: basic
Http + 1.1
GET /api/v2/datasets/{dataset_id} HTTP/1.1 Authorization: Bearer REPLACE_BEARER_TOKEN Host: app.getcensus.com
Responses
200
Successfully retrieved the dataset
401
Invalid credentials for the requested resource.
403
You are not authorized to use this feature or the feature is not available for your organization.
404
Resource not found.
200
status
string
Outcome of the operation.
enum:
"success""not_found""error"
data
object
name
stringrequired
The name of the dataset
example:
Users
type
stringrequired
sql
Type of dataset
default:
sql
enum:
"sql"
id
integerrequired
Unique identifier for the dataset
example:
157
resource_identifier
stringrequired
Resource identifier for the dataset
example:
dataset:users
description
stringrequired
Optional description of the dataset
x-nullable:
true
example:
This dataset contains golden user records
created_at
stringrequired
Timestamp when the dataset was created
format:
date-time
updated_at
stringrequired
Timestamp when the dataset was last updated
format:
date-time
cached_record_count
integerrequired
Cached count of records in the dataset
x-nullable:
true
columns
arrayrequired
List of columns in the dataset
name
stringrequired
The name of the column
example:
email
data_type
stringrequired
The data type of the column
example:
string
can_be_upsert_key
booleanrequired
Indicates if the column can be used as an upsert key
example:
true
query
stringrequired
SQL query that defines the dataset
example:
SELECT id, name, email FROM users WHERE active = true
source_id
integerrequired
ID of the source connection
example:
123
group_id
stringrequired
The unique identifier of the group that this dataset's source connection belongs to.
example:
wandering_aimlessly
401
status
integer
HTTP status code.
enum:
"401"
403
status
integer
HTTP status code.
enum:
"403"
message
string
Error message.
404
status
integer
HTTP status code.
enum:
"404"
{ "status": "success", "data": { "name": "Users", "type": "sql", "id": 157, "resource_identifier": "dataset:users", "description": "This dataset contains golden user records", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "cached_record_count": 0, "columns": [ { "name": "email", "data_type": "string", "can_be_upsert_key": true } ], "query": "SELECT id, name, email FROM users WHERE active = true", "source_id": 123, "group_id": "wandering_aimlessly" } }