Skip to content

Trash or restore a file without changing its identity or storage charge

POST/v1/files/trash-operations

Authorization

AuthorizationBearer <token>

In: header

Request Body

application/json

Response Body

application/json

curl -X POST "https://example.com/v1/files/trash-operations" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "trash",
    "workplaceId": "4989ce91-52f9-461b-87fa-af1f28004fc0",
    "fileId": "a1c6a2ab-4b01-4253-b4c9-70e04b3b48fc",
    "expectedVersion": "d4872add-ad6c-489f-92b8-0d0c927185fe",
    "operationId": "3051932a-fdd2-48fa-b330-7e7d41535969"
  }'
{
  "operationId": "3051932a-fdd2-48fa-b330-7e7d41535969",
  "fileId": "a1c6a2ab-4b01-4253-b4c9-70e04b3b48fc",
  "version": "8b898373-21c7-4028-b85f-cc5068e68df9",
  "occurredAt": "2019-08-24T14:15:22Z",
  "state": "trashed",
  "trashExpiresAt": "2019-08-24T14:15:22Z"
}