Check flow

POST /v1/organisations/{organisation_id}/spaces/{space_id}/flows/check

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_id path string required
  • space_id path string required

Request body

application/json CheckFlow required

  • file_id string required
  • version_id string required

Responses

  • 200 application/json FlowCheck

    The check's errors, the outside-reach report, who may activate it and what the space identity can't reach

  • 401 application/json ErrorBody

    unauthenticated

  • 403 application/json ErrorBody

    workspace_content_restricted, insufficient_scope

  • 404 application/json ErrorBody

    No such file or version, or flows are off

  • 409 application/json ErrorBody

    file_scanning, file_quarantined, file_scan_failed

  • 422 application/json ErrorBody

    not_a_workflow, file_too_large, invalid_encoding, validation_failed

  • 429 application/json ErrorBody

    rate_limited: the API key's requests per minute are used up; retry after Retry-After seconds

  • 500 application/json ErrorBody

    internal

  • 503 application/json ErrorBody

    storage_unavailable; or unavailable: the database is briefly unavailable; retry after Retry-After seconds

Error codes

Errors come back as an ErrorBody whose code is one of these.

  • 401 unauthenticated
  • 403 workspace_content_restrictedinsufficient_scope
  • 404 not_found generic 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
curl -X POST "$IVY_API_URL/v1/organisations/$ORGANISATION_ID/spaces/$SPACE_ID/flows/check" \
  -H "Authorization: Bearer $IVY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_id":"file_123","version_id":"version_123"}'
JavaScript SDK
import { client, checkFlow } 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 checkFlow({
  path: { organisation_id: organisationId, space_id: spaceId },
  body: {
    file_id: "file_123",
    version_id: "version_123"
  },
});
Example request body
{
  "file_id": "file_123",
  "version_id": "version_123"
}
Example response (200)
{
  "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"
    }
  ]
}