botruntime
API ReferenceFiles API

List Files

List files for bot

GET
/v1/files

Query Parameters

nextToken?string

Provide the meta.nextToken value provided in the last API response to retrieve the next page of results

pageSize?integer

Number of items to return per page (default 20, max 100)

sortField?string

Sort results by this field

Value in

  • "key"
  • "size"
  • "createdAt"
  • "updatedAt"
  • "status"
sortDirection?string

Sort results in this direction

Value in

  • "asc"
  • "desc"
tags?unknown

Filter files by tags. Tags should be passed as a URL-encoded JSON object of key-value pairs that must be present in the tags of a file. An array of multiple string values for the same key are treated as an OR condition. To exclude a value, express it as an object with a nested not key with the string or string-array value(s) to exclude.

ids?array<string>

Filter files by IDs.

Itemsitems <= 50
indexed?boolean

Filter files by indexing state

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/files"
{  "files": [    {      "id": "string",      "botId": "string",      "key": "string",      "url": "string",      "size": 0,      "contentType": "string",      "tags": {        "property1": "string",        "property2": "string"      },      "metadata": {        "property1": null,        "property2": null      },      "createdAt": "string",      "updatedAt": "string",      "accessPolicies": [        "integrations"      ],      "index": true,      "status": "upload_pending",      "failedStatusReason": "string",      "expiresAt": "string",      "owner": {        "type": "bot",        "id": "string",        "name": "string",        "alias": "string"      },      "indexingStack": "v1"    }  ],  "meta": {    "nextToken": "string"  }}
{  "files": [    {      "id": "string",      "botId": "string",      "key": "string",      "url": "string",      "size": 0,      "contentType": "string",      "tags": {        "property1": "string",        "property2": "string"      },      "metadata": {        "property1": null,        "property2": null      },      "createdAt": "string",      "updatedAt": "string",      "accessPolicies": [        "integrations"      ],      "index": true,      "status": "upload_pending",      "failedStatusReason": "string",      "expiresAt": "string",      "owner": {        "type": "bot",        "id": "string",        "name": "string",        "alias": "string"      },      "indexingStack": "v1"    }  ],  "meta": {    "nextToken": "string"  }}