Create a new dataset Public Preview
Create a new dataset in the current workspace. Supports SQL datasets.
Request schema
Header parameters
HTTP: basicAuth
HTTP AuthorizationScheme: basic
Request
The name of the dataset
Type of dataset
Optional description of the dataset
SQL query that defines the dataset
The unique identifier of the group whose connection this SQL dataset's query will run against.
POST /api/v2/datasets HTTP/1.1 Authorization: Bearer REPLACE_BEARER_TOKEN Content-Type: application/json Host: app.getcensus.com Content-Length: 205 { "name": "Users", "type": "sql", "description": "This dataset contains golden user records", "query": "SELECT id, name, email FROM users WHERE active = true", "group_id": "wandering_aimlessly" }
Responses
201
Outcome of the operation.
The name of the dataset
Type of dataset
Unique identifier for the dataset
Resource identifier for the dataset
Optional description of the dataset
Timestamp when the dataset was created
Timestamp when the dataset was last updated
Cached count of records in the dataset
List of columns in the dataset
The name of the column
The data type of the column
Indicates if the column can be used as an upsert key
SQL query that defines the dataset
ID of the source connection
The unique identifier of the group that this dataset's source connection belongs to.
400
The outcome of the request
The reason the request failed
401
HTTP status code.
403
HTTP status code.
Error message.
{ "status": "created", "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" } }