Skip to content

Core dataset

Core dataset operations.

Fields#

  • pk: int
  • name: str
  • description: str
  • version: int
  • previous_version: int
  • project: project ID
  • licence: license ID
  • tags: str
  • is_public: bool
  • creator: user ID
  • creation_time: timestamp
  • deletion_time: timestamp
  • files (object):

    • file name (str): cache ID (str)

Actions#

List#

Lists the datasets present on the server.

Method#

POST

URL#

/v1/datasets/list

Permissions#
Body (optional)#
Response#
  • A JSON array of objects containing each dataset's fields

Create#

Creates a new dataset.

Method#

POST

URL#

/v1/datasets/create

Body#
Permissions#
Response#
  • A JSON object containing the newly-created dataset's fields

Retrieve#

Gets the information about a specific dataset.

Method#

GET

URL#

/v1/datasets/{PK}

Parameters#
  • PK: int (primary key of the dataset)
Permissions#
Response#
  • A JSON object containing the dataset's fields

Update#

Updates a specific dataset.

Method#

PUT

URL#

/v1/datasets/{PK}

Parameters#
  • PK: int (primary key of the dataset)
Body#
Permissions#
Response#
  • A JSON object containing the updated dataset's fields

Partial Update#

Updates a specific dataset.

Method#

PATCH

URL#

/v1/datasets/{PK}

Parameters#
  • PK: int (primary key of the dataset)
Body#
  • name (optional): str
  • description (optional): str
  • project (optional): project ID
  • licence (optional): license ID
  • tags (optional): str
  • is_public (optional): bool
Permissions#
Response#
  • A JSON object containing the updated dataset's fields

Destroy#

Flags a dataset as deleted, it can be reinstated. To permanently delete, see Hard Delete.

Method#

DELETE

URL#

/v1/datasets/{PK}

Parameters#
  • PK: int (primary key of the dataset)
Permissions#

Clear Dataset#

Removes all meta-data and annotations from a dataset.

Method#

DELETE

URL#

/v1/datasets/{PK}/clear

Parameters#
  • PK: int (primary key of the dataset)
Permissions#
Response#
  • A JSON object containing the cleared dataset's fields

Merge#

Merges the files from a source dataset into a target dataset.

Method#

POST

URL#

/v1/datasets/{PK}/merge/{OTHER}

Parameters#
  • PK: int (primary key of the target dataset)
  • OTHER: int (primary key of the source dataset)
Body#
  • delete: bool (whether to delete the source dataset after the merge)
  • hard (optional): bool (whether to hard-delete, ignored if delete is false, default is false)
Permissions#
Response#
  • A JSON object containing the target dataset's fields

Download#

Downloads a dataset.

Method#

POST

URL#

/v1/datasets/{PK}/download

Parameters#
  • PK: int (primary key of the dataset)
Body#
  • params (optional): JSON Object (must be empty if supplied, ignored)
  • filetype (optional): str (one of "zip" or "tar.gz", defaults to "zip")
Permissions#
Response#
  • The dataset as an archive, containing the files in the dataset.

Copy#

Creates a copy of a dataset.

Method#

POST

URL#

/v1/datasets/{PK}/copy

Parameters#
  • PK: int (primary key of the dataset)
Body#
  • new_name (optional): str (creates a new dataset if supplied, or a new version of the source dataset if not)
  • only_files (optional): array of str (the files to include in the copy, or all files if omitted)
Permissions#
Response#
  • A JSON object containing the newly-created dataset's fields

Add File#

Adds a file to a dataset.

Method#

POST

URL#

/v1/datasets/{PK}/files/{FILENAME}

Parameters#
  • PK: int (primary key of the dataset)
  • FILENAME: str (name of the new file)
Body#

File binary data.

Permissions#
Response#
  • filename: str
  • handle: str (handle to the file's data on the server)

Add Files#

Adds files to a dataset.

Method#

POST

URL#

/v1/datasets/{PK}/files-multi

Parameters#
  • PK: int (primary key of the dataset)
Body#

Binary data of a zip archive containing the files to add.

Permissions#
Response#
  • array of:

    • filename: str
    • handle: str (handle to the file's data on the server)

Get File#

Gets a file from a dataset.

Method#

GET

URL#

/v1/datasets/{PK}/files/{FILENAME}

Parameters#
  • PK: int (primary key of the dataset)
  • FILENAME: str (name of the file)
Permissions#
Response#

File binary data.

Delete File#

Deletes a file from the dataset.

Method#

DELETE

URL#

/v1/datasets/{PK}/files/{FILENAME}

Parameters#
  • PK: int (primary key of the dataset)
  • FILENAME: str (name of the file)
Permissions#
Response#
  • filename: str
  • handle: str (handle to the file's data on the server)

Set Metadata#

Sets the metadata for a file in a dataset.

Method#

POST

URL#

/v1/datasets/{PK}/metadata/{FILENAME}

Parameters#
  • PK: int (primary key of the dataset)
  • FILENAME: str (name of the file)
Body#
  • metadata: str
Permissions#
Response#
  • metadata: str

Get Metadata#

Gets the metadata for a file in a dataset.

Method#

GET

URL#

/v1/datasets/{PK}/metadata/{FILENAME}

Parameters#
  • PK: int (primary key of the dataset)
  • FILENAME: str (name of the file)
Permissions#
Response#
  • metadata: str

Get All Metadata#

Gets the metadata for all files in a dataset.

Method#

GET

URL#

/v1/datasets/{PK}/metadata

Parameters#
  • PK: int (primary key of the dataset)
Permissions#
Response#

JSON object from filename to metadata

Hard Delete#

Permanently deletes a dataset. For soft-deletion, see Destroy.

METHOD#

DELETE

URL#

/v1/datasets/{PK}/hard

Parameters#
  • PK: int (primary key of the dataset)
Permissions#
Response#
  • JSON object containing the fields of the hard-deleted dataset.

Reinstate#

Undeletes a previously soft-deleted dataset.

Method#

DELETE

URL#

/v1/datasets/{PK}/reinstate

Parameters#
  • PK: int (primary key of the dataset)
Permissions#
Response#
  • JSON object containing the fields of the reinstated dataset.