API¶
- GET /dags¶
Returns list of dags by dag_ids.
Runs airflow list_tasks for every dag_id in dag_ids. If dag_ids is None, process all dags.
- Query Parameters
dag_ids (array) – Dag identifiers
- Status Codes
200 OK – Filtered by dag_ids list of dags.
400 Bad Request – The request is malformed.
401 Unauthorized – The request is unauthorized.
403 Forbidden – The requester is not authorized to perform this action.
500 Internal Server Error – An unexpected error occurred.
- Response JSON Object
dags[].dag_id (string) –
dags[].tasks[] (string) –
- POST /dags¶
Creates new dag with dag_id from the attached workflow.cwl file or its compressed content.
Creates new dag with dag_id from the attached workflow.cwl file or its compressed content.
- Query Parameters
dag_id (string) – Dag identifier
- Status Codes
200 OK – dag_id, py and cwl file locations of a created dag.
400 Bad Request – The request is malformed.
401 Unauthorized – The request is unauthorized.
403 Forbidden – The requester is not authorized to perform this action.
500 Internal Server Error – An unexpected error occurred.
- Response JSON Object
cwl_path (string) – (required)
dag_id (string) – (required)
dag_path (string) – (required)
- GET /dag_runs¶
Returns list of dag_runs by dag_id, run_id, execution_date, state.
Runs airflow task_state dag_id, task_id, execution_date for every task of dag_run from airflow list_dag_runs dag_id
- Query Parameters
dag_id (string) – Dag identifier
run_id (string) – Run identifier
execution_date (string) – Execution date
state (string) – Dag run state
- Status Codes
200 OK – Filtered by dag_id, run_id, execution_date, state list of dag_runs.
400 Bad Request – The request is malformed.
401 Unauthorized – The request is unauthorized.
403 Forbidden – The requester is not authorized to perform this action.
500 Internal Server Error – An unexpected error occurred.
- Response JSON Object
dag_runs[].dag_id (string) – (required)
dag_runs[].execution_date (string) – (required)
dag_runs[].progress (integer) – (required)
dag_runs[].run_id (string) – (required)
dag_runs[].start_date (string) – (required)
dag_runs[].state (string) – Dag run state (required)
dag_runs[].tasks[].id (string) –
dag_runs[].tasks[].state (string) – Task state
- POST /dag_runs¶
Creates new dag_run for dag_id with optional run_id and conf
Creates new_dag run for dag_id with optional run_id and conf
- Query Parameters
dag_id (string) – Dag identifier
run_id (string) – Run identifier
conf (string) – Run configuration (JSON-formatted string)
- Status Codes
200 OK – Reference information about created dag_run.
400 Bad Request – The request is malformed.
401 Unauthorized – The request is unauthorized.
403 Forbidden – The requester is not authorized to perform this action.
500 Internal Server Error – An unexpected error occurred.
- Response JSON Object
dag_id (string) – (required)
execution_date (string) – (required)
run_id (string) – (required)
start_date (string) – (required)
state (string) – Dag run state (required)
- POST /dags/dag_runs¶
Combined logic from /dags and /dag_runs POSTs
Creates new dag with dag_id from the attached workflow.cwl file or its compressed content. Either workflow or workflow_content should be provided. dag_id should follow the naming rule “cwlid-commitsha”, otherwise outdated dags won’t be deleted.
Tries to delete all previous dag_runs for the provided dag_id and run_id, which also includes - stopping all running tasks for the current dag_id and run_id - removing correspondent temporary data - cleaning up correspondent records in DB - removing outdated dags for the same cwlid if no running dag_runs were found for them
Creates new dag_run for dag_id with run_id and optional conf
- Query Parameters
dag_id (string) – Dag identifier, follow the naming rule “cwlid-commitsha”
run_id (string) – Run identifier
conf (string) – Run configuration (JSON-formatted string)
- Status Codes
200 OK – Reference information about created dag and dag_run.
400 Bad Request – The request is malformed.
401 Unauthorized – The request is unauthorized.
403 Forbidden – The requester is not authorized to perform this action.
500 Internal Server Error – An unexpected error occurred.
- Response JSON Object
dag_id (string) – (required)
execution_date (string) – (required)
run_id (string) – (required)
start_date (string) – (required)
state (string) – Dag run state (required)
- POST /dags/{dag_id}/dag_runs¶
Creates new dag_run for dag_id with optional run_id and conf
Creates new dag_run for dag_id with optional run_id and conf. Corresponds to the original Airflow API to trigger dag_run
- Parameters
dag_id (string) – Dag identifier
- Request JSON Object
conf (string) –
run_id (string) –
- Status Codes
200 OK – Reference information about created dag_run.
400 Bad Request – The request is malformed.
401 Unauthorized – The request is unauthorized.
403 Forbidden – The requester is not authorized to perform this action.
500 Internal Server Error – An unexpected error occurred.
- Response JSON Object
dag_id (string) – (required)
execution_date (string) – (required)
run_id (string) – (required)
start_date (string) – (required)
state (string) – Dag run state (required)
- GET /wes/service-info¶
Get information about Workflow Execution Service.
May include information related (but not limited to) the workflow descriptor formats, versions supported, the WES API versions supported, and information about general service availability.
- Status Codes
200 OK –
400 Bad Request – The request is malformed.
401 Unauthorized – The request is unauthorized.
403 Forbidden – The requester is not authorized to perform this action.
500 Internal Server Error – An unexpected error occurred.
- Response JSON Object
auth_instructions_url (string) – A web page URL with human-readable instructions on how to get an authorization token for use with a specific WES endpoint.
contact_info_url (string) – An email address URL (mailto:) or web page URL with contact information for the operator of a specific WES endpoint. Users of the endpoint should use this to report problems or security vulnerabilities.
default_workflow_engine_parameters[].default_value (string) – The stringified version of the default parameter. e.g. “2.45”.
default_workflow_engine_parameters[].name (string) – The name of the parameter
default_workflow_engine_parameters[].type (string) – Describes the type of the parameter, e.g. float.
supported_filesystem_protocols[] (string) –
supported_wes_versions[] (string) –
system_state_counts (object) – The system statistics, key is the statistic, value is the count of runs in that state. See the State enum for the possible keys.
tags (object) – A key-value map of arbitrary, extended metadata outside the scope of the above but useful to report back
workflow_engine_versions (object) – The engine(s) used by this WES service, key is engine name (e.g. Cromwell) and value is version
workflow_type_versions (object) – A map with keys as the workflow format type name (currently only CWL and WDL are used although a service may support others) and value is a workflow_type_version object which simply contains an array of one or more version strings
- GET /wes/runs¶
List the workflow runs.
This list should be provided in a stable ordering. (The actual ordering 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.
- Query Parameters
page_size (integer) – OPTIONAL The preferred number of workflow runs to return in a page. If not provided, the implementation should use a default page size. The implementation must not return more items than page_size, but it may return fewer. Clients should not assume that if fewer than page_size items are returned that all items have been returned. The availability of additional pages is indicated by the value of next_page_token in the response.
page_token (string) – OPTIONAL Token to use to indicate where to start getting results. If unspecified, return the first page of results.
- Status Codes
200 OK – List of the workflow runs
400 Bad Request – The request is malformed.
401 Unauthorized – The request is unauthorized.
403 Forbidden – The requester is not authorized to perform this action.
500 Internal Server Error – An unexpected error occurred.
- Response JSON Object
next_page_token (string) – A token which may be supplied as page_token in workflow run list request to get the next page of results. An empty string indicates there are no more items to return.
runs[].run_id (string) – (required)
runs[].state (string) –
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.
- POST /wes/runs¶
Run a workflow.
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.
- Status Codes
200 OK –
400 Bad Request – The request is malformed.
401 Unauthorized – The request is unauthorized.
403 Forbidden – The requester is not authorized to perform this action.
500 Internal Server Error – An unexpected error occurred.
- Response JSON Object
run_id (string) – workflow run ID
- GET /wes/runs/{run_id}¶
Get detailed info about a workflow run.
This endpoint provides detailed information about a given workflow run. The returned result has information about the outputs produced by this workflow (if available), a log object which allows the stderr and stdout to be retrieved, a log array so stderr/stdout for individual tasks can be retrieved, and the overall state of the workflow run (e.g. RUNNING, see the State section).
- Parameters
run_id (string) –
- Status Codes
200 OK – Detailed info about a workflow run.
401 Unauthorized – The request is unauthorized.
403 Forbidden – The requester is not authorized to perform this action.
404 Not Found – The requested workflow run not found.
500 Internal Server Error – An unexpected error occurred.
- Response JSON Object
outputs (object) – The outputs from the workflow run.
request.tags (object) – OPTIONAL A key-value map of arbitrary metadata outside the scope of workflow_params but useful to track with this run request
request.workflow_engine_parameters (object) – OPTIONAL Additional parameters can be sent to the workflow engine using this field. Default values for these parameters can be obtained using the ServiceInfo endpoint.
request.workflow_params (object) – REQUIRED The workflow run parameterizations (JSON encoded), including input and output file locations
request.workflow_type (string) – REQUIRED The workflow descriptor type, must be “CWL” or “WDL” currently (or another alternative supported by this WES instance)
request.workflow_type_version (string) – REQUIRED The workflow descriptor type version, must be one supported by this WES instance
request.workflow_url (string) – REQUIRED The workflow CWL or WDL document. When workflow_attachments is used to attach files, the workflow_url may be a relative path to one of the attachments.
run_id (string) – workflow run ID
run_log.cmd[] (string) –
run_log.end_time (string) – When the command stopped executing (completed, failed, or cancelled), in ISO 8601 format “%Y-%m-%dT%H:%M:%SZ”
run_log.exit_code (integer) – Exit code of the program
run_log.name (string) – The task or workflow name
run_log.start_time (string) – When the command started executing, in ISO 8601 format “%Y-%m-%dT%H:%M:%SZ”
run_log.stderr (string) – A URL to retrieve standard error logs of the workflow run or task. This URL may change between status requests, or may not be available until the task or workflow has finished execution. Should be available using the same credentials used to access the WES endpoint.
run_log.stdout (string) – A URL to retrieve standard output logs of the workflow run or task. This URL may change between status requests, or may not be available until the task or workflow has finished execution. Should be available using the same credentials used to access the WES endpoint.
state (string) –
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.
task_logs[].cmd[] (string) –
task_logs[].end_time (string) – When the command stopped executing (completed, failed, or cancelled), in ISO 8601 format “%Y-%m-%dT%H:%M:%SZ”
task_logs[].exit_code (integer) – Exit code of the program
task_logs[].name (string) – The task or workflow name
task_logs[].start_time (string) – When the command started executing, in ISO 8601 format “%Y-%m-%dT%H:%M:%SZ”
task_logs[].stderr (string) – A URL to retrieve standard error logs of the workflow run or task. This URL may change between status requests, or may not be available until the task or workflow has finished execution. Should be available using the same credentials used to access the WES endpoint.
task_logs[].stdout (string) – A URL to retrieve standard output logs of the workflow run or task. This URL may change between status requests, or may not be available until the task or workflow has finished execution. Should be available using the same credentials used to access the WES endpoint.
- POST /wes/runs/{run_id}/cancel¶
Cancel a running workflow.
- Parameters
run_id (string) –
- Status Codes
200 OK – RunId
401 Unauthorized – The request is unauthorized.
403 Forbidden – The requester is not authorized to perform this action.
404 Not Found – The requested workflow run wasn”t found.
500 Internal Server Error – An unexpected error occurred.
- Response JSON Object
run_id (string) – workflow run ID
- GET /wes/runs/{run_id}/status¶
Get quick status info about a workflow run.
This provides an abbreviated (and likely fast depending on implementation) status of the running workflow, returning a simple result with the overall state of the workflow run (e.g. RUNNING, see the State section).
- Parameters
run_id (string) –
- Status Codes
200 OK – Status info about a workflow run.
401 Unauthorized – The request is unauthorized.
403 Forbidden – The requester is not authorized to perform this action.
404 Not Found – The requested workflow run wasn”t found.
500 Internal Server Error – An unexpected error occurred.
- Response JSON Object
run_id (string) – (required)
state (string) –
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.