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",
  "data": {
    "type": "sql",
    "query": "SELECT id, name, email FROM users WHERE active = true",
    "source_id": 123,
    "name": "Users",
    "id": 157,
    "resource_identifier": "dataset:deduplicated_users",
    "description": "This dataset contains golden user records",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "cached_record_count": 123,
    "columns": [
      {
        "name": "email",
        "data_type": "string"
      }
    ]
  }
}

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

Response

200
application/json

Successfully updated the dataset

The response is of type object.