6. API docs

REANA REST API client.

reana_client.api.client.create_workflow_from_json(workflow_json, name, access_token, parameters=None, workflow_engine='yadage', outputs=None)[source]

Create a workflow from json specification.

Parameters:
  • workflow_json – workflow specification in json format.
  • name – name or UUID of the workflow to be started.
  • access_token – Access token of the current user.
  • parameters – workflow input parameters dictionary.
  • workflow_engine – one of the workflow engines (yadage, serial, cwl)
  • outputs – dictionary with expected workflow outputs.
Example:
create_workflow_from_json(
    workflow_json=workflow_json,
    name='workflow_name.1',
    access_token='access_token',
    parameters={'files': ['file.txt'], 'parameters': {'key': 'value'}},
    workflow_engine='serial')
reana_client.api.client.upload_file(workflow_id, file_, file_name, access_token)[source]

Upload file to workflow workspace.

Parameters:
  • workflow_id – UID which identifies the workflow.
  • file – content of a file that will be uploaded.
  • file_name – name of a file that will be uploaded.
  • access_token – access token of the current user.
reana_client.api.client.start_workflow(workflow, access_token, parameters)[source]

Start a workflow.

Parameters:
  • workflow – name or id of previously created workflow.
  • access_token – access token of the current user.
  • parameters – dict of workflow parameters to override the original ones (after workflow creation).
reana_client.api.client.download_file(workflow_id, file_name, access_token)[source]

Downdload the requested file if it exists.

Parameters:
  • workflow_id – UUID which identifies the workflow.
  • file_name – File name or path to the file requested.
Returns:

.