Skip to main content
POST
Report Job Progress

Headers

authorization
string | null
X-Organization-ID
string | null

Path Parameters

job_id
string
required

Cookies

stytch_session
string | null

Body

application/json

Worker progress update — single endpoint for the lifecycle of a Job that the worker itself created.

Designed for inbound-feed workers (e.g. rrs-oracle-import-worker) that don't have a database connection — they create the Job via POST /api/jobs/ and then call this endpoint at each phase transition. All fields are optional; only provided fields take effect.

error
JobProgressErrorBody · object | null

Append an error to the Job's errors[] array

mark_completed
boolean
default:false

If true, mark the Job complete (auto-derives COMPLETED / COMPLETED_WITH_WARNINGS / PARTIAL_SUCCESS)

mark_failed
string | null

If set, mark the Job failed with this message as error_message

mark_started
boolean
default:false

If true, transition status to in_progress

message
string | null

Optional log line stamped on metadata.last_message

metadata_patch
Metadata Patch · object | null

Arbitrary metadata fields to merge under metadata.* — e.g. {'import_job_id': 'enrichment-...'} to cross-link the downstream job.

processed_items
integer | null

Set processed_items directly. Useful for inbound-feed workers that dispatch a batch downstream (e.g. via /import-json-async) and need the parent Job to reflect progress without a per-item NATS bus.

Required range: x >= 0
stage
string | null

Sets metadata.stage (e.g. 'downloading', 'transforming', 'uploading', 'dispatched').

total_items
integer | null

Update total_items (e.g. set after the worker counts the rows in a downloaded file).

Required range: x >= 0
warning
JobProgressErrorBody · object | null

Append a warning to the Job's warnings[] array

Response

Successful Response

Response model for a single Job.

failed_items
integer
required

Items that failed

job_id
string
required

Unique job identifier

job_type
string
required

Type of job (enrichment or crawl)

processed_items
integer
required

Items successfully processed

progress_percentage
number
required

Progress percentage (0-100)

status
string
required

Current job status

success_rate
number
required

Success rate percentage (0-100)

total_items
integer
required

Total items to process

archived_at
string | null

When the job was archived (ISO 8601; null = active)

completed_at
string | null

Job completion timestamp

created_at
string | null

Job creation timestamp

duration_seconds
number | null

Job duration in seconds

error_message
string | null

DEPRECATED: Use 'errors' array. Legacy error message

errors
JobErrorResponse · object[]

Array of errors that occurred

metadata
Metadata · object | null

Job metadata

needs_review_items
integer
default:0

Items escalated to the Agent Inbox awaiting human review

started_at
string | null

Job start timestamp

triggered_by
string | null

User who triggered the job

warned_items
integer
default:0

Items processed with warnings (e.g., expected target gaps)

warnings
JobErrorResponse · object[]

Array of non-blocking warnings (same shape as errors)