Skip to content

List a folder's files + documents

GET
/api/v1/folders/{folderId}/documents
curl --request GET \
--url 'https://api.langparse.dev/api/v1/folders/example/documents?expand=documents.model&fields%5Bmodel%5D=id%2Cname%2Cversion' \
--header 'X-Api-Key: <X-Api-Key>'

The path segment accepts a folder id OR a folder name (URL-encoded), e.g. /v1/folders/Website%20Examples/documents.

folderId
required
string

Folder id or name.

expand
string

Comma-separated relation paths to expand. Each relation (e.g. a document’s model) is an id string by default; expanding REPLACES it in place with a nested object — e.g. documents.modelmodel:{id,name}. Shallow (one hop).

Example
documents.model
fields[model]
string

Fields to return for an expanded model (allowed: id, name, version, geometry). Default: id,name.

Example
id,name,version

Files filed into the folder, each with its related document(s)

Media typeapplication/json
object
folder
object
id
string
name
string
path
string
items
Array<object>
object
id
string
fileName
string
filedAt
string
documents
Array<object>
object
id
string
model

Model id string, or { id, name } when ?expand=documents.model.

string
nullable
status
string
createdAt
string
Examplegenerated
{
"folder": {
"id": "example",
"name": "example",
"path": "example"
},
"items": [
{
"id": "example",
"fileName": "example",
"filedAt": "example",
"documents": [
{
"id": "example",
"model": "example",
"status": "example",
"createdAt": "example"
}
]
}
]
}

Missing or invalid API key

Folder not found