Skip to navigation

Create a dataset

View as Markdown

Creates a dataset. Rejects a query that fails to run against the organization’s data. If a dataset with the same name, query, and default parameters exists, returns it instead.

Requires an API key with the write scope.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
namestringRequired1-255 characters
Name, unique among the organization's datasets.
querystringRequired

SQL query: a single read-only SELECT statement. Reference parameters as :name.

descriptionstring or nullOptional
Description shown with the dataset.
default_parametersmap from strings to any or nullOptional
Default values for the query's parameters, keyed by name. Give one for every parameter the query uses.

Response

OK
idstringformat: "uuid"
namestring
publish_statusenum
Whether an authored object is finished enough for others to rely on. In review marks a draft its author considers ready for an admin to publish.
Allowed values:
date_updateddatetime
descriptionstring or nullOptional
querystring or nullOptional
default_parametersmap from strings to any or nullOptional
userobject or nullOptional
access_levelenum or nullOptional
What a grant lets its grantee do. Manage includes edit and adds sharing, archiving and deleting.
Allowed values:

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error
503
Service Unavailable Error