Workflows API

Routes to make, publish, activate, import, and share workflows.

Routes to make, change, publish, and share workflows.

List workflows

GET /api/v1/workflows

Query parameters

Name Type Required Notes
limit integer No Default: 50. Range: 1 to 100.
cursor string No Maximum length: 512.

Answer: 200. Fields: items, nextCursor.

Create a workflow

POST /api/v1/workflows

Zerodot checks the node types, the config, and the edge ports of the graph.

Body

Name Type Required Notes
name string Yes Maximum length: 120.
graph object No A workflow graph. See the graph.

Answer: 201. Fields: id, name, active, published, publishedVersionId, minutesSavedPerRun, description, tags, createdAt, updatedAt, draftGraph, triggers, warnings.

Create a workflow from a .zerodot.json file

POST /api/v1/workflows/import

The new workflow is a draft. Zerodot removes a credential id that the project does not have. The answer lists the variable keys that the project does not have. Send file or url.

Body

Name Type Required Notes
file any No A .zerodot.json file.
url string No A share link, or the URL of a .zerodot.json file.
password string No The password of a protected share link. Null removes it. Maximum length: 200.
name string No Maximum length: 120.

Answer: 201. Fields: id, name, missingVariables, clearedCredentials, missingNodeTypes.

POST /api/v1/workflows/import/preview

This request changes nothing. The answer lists the node types that are not installed, and the node packages that have them. This request uses a single-use link. To prevent this, send the file of the link.

Body

Name Type Required Notes
file any No A .zerodot.json file.
url string No A share link, or the URL of a .zerodot.json file.
password string No The password of a protected share link. Null removes it. Maximum length: 200.
name string No Maximum length: 120.

Answer: 200. Fields: name, nodeCount, missingNodeTypes, missingVariables, clearedCredentials, packages, unknownNodeTypes, catalogError.

GET /api/v1/workflows/{id}/shares

Path parameters

Name Type Required Notes
id UUID Yes

Answer: 200. Fields: items.

POST /api/v1/workflows/{id}/shares

The link holds a copy of the draft. Each link has its own URL, label, password, and single-use setting. A different Zerodot instance can import the URL with POST /workflows/import. The copy has no variable values and no credential data.

Path parameters

Name Type Required Notes
id UUID Yes

Body

Name Type Required Notes
label string or null No A name for you, for example the name of the buyer.
password string or null No The password of a protected share link. Null removes it.
singleUse boolean No The link operates for one import only.

Answer: 201. Fields: token, url, workflowId, label, createdAt, updatedAt, protected, singleUse, usedAt.

PATCH /api/v1/shares/{token}

Change the label, the password, or the single-use setting. With refresh, the link gets a copy of the current draft. A used single-use link stays used.

Path parameters

Name Type Required Notes
token string Yes Maximum length: 64.

Body

Name Type Required Notes
label string or null No A name for you, for example the name of the buyer.
password string or null No The password of a protected share link. Null removes it.
singleUse boolean No The link operates for one import only.
refresh boolean No Put a copy of the current draft in the link.

Answer: 200. Fields: token, url, workflowId, label, createdAt, updatedAt, protected, singleUse, usedAt.

DELETE /api/v1/shares/{token}

After this request, you cannot use the link.

Path parameters

Name Type Required Notes
token string Yes Maximum length: 64.

Answer: 200. Fields: deleted.

Export the draft

GET /api/v1/workflows/{id}/export

The answer is a .zerodot.json file. It has no variable values and no credential data. It lists the variable keys that the workflow reads.

Path parameters

Name Type Required Notes
id UUID Yes

Answer: 200. Fields: schema, nodes, edges, name, variables.

Get a workflow with its draft graph

GET /api/v1/workflows/{id}

Path parameters

Name Type Required Notes
id UUID Yes

Answer: 200. Fields: id, name, active, published, publishedVersionId, minutesSavedPerRun, description, tags, createdAt, updatedAt, draftGraph, triggers, warnings.

Rename a workflow or replace its draft

PATCH /api/v1/workflows/{id}

Path parameters

Name Type Required Notes
id UUID Yes

Body

Name Type Required Notes
name string No Maximum length: 120.
graph object No A workflow graph. See the graph.

Answer: 200. Fields: id, name, active, published, publishedVersionId, minutesSavedPerRun, description, tags, createdAt, updatedAt, draftGraph, triggers, warnings.

List published versions

GET /api/v1/workflows/{id}/versions

Path parameters

Name Type Required Notes
id UUID Yes

Query parameters

Name Type Required Notes
limit integer No Default: 50. Range: 1 to 100.
cursor string No Maximum length: 512.

Answer: 200. Fields: items, nextCursor.

Get one version with its graph

GET /api/v1/workflows/{id}/versions/{version}

Path parameters

Name Type Required Notes
id UUID Yes
version integer Yes

Answer: 200. Fields: id, workflowId, version, createdBy, createdAt, graph.

Copy a version into the draft

POST /api/v1/workflows/{id}/versions/{version}/restore

The graph of the version replaces the draft. The published version does not change. To use the new draft in production, publish it.

Path parameters

Name Type Required Notes
id UUID Yes
version integer Yes

Answer: 200. Fields: id, name, active, published, publishedVersionId, minutesSavedPerRun, description, tags, createdAt, updatedAt, draftGraph, triggers, warnings.

Publish a new version

POST /api/v1/workflows/{id}/publish

This request publishes the draft. If the body has a graph, it publishes that graph.

Path parameters

Name Type Required Notes
id UUID Yes

Body

Name Type Required Notes
graph object No A workflow graph. See the graph.

Answer: 200. Fields: version, versionId, warnings.

Turn triggers on or off

POST /api/v1/workflows/{id}/activate

A workflow must have a published version before you can make it active.

Path parameters

Name Type Required Notes
id UUID Yes

Body

Name Type Required Notes
active boolean Yes

Answer: 200. Fields: active.

The graph

A graph holds the nodes and the edges of a workflow. The OpenAPI document at /api/v1/openapi.json has the full schema. To see an example, export a workflow with GET /workflows/{id}/export. To read the config of a node type, use GET /node-types/{type}.

Change this page on GitHub