Zum Inhalt springen

List indexing jobs

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

Get paginated list of indexing jobs with optional filtering, scoped to the caller’s accessible collections

page
integer
>= 1

Page number (default 1)

pageSize
integer
>= 1 <= 100

Items per page (default 20, max 100)

status
string
Allowed values: queued running completed failed cancelled

Filter by job status

collectionIds
string

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

List of jobs

Media typeapplication/json

Paginated list of jobs (handlers.JobListResponse)

object
jobs
required
Array<object>

Indexing job information (handlers.JobInfo)

object
id
required

Unique job identifier

string format: uuid
fileId
required

Associated file ID

string format: uuid
fileName

Name of the file being processed (list endpoint only)

string
nullable
collectionId

Associated collection ID (list endpoint only)

string format: uuid
nullable
collectionName

Associated collection name (list endpoint only)

string
nullable
type
required

Job action type (JSON key is “type”; the Go field is named Action)

string
Allowed values: index reindex delete rebuild_fts
status
required

Current job status

string
Allowed values: queued running completed failed cancelled
retryCount
required

Number of retries attempted

integer
maxRetries
required

Maximum allowed retries

integer
error

Error message if job failed

string
nullable
createdAt
required

ISO 8601 creation timestamp

string format: date-time
startedAt

ISO 8601 start timestamp

string format: date-time
nullable
completedAt

ISO 8601 completion timestamp

string format: date-time
nullable
queuePosition

1-based position in the global FIFO queue; present only for jobs currently in ‘queued’ status (list endpoint only)

integer
nullable
total
required
integer
page
required
integer
pageSize
required
integer
totalPages
required
integer
statusCounts
object
queued
required
integer
running
required
integer
completed
required
integer
failed
required
integer
total
required
integer
queueStats

Absent when the best-effort queue-stats query fails

object
queued
required
integer
running
required
integer
deletableFailedCount
required

Write-scoped (admin-role collections only) count of failed jobs — what “Delete/Retry All Failed” can actually act on. Distinct from statusCounts.failed, which is read-scoped for the informational badge.

integer
Example
{
"jobs": [
{
"type": "index",
"status": "queued"
}
]
}

Unauthorized

Media typeapplication/json
object
error
required

Error message

string
Examplegenerated
{
"error": "example"
}