Workflows and Artifacts
Workflows operate on a saved Technical Session. Successful workflow actions persist a revision and register an artifact in the session's unified_experience.
List artifacts
curl "$IVORLEAF_API_BASE_URL/v1/history/$SESSION_ID/artifacts" \
--header "Authorization: Bearer $IVORLEAF_API_KEY"
The source implementation returns session_id, artifact_count, artifacts, and unified_experience. The route has no declared response model, so tolerate additive fields.
Retrieve one artifact
curl "$IVORLEAF_API_BASE_URL/v1/history/$SESSION_ID/artifacts/$ARTIFACT_ID" \
--header "Authorization: Bearer $IVORLEAF_API_KEY"
The source implementation returns session_id, artifact_id, artifact, content, and optional presentation. A missing artifact returns 404 with Artifact not found.
Generate a validated workflow artifact
Published technical workflow routes use POST /v1/history/{session_id}/technical-workflows/{workflow}. It accepts no JSON body; the input is the existing session context and one verified workflow identifier.
curl --request POST \
"$IVORLEAF_API_BASE_URL/v1/history/$SESSION_ID/technical-workflows/architecture-review" \
--header "Authorization: Bearer $IVORLEAF_API_KEY"
Source-derived response fields include session_id, revision_id, action, workflow_id, workflow_type, title, technical_analysis, recommendations, risks, validation_summary, sources, artifact, and unified_experience. Published typed workflow aliases declare TechnicalWorkflowActionResponse; nested content still requires runtime validation. History/artifact retrieval responses are less completely typed. The generic /actions/{action} dispatcher is a hidden compatibility surface and is not the recommended public integration route.