Delete Item
Delete one or many files or folders.
Endpoint
http
DELETE /api/v1/itemsParameters
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
items | array | yes | The array of the items |
items.*.force_delete | boolean | yes | Determine how to delete the item. If value is set to yes, then the item will be immediately deleted from the database and storage. If false, the item will be deleted softly. |
items.*.type | string | yes | The type of the deleting item. Allowed types are folder or file. |
items.*.id | uuid | yes | The ID of the item. |
Request example
sh
curl --location --request DELETE 'https://files.ro/api/v1/items' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--data-raw '{
"items": [
{
"force_delete": false,
"type": "folder",
"id": "{item_id}"
}
]
}'Response
json
{
"type": "success",
"message": "Items was successfully deleted."
}json
{
"type": "error",
"message": "You are not authorized"
}json
{
"message": "The given data was invalid.",
"errors": {
"field": [
"The field is required."
]
}
}