flexmeasures.api.v3_0.jobs

Classes

class flexmeasures.api.v3_0.jobs.JobAPI

Endpoint for querying the status of background jobs by UUID.

get_job_status(job_id: str, **kwargs)

— get:

summary: Get the status of a background job description: |

Look up a background job by its UUID and see whether it is queued, running, finished, or failed.

The response includes a status message plus job metadata such as the queue name, function name, timestamps, and the job result when available.

security:
  • ApiKeyAuth: []

parameters:
  • in: path name: uuid required: true description: UUID of the background job. example: b3d26a8a-7a43-4a9f-93e1-fc2a869ea97b schema:

    type: string

responses:
200:

description: Job status retrieved successfully. content:

application/json:
schema:

type: object properties:

status:

type: string enum:

  • QUEUED

  • STARTED

  • FINISHED

  • FAILED

  • DEFERRED

  • SCHEDULED

  • STOPPED

  • CANCELED

description: Current status of the job.

message:

type: string description: Human-readable description of the job status.

result:

description: Return value of the job function, or null when not yet available. nullable: true

func_name:

type: string description: Fully-qualified name of the function executed by this job.

origin:

type: string description: Name of the queue the job was placed on.

enqueued_at:

type: string format: date-time nullable: true description: ISO-8601 timestamp of when the job was enqueued.

started_at:

type: string format: date-time nullable: true description: ISO-8601 timestamp of when the job started executing.

ended_at:

type: string format: date-time nullable: true description: ISO-8601 timestamp of when the job finished executing.

examples:
queued:

summary: Queued job value:

status: QUEUED message: “Scheduling job waiting to be processed.” result: null func_name: “flexmeasures.data.services.scheduling.create_schedule” origin: scheduling enqueued_at: “2026-04-28T10:00:00+00:00” started_at: null ended_at: null

finished:

summary: Finished job value:

status: FINISHED message: “Scheduling job has finished.” result: null func_name: “flexmeasures.data.services.scheduling.create_schedule” origin: scheduling enqueued_at: “2026-04-28T10:00:00+00:00” started_at: “2026-04-28T10:00:01+00:00” ended_at: “2026-04-28T10:00:05+00:00”

failed:

summary: Failed job value:

status: FAILED message: “Scheduling job failed with ValueError: …” result: null func_name: “flexmeasures.data.services.scheduling.create_schedule” origin: scheduling enqueued_at: “2026-04-28T10:00:00+00:00” started_at: “2026-04-28T10:00:01+00:00” ended_at: “2026-04-28T10:00:02+00:00”

400:

description: UNRECOGNIZED_JOB

401:

description: UNAUTHORIZED

tags:
  • Jobs