Skip to content
OpenPostDocs
OpenPostDocs
Workflows

Cancel remaining steps; an action already dispatched may finish

POST/workflow-runs/{id}/cancel

Authorization

AuthorizationBearer <token>

In: header

Path Parameters

id*string

Query Parameters

workspace_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/workflow-runs/string/cancel?workspace_id=string" \  -H "Content-Type: application/json" \  -d '{    "expected_revision": 1  }'
{  "$schema": "https://example.com/api/v1/schemas/WorkflowRun.json",  "created_at": "2019-08-24T14:15:22Z",  "current_step_id": "string",  "definition": {    "schema": 1,    "source": {      "$schema": "https://example.com/api/v1/schemas/WorkflowSource.json",      "account_ids": [        "string"      ],      "connection_id": "string",      "include_prereleases": true,      "interval_minutes": 0,      "kind": "manual",      "repository": "string",      "url": "string"    },    "steps": [      {        "else": [          {}        ],        "id": "string",        "inputs": {          "property1": {            "literal": null,            "reference": "string"          },          "property2": {            "literal": null,            "reference": "string"          }        },        "kind": "create_draft",        "name": "string",        "then": [          {}        ]      }    ]  },  "error": "string",  "id": "string",  "mode": "string",  "revision": 0,  "source": {    "property1": null,    "property2": null  },  "state": "string",  "steps": [    {      "completed_at": "2019-08-24T14:15:22Z",      "error": "string",      "inputs": {        "property1": null,        "property2": null      },      "kind": "string",      "name": "string",      "output": {        "property1": null,        "property2": null      },      "started_at": "2019-08-24T14:15:22Z",      "state": "string",      "step_id": "string"    }  ],  "updated_at": "2019-08-24T14:15:22Z",  "wake_at": "2019-08-24T14:15:22Z",  "workflow_id": "string",  "workflow_name": "string",  "workflow_revision": 0,  "workspace_id": "string"}