Updating a Dataset
Last updated
Was this helpful?
Last updated
Was this helpful?
A dataset is a JSON document. It contains object keys, such as resources, and string keys such as the title and description. The fields "id" and "readonly" are immutable.
GET
https://data.website/api/dataset/:slug
Read a dataset as a JSON object. Includes a `readonly` field, which cannot be patched, providing supporting database information.
slug
string
URL slug of the dataset. Also accepts the UUID.
PATCH
https://data.website/api/dataset/:slug
Accepts a JSON patch (http://jsonpatch.com) to update the dataset. Can edit or add any valid field, except the `readonly` field.
slug
string
URL slug of the dataset. Also accepts the UUID.
Content-Type
string
application/json
JSON Patch
string
Request body must be a well-formed JSON patch
POST
https://data.website/api/dataset
Submit a JSON document to create a new dataset. The API will return HTTP 400 with a list of errors if it fails validation.
title
string
Dataset title
slug
string
Dataset URL slug
parent
string
ID of the parent team
POST
https://data.website/api/dataset/:slug/resources
Use a regular HTTP form to upload a file to a dataset.
slug
string
URL slug of the dataset. Also accepts the UUID.
file
object
HTTP file upload
title
string
Title of the new resource
description
string
Descriptive text of the new resource
POST
https://data.website/api/dataset/:slug/resources/:id
slug
string
URL slug of the dataset. Also accepts the UUID.
id
string
UUID of the resource
file
object
HTTP file upload
title
string
Optionally overwrite the title
description
string
Optionally overwrite the description
You can upload larger files directly to the storage backend by fetching a presigned link. This is how the web interface handles file uploads.
This offers much higher uploads speeds, but it takes three requests:
POST
to the API to fetch a presigned link.
POST
to the storage backend to upload the file.
PATCH
the dataset API to attach the file.
To upload files over 100MB, see .