Content Trash
When media content is deleted in Fastevo MP2 (except for content in pendingUpload or queued status, which gets permanently deleted immediately), it is moved to a "trash" area for 30 days. During this period, items remain in pendingDeletion status. If not restored within 30 days, the items are permanently deleted.
This page documents how to work with trashed content. For general content attributes and structure, please refer to the Content Management documentation.
Getting Trashed Content
To retrieve a list of trashed media contents, perform a GET request to:
GET https://api.fastevo.net/api/v1/projects/mediaProtection/trashQuery Parameters
In most cases, this endpoint does not require additional query parameters to function. Pagination parameters such as page and limit may be available if you need them.
(If you need sorting, filtering, and other parameters, they may be introduced in future enhancements.)
Example Response
{
"currentPage": 1,
"totalPages": 1,
"totalRecords": 1,
"data": [
{
"_id": "67d9daf57ec087aa6e1299f8",
"tags": [],
"poster": {},
"createdAt": "2025-03-18T20:43:33.072Z",
"contentType": "audio",
"durationInSeconds": 54,
"status": "pendingDeletion",
"lifecycleState": "trashed",
"watermarkProfile": "",
"videoQualities": [],
"folderPath": "/",
"deletionInfo": {
"scheduledDeletionAt": "2025-04-17T21:36:04.755Z",
"recoveryFolderPath": "prueba/carpeta/123/imports/",
"recoveryStatus": "ready"
},
"engageKit": [
{
"fileType": "autoSnapshot",
"signedUrl": "string"
}
]
}
]
}Explanation of Fields
All standard fields (e.g., _id, contentType, status, etc.) match those documented in the Content Management page. However, when content is in trash:
- status is always
pendingDeletion. - lifecycleState describes the current trash or restore operation. Unlike
status, it lets clients decide whether to show progress or a restore action. - deletionInfo:
- scheduledDeletionAt: The date and time at which the content will be permanently removed if not restored before then.
- recoveryFolderPath: The folder path in which the content will be placed upon restoration.
- recoveryStatus: The status the content will have after being restored. Typically the status before it was deleted (e.g.,
ready).
Lifecycle States
lifecycleState | Meaning | Recommended UI |
|---|---|---|
trashing | The delete request was accepted and Fastevo is moving the clear-delivery files into recovery storage. | Offer Restore as an undo action; the API queues it durably. |
trashed | The content is fully quarantined and can be restored immediately. | Offer Restore. |
restoreQueued | Restore was requested while trashing was still finishing. | Show Restoration requested and poll. |
restoring | Fastevo is moving files back and invalidating delivery caches. | Show Restoring and poll. |
Active contents returned by variant endpoints use lifecycleState: "active".
Restoring Trashed Content
To restore a piece of content from trash, perform a POST request to:
POST https://api.fastevo.net/api/v1/projects/mediaProtection/trash/{contentId}/restoreReplace {contentId} with the actual unique identifier of the trashed media content.
The restore endpoint is safe to call as soon as a deletion returns 202, even
while lifecycleState is still trashing. Fastevo stores the restore intent
durably and automatically starts it after quarantine completes.
Accepted Response
Clear-delivery restore normally returns 202 Accepted before S3 and
CloudFront work completes:
{
"success": true,
"status": "pendingDeletion",
"lifecycleState": "restoreQueued"
}lifecycleState is restoreQueued when quarantine must finish first and
restoring when the restore worker already owns the operation. Repeat requests
for either state return the same 202 without starting a second restore or
changing the active worker's ownership lease.
Poll the trash listing or the content's protection-variant endpoint. Restore is
complete when the item leaves trash and its variant reports
lifecycleState: "active"; its content status returns to
deletionInfo.recoveryStatus.
Other compatible responses are:
200 OK: the content was already restored; the response includes its active status andlifecycleState: "active".204 No Content: a legacy or immediately restorable non-clear content was restored synchronously.409 Conflict: another incompatible operation won the race. Lifecycle conflicts includecode: "CONTENT_LIFECYCLE_CONFLICT"and an authoritativedetails.lifecycleState; compatible legacy operations may return the standard conflict shape without those optional fields. Refresh the content before deciding the next action.
Permanent Deletion
After 30 days in trash, any content not restored is automatically and permanently deleted by the system. There is no self-service recovery after permanent deletion.