longrun.
List files

Docs

Files / List files

List files

List files in your workspace. Supports limit, offset, q, and category query parameters.

GEThttps://uselongrun.app/v1/files
Request
curl --request GET "https://uselongrun.app/v1/files" \
  --header "Authorization: Bearer ${API_KEY}"

Request parameters

query
limitintegerOptional

Maximum number of results to return in this request. Use offset to request the next page.

Example
20

Default: 200

Minimum: 1

Maximum: 200

query
offsetintegerOptional

Number of results to skip. For a second page of 20 results, use 20.

Example
20

Default: 0

Minimum: 0

Maximum: 1000000

query
qstringOptional

Search text used to narrow the returned results.

Example
"receipt"

Default: ""

Maximum length: 200 characters.

query
categoryobjectOptional

Only return items in this category. Choose an allowed category below.

Example
"File"

Allowed values: File PDF JSON File CSV Image Video Audio Archive XLSX

query
categoriesstringOptional

Comma-separated file categories to include.

Example
"PDF,Image"

Maximum length: 200 characters.

query
scopeobjectOptional

Whether to list all files, saved files, or temporary files.

Example
"saved"

Default: "all"

Allowed values: all saved temporary

query
availablebooleanOptional

Only include files that are still available for use.

Example
true

Default: false

query
searchstringOptional

Search text used to find matching files; this overrides q when both are supplied.

Example
"receipt"

Maximum length: 200 characters.

Returns

Returns HTTP 200.

items[].idstring
items[].namestring
items[].mime_typestring
items[].sizeinteger

Minimum: 0

items[].storagestring
items[].urlstringnull
items[].accessstring
items[].expires_atstringnull
items[].url_expires_atstringnull
items[].categorystring
items[].sourcestring
items[].created_atstring
items[].source_run_idstringnull
items[].source_namestring
items[].savedboolean
items[].retainedboolean
items[].expiredboolean