Zum Inhalt springen

List files

GET
/files
curl --request GET \
--url 'https://firma.company-gpt.com/companygpt/rag/api/files?status=pending' \
--header 'Authorization: Bearer <token>'

Get paginated list of files accessible to the authenticated user. Results are filtered based on the user’s collection permissions.

page
integer
>= 1

Page number (1-indexed, default 1)

pageSize
integer
>= 1 <= 100

Items per page (default 20, max 100)

collectionIds
string

Comma-separated list of collection UUIDs to filter by (intersected with the caller’s accessible collections)

status
string
Allowed values: pending indexed indexed_with_warning failed

Filter by file status

search
string

Case-insensitive substring match on file name

Successful response

Media typeapplication/json

Paginated list of files (handlers.FileListResponse)

object
files
required
Array<object>

File metadata (mirrors handlers.FileInfo)

object
id
required

Unique file identifier

string format: uuid
name
required

Original file name

string
blobPath
required

Path in blob storage

string
sizeBytes

File size in bytes

integer format: int64
nullable
contentType

MIME type

string
nullable
status
required

File processing status

string
Allowed values: pending indexed indexed_with_warning failed
collectionId

Associated collection ID

string format: uuid
nullable
collectionName

Associated collection name

string
nullable
createdAt
required

ISO 8601 creation timestamp

string format: date-time
updatedAt
required

ISO 8601 last update timestamp

string format: date-time
lastIndexedAt

ISO 8601 last indexing timestamp

string format: date-time
nullable
sourceMetadata

Source-specific metadata (ACL fields, SharePoint item info, etc.); omitted/empty for files with no metadata

object
key
additional properties
any
total
required
integer
page
required
integer
pageSize
required
integer
totalPages
required
integer
Example
{
"files": [
{
"status": "pending"
}
]
}

Unauthorized

Media typeapplication/json
object
error
required

Error message

string
Examplegenerated
{
"error": "example"
}

Server error

Media typeapplication/json
object
error
required

Error message

string
Examplegenerated
{
"error": "example"
}