WorkflowHub project

Logo

Project pages for developing and running WorkflowHub, a registry of scientific workflows.

View the Project on GitHub workflowhub-eu/about

RO-Crate Submission API

Submitting Workflows

To submit a new workflow to WorkflowHub as an RO-Crate, POST a multipart request to the /workflows endpoint with the following parameters:

To add a new version to an existing workflow, POST to e.g. /workflows/123/create_version where 123 is the workflow ID.

To change the policy and other metadata of the workflow, see the JSON API docs

Examples

The following examples assume authentication via API token. See the docs for details on other authentication methods.

They also assume your RO-Crate is in a file named my_ro_crate.crate.zip, and you want to add it to a Team with ID 1234.

Curl

curl -X POST -H "Authorization: Token YOUR_TOKEN_HERE" \
     -F workflow[project_ids][]=1234 \
     -F ro_crate=@my_ro_crate.crate.zip https://workflowhub.eu/workflows

Python + requests

import requests
payload = { 'ro_crate': ('my_ro_crate.crate.zip ', open('my_ro_crate.crate.zip', 'rb')), 
            'workflow[project_ids][]': (None, '1234') }
headers = { 'authorization': 'Token YOUR_TOKEN_HERE' }

response = requests.post('https://workflowhub.eu/workflows', files=payload, headers=headers)