1. Overview
+1.1. Version information
+Version : 0.3.0
+1.2. URI scheme
+BasePath : /ga4gh/wes/v1
+Schemes : HTTP, HTTPS
1.3. Consumes
+-
+
-
+
+application/json
+
1.4. Produces
+-
+
-
+
+application/json
+
2. Executive Summary
+An executive summary summarising the major points of the document. To be added for issue #37.
+3. Introduction
+Introduction setting the document’s scope.
+4. Standards
+Standards incorporated (?)
+4.1. Authorization & Authentication
+Security issues around authentication and authorization need to be resolved and added into the specification. To be added for issue #36.
+5. Paths
+5.1. Run a workflow.
+POST /runs+
5.1.1. Description
+This endpoint creates a new workflow run and
+returns the workflow ID to monitor its progress.
The request may upload files that are required to execute the
+workflow identified as workflow_attachment
. The parts
+supplied in workflow_attachment
may include 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.
See documentation for WorkflowRequest for detail about other
+fields.
5.1.2. Parameters
+Type | +Name | +Schema | +
---|---|---|
FormData |
+tags |
+string (application/json) |
+
FormData |
+workflow_attachment |
+< string (binary) > array |
+
FormData |
+workflow_engine_parameters |
+string (application/json) |
+
FormData |
+workflow_params |
+string (application/json) |
+
FormData |
+workflow_type |
+string |
+
FormData |
+workflow_type_version |
+string |
+
FormData |
+workflow_url |
+string |
+
5.1.3. Responses
+HTTP Code | +Description | +Schema | +
---|---|---|
200 |
++ | + |
400 |
+The request is malformed. |
++ |
401 |
+The request is unauthorized. |
++ |
403 |
+The requester is not authorized to perform this action. |
++ |
500 |
+An unexpected error occurred. |
++ |
5.1.4. Consumes
+-
+
-
+
+multipart/form-data
+
5.1.5. Tags
+-
+
-
+
WorkflowExecutionService
+
+
5.2. List the workflow runs.
+GET /runs+
5.2.1. Description
+This should be provided in a stable
+ordering, however the ordering of this list is implementation
+dependent. When paging through the list, the client should
+not make assumptions about live updates, but should assume the
+contents of the list reflect the workflow list at the moment
+that the first page is requested. To monitor a specific
+workflow run, use GetRunStatus or GetRunLog.
5.2.2. Parameters
+Type | +Name | +Description | +Schema | +
---|---|---|---|
Query |
+page_size |
+OPTIONAL |
+integer (int64) |
+
Query |
+page_token |
+OPTIONAL |
+string |
+
5.2.3. Responses
+HTTP Code | +Description | +Schema | +
---|---|---|
200 |
++ | + |
400 |
+The request is malformed. |
++ |
401 |
+The request is unauthorized. |
++ |
403 |
+The requester is not authorized to perform this action. |
++ |
500 |
+An unexpected error occurred. |
++ |
5.2.4. Tags
+-
+
-
+
WorkflowExecutionService
+
+
5.3. Get detailed info about a workflow run.
+GET /runs/{run_id}+
5.3.1. Parameters
+Type | +Name | +Schema | +
---|---|---|
Path |
+run_id |
+string |
+
5.3.2. Responses
+HTTP Code | +Description | +Schema | +
---|---|---|
200 |
++ | + |
401 |
+The request is unauthorized. |
++ |
403 |
+The requester is not authorized to perform this action. |
++ |
404 |
+The requested workflow run not found. |
++ |
500 |
+An unexpected error occurred. |
++ |
5.3.3. Tags
+-
+
-
+
WorkflowExecutionService
+
+
5.4. Cancel a running workflow.
+DELETE /runs/{run_id}+
5.4.1. Parameters
+Type | +Name | +Schema | +
---|---|---|
Path |
+run_id |
+string |
+
5.4.2. Responses
+HTTP Code | +Description | +Schema | +
---|---|---|
200 |
++ | + |
401 |
+The request is unauthorized. |
++ |
403 |
+The requester is not authorized to perform this action. |
++ |
404 |
+The requested workflow run wasn’t found. |
++ |
500 |
+An unexpected error occurred. |
++ |
5.4.3. Tags
+-
+
-
+
WorkflowExecutionService
+
+
5.5. Get quick status info about a workflow run.
+GET /runs/{run_id}/status+
5.5.1. Parameters
+Type | +Name | +Schema | +
---|---|---|
Path |
+run_id |
+string |
+
5.5.2. Responses
+HTTP Code | +Description | +Schema | +
---|---|---|
200 |
++ | + |
401 |
+The request is unauthorized. |
++ |
403 |
+The requester is not authorized to perform this action. |
++ |
404 |
+The requested workflow run wasn’t found. |
++ |
500 |
+An unexpected error occurred. |
++ |
5.5.3. Tags
+-
+
-
+
WorkflowExecutionService
+
+
5.6. Get information about Workflow Execution Service.
+GET /service-info+
5.6.1. Description
+May include information related (but not limited to) the workflow descriptor formats, versions supported, the WES API versions supported, and information about general the service availability.
+x-swagger-router-controller: ga4gh.wes.server
5.6.2. Responses
+HTTP Code | +Description | +Schema | +
---|---|---|
200 |
++ | + |
400 |
+The request is malformed. |
++ |
401 |
+The request is unauthorized. |
++ |
403 |
+The requester is not authorized to perform this action. |
++ |
500 |
+An unexpected error occurred. |
++ |
5.6.3. Tags
+-
+
-
+
WorkflowExecutionService
+
+
6. Definitions
+6.1. DefaultWorkflowEngineParameter
+A message that allows one to describe default parameters for a workflow
+engine.
Name | +Description | +Schema | +
---|---|---|
default_value |
+The stringified version of the default parameter. e.g. "2.45". |
+string |
+
type |
+Describes the type of the parameter, e.g. float. |
+string |
+
6.2. ErrorResponse
+An object that can optionally include information about the error.
+Name | +Description | +Schema | +
---|---|---|
msg |
+A detailed error message. |
+string |
+
status_code |
+The integer representing the HTTP status code (e.g. 200, 404). |
+integer |
+
6.3. Log
+Name | +Schema | +
---|---|
cmd |
+< string > array |
+
end_time |
+string |
+
exit_code |
+integer (int32) |
+
name |
+string |
+
start_time |
+string |
+
stderr |
+string |
+
stdout |
+string |
+
6.4. RunId
+Name | +Schema | +
---|---|
run_id |
+string |
+
6.5. RunListResponse
+The service will return a RunListResponse when receiving a successful RunListRequest.
+Name | +Description | +Schema | +
---|---|---|
next_page_token |
+A token which may be supplied as "page_token" in workflow run list request to get the next page |
+string |
+
runs |
+A list of workflow runs that the service has executed or is executing. |
+< RunStatus > array |
+
6.6. RunLog
+Name | +Description | +Schema | +
---|---|---|
outputs |
++ | + |
request |
+The original request message used to initiate this execution. |
++ |
run_id |
++ | string |
+
run_log |
++ | + |
state |
++ | + |
task_logs |
++ | < Log > array |
+
6.7. RunRequest
+To execute a workflow, send a run request including all the details needed to begin downloading
+and executing a given workflow.
Name | +Description | +Schema | +
---|---|---|
tags |
++ | < string, string > map |
+
workflow_engine_parameters |
+OPTIONAL |
+< string, string > map |
+
workflow_params |
+REQUIRED |
++ |
workflow_type |
++ | string |
+
workflow_type_version |
++ | string |
+
workflow_url |
+REQUIRED |
+string |
+
6.8. RunStatus
+Small description of a workflow run, returned by server during listing
+Name | +Schema | +
---|---|
run_id |
+string |
+
state |
++ |
6.9. ServiceInfo
+A message containing useful information about the running service, including supported versions and
+default settings.
Name | +Description | +Schema | +
---|---|---|
auth_instructions_url |
+A web page URL with information about how to get an |
+string |
+
contact_info |
+An email address or web page URL with contact information |
+string |
+
default_workflow_engine_parameters |
+Each workflow engine can present additional parameters that can be sent to the |
+< DefaultWorkflowEngineParameter > array |
+
supported_filesystem_protocols |
+The filesystem protocols supported by this service, currently these may include common |
+< string > array |
+
supported_wes_versions |
++ | < string > array |
+
system_state_counts |
+The system statistics, key is the statistic, value is the count of runs in that state. |
+< string, integer (int64) > map |
+
tags |
++ | < string, string > map |
+
workflow_engine_versions |
++ | < string, string > map |
+
workflow_type_versions |
++ | < string, WorkflowTypeVersion > map |
+
6.10. State
+-
+
-
+
UNKNOWN: The state of the task is unknown.
+
+
This provides a safe default for messages where this field is missing,
+for example, so that a missing field does not accidentally imply that
+the state is QUEUED.
+ - QUEUED: The task is queued.
+ - INITIALIZING: The task has been assigned to a worker and is currently preparing to run.
+For example, the worker may be turning on, downloading input files, etc.
+ - RUNNING: The task is running. Input files are downloaded and the first Executor
+has been started.
+ - PAUSED: The task is paused.
An implementation may have the ability to pause a task, but this is not required.
+ - COMPLETE: The task has completed running. Executors have exited without error
+and output files have been successfully uploaded.
+ - EXECUTOR_ERROR: The task encountered an error in one of the Executor processes. Generally,
+this means that an Executor exited with a non-zero exit code.
+ - SYSTEM_ERROR: The task was stopped due to a system error, but not from an Executor,
+for example an upload failed due to network issues, the worker’s ran out
+of disk space, etc.
+ - CANCELED: The task was canceled by the user.
Type : enum (UNKNOWN, QUEUED, INITIALIZING, RUNNING, PAUSED, COMPLETE, EXECUTOR_ERROR, SYSTEM_ERROR, CANCELED)
+6.12. WorkflowTypeVersion
+Available workflow types supported by a given instance of the service.
+Name | +Description | +Schema | +
---|---|---|
workflow_type_version |
+an array of one or more acceptable types for the Workflow Type. For |
+< string > array |
+