ResonantGeoData / RD-OASIS

ResonantGeoData OASIS Deployment
Apache License 2.0
2 stars 1 forks source link

Add specific dataset file add/remove endpoints #23

Closed jjnesbitt closed 2 years ago

jjnesbitt commented 2 years ago

Currently, the only way to modify which files are in a dataset is to submit a PUT, PATCH, or DELETE request to the dataset detail view, which specifying all of the files which should now belong in the files field. For some reason, this is very slow. An approach that might be more performant is to add an endpoint for adding/removing files. I was thinking of the following structure for the request payload:

{
  "insert": [
    1,
    2
  ],
  "delete": [
    12,
    21
  ]
}

Additionally, a /clear endpoint could be added onto the dataset view, which as a convenience, would just clear the dataset in one request, with no payload.