Remove file
DELETE /data/{id}
Removes file specified by $FILE_ID. In case of a directory, all its children are recursively removed - note that the operation will fail part-way if the client does not have permissions to remove some of the nested files/directories.
Example cURL requests
Remove specific file
curl -H "X-Auth-Token: $TOKEN" -X DELETE "https://$HOST/api/v3/oneprovider/data/$FILE_ID"
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string File or directory Id |
Request Examples
Shell
oneprovider-rest-cli removeFile id=$FILE_IDResponses
application/json
204
The file has been removed.
400
Invalid request.
Property
Type & Description
error
string
Identifier representing internal error code.
error_description
string
Detailed error message.
Example
application/json
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
} 403
Forbidden request.
Property
Type & Description
error
string
Identifier representing internal error code.
error_description
string
Detailed error message.
Example
application/json
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
} 404
File not found.
Property
Type & Description
error
string
Identifier representing internal error code.
error_description
string
Detailed error message.
Example
application/json
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
} 500
Internal server error.
Property
Type & Description
error
string
Identifier representing internal error code.
error_description
string
Detailed error message.
Example
application/json
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}