Skip to main content
PATCH
/
datasets
/
{dataset_id}
Update dataset
curl --request PATCH \
  --url https://app.getcensus.com/api/v1/datasets/{dataset_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Users",
  "description": "This dataset contains golden user records",
  "query": "SELECT id, name, email FROM users WHERE active = true"
}
'
{
  "status": "updated"
}

Authorizations

Authorization
string
header
required

Bearer token for the current workspace. Can be retrieved from the Workspace's settings page.

Path Parameters

dataset_id
integer
required

ID of the dataset

Body

application/json
name
string

The name of the dataset

Example:

"Users"

description
string

Optional description of the dataset

Example:

"This dataset contains golden user records"

query
string

SQL query that defines the dataset

Example:

"SELECT id, name, email FROM users WHERE active = true"

Response

Successfully updated the dataset

status
enum<string>

Outcome of the operation.

Available options:
updated,
not_found,
error
Example:

"updated"

data
SQL · object