Run workflow from step
POST /v1/organisations/{organisation_id}/workspaces/{workspace_id}/workflow-runs/{run_id}/from Deprecated
Run from here (flow-paths-design §8 phase 4): a new run of the same version that reuses the outputs of the steps before step_id from this run, without doing their work again.
Authentication
Send an API key, or an access token from your organisation’s identity provider, in the Authorization header. How API keys work
Any API key can call this operation; it needs no scope.
Security schemes in the OpenAPI document: session_cookie (cookie __Host-ivy_session)bearer (bearer)api_key (bearer)
Parameters
-
organisation_idpathstringrequired -
workspace_idpathstringrequired -
run_idpathstringrequired
Request body
application/json RunFromStep required
-
step_idstringrequiredThe step the new run starts at; the steps it runs after are reused.
Responses
-
The new run started: the steps before the chosen one are reused from the run, the rest run again
-
unauthenticated -
run_content_hidden: you may see only that the run ran;not_your_run: it acts as the person who started it;insufficient_scope,workspace_content_restricted,forbidden -
No such run you may know of, no such step, or flows or paths are off
-
run_in_progress;test_run: test runs start again from the editor;cannot_run_from_here: a step before it didn't finish;run_from_version_changed: the flow has another active version;run_from_reused_erased: what a step to reuse did, or the run's input, was erased;run_from_changed_inputs: the trigger's file, or a file a step to reuse read, has a newer version;input_missing: a file the run read or a step to reuse saved is being deleted;busy;workflow_inactive: the flow was switched off while the run started;workspace_archived; on the threerun_from_…codes andinput_missing, run it again from the start -
rate_limited: the API key's requests per minute are used up; retry afterRetry-Afterseconds -
internal -
unavailable: the database is briefly unavailable; retry afterRetry-Afterseconds
Error codes
Errors come back as an ErrorBody whose code is one of these.
- 401
unauthenticated - 403
run_content_hiddennot_your_runinsufficient_scopeworkspace_content_restrictedforbidden - 404
not_foundgeneric code for this status - 409
run_in_progresstest_runcannot_run_from_hererun_from_version_changedrun_from_reused_erasedrun_from_changed_inputsinput_missingbusyworkflow_inactiveworkspace_archived - 429
rate_limited - 500
internal - 503
unavailable
Examples
curl -X POST "$IVY_API_URL/v1/organisations/$ORGANISATION_ID/workspaces/$WORKSPACE_ID/workflow-runs/$RUN_ID/from" \
-H "Authorization: Bearer $IVY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"step_id":"step_123"}' import { client, runWorkflowFromStep } from "@spacivapp/ivy-sdk";
client.setConfig({
baseUrl: process.env.IVY_API_URL,
headers: { Authorization: `Bearer ${process.env.IVY_API_KEY}` },
});
const { data, error, response } = await runWorkflowFromStep({
path: { organisation_id: organisationId, workspace_id: workspaceId, run_id: runId },
body: {
step_id: "step_123"
},
}); {
"step_id": "step_123"
} {
"existing": false,
"outcome": "string",
"reason": "string",
"run_id": "run_123"
}