Skip to content
Proud to collaborate with Microsoft for Startups

audit.workflow-run.get-history ​

Full transition log for one workflow run, after verifying it belongs to the caller's organization.

Return the full transition log for one workflow run, after verifying the run's organization_uuid matches the caller's.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-audit
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—UUID of the caller's organization (run must belong to it)
workflow_uuidstringYes—The engine workflow id (UUID-shaped string) whose history is fetched
limitintegerNo—Page size (default 100, max 500, clamped by the engine)
offsetintegerNo—Number of transition rows to skip from the start (default 0)
diagnostic_modebooleanNo—When true, include the fuller redacted state_data_json payload for diagnostics
workflow_run_idstringNo—Engine-stamped parent DAG run id when invoked as a Step target

Output Schema ​

FieldTypeRequiredDefaultDescription
workflow_uuidstringYes—Echo of the requested workflow_uuid
workflow_typestringNo—The run's workflow_type, or empty string if not found / org mismatch
itemsjsonYes—Ordered list of state transitions for the run (oldest first). Each item: {state_name, is_terminal, terminal_status, actor, triggered_by, created_at_iso, state_data_json}. Empty if not found or the run belongs to another organization. state_data_json is a JSON-serialized string (not a dict): the engine's ReadOnlyDataWorkflow._strip_internal_ids walks every nested dict/list looking for unsibling'd id keys, but state_data is opaque JSON written by other workflows that may legitimately carry raw id columns from their own domain tables. Stringifying turns it into a scalar from the rule's perspective, so the audit surface doesn't have to opt those IDs into ALLOW_INTERNAL_IDS one library at a time. Clients should JSON.parse(state_data_json) to render.
totalintegerYes—Total transition count for the run (independent of limit/offset)
limitintegerYes—Effective limit used by the query (after clamping)
offsetintegerYes—Effective offset used by the query
mismatchbooleanYes—True if the run was not found OR belongs to another organization
errorstringNo—Set when the underlying storage call raised (string message)
error_typestringNo—Set when the underlying storage call raised (exception class name)

States ​

StateInitialTerminalSuccessAuto-advanceDescription
doneYesYesYes——

Outcomes ​

OutcomeTypeDescriptionState Data Keys
readSUCCESSWorkflow run history returnedworkflow_uuid, items, total
failedFAILUREAudit workflow failedfailure_reason

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "audit.workflow-run.get-history",
  "initial_data": {
    "organization_uuid": "value",
    "workflow_uuid": "value"
  }
}