From 07f0b38e8a9f0e7ea303adc2608ae5265ec7e075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 30 Sep 2022 16:27:14 +0200 Subject: [PATCH] OAPI: add operation to set job priority --- pkg/api/flamenco-openapi.yaml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/pkg/api/flamenco-openapi.yaml b/pkg/api/flamenco-openapi.yaml index 5cd28925..856bff70 100644 --- a/pkg/api/flamenco-openapi.yaml +++ b/pkg/api/flamenco-openapi.yaml @@ -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: