Manage data jobs

List, filter, update metadata, and cancel data jobs.

Use the data jobs API to list and filter jobs, update names and descriptions, and cancel in-progress alignment runs.

List data jobs

Endpoint: GET /v1/flow/data-jobs List data jobs

Returns a paginated list of all data jobs for the authenticated user.

from seekrai import SeekrFlow

client = SeekrFlow()

jobs = client.data_jobs.list()
for job in jobs.data:
    print(job.id, job.name, job.status, job.created_at)

Filter and sort

ParameterTypeOptionsDefault
job_typestringprinciple_files, context_grounded_files, context_grounded_vector_db
sort_bystringname, created_at, job_typecreated_at
sort_orderstringasc, descdesc
limitint1–10025
offsetint≥ 00
# List only principle_files jobs, most recent first
jobs = client.data_jobs.list(
    job_type="principle_files",
    sort_by="created_at",
    sort_order="desc",
    limit=10,
)
for job in jobs.data:
    print(job.id, job.name, job.status)

Get job detail

Endpoint: GET /v1/flow/data-jobs/{id} Get data job

Returns the full job detail including ingestion jobs, file records, timeline events, and alignment status. See Monitor ingestion for a field-by-field reference.

detail = client.data_jobs.retrieve("dj-1234567890")
print("Status:", detail.status)
print("Files:", len(detail.files))
print("Ingestion jobs:", len(detail.ingestion_jobs))

Update job attributes

Endpoint: PATCH /v1/flow/data-jobs/{id} Update data job

Update the job name, description, system prompt, or vector database ID without recreating the job.

data_job = client.data_jobs.update(
    "dj-1234567890",
    name="Customer support refresh v2",
    description="Updated scope with airline escalation policies",
    system_prompt="You are an airline support expert. Always cite the policy section.",
)
print("Updated name:", data_job.name)

Editable fields:

FieldNotes
nameKeep under 255 characters.
descriptionOptional free-text context, scope, or notes.
system_promptRequired for principle_files jobs before starting. Immediately overwrites the stored value.
vector_database_idRequired for context_grounded_vector_db jobs before starting.
⚠️

Warning

Once alignment starts, job inputs are locked. Attempting to update a running job returns 409 Conflict.


Cancel a job

Endpoint: POST /v1/flow/data-jobs/{id}/cancel Cancel data job

Cancels the alignment run associated with the data job. Only applies when alignment is in pending, queued, or running state.

client.data_jobs.cancel("dj-1234567890")
print("Job cancelled.")

Attempting to cancel a job whose alignment is not in a cancellable state returns 304 Not Modified.