v2/async/files/delete
This call lets you perform perform an asynchronous bulk deletion of files or folders. Deleting folders which aren't empty is allowed.
Request
https://cavatica-api.sbgenomics.com/v2/async/files/deleteExample request
POST /v2/async/files/delete
Host: cavatica-api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5336ea8f1273259740f75curl -X POST \
https://cavatica-api.sbgenomics.com/v2/async/files/delete \
-H 'Content-Type: application/json' \
-H 'X-SBG-Auth-Token: d32c2976ffc04d0eb90c6c4fb2c0a465' \
-d '{
"items": [
{
"file": "5c6d3f30e4b038563238932f"
},
{
"file": "5c6d3f30e4b038563238932b"
},
{
"file": "5c6d3f30e4b0385632389331"
}
]
}'Header Fields
Name | Description |
|---|---|
X-SBG-Auth-Token required | Your CAVATICA authentication token. |
Content-Type |
|
Request body
Key | Data type | Description |
|---|---|---|
| object | The ID of the file or folder you are deleting. Use the API call for listing all files to obtain the file or folder ID. Deleting folders which are not empty is allowed. |
{
"items": [
{
"file": "5c6d3f30e4b038563238932f"
},
{
"file": "5c6d3f30e4b038563238932b"
},
{
"file": "5c6d3f30e4b0385632389331"
}
]
}Response
See a list of CAVATICA-specific response codes that may be contained in the body of the response.
Response body
Key | Data type of value | Description of value |
|---|---|---|
| string | ID of this delete job. |
| string | The result of the job if available at the time the call is made. Use the details of a deletion job to see more information. |
| string | The type of job, which is |
| string | The state is SUBMITTED at the time of making this call. |
| string | The number of failed files if that information is available at the time of the call. You can get details of a copy job with a dedicated call. |
| string | The number of completed files if that information is available at the time of the call. You can get details of a copy job with a dedicated call. |
| string | The number of failed files if that information is available at the time of the call. You can get the details of a deletion job with a dedicated call. |
Example response body
{
"href": "https://cavatica-api.sbgenomics.com/v2/async/files/delete/70714077692891136",
"id": "70714077692891136",
"result": [],
"type": "DELETE",
"state": "SUBMITTED",
"failed_files": 0,
"completed_files": 0,
"total_files": 0
}