2. REST API

The REANA Server offers a REST API for management workloads (workflows, jobs, tasks, etc.) running on REANA Cloud.

GET /api/ping

Ping the server (healthcheck)

Ping the server.

Status Codes:
  • 200 OK – Ping succeeded. Service is running and accessible.
GET /api/users

Get user information. Requires the admin api key.

Get user information.

Query Parameters:
 
  • email (string) – Not required. The email of the user.
  • id (string) – Not required. UUID of the user.
  • user_token (string) – Not required. API key of the admin.
  • access_token (string) – Required. API key of the admin.
Status Codes:
POST /api/users

Creates a new user with the provided information.

This resource creates a new user with the provided information (email, id). Requires the admin api key.

Query Parameters:
 
  • email (string) – Required. The email of the user.
  • user_token (string) – Required. API key of the user.
  • access_token (string) – Required. API key of the admin.
Status Codes:
GET /api/workflows

Returns list of all current workflows in REANA.

This resource return all current workflows in JSON format.

Query Parameters:
 
  • access_token (string) – Required. The API access_token of workflow owner.
Status Codes:
POST /api/workflows

Creates a new workflow based on a REANA specification file.

This resource is expecting a REANA specification in JSON format with all the necessary information to instantiate a workflow.

Query Parameters:
 
  • workflow_name (string) – Name of the workflow to be created. If not provided name will be generated.
  • spec (string) – Remote repository which contains a valid REANA specification.
  • access_token (string) – Required. The API access_token of workflow owner.
Status Codes:
GET /api/workflows/{workflow_id_or_name}/logs

Get workflow logs of a workflow.

This resource reports the status of a workflow. Resource is expecting a workflow UUID.

Parameters:
  • workflow_id_or_name (string) – Required. Analysis UUID or name.
Query Parameters:
 
  • access_token (string) – Required. API access_token of workflow owner.
Status Codes:
  • 200 OK – Request succeeded. Info about a 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. User does not exist.
  • 500 Internal Server Error – Request failed. Internal controller error.
GET /api/workflows/{workflow_id_or_name}/status

Get status of a workflow.

This resource reports the status of a workflow. Resource is expecting a workflow UUID.

Parameters:
  • workflow_id_or_name (string) – Required. Analysis UUID or name.
Query Parameters:
 
  • access_token (string) – Required. The API access_token of workflow owner.
Status Codes:
  • 200 OK – Request succeeded. Info about a workflow, including the status is returned.
  • 400 Bad Request – Request failed. The incoming payload seems malformed.
  • 403 Forbidden – Request failed. User is not allowed to access workflow.
  • 404 Not Found – Request failed. Either User or Analysis does not exist.
  • 500 Internal Server Error – Request failed. Internal controller error.
PUT /api/workflows/{workflow_id_or_name}/status

Set status of a workflow.

This resource reports the status of a workflow. Resource is expecting a workflow UUID.

Parameters:
  • workflow_id_or_name (string) – Required. Analysis UUID or name.
Query Parameters:
 
  • status (string) – Required. New workflow status.
  • access_token (string) – Required. The API access_token of workflow owner.
Status Codes:
  • 200 OK – Request succeeded. Info about a workflow, including the status is returned.
  • 400 Bad Request – Request failed. The incoming payload 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. Analysis UUID or name.
Query Parameters:
 
  • access_token (string) – Required. The API access_token of workflow owner.
Status Codes:
POST /api/workflows/{workflow_id_or_name}/workspace

Adds a file to the workspace.

This resource is expecting a file to place in the workspace.

Parameters:
  • workflow_id_or_name (string) – Required. Analysis UUID or name.
Query Parameters:
 
  • file_name (string) – Required. File name.
  • access_token (string) – Required. The API access_token of workflow owner.
Status Codes:
GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}

Returns the requested file.

This resource is expecting a workflow UUID and a file name 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:
 
  • access_token (string) – Required. The API access_token of workflow owner.
Status Codes: