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.
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: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.