Workflows

Workflows

Metafold workflows endpoint.

Constructor

new Workflows()

Source:

Classes

Workflows

Methods

(async) cancel(id)

Cancel a running workflow.
Source:
Parameters:
Name Type Description
id string ID of workflow to canel.
Returns:
Workflow resource.

(async) delete(id)

Delete a workflow.
Source:
Parameters:
Name Type Description
id string ID of workflow to delete.

(async) get(id)

Get a workflow.
Source:
Parameters:
Name Type Description
id string ID of workflow to get.
Returns:
Workflow resource.

(async) list(paramsopt)

List workflows.
Source:
Parameters:
Name Type Attributes Description
params Object <optional>
Optional list parameters.
Name Type Attributes Description
sort string <optional>
Sort string. For details on syntax see the Metafold API docs. Supported sorting fields are: "id", "created", "started", or "finished".
q string <optional>
Query string. For details on syntax see the Metafold API docs. Supported search fields are: "id" and "state".
Returns:
List of workflow resources.

(async) run(definition, paramsopt, assetsopt, timeoutopt)

Dispatch a new workflow and wait for the result.
Source:
Parameters:
Name Type Attributes Default Description
definition string Workflow definition encoded as YAML.
params Object <optional>
Workflow parameters.
assets Object <optional>
Workflow assets.
timeout number <optional>
12000 Time in seconds to wait for a result.
Returns:
Completed workflow resource.