List a folder's files + documents
GET
/api/v1/folders/{folderId}/documents
const url = 'https://api.langparse.dev/api/v1/folders/example/documents?expand=documents.model&fields%5Bmodel%5D=id%2Cname%2Cversion';const options = {method: 'GET', headers: {'X-Api-Key': '<X-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”folderId
required
string
Folder id or name.
Query Parameters
Section titled “Query Parameters”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.model → model:{id,name}. Shallow (one hop).
Example
documents.modelfields[model]
string
Fields to return for an expanded model (allowed: id, name, version, geometry). Default: id,name.
Example
id,name,versionResponses
Section titled “Responses”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
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