From 5d3045935997d4c757a08d6293c4d9c3d3f7d2ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 28 Jun 2022 16:00:38 +0200 Subject: [PATCH] OAPI: add endpoint to get URLs of last-rendered images of a job --- pkg/api/flamenco-openapi.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/pkg/api/flamenco-openapi.yaml b/pkg/api/flamenco-openapi.yaml index eba14f96..213a99ba 100644 --- a/pkg/api/flamenco-openapi.yaml +++ b/pkg/api/flamenco-openapi.yaml @@ -464,6 +464,24 @@ paths: application/json: schema: { $ref: "#/components/schemas/Job" } + /api/jobs/{job_id}/last-rendered: + summary: Obtain info about the last-rendered images for this job. + get: + operationId: fetchJobLastRenderedInfo + summary: Get the URL that serves the last-rendered images of this job. + tags: [jobs] + parameters: + - name: job_id + in: path + required: true + schema: { type: string, format: uuid } + responses: + "200": + description: Normal response. + content: + application/json: + schema: { $ref: "#/components/schemas/JobLastRenderedImageInfo" } + /api/jobs/{job_id}/setstatus: summary: Request a status change for the given job. post: @@ -1258,6 +1276,19 @@ components: updated: { type: string, format: date-time } required: [id, name, status, priority, task_type, updated] + JobLastRenderedImageInfo: + description: > + Enough information for a client to piece together different strings to + form a host-relative URL to the last-rendered image. To construct the + URL, concatenate "{base}/{one of the suffixes}". + type: object + properties: + "base": { type: string, format: url } + "suffixes": + type: array + items: { type: string } + required: [base, suffixes] + JobBlocklist: description: "List of workers that are not allowed certain task types on a specific job." type: array