Delete files from the data release collection.
Delete files from the Globus collection directory for a data release.
This endpoint takes a JSON payload containing a non-empty files_to_delete list naming the files to delete from the data release directory.
Each entry must be a plain file name, not a path. Entries containing / or \, and the entries "", "." and "..", are rejected. Deletes are not recursive, so directories -- including component directories -- cannot be deleted through this endpoint; delete a component with DELETE /component/{id} instead.
.. code-block::
{
"files_to_delete": [
"example.xml",
"data.csv"
]
}
The delete is submitted to Globus as an asynchronous task. The response data includes its task_id; poll the task's status with GET /data-release/files/task/{task_id} to confirm the files were removed.
Note that the data release's search index and distribution metadata are not updated by this endpoint. Reindex with POST /item/{item_id}/upload/index-files once the delete task has succeeded.
:param id: The ID of the data release. :param params: The JSON payload containing the files_to_delete list. :param token: A valid bearer token for the user. :returns: A success :class:HorizonAPIResponse whose data contains the Globus delete task_id. :raises NotFoundException: If the data release does not exist (404). :raises ForbiddenException: If the user lacks write access to the data release (403). :raises DeleteFilesException: If any entry in files_to_delete is not a plain file name (400).
Request
- Base URLhttps://data.usgs.gov (the document declares no server; this is the origin it was published from)
- AuthOAuth 2Authorization code: https://auth.globus.org/v2/oauth2/authorize?scope=openidToken URL: https://data.usgs.gov/datacatalog/api/auth/login
Path parameters
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.