Skip to Content
Docs
ReferenceRead

List a folder

POST
/list_folder

Lists the folders and files directly inside a project folder, in name order, 50 at a time. Omit folder_id for the project root. Each item names its Drive entry (entry_id), its content (media_id) and its saved bytes (revision_id); pass its id to fetch to read it. Pass next_cursor back as cursor for the next page.

Needs a key with awen:read. Costs 1 unit 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, from list_projects or search.

Match^[A-Za-z0-9_-]+$
Length1 <= length <= 128
folder_id?string

A folder's entry_id; omit for the project root.

Match^[A-Za-z0-9_-]+$
Length1 <= length <= 128
cursor?string
Length1 <= length <= 32768

Response Body

The operation's answer.

application/json
  1. response
project_id*string
project_name*string
folder_id*string|null
folder_name*string|null
path*string
items*array<>
total_count*integer
Range0 <= value <= 9007199254740991
next_cursor*string|null
Example Request
curl -X POST 'https://app.awen.ai/api/v1/list_folder' \  -H 'Content-Type: application/json' \  -d '{  "project_id": "string"}'
Example Response
{  "project_id": "string",  "project_name": "string",  "folder_id": "string",  "folder_name": "string",  "path": "string",  "items": [    {      "id": "string",      "entry_id": "string",      "kind": "folder",      "name": "string",      "media_id": "string",      "revision_id": "string",      "item_count": 0,      "url": "string"    }  ],  "total_count": 0,  "next_cursor": "string"}