diff --git a/reana_commons/openapi_specifications/reana_server.json b/reana_commons/openapi_specifications/reana_server.json index 4db3989b..4a32e68f 100644 --- a/reana_commons/openapi_specifications/reana_server.json +++ b/reana_commons/openapi_specifications/reana_server.json @@ -2,7 +2,7 @@ "info": { "description": "Submit workflows to be run on REANA Cloud", "title": "REANA Server", - "version": "0.9.1a3" + "version": "0.9.1" }, "paths": { "/account/settings/linkedaccounts/": {}, @@ -3955,6 +3955,189 @@ "summary": "Set status of a workflow." } }, + "/api/workflows/{workflow_id_or_name}/unshare": { + "post": { + "description": "This resource unshares a workflow with another user. This resource is expecting a workflow UUID and some parameters.", + "operationId": "unshare_workflow", + "parameters": [ + { + "description": "The API access_token of workflow owner.", + "in": "query", + "name": "access_token", + "required": false, + "type": "string" + }, + { + "description": "Required. Workflow UUID or name.", + "in": "path", + "name": "workflow_id_or_name", + "required": true, + "type": "string" + }, + { + "description": "Required. User to unshare the workflow with.", + "in": "query", + "name": "user_email_to_unshare_with", + "required": true, + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Request succeeded. The workflow has been unshared with the user.", + "examples": { + "application/json": { + "message": "The workflow has been unshared with the user.", + "workflow_id": "cdcf48b1-c2f3-4693-8230-b066e088c6ac", + "workflow_name": "mytest.1" + } + }, + "schema": { + "properties": { + "message": { + "type": "string" + }, + "workflow_id": { + "type": "string" + }, + "workflow_name": { + "type": "string" + } + }, + "type": "object" + } + }, + "400": { + "description": "Request failed. The incoming data specification seems malformed.", + "examples": { + "application/json": { + "errors": [ + "Missing data for required field." + ], + "message": "Malformed request." + } + }, + "schema": { + "properties": { + "errors": { + "items": { + "type": "string" + }, + "type": "array" + }, + "message": { + "type": "string" + } + }, + "type": "object" + } + }, + "403": { + "description": "Request failed. User is not allowed to unshare the workflow.", + "examples": { + "application/json": { + "errors": [ + "User is not allowed to unshare the workflow." + ] + } + }, + "schema": { + "properties": { + "errors": { + "items": { + "type": "string" + }, + "type": "array" + }, + "message": { + "type": "string" + } + }, + "type": "object" + } + }, + "404": { + "description": "Request failed. Workflow does not exist or user does not exist.", + "examples": { + "application/json": { + "errors": [ + "Workflow cdcf48b1-c2f3-4693-8230-b066e088c6ac does not exist" + ], + "message": "Workflow cdcf48b1-c2f3-4693-8230-b066e088c6ac does not exist" + } + }, + "schema": { + "properties": { + "errors": { + "items": { + "type": "string" + }, + "type": "array" + }, + "message": { + "type": "string" + } + }, + "type": "object" + } + }, + "409": { + "description": "Request failed. The workflow is not shared with the user.", + "examples": { + "application/json": { + "errors": [ + "The workflow is not shared with the user." + ], + "message": "The workflow is not shared with the user." + } + }, + "schema": { + "properties": { + "errors": { + "items": { + "type": "string" + }, + "type": "array" + }, + "message": { + "type": "string" + } + }, + "type": "object" + } + }, + "500": { + "description": "Request failed. Internal controller error.", + "examples": { + "application/json": { + "errors": [ + "Internal controller error." + ], + "message": "Internal controller error." + } + }, + "schema": { + "properties": { + "errors": { + "items": { + "type": "string" + }, + "type": "array" + }, + "message": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "summary": "Unshare a workflow with another user." + } + }, "/api/workflows/{workflow_id_or_name}/workspace": { "get": { "description": "This resource retrieves the file list of a workspace, given its workflow UUID.", diff --git a/reana_commons/openapi_specifications/reana_workflow_controller.json b/reana_commons/openapi_specifications/reana_workflow_controller.json index ba596536..f66dce6b 100644 --- a/reana_commons/openapi_specifications/reana_workflow_controller.json +++ b/reana_commons/openapi_specifications/reana_workflow_controller.json @@ -2,7 +2,7 @@ "info": { "description": "Submit and manage workflows", "title": "REANA Workflow Controller", - "version": "0.9.1a2" + "version": "0.9.1" }, "paths": { "/api/workflows": { @@ -1418,6 +1418,183 @@ "summary": "Set workflow status." } }, + "/api/workflows/{workflow_id_or_name}/unshare": { + "post": { + "description": "This resource allows to unshare a workflow with other users.", + "operationId": "unshare_workflow", + "parameters": [ + { + "description": "Required. UUID of workflow owner.", + "in": "query", + "name": "user_id", + "required": true, + "type": "string" + }, + { + "description": "Required. Analysis UUID or name.", + "in": "path", + "name": "workflow_id_or_name", + "required": true, + "type": "string" + }, + { + "description": "Required. User to unshare the workflow with.", + "in": "query", + "name": "user_email_to_unshare_with", + "required": true, + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Request succeeded. The workflow has been unshared with the user.", + "examples": { + "application/json": { + "message": "The workflow has been unsahred with the user.", + "workflow_id": "cdcf48b1-c2f3-4693-8230-b066e088c6ac", + "workflow_name": "mytest.1" + } + }, + "schema": { + "properties": { + "message": { + "type": "string" + }, + "workflow_id": { + "type": "string" + }, + "workflow_name": { + "type": "string" + } + }, + "type": "object" + } + }, + "400": { + "description": "Request failed. The incoming data specification seems malformed.", + "examples": { + "application/json": { + "errors": [ + "Missing data for required field." + ], + "message": "Malformed request." + } + }, + "schema": { + "properties": { + "errors": { + "items": { + "type": "string" + }, + "type": "array" + }, + "message": { + "type": "string" + } + }, + "type": "object" + } + }, + "403": { + "description": "Request failed. User is not allowed to unshare the workflow.", + "examples": { + "application/json": { + "errors": [ + "User is not allowed to unshare the workflow." + ] + } + }, + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "type": "object" + } + }, + "404": { + "description": "Request failed. Workflow does not exist or user does not exist.", + "examples": { + "application/json": { + "errors": [ + "Workflow cdcf48b1-c2f3-4693-8230-b066e088c6ac does not exist" + ], + "message": "Workflow cdcf48b1-c2f3-4693-8230-b066e088c6ac does not exist" + } + }, + "schema": { + "properties": { + "errors": { + "items": { + "type": "string" + }, + "type": "array" + }, + "message": { + "type": "string" + } + }, + "type": "object" + } + }, + "409": { + "description": "Request failed. The workflow is not shared with the user.", + "examples": { + "application/json": { + "errors": [ + "The workflow is not shared with the user." + ], + "message": "The workflow is not shared with the user." + } + }, + "schema": { + "properties": { + "errors": { + "items": { + "type": "string" + }, + "type": "array" + }, + "message": { + "type": "string" + } + }, + "type": "object" + } + }, + "500": { + "description": "Request failed. Internal controller error.", + "examples": { + "application/json": { + "errors": [ + "Internal controller error." + ], + "message": "Internal controller error." + } + }, + "schema": { + "properties": { + "errors": { + "items": { + "type": "string" + }, + "type": "array" + }, + "message": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "summary": "Unshare a workflow with other users." + } + }, "/api/workflows/{workflow_id_or_name}/workspace": { "get": { "description": "This resource retrieves the file list of a workspace, given its workflow UUID.",