Skip to Content
Docs
ReferenceRead

Download files and folders

POST
/download

Gives one link that downloads files and folders of a project the user can open, as Download in awen does: a ZIP of up to 50 files, counting every file inside the folders, which keep their paths (one file alone downloads as itself). Pass each item's entry_id from list_folder. convert_to saves every image that converts as PNG or JPEG and keeps every other file as stored. Files still being made inside a folder are left out and counted in skipped. The link is download_url, valid until expires_at (5 minutes): it opens these files without signing in, so give it only to the user. Call again for a fresh link.

Needs a key with awen:read. Costs 4 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
items*array<>

The entry_id of each file and folder to download, from list_folder.

Items1 <= items <= 25
convert_to?string

Saves the images as PNG or JPEG; omit for the originals.

Value in"png""jpeg"

Response Body

The operation's answer.

application/json
  1. response
project_id*string
download_url*string
expires_at*string
skipped*
Example Request
curl -X POST 'https://app.awen.ai/api/v1/download' \  -H 'Content-Type: application/json' \  -d '{  "project_id": "string",  "items": [    "string"  ]}'
Example Response
{  "project_id": "string",  "download_url": "string",  "expires_at": "string",  "skipped": {    "property1": 1,    "property2": 1  }}