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

NameTypeRequiredConstraintsDescription
projectIdintegerYesThe unique ID for a specified project.
entityIdstringYesEntity ID (unique within project)
workflowIdstringYesThe unique ID of the workflow (MongoDB ObjectID hex string).

Responses

201 The run was created and queued.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
createdAtstringNoThe time the run was created (ISO 8601).
entityIdstringNoThe unique identifier for the entity the workflow belongs to.
errorobjectNoError information set when the run fails. Absent on non-failed runs.
Properties of error
PropertyTypeRequiredConstraintsDescription
codestringNoone of: user, internal, expired, timeoutMachine-readable error code. 'user': a failure the user can fix (see 'message'). 'internal': an unexpected failure the user cannot fix. 'expired': the run was not picked up before the timeout. 'timeout': the run started but did not finish within the execution timeout.
messagestringNoHuman-readable, user-facing description of the failure and how to address it. Present for 'user' errors. Safe to display; contains no internal implementation detail.
finishedAtstringNoThe time the run completed (ISO 8601). Absent while the run is queued or running.
idstringNoThe unique identifier for the workflow run.
projectIdintegerNoThe unique identifier for the project the run belongs to.
statestringNoone of: queued, running, succeeded, failedThe current lifecycle state of the run.
stepsarray<object>NoThe step execution records for this run, in the order the steps were started. Empty on runs that have not executed any step yet.
Properties of steps
PropertyTypeRequiredConstraintsDescription
branchIdstringNoThe ID of the parent step's branch this step belongs to. Absent for top-level steps.
finishedAtstringNoThe time the step completed (ISO 8601). Absent while the step is running.
idstringNoThe identifier of the workflow step that was executed.
inputsobjectNoThe resolved input values the step ran with.
nodestringNoThe node type the step executed.
outputsobjectNoThe output values the step produced. Absent unless the step succeeded with output.
parentIdstringNoThe ID of the step this step branched from. Absent for top-level steps.
startedAtstringNoThe time the step started (ISO 8601).
statestringNoone of: running, succeeded, failed, cancelledThe state of the step execution.
triggerobjectNoWhat 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.
Properties of trigger
PropertyTypeRequiredConstraintsDescription
triggerIdstringNoThe ID of the trigger that fired. For a manual run, the ID of the workflow's first trigger.
triggeredBystringNoone of: trigger, manualWhat caused the run to start. 'trigger': the workflow's trigger fired. 'manual': started by hand through the API. Absent on runs created before this field was recorded.
typestringNoone of: cron, eventThe type of the workflow's triggers.
updatedAtstringNoThe time the run was last updated (ISO 8601).
workflowIdstringNoThe unique identifier for the workflow that was executed.

401 Authorization is required to access this resource.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-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

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

404 Workflow not found.

429 Request failed because of rate limit.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

500 An unexpected error has occurred.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

503 The service is temporarily unavailable.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.