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

The shared technical workflow route is POST /v1/history/{session_id}/actions/{action}. 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/actions/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. The endpoint currently lacks an OpenAPI response model, so no fabricated response sample is shown.