Run an entity workflow manually
POST/projects/{projectId}/entities/{entityId}/workflows/{workflowId}/runs
Base URL: https://api.tinkermode.com
Start a run of this workflow now. Currently, only enabled workflows with cron triggers are supported.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain a user API key of a user with create permission on entity workflow runs (resource type: entityWorkflowRun, action: create), a service account token with the same permission, or a project API key with admin permission.
Path parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
projectId | integer | Yes | The unique ID for a specified project. | |
entityId | string | Yes | Entity ID (unique within project) | |
workflowId | string | Yes | The unique ID of the workflow (MongoDB ObjectID hex string). |
Responses
201 The run was created and queued.
Content type: application/json
| Property | Type | Required | Constraints | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
createdAt | string | No | The time the run was created (ISO 8601). | |||||||||||||||||||||||||||||||||||||||||||||||||||
entityId | string | No | The unique identifier for the entity the workflow belongs to. | |||||||||||||||||||||||||||||||||||||||||||||||||||
error | object | No | Error information set when the run fails. Absent on non-failed runs. | |||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
finishedAt | string | No | The time the run completed (ISO 8601). Absent while the run is queued or running. | |||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | No | The unique identifier for the workflow run. | |||||||||||||||||||||||||||||||||||||||||||||||||||
projectId | integer | No | The unique identifier for the project the run belongs to. | |||||||||||||||||||||||||||||||||||||||||||||||||||
state | string | No | one of: queued, running, succeeded, failed | The current lifecycle state of the run. | ||||||||||||||||||||||||||||||||||||||||||||||||||
steps | array<object> | No | The step execution records for this run, in the order the steps were started. Empty on runs that have not executed any step yet. | |||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
trigger | object | No | What started this run. Steps can read it as $trigger. Event runs also carry 'eventType' and the event 'data'. Absent on runs created before this field was recorded. | |||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
updatedAt | string | No | The time the run was last updated (ISO 8601). | |||||||||||||||||||||||||||||||||||||||||||||||||||
workflowId | string | No | The unique identifier for the workflow that was executed. | |||||||||||||||||||||||||||||||||||||||||||||||||||
401 Authorization is required to access this resource.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
403 The workflow is disabled, or it has a trigger that is not a cron trigger.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
404 Workflow not found.
429 Request failed because of rate limit.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
500 An unexpected error has occurred.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
503 The service is temporarily unavailable.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |