Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BW-1255 Implement POST /runs endpoint #6779

Merged
merged 15 commits into from
Jul 29, 2022
59 changes: 58 additions & 1 deletion docs/api/RESTAPI.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

104 changes: 104 additions & 0 deletions engine/src/main/resources/swagger/cromwell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,110 @@ paths:
'500':
description: An unexpected error occurred.
$ref: '#/responses/ServerError'
post:
tags:
- GA4GH Workflow Execution Service (WES) - Alpha preview
summary: Run workflow
description: >-
This endpoint creates a new workflow run and returns a `RunId` to
monitor its progress.


The `workflow_attachment` array may be used to upload files that are
required to execute the workflow, including the primary workflow, tools
imported by the workflow, other files referenced by the workflow, or
files which are part of the input. The implementation should stage
these files to a temporary directory and execute the workflow from
there. These parts must have a Content-Disposition header with a
"filename" provided for each part. Filenames may include
subdirectories, but must not include references to parent directories
with '..' -- implementations should guard against maliciously
constructed filenames.


The `workflow_url` is either an absolute URL to a workflow file that is
accessible by the WES endpoint, or a relative URL corresponding to one
of the files attached using `workflow_attachment`.


The `workflow_params` JSON object specifies input parameters, such as
input files. The exact format of the JSON object depends on the
conventions of the workflow language being used. Input files should
either be absolute URLs, or relative URLs corresponding to files
uploaded using `workflow_attachment`. The WES endpoint must understand
and be able to access URLs supplied in the input. This is
implementation specific.


The `workflow_type` is the type of workflow language and must be "CWL"
or "WDL" currently (or another alternative supported by this WES
instance).


The `workflow_type_version` is the version of the workflow language
submitted and must be one supported by this WES instance.


See the `RunRequest` documentation for details about other fields.
operationId: RunWorkflow
consumes:
- multipart/form-data
parameters:
- name: workflow_params
description: ""
required: false
type: string
in: formData
- name: workflow_type
description: ""
required: false
type: string
in: formData
- name: workflow_type_version
description: ""
required: false
type: string
in: formData
- name: tags
description: ''
required: false
type: string
in: formData
- name: workflow_engine_parameters
description: ''
required: false
type: string
in: formData
- name: workflow_url
description: ''
required: false
type: string
in: formData
- name: workflow_attachment
description: ''
required: false
type: array
items:
type: file
format: binary
in: formData
responses:
'201':
description: Successful Request
schema:
$ref: '#/definitions/RunId'
'400':
description: The request is malformed.
$ref: '#/responses/BadRequest'
'401':
description: The request is unauthorized.
$ref: '#/responses/InvalidSubmission'
'403':
description: The requester is not authorized to perform this action.
$ref: '#/responses/Forbidden'
'500':
description: An unexpected error occurred.
$ref: '#/responses/ServerError'
'/api/ga4gh/wes/v1/runs/{run_id}':
get:
tags:
Expand Down
Loading