Check workflow
POST /v1/organisations/{organisation_id}/workspaces/{workspace_id}/workflows/check Deprecated
Checks a version without activating it (§7.2); a dry run while editing.
Authentication
Send an API key, or an access token from your organisation’s identity provider, in the Authorization header. How API keys work
Scope the API key needs: workflows:read
Security schemes in the OpenAPI document: session_cookie (cookie __Host-ivy_session)bearer (bearer)api_key (bearer)
Parameters
-
organisation_idpathstringrequired -
workspace_idpathstringrequired
Request body
application/json CheckFlow required
-
file_idstringrequired -
version_idstringrequired
Responses
-
The check's errors, the outside-reach report, who may activate it and what the space identity can't reach
-
unauthenticated -
workspace_content_restricted,insufficient_scope -
No such file or version, or flows are off
-
file_scanning,file_quarantined,file_scan_failed -
not_a_workflow,file_too_large,invalid_encoding,validation_failed -
rate_limited: the API key's requests per minute are used up; retry afterRetry-Afterseconds -
internal -
storage_unavailable; orunavailable: 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
workspace_content_restrictedinsufficient_scope - 404
not_foundgeneric code for this status - 409
file_scanningfile_quarantinedfile_scan_failed - 422
not_a_workflowfile_too_largeinvalid_encodingvalidation_failed - 429
rate_limited - 500
internal - 503
storage_unavailableunavailable
Examples
curl -X POST "$IVY_API_URL/v1/organisations/$ORGANISATION_ID/workspaces/$WORKSPACE_ID/workflows/check" \
-H "Authorization: Bearer $IVY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"file_id":"file_123","version_id":"version_123"}' import { client, checkWorkflow } 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 checkWorkflow({
path: { organisation_id: organisationId, workspace_id: workspaceId },
body: {
file_id: "file_123",
version_id: "version_123"
},
}); {
"file_id": "file_123",
"version_id": "version_123"
} {
"errors": [
{
"code": "not_found",
"column": 0,
"line": 0,
"message": "A short explanation for people",
"path": "string"
}
],
"file_id": "file_123",
"identity_cannot_reach": [
{
"access": "string",
"kind": "string",
"reference": "string",
"step": "string"
}
],
"needs_admin": [
"string"
],
"outside_reach": {},
"path_changes": [
"string"
],
"paths": [
{
"after": [
{
"paths": [],
"step_id": "step_123"
}
],
"at_the_same_time": [
"string"
],
"certain": false,
"step_id": "step_123"
}
],
"people_run_only": false,
"valid": false,
"version_id": "version_123",
"warnings": [
{
"code": "not_found",
"column": 0,
"line": 0,
"message": "A short explanation for people",
"path": "string"
}
]
}