Skip to Content
Docs
ReferenceOrganise

Restore files and folders from the trash

POST
/restore_entries

Brings files and folders of a project the user can edit back from its Trash, with everything that was trashed inside the folders, as Restore in awen does. Pass the entry_ids trash_entries returned, within 30 days. Each comes back in its folder, or at the project root when that folder is gone. A folder is refused when another folder of its name now sits in the same place, and a memory when another of the user's memories took its name: rename that one first.

Needs a key with awen:write. Costs 2 units of the key's rate limit.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from Settings → Connected apps → API keys, sent as Authorization: Bearer awen_sk_…. Keep it on a server: a request from a web page is refused.

Request Body

application/json
  1. body
project_id*string

The project's project_id.

Match^[A-Za-z0-9_-]+$
Length1 <= length <= 128
entry_ids*array<>

The entry_id of each trashed file and folder to restore.

Items1 <= items <= 25

Response Body

The operation's answer.

application/json
  1. response
project_id*string
entry_ids*array<string>
entry_count*integer
Range0 <= value <= 9007199254740991
Example Request
curl -X POST 'https://app.awen.ai/api/v1/restore_entries' \  -H 'Content-Type: application/json' \  -d '{  "project_id": "string",  "entry_ids": [    "string"  ]}'
Example Response
{  "project_id": "string",  "entry_ids": [    "string"  ],  "entry_count": 0}