dataset.py

Dataset requests.

dataset.build_dataset_info(identifier: str)[source]

Query for a dataset from the database.

Parameters

identifier (str) – The uuid of the dataset.

Returns

The prepared dataset entry.

Return type

dict

dataset.delete_dataset(identifier: str)[source]

Delete a dataset.

Can be deleted only by editors or user with DATA_MANAGEMENT permissions.

Parameters

identifier (str) – The dataset uuid.

dataset.get_dataset(identifier)[source]

Retrieve the dataset with uuid <identifier>.

Parameters

identifier (str) – uuid for the wanted dataset

Returns

json structure for the dataset

Return type

flask.Response

dataset.get_dataset_log(identifier: str = None)[source]

Get change logs for the user entry with uuid identifier.

Can be accessed by editors with DATA_EDIT and admin (DATA_MANAGEMENT).

Logs for deleted datasets cannot be accessed.

Parameters

identifier (str) – The uuid of the dataset.

Returns

Logs as json.

Return type

flask.Response

dataset.info_add_dataset()[source]

Return information about the correct endpoint for adding datasets.

dataset.list_datasets()[source]

Provide a simplified list of all available datasets.

dataset.list_user_data()[source]

List all datasets belonging to current user.

dataset.update_dataset(identifier)[source]

Update a dataset with new values.

Parameters

identifier (str) – uuid for the wanted dataset

Returns

success: 200, failure: 400

Return type

flask.Response