From 458f8d668743ce8355e0d60b51bd09af582d80b2 Mon Sep 17 00:00:00 2001 From: Bernd Hufmann Date: Wed, 1 Nov 2023 15:50:11 -0400 Subject: [PATCH] Add an endpoint for closing an experiment With this it's possible to close an experiment on the server. Upon reception of the command the server can dispose allocated resources hence the client doesn't need them anymore. UI clients for example can close the experiment when a user closed the graphs. Fixes #96 Signed-off-by: Bernd Hufmann --- API-proposed.yaml | 27 +++++++++++++++++++++++++++ API.yaml | 27 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/API-proposed.yaml b/API-proposed.yaml index 8d55c6f..ce50750 100644 --- a/API-proposed.yaml +++ b/API-proposed.yaml @@ -1169,6 +1169,33 @@ paths: application/json: schema: type: string + /experiments/{expUUID}:close: + put: + tags: + - Experiments + summary: Close experiment to dispose allocated resources. + operationId: closeExperiment + parameters: + - name: expUUID + in: path + description: UUID of the experiment to query + required: true + schema: + type: string + format: uuid + responses: + "200": + description: Return the model of the closed experiment + content: + application/json: + schema: + $ref: '#/components/schemas/Experiment' + "404": + description: No such experiment + content: + application/json: + schema: + type: string /experiments/{expUUID}: get: tags: diff --git a/API.yaml b/API.yaml index 03a011a..e195ecf 100644 --- a/API.yaml +++ b/API.yaml @@ -1159,6 +1159,33 @@ paths: application/json: schema: type: string + /experiments/{expUUID}:close: + put: + tags: + - Experiments + summary: Close experiment to dispose allocated resources. + operationId: closeExperiment + parameters: + - name: expUUID + in: path + description: UUID of the experiment to query + required: true + schema: + type: string + format: uuid + responses: + "200": + description: Return the model of the closed experiment + content: + application/json: + schema: + $ref: '#/components/schemas/Experiment' + "404": + description: No such experiment + content: + application/json: + schema: + type: string /experiments/{expUUID}: get: tags: