2. REST API¶
The REANA-Workflow-Controller component offers a REST API for managing workflows.
-
POST/api/cwl/remote¶ Creates a new cwl workflow from a remote repository.
This resource is expecting JSON data with all the necessary information to instantiate a cwl workflow from a remote repository.
Query Parameters: - user (string) – Required. UUID of workflow owner.
Status Codes: - 200 OK – Request succeeded. The workflow has been instantiated.
- 400 Bad Request – Request failed. The incoming data specification seems malformed
-
GET/api/workflows¶ Returns all workflows.
This resource is expecting a user UUID. The information related to all workflows for a given user will be served as JSON
Query Parameters: - user (string) – Required. UUID of workflow owner.
Status Codes: - 200 OK – Requests succeeded. The response contains the current workflows for a given user.
- 400 Bad Request – Request failed. The incoming data specification seems malformed.
- 404 Not Found – Request failed. User does not exist.
- 500 Internal Server Error – Request failed. Internal controller error.
-
POST/api/workflows¶ Create workflow and its workspace.
This resource expects all necessary data to represent a workflow so it is stored in database and its workspace is created.
Query Parameters: - user (string) – Required. UUID of workflow owner.
Status Codes: - 201 Created – Request succeeded. The workflow has been created along with its workspace
- 400 Bad Request – Request failed. The incoming data specification seems malformed
- 404 Not Found – Request failed. User does not exist.
-
GET/api/workflows/{workflow_id_or_name}/logs¶ Returns logs of a specific workflow from a workflow engine.
This resource is expecting a workflow UUID and a filename to return its outputs.
Parameters: - workflow_id_or_name (string) – Required. Workflow UUID or name.
Query Parameters: - user (string) – Required. UUID of workflow owner.
Status Codes: - 200 OK – Request succeeded. Info about workflow, including the status is returned.
- 400 Bad Request – Request failed. The incoming data specification seems malformed.
- 404 Not Found – Request failed. User does not exist.
- 500 Internal Server Error – Request failed. Internal controller error.
-
GET/api/workflows/{workflow_id_or_name}/status¶ Get workflow status.
This resource reports the status of workflow.
Parameters: - workflow_id_or_name (string) – Required. Workflow UUID or name.
Query Parameters: - user (string) – Required. UUID of workflow owner.
Status Codes: - 200 OK – Request succeeded. Info about workflow, including the status is returned.
- 400 Bad Request – Request failed. The incoming data specification seems malformed.
- 403 Forbidden – Request failed. User is not allowed to access workflow.
- 404 Not Found – Request failed. Either User or Workflow does not exist.
- 500 Internal Server Error – Request failed. Internal controller error.
-
PUT/api/workflows/{workflow_id_or_name}/status¶ Set workflow status.
This resource sets the status of workflow.
Parameters: - workflow_id_or_name (string) – Required. Workflow UUID or name.
Query Parameters: - user (string) – Required. UUID of workflow owner.
- status (string) – Required. New status.
Status Codes: - 200 OK – Request succeeded. Info about workflow, including the status is returned.
- 400 Bad Request – Request failed. The incoming data specification seems malformed.
- 403 Forbidden – Request failed. User is not allowed to access workflow.
- 404 Not Found – Request failed. Either User or Workflow does not exist.
- 409 Conflict – Request failed. The workflow could not be started due to a conflict.
- 500 Internal Server Error – Request failed. Internal controller error.
- 501 Not Implemented – Request failed. The specified status change is not implemented.
-
GET/api/workflows/{workflow_id_or_name}/workspace¶ Returns the workspace file list.
This resource retrieves the file list of a workspace, given its workflow UUID.
Parameters: - workflow_id_or_name (string) – Required. Workflow UUID or name.
Query Parameters: - user (string) – Required. UUID of workflow owner.
Status Codes: - 200 OK – Requests succeeded. The list of code|input|output files has been retrieved.
- 400 Bad Request – Request failed. The incoming data specification seems malformed.
- 404 Not Found – Request failed. Workflow does not exist.
- 500 Internal Server Error – Request failed. Internal controller error.
-
POST/api/workflows/{workflow_id_or_name}/workspace¶ Adds a file to the workspace.
This resource is expecting a workflow UUID and a file to place in the workspace.
Parameters: - workflow_id_or_name (string) – Required. Workflow UUID or name.
Query Parameters: - user (string) – Required. UUID of workflow owner.
- file_name (string) – Required. File name.
Status Codes: - 200 OK – Request succeeded. The file has been added to the workspace.
- 400 Bad Request – Request failed. The incoming data specification seems malformed
- 404 Not Found – Request failed. Workflow does not exist.
- 500 Internal Server Error – Request failed. Internal controller error.
-
GET/api/workflows/{workflow_id_or_name}/workspace/{file_name}¶ Returns the requested file.
This resource is expecting a workflow UUID and a filename existing inside the workspace to return its content.
Parameters: - workflow_id_or_name (string) – Required. Workflow UUID or name
- file_name (string) – Required. Name (or path) of the file to be downloaded.
Query Parameters: - user (string) – Required. UUID of workflow owner.
Status Codes: - 200 OK – Requests succeeded. The file has been downloaded.
- 400 Bad Request – Request failed. The incoming data specification seems malformed.
- 404 Not Found – Request failed. file_name does not exist.
- 500 Internal Server Error – Request failed. Internal controller error.
-
POST/api/yadage/remote¶ Creates a new yadage workflow from a remote repository.
This resource is expecting JSON data with all the necessary information to instantiate a yadage workflow from a remote repository.
Query Parameters: - user (string) – Required. UUID of workflow owner.
Status Codes: - 200 OK – Request succeeded. The workflow has been instantiated.
- 400 Bad Request – Request failed. The incoming data specification seems malformed
-
POST/api/yadage/spec¶ Creates a new yadage workflow from a specification file.
This resource is expecting a JSON yadage specification.
Query Parameters: - user (string) – Required. UUID of workflow owner.
Status Codes: - 200 OK – Request succeeded. The workflow has been instantiated.
- 400 Bad Request – Request failed. The incoming data specification seems malformed