From 48a1c06277f45998c8fd79e0efb41d74eba392c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 31 Aug 2022 11:38:14 +0200 Subject: [PATCH] OAPI: add operation to get the shared storage, for current platform Add an operation `getSharedStorage` that can return the shared storage location, adjusted for the given audience & platform. This uses the two-way variables system to adjust the Manager's configuration. --- pkg/api/flamenco-openapi.yaml | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/pkg/api/flamenco-openapi.yaml b/pkg/api/flamenco-openapi.yaml index 393947c4..5cd28925 100644 --- a/pkg/api/flamenco-openapi.yaml +++ b/pkg/api/flamenco-openapi.yaml @@ -167,6 +167,30 @@ paths: application/json: schema: { $ref: "#/components/schemas/ManagerVariables" } + /api/v3/configuration/shared-storage/{audience}/{platform}: + summary: Endpoint for getting the shared storage location from Flamenco Manager's configuration. + get: + summary: > + Get the shared storage location of this Manager, adjusted for the given + audience and platform. + operationId: getSharedStorage + tags: [meta] + parameters: + - name: audience + in: path + required: true + schema: { $ref: "#/components/schemas/ManagerVariableAudience" } + - name: platform + in: path + required: true + schema: { type: string } + responses: + "200": + description: Normal response. + content: + application/json: + schema: { $ref: "#/components/schemas/SharedStorageLocation" } + ## Worker /api/v3/worker/register-worker: @@ -1157,6 +1181,21 @@ components: type: string enum: [workers, users] + SharedStorageLocation: + type: object + description: > + Location of the shared storage, adjusted for a specific audience & + platform. This uses two-way variables to adjust the shared storage path + from the Manager's configuration. + properties: + "location": { type: string } + "audience": { $ref: "#/components/schemas/ManagerVariableAudience" } + "platform": { type: string } + "shamanEnabled": + description: Whether the Shaman file transfer API is available. + type: boolean + required: [location, audience, platform, shamanEnabled] + PathCheckInput: type: object properties: