diff --git a/reana_commons/openapi_specifications/reana_server.json b/reana_commons/openapi_specifications/reana_server.json index cbd02a41..20629359 100644 --- a/reana_commons/openapi_specifications/reana_server.json +++ b/reana_commons/openapi_specifications/reana_server.json @@ -2,15 +2,11 @@ "info": { "description": "Submit workflows to be run on REANA Cloud", "title": "REANA Server", - "version": "0.9.1" + "version": "0.95.0a1" }, "paths": { "/account/settings/linkedaccounts/": {}, "/account/settings/linkedaccounts/static/{filename}": {}, - "/account/settings/login": {}, - "/account/settings/security/": {}, - "/account/settings/sessions/revoke/": {}, - "/account/settings/static/{filename}": {}, "/api/config": { "get": { "description": "This resource provides configuration needed by Reana-UI.", @@ -148,12 +144,87 @@ "get": { "description": "Retrieve projects from GitLab.", "operationId": "gitlab_projects", + "parameters": [ + { + "description": "The API access_token of the current user.", + "in": "query", + "name": "access_token", + "required": false, + "type": "string" + }, + { + "description": "The search string to filter the project list.", + "in": "query", + "name": "search", + "required": false, + "type": "string" + }, + { + "description": "Results page number (pagination).", + "in": "query", + "name": "page", + "required": false, + "type": "integer" + }, + { + "description": "Number of results per page (pagination).", + "in": "query", + "name": "size", + "required": false, + "type": "integer" + } + ], "produces": [ "application/json" ], "responses": { "200": { - "description": "This resource return all projects owned by the user on GitLab in JSON format." + "description": "This resource return all projects owned by the user on GitLab in JSON format.", + "schema": { + "properties": { + "has_next": { + "type": "boolean" + }, + "has_prev": { + "type": "boolean" + }, + "items": { + "items": { + "properties": { + "hook_id": { + "type": "integer", + "x-nullable": true + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "page": { + "type": "integer" + }, + "size": { + "type": "integer" + }, + "total": { + "type": "integer", + "x-nullable": true + } + }, + "type": "object" + } }, "403": { "description": "Request failed. User token not valid.", @@ -3229,25 +3300,30 @@ "type": "string" }, { - "description": "Required. User to share the workflow with.", - "in": "query", - "name": "user_email_to_share_with", + "description": "JSON object with details of the share.", + "in": "body", + "name": "share_details", "required": true, - "type": "string" - }, - { - "description": "Optional. Message to include when sharing the workflow.", - "in": "query", - "name": "message", - "required": false, - "type": "string" - }, - { - "description": "Optional. Date when access to the workflow will expire (format YYYY-MM-DD).", - "in": "query", - "name": "valid_until", - "required": false, - "type": "string" + "schema": { + "properties": { + "message": { + "description": "Optional. Message to include when sharing the workflow.", + "type": "string" + }, + "user_email_to_share_with": { + "description": "User to share the workflow with.", + "type": "string" + }, + "valid_until": { + "description": "Optional. Date when access to the workflow will expire (format YYYY-MM-DD).", + "type": "string" + } + }, + "required": [ + "user_email_to_share_with" + ], + "type": "object" + } } ], "produces": [ @@ -3279,23 +3355,17 @@ } }, "400": { - "description": "Request failed. The incoming data specification seems malformed.", + "description": "Request failed. The incoming data seems malformed." + }, + "401": { + "description": "Request failed. User not signed in.", "examples": { "application/json": { - "errors": [ - "Missing data for required field." - ], - "message": "Malformed request." + "message": "User not signed in." } }, "schema": { "properties": { - "errors": { - "items": { - "type": "string" - }, - "type": "array" - }, "message": { "type": "string" } @@ -3304,12 +3374,10 @@ } }, "403": { - "description": "Request failed. User is not allowed to share the workflow.", + "description": "Request failed. Credentials are invalid or revoked.", "examples": { "application/json": { - "errors": [ - "User is not allowed to share the workflow." - ] + "message": "Token not valid." } }, "schema": { @@ -3325,75 +3393,24 @@ "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 already shared with the user.", "examples": { "application/json": { - "errors": [ - "The workflow is already shared with the user." - ], "message": "The workflow is already 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" } } }, @@ -5212,6 +5229,7 @@ "/oauth/disconnect/{remote_app}/": {}, "/oauth/login": {}, "/oauth/login/{remote_app}/": {}, + "/oauth/logout": {}, "/oauth/signup/{remote_app}/": {}, "/oauth/static/{filename}": {}, "/signin": {}, diff --git a/reana_commons/openapi_specifications/reana_workflow_controller.json b/reana_commons/openapi_specifications/reana_workflow_controller.json index db22f201..8ce8d276 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.1" + "version": "0.95.0a1" }, "paths": { "/api/workflows": { @@ -1028,7 +1028,7 @@ { "description": "Required. UUID of workflow owner.", "in": "query", - "name": "user_id", + "name": "user", "required": true, "type": "string" }, @@ -1040,25 +1040,30 @@ "type": "string" }, { - "description": "Required. User to share the workflow with.", - "in": "query", - "name": "user_email_to_share_with", + "description": "JSON object with details of the share.", + "in": "body", + "name": "share_details", "required": true, - "type": "string" - }, - { - "description": "Optional. Message to include when sharing the workflow.", - "in": "query", - "name": "message", - "required": false, - "type": "string" - }, - { - "description": "Optional. Date when access to the workflow will expire (format YYYY-MM-DD).", - "in": "query", - "name": "valid_until", - "required": false, - "type": "string" + "schema": { + "properties": { + "message": { + "description": "Optional. Message to include when sharing the workflow.", + "type": "string" + }, + "user_email_to_share_with": { + "description": "User to share the workflow with.", + "type": "string" + }, + "valid_until": { + "description": "Optional. Date when access to the workflow will expire (format YYYY-MM-DD).", + "type": "string" + } + }, + "required": [ + "user_email_to_share_with" + ], + "type": "object" + } } ], "produces": [ @@ -1090,121 +1095,30 @@ } }, "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 share the workflow.", - "examples": { - "application/json": { - "errors": [ - "User is not allowed to share the workflow." - ] - } - }, - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "type": "object" - } + "description": "Request failed. The incoming data seems malformed." }, "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 already shared with the user.", "examples": { "application/json": { - "errors": [ - "The workflow is already shared with the user." - ], "message": "The workflow is already 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" } } }, @@ -1981,7 +1895,7 @@ ], "responses": { "200": { - "description": "Requests succeeded. The file has been downloaded.", + "description": "Request succeeded. Details about deleted files and failed deletions are returned.", "schema": { "type": "file" }