OAPI: version all API URLs with /v3/

Change all API URL paths from `/api/…` to `/api/v3/…`. This ensures that
old Flamenco v2 clients/workers stop working when the new Manager is in
place. This also allows redirecting API calls based on the URL, also for
future upgrades.
This commit is contained in:
Sybren A. Stüvel 2022-07-04 12:11:58 +02:00
parent 30f7df5259
commit 9daecf2b45

View File

@ -14,7 +14,7 @@ servers:
paths: paths:
## Meta ## Meta
/api/version: /api/v3/version:
summary: Clients can use this to check this is actually a Flamenco server. summary: Clients can use this to check this is actually a Flamenco server.
get: get:
summary: Get the Flamenco version of this Manager summary: Get the Flamenco version of this Manager
@ -28,7 +28,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/FlamencoVersion" $ref: "#/components/schemas/FlamencoVersion"
/api/configuration: /api/v3/configuration:
summary: Endpoint for getting configuration of Flamenco Manager. summary: Endpoint for getting configuration of Flamenco Manager.
get: get:
summary: Get the configuration of this Manager. summary: Get the configuration of this Manager.
@ -43,7 +43,7 @@ paths:
## Worker ## Worker
/api/worker/register-worker: /api/v3/worker/register-worker:
summary: Registration of new workers summary: Registration of new workers
post: post:
summary: Register a new worker summary: Register a new worker
@ -70,7 +70,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
/api/worker/sign-on: /api/v3/worker/sign-on:
summary: Called by Workers to let the Manager know they're ready to work, and to update their metadata. summary: Called by Workers to let the Manager know they're ready to work, and to update their metadata.
post: post:
summary: Authenticate & sign in the worker. summary: Authenticate & sign in the worker.
@ -98,7 +98,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
/api/worker/sign-off: /api/v3/worker/sign-off:
summary: Called by Workers to let the Manager know they're going offline. summary: Called by Workers to let the Manager know they're going offline.
post: post:
summary: Mark the worker as offline summary: Mark the worker as offline
@ -115,7 +115,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
/api/worker/state: /api/v3/worker/state:
summary: Called by Workers to check whether there is any state change requested. summary: Called by Workers to check whether there is any state change requested.
get: get:
operationId: workerState operationId: workerState
@ -137,7 +137,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
/api/worker/state-changed: /api/v3/worker/state-changed:
summary: Called by Workers to let the Manager know they've changed status. summary: Called by Workers to let the Manager know they've changed status.
post: post:
summary: Worker changed state. This could be as acknowledgement of a Manager-requested state change, or in response to worker-local signals. summary: Worker changed state. This could be as acknowledgement of a Manager-requested state change, or in response to worker-local signals.
@ -161,7 +161,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
/api/worker/task: /api/v3/worker/task:
summary: Task scheduler endpoint. summary: Task scheduler endpoint.
post: post:
operationId: scheduleTask operationId: scheduleTask
@ -190,7 +190,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/WorkerStateChange" $ref: "#/components/schemas/WorkerStateChange"
/api/worker/task/{task_id}: /api/v3/worker/task/{task_id}:
summary: Workers send info about task progression here. summary: Workers send info about task progression here.
post: post:
operationId: taskUpdate operationId: taskUpdate
@ -221,7 +221,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
/api/worker/task/{task_id}/may-i-run: /api/v3/worker/task/{task_id}/may-i-run:
summary: Workers check whether they're allowed to keep running this task. summary: Workers check whether they're allowed to keep running this task.
get: get:
operationId: mayWorkerRun operationId: mayWorkerRun
@ -249,7 +249,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
/api/worker/task/{task_id}/output-produced: /api/v3/worker/task/{task_id}/output-produced:
summary: Workers send thumbnails/previews of their last-produced output here. summary: Workers send thumbnails/previews of their last-produced output here.
post: post:
operationId: taskOutputProduced operationId: taskOutputProduced
@ -305,7 +305,7 @@ paths:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
# Worker Management # Worker Management
/api/worker-mgt/workers: /api/v3/worker-mgt/workers:
summary: Obtain list of Workers known to the Manager. summary: Obtain list of Workers known to the Manager.
get: get:
operationId: fetchWorkers operationId: fetchWorkers
@ -318,7 +318,7 @@ paths:
application/json: application/json:
schema: { $ref: "#/components/schemas/WorkerList" } schema: { $ref: "#/components/schemas/WorkerList" }
/api/worker-mgt/workers/{worker_id}: /api/v3/worker-mgt/workers/{worker_id}:
summary: Get detailed worker info. summary: Get detailed worker info.
get: get:
operationId: fetchWorker operationId: fetchWorker
@ -336,7 +336,7 @@ paths:
application/json: application/json:
schema: { $ref: "#/components/schemas/Worker" } schema: { $ref: "#/components/schemas/Worker" }
/api/worker-mgt/workers/{worker_id}/setstatus: /api/v3/worker-mgt/workers/{worker_id}/setstatus:
summary: Request a status change for the given worker. summary: Request a status change for the given worker.
post: post:
operationId: requestWorkerStatusChange operationId: requestWorkerStatusChange
@ -365,7 +365,7 @@ paths:
## Jobs ## Jobs
/api/jobs/types: /api/v3/jobs/types:
summary: Available Flamenco job types. summary: Available Flamenco job types.
get: get:
operationId: getJobTypes operationId: getJobTypes
@ -378,7 +378,7 @@ paths:
application/json: application/json:
schema: { $ref: "#/components/schemas/AvailableJobTypes" } schema: { $ref: "#/components/schemas/AvailableJobTypes" }
/api/jobs/type/{typeName}: /api/v3/jobs/type/{typeName}:
summary: Info about a specific job type. summary: Info about a specific job type.
get: get:
operationId: getJobType operationId: getJobType
@ -396,7 +396,7 @@ paths:
application/json: application/json:
schema: { $ref: "#/components/schemas/AvailableJobType" } schema: { $ref: "#/components/schemas/AvailableJobType" }
/api/jobs: /api/v3/jobs:
summary: Job submission endpoint. summary: Job submission endpoint.
post: post:
operationId: submitJob operationId: submitJob
@ -421,7 +421,7 @@ paths:
application/json: application/json:
schema: { $ref: "#/components/schemas/Error" } schema: { $ref: "#/components/schemas/Error" }
/api/jobs/query: /api/v3/jobs/query:
summary: Obtain jobs with filtering and sorting. summary: Obtain jobs with filtering and sorting.
post: post:
operationId: queryJobs operationId: queryJobs
@ -446,7 +446,7 @@ paths:
application/json: application/json:
schema: { $ref: "#/components/schemas/Error" } schema: { $ref: "#/components/schemas/Error" }
/api/jobs/{job_id}: /api/v3/jobs/{job_id}:
summary: Job info and management summary: Job info and management
get: get:
operationId: fetchJob operationId: fetchJob
@ -464,7 +464,7 @@ paths:
application/json: application/json:
schema: { $ref: "#/components/schemas/Job" } schema: { $ref: "#/components/schemas/Job" }
/api/jobs/{job_id}/last-rendered: /api/v3/jobs/{job_id}/last-rendered:
summary: Obtain info about the last-rendered images for this job. summary: Obtain info about the last-rendered images for this job.
get: get:
operationId: fetchJobLastRenderedInfo operationId: fetchJobLastRenderedInfo
@ -484,7 +484,7 @@ paths:
"204": "204":
description: This job doesn't have any last-rendered image. description: This job doesn't have any last-rendered image.
/api/jobs/last-rendered: /api/v3/jobs/last-rendered:
summary: Obtain info about the global last-rendered image. summary: Obtain info about the global last-rendered image.
get: get:
operationId: fetchGlobalLastRenderedInfo operationId: fetchGlobalLastRenderedInfo
@ -499,7 +499,7 @@ paths:
"204": "204":
description: This job doesn't have any last-rendered image. description: This job doesn't have any last-rendered image.
/api/jobs/{job_id}/setstatus: /api/v3/jobs/{job_id}/setstatus:
summary: Request a status change for the given job. summary: Request a status change for the given job.
post: post:
operationId: setJobStatus operationId: setJobStatus
@ -528,7 +528,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
/api/jobs/{job_id}/tasks: /api/v3/jobs/{job_id}/tasks:
summary: Access tasks of this job. summary: Access tasks of this job.
get: get:
operationId: fetchJobTasks operationId: fetchJobTasks
@ -552,7 +552,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
/api/jobs/{job_id}/blocklist: /api/v3/jobs/{job_id}/blocklist:
summary: Access blocklist of this job. summary: Access blocklist of this job.
get: get:
operationId: fetchJobBlocklist operationId: fetchJobBlocklist
@ -599,7 +599,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
/api/tasks/{task_id}: /api/v3/tasks/{task_id}:
summary: Fetch a single task summary: Fetch a single task
get: get:
operationId: fetchTask operationId: fetchTask
@ -623,7 +623,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
/api/tasks/{task_id}/logtail: /api/v3/tasks/{task_id}/logtail:
summary: Fetch the task's last few log lines. summary: Fetch the task's last few log lines.
get: get:
operationId: fetchTaskLogTail operationId: fetchTaskLogTail
@ -650,11 +650,11 @@ paths:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
/api/tasks/{task_id}/setstatus: /api/v3/tasks/{task_id}/setstatus:
summary: > summary: >
Request a status change for the given task. This may have effect on the Request a status change for the given task. This may have effect on the
job status as well. This endpoint is meant for humans managing tasks via job status as well. This endpoint is meant for humans managing tasks via
the web interface. Workers post to `/api/worker/task/{task_id}` instead. the web interface. Workers post to `/api/v3/worker/task/{task_id}` instead.
post: post:
operationId: setTaskStatus operationId: setTaskStatus
tags: [jobs] tags: [jobs]
@ -684,7 +684,7 @@ paths:
## Shaman ## Shaman
/api/shaman/checkout/requirements: /api/v3/shaman/checkout/requirements:
summary: Allows a client to check which files are available on the server, and which ones are still unknown. summary: Allows a client to check which files are available on the server, and which ones are still unknown.
post: post:
operationId: shamanCheckoutRequirements operationId: shamanCheckoutRequirements
@ -711,7 +711,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
/api/shaman/checkout/create: /api/v3/shaman/checkout/create:
summary: Symlink a set of files into the checkout area. summary: Symlink a set of files into the checkout area.
post: post:
operationId: shamanCheckout operationId: shamanCheckout
@ -750,7 +750,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
/api/shaman/files/{checksum}/{filesize}: /api/v3/shaman/files/{checksum}/{filesize}:
summary: Upload files to the Shaman server. summary: Upload files to the Shaman server.
get: get:
operationId: shamanFileStoreCheck operationId: shamanFileStoreCheck