Delete files from the data release component collection.
Delete files from the Globus collection directory for a data release component.
This endpoint takes a JSON payload containing a non-empty files_to_delete list naming the files to delete from the component directory, i.e. from <release_id>/<component_name>/.
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 cannot be deleted through this endpoint.
.. 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 component's search index and distribution metadata are not updated by this endpoint.
:param id: The ID of the data release component. :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 component does not exist (404). :raises ForbiddenException: If the user lacks write access to the component (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.