From 799910c6cc5d9f227556d380f5c2c80f0f2b943f Mon Sep 17 00:00:00 2001 From: solimant Date: Mon, 7 Oct 2024 19:36:43 +0000 Subject: [PATCH] Add CancelTask Signed-off-by: solimant --- .../src/schema/openapi.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/plugins/scaffolder-backend/src/schema/openapi.yaml b/plugins/scaffolder-backend/src/schema/openapi.yaml index 0b6a5d1d44..b0611bf2d3 100644 --- a/plugins/scaffolder-backend/src/schema/openapi.yaml +++ b/plugins/scaffolder-backend/src/schema/openapi.yaml @@ -676,3 +676,23 @@ paths: - JWT: [] parameters: - $ref: '#/components/parameters/taskId' + + /v2/tasks/{taskId}/cancel: + post: + operationId: CancelTask + description: Sends a signal to a task broker to cancel the running task by taskId. + responses: + '200': + description: Ok + content: + application/json: + schema: + type: object + properties: + status: + $ref: '#/components/schemas/TaskStatus' + security: + - {} + - JWT: [] + parameters: + - $ref: '#/components/parameters/taskId'