Endpoints to manage datasets
Refs https://redmine.teklia.com/issues/3653
We need a few new endpoints (in category dataset
) to manage the brand new datasets:
-
ListCorpusDataset
must provide a paginated list of all datasets in a given corpus- accessible to corpus guest, contributors and admins
- output fields: id, name, description, state
-
CreateDataset
must allow a corpus contributor or admin to create a new dataset- input fields: name, description, sets
- output fields: same + ID
- state is always open upon creation
- creator us current user
-
UpdateDataset
must allow a corpus contributor or admin to edit an existing dataset- input fields: name, description, sets, state
-
⚠ state is only modifiable by a ponos task (which uses that dataset, if you are after #1517 (closed))
-
DeleteDataset
must allow a corpus admin to delete an existing dataset, only if the dataset state is open