From c71ae574f12431af6ce719eaee51a712c9c2529f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 18 Sep 2024 14:27:47 +0200 Subject: [PATCH] OAPI: replace `queryJobs` operation with `fetchJobs` Replace the `queryJobs` operation (which takes a query object to do filtering & pagination) with the new `fetchJobs` operation (which just returns all jobs without filtering). The reason for this is that the querying that this operation supported was never used by the front-end. And now it's getting in the way of other development work, so it has to go. --- pkg/api/flamenco-openapi.yaml | 42 +++++++++++++---------------------- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/pkg/api/flamenco-openapi.yaml b/pkg/api/flamenco-openapi.yaml index b80b1daa..975567fc 100644 --- a/pkg/api/flamenco-openapi.yaml +++ b/pkg/api/flamenco-openapi.yaml @@ -744,7 +744,22 @@ paths: schema: { $ref: "#/components/schemas/AvailableJobType" } /api/v3/jobs: - summary: Job submission endpoint. + summary: Job submission and listing endpoint. + get: + operationId: fetchJobs + summary: List all jobs in the database. + tags: [jobs] + responses: + "200": + description: Normal query response, can be empty list if there are no jobs. + content: + application/json: + schema: { $ref: "#/components/schemas/JobsQueryResult" } + default: + description: Error message + content: + application/json: + schema: { $ref: "#/components/schemas/Error" } post: operationId: submitJob summary: Submit a new job for Flamenco Manager to execute. @@ -840,31 +855,6 @@ paths: application/json: schema: { $ref: "#/components/schemas/Error" } - /api/v3/jobs/query: - summary: Obtain jobs with filtering and sorting. - post: - operationId: queryJobs - summary: Fetch list of jobs. - tags: [jobs] - requestBody: - description: Specification of which jobs to get. - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/JobsQuery" - responses: - "200": - description: Normal query response, can be empty list if nothing matched the query. - content: - application/json: - schema: { $ref: "#/components/schemas/JobsQueryResult" } - default: - description: Error message - content: - application/json: - schema: { $ref: "#/components/schemas/Error" } - /api/v3/jobs/{job_id}: summary: Job info and management get: