Zum Inhalt springen

Reindex a file

POST
/files/{fileId}/reindex
curl --request POST \
--url https://firma.company-gpt.com/companygpt/rag/api/files/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reindex \
--header 'Authorization: Bearer <token>'

Queue a file for reprocessing. Requires write access to the file’s collection. For manually uploaded files (whose blob is deleted after indexing), the file must be re-uploaded instead — this returns 400 in that case.

fileId
required
string format: uuid

File UUID

Reindex job queued

Media typeapplication/json

Response for POST /files/{fileId}/reindex

object
status
required
string
jobId
required
string format: uuid
file
required

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
Example
{
"status": "queued",
"file": {
"status": "pending"
}
}

File has no stored blob and must be re-uploaded to reindex

Media typeapplication/json
object
error
required

Error message

string
Examplegenerated
{
"error": "example"
}

Unauthorized

Media typeapplication/json
object
error
required

Error message

string
Examplegenerated
{
"error": "example"
}

Access denied (write permission required)

Media typeapplication/json
object
error
required

Error message

string
Examplegenerated
{
"error": "example"
}

File not found

Media typeapplication/json
object
error
required

Error message

string
Examplegenerated
{
"error": "example"
}