OAPI: add operation to set job priority

This commit is contained in:
Sybren A. Stüvel 2022-09-30 16:27:14 +02:00
parent 0a7b7d9cf6
commit 07f0b38e8a

@ -757,6 +757,35 @@ paths:
schema:
$ref: "#/components/schemas/Error"
/api/v3/jobs/{job_id}/setpriority:
summary: Request a priority change for the given job.
post:
operationId: setJobPriority
tags: [jobs]
parameters:
- name: job_id
in: path
required: true
schema: { type: string, format: uuid }
requestBody:
description: The new priority.
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/JobPriorityChange"
responses:
"204":
description: Priority change was accepted.
"422":
description: The requested priority is not acceptable.
default:
description: Unexpected error.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/api/v3/jobs/{job_id}/tasks:
summary: Access tasks of this job.
get:
@ -1751,6 +1780,15 @@ components:
description: The reason for this status change.
required: [status, reason]
JobPriorityChange:
type: object
properties:
priority:
type: integer
minimum: 0
maximum: 100
required: [priority]
TaskStatusChange:
type: object
properties: