qunicorn_core.api.job_api.job_view module

Module containing the routes of the job manager API.

class qunicorn_core.api.job_api.job_view.JobCancelView

Bases: MethodView

Jobs endpoint to cancel a single job.

methods: t.ClassVar[t.Collection[str] | None] = {'POST'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

post(body, job_id: int, jwt_subject: str | None)

DEPRECATED! Use POST /jobs/<job_id>/ instead.

Cancel a job execution via id.

class qunicorn_core.api.job_api.job_view.JobDetailView

Bases: MethodView

Jobs endpoint for a single job.

delete(job_id: int, jwt_subject: str | None)

Delete job data via id and return the deleted job.

get(job_id: int, jwt_subject: str | None)

Get the details/results of a job.

methods: t.ClassVar[t.Collection[str] | None] = {'DELETE', 'GET', 'POST'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

post(command: dict, job_id: int, jwt_subject: str | None)

Run, rerun or cancel an existing job.

Commnad “run”:

Run job on IBM that was previously uploaded.

Commnad “rerun”:

Create a new job on basis of an existing job and execute it.

Commnad “cancel”:

Cancel a job execution via id.

class qunicorn_core.api.job_api.job_view.JobIDView

Bases: MethodView

Jobs endpoint for collection of all jobs.

get(jwt_subject: str | None, status: str | None = None, deployment: int | None = None, device: int | None = None, page: int = 1, item_count: int = 100)

Get all created jobs.

methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

post(body: dict, jwt_subject: str | None, deployment: int | None = None)

Create/Register and run new job.

The deployment can be set in the body as deploymentId`or with the query parameter `deployment. If both are given, the query parameter will be used.

class qunicorn_core.api.job_api.job_view.JobQueueView

Bases: MethodView

Jobs endpoint to get the queued jobs.

get(jwt_subject: str | None)

DEPRECATED! Use the “status” filter of the “/jobs/” route instead.

Get the items of the job queue and the running job.

methods: t.ClassVar[t.Collection[str] | None] = {'GET'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

class qunicorn_core.api.job_api.job_view.JobReRunView

Bases: MethodView

Jobs endpoint to rerun a single job.

methods: t.ClassVar[t.Collection[str] | None] = {'POST'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

post(body, job_id: int, jwt_subject: str | None)

DEPRECATED! Use POST /jobs/<job_id>/ instead.

Create a new job on basis of an existing job and execute it.

class qunicorn_core.api.job_api.job_view.JobResultDetailView

Bases: MethodView

Single result endpoint of a single job.

get(result_id: int, job_id: int, jwt_subject: str | None)

Get a single result of a job.

methods: t.ClassVar[t.Collection[str] | None] = {'GET'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

class qunicorn_core.api.job_api.job_view.JobResultsView

Bases: MethodView

Results endpoint of a single job.

get(job_id: int, jwt_subject: str | None)

Get the results of a job.

methods: t.ClassVar[t.Collection[str] | None] = {'GET'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

class qunicorn_core.api.job_api.job_view.JobRunView

Bases: MethodView

Jobs endpoint to run a single job.

methods: t.ClassVar[t.Collection[str] | None] = {'POST'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

post(body, job_id: int, jwt_subject: str | None)

DEPRECATED! Use POST /jobs/<job_id>/ instead.

Run job on IBM that was previously uploaded.