Skip to main content

TaskResponse

attemptsinteger<int32>required

Number of execution attempts

Example: 0
bookIdstring,null<uuid>nullable

Associated book ID (if applicable)

bookTitlestring | nullnullable

Resolved title of the associated book (from book_metadata.title). Populated only when the task is book-scoped and metadata exists.

completedAtstring,null<date-time>nullable

When task execution completed

createdAtstring<date-time>required

When the task was created

Example: 2024-01-15T10:00:00Z
idstring<uuid>required

Unique task identifier

Example: 550e8400-e29b-41d4-a716-446655440000
lastErrorstring | nullnullable

Error message from last failed attempt

libraryIdstring,null<uuid>nullable

Associated library ID (if applicable)

Example: 550e8400-e29b-41d4-a716-446655440001
libraryNamestring | nullnullable

Resolved name of the associated library (from libraries.name). Populated only when the task is library-scoped.

lockedBystring | nullnullable

Worker ID that has locked this task

Example: worker-1
lockedUntilstring,null<date-time>nullable

When the lock expires

maxAttemptsinteger<int32>required

Maximum number of allowed attempts

Example: 3
params

Task-specific parameters

priorityinteger<int32>required

Priority level (higher = more urgent)

Example: 0
result

Task execution result

scheduledForstring<date-time>required

When the task is scheduled to run

Example: 2024-01-15T12:00:00Z
seriesIdstring,null<uuid>nullable

Associated series ID (if applicable)

seriesTitlestring | nullnullable

Resolved title of the associated series (from series_metadata.title). Populated only when the task is series-scoped and metadata exists.

startedAtstring,null<date-time>nullable

When task execution started

statusstringrequired

Current status (pending, processing, completed, failed)

Example: pending
taskTypestringrequired

Type of task (scan_library, generate_thumbnail, etc.)

Example: scan_library
TaskResponse
{
"attempts": 0,
"bookId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"bookTitle": "string",
"completedAt": "2024-07-29T15:51:28.071Z",
"createdAt": "2024-01-15T10:00:00Z",
"id": "550e8400-e29b-41d4-a716-446655440000",
"lastError": "string",
"libraryId": "550e8400-e29b-41d4-a716-446655440001",
"libraryName": "string",
"lockedBy": "worker-1",
"lockedUntil": "2024-07-29T15:51:28.071Z",
"maxAttempts": 3,
"priority": 0,
"scheduledFor": "2024-01-15T12:00:00Z",
"seriesId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"seriesTitle": "string",
"startedAt": "2024-07-29T15:51:28.071Z",
"status": "pending",
"taskType": "scan_library"
}