· docs
  1. Docs
  2. Reference

HTTP API Reference

The JSON API behind the archigov UI — authentication, conventions, errors, and every endpoint grouped by domain.

The web UI is a client of this API and has no private endpoints: anything you can do in the product you can automate, with the same rights.

#Conventions

  • Base path: /api. Requests and responses are JSON unless noted (CSV and XML exports).
  • Identifiers: UUIDs in paths; human codes (ADR-0001, REV-0001, STD-001, SES-0001) in responses. Many detail endpoints accept either.
  • Timestamps: ISO 8601, UTC.
  • Every mutation is audited under the calling user.

#Authentication

ModeHow to call
AUTH_MODE=entraSign in through the browser flow (/api/auth/login); the API uses the session cookie. Unauthenticated calls get 401 {"error":"sign_in_required","login_url":"…"}
AUTH_MODE=localThe session cookie (from POST /api/auth/local) or, without one, an x-user: <user id> header. An unknown user is treated as a platform admin with no governance rights
Shell
# local mode: act as the demo decision maker
curl -s http://localhost:8080/api/me/work -H 'x-user: m.hughes'

Caution

The x-user header is honoured only in local mode, which is a trusted-network convenience. Under Entra it is ignored.

#Errors

StatusMeaning
400Invalid input; error explains what
401Not signed in (Entra mode)
403The capability is missing ({"error","capability"}) or a board check refused ({"error","reason"})
404Unknown item
409A state conflict, e.g. accepting a decision under review, an AI feature that is disabled, changing frozen positions
502An upstream provider (Azure, DevOps, AI) failed; the message never contains a secret

#Endpoints

#System

MethodPathPurpose
GET/healthLiveness; no auth
GET/overviewDashboard figures, pipeline, and the caller's awaiting count
GET/me/workThe caller's work queue: positions, declare, resolve, sessions, conditions, confirm (conditions on boards the caller chairs whose work item in Azure DevOps is closed), requested (for authors: reviews a delivery team asked for by tag), circulations, assessments, resubmit, changed, no_decision, sign_offs ({subject, board, due, status, revision_needed}: the reaffirmations due soon or overdue on boards the caller chairs)
GET/search?q=Search across items
GET, POST/settingsRead or change settings (POST: platform admin)
POST/backupBack up now (platform admin)
GET/ai/featuresWhich AI features are enabled
POST/ai/testProvider round-trip test (platform admin)
GET/auditAudit rows with item codes; filters and facets
GET/audit/verifyRe-verify the hash chain

#Authentication and Users

MethodPathPurpose
GET/auth/meThe caller, roles, seats and capabilities
GET/auth/login, /auth/callbackEntra sign-in flow
POST/auth/localSign in as a user (local mode)
POST/auth/logoutSign out
GET, POST/auth/rolesRole assignments (POST: platform admin)
GET, POST/users; GET, PUT /users/:idUsers, system roles and the admin flag (writes: platform admin)

#Model

MethodPathPurpose
GET/applications, /applications/:idApplications with resources, provenance, verification and classification (the list: criticality, services, regulated, origin, verification; the detail adds method, evidence, what the tags say, reason, who set and verified it)
GET/applications/:id/viewsGenerated ArchiMate views as JSON and XML, with annotations
POST/applications/:id/verify-allVerify an application and its members
PUT/applications/:id/classificationClassify by hand: {criticality, services: [{name, kind}], reason} (authors; reason ≥ 10 characters; a regulated service with any criticality but critical is 400)
POST/applications/:id/classification/resetHand the classification back to the tags (409 when already derived)
POST/applications/:id/classification/verifyVerify the classification; {verified: false} withdraws
POST/applications/:id/classification/suggestAI classification suggestion; nothing stored (409 when off)
GET/business-servicesEach service with the applications, resources, regions and shared services behind it; unclassified applications; critical applications naming no service; counts by tier
POST/applications/:id/annotations; PUT, DELETE /annotations/:idNotes on a view or element (author-only edit)
GET/shared-servicesShared services
POST/elements/:id/verifyVerify an element
POST/resources/:id/moveMove a resource to another application

#Legacy Register

MethodPathPurpose
GET/lifecycleThe register: the lifecycle data in force (snapshot: source, licence, date, products), warn_days, assessment_months, counts by state, components worst first with the resources running each and how each was matched, unmatched (tracked resources with no version), applications with their legacy status, and due
GET/lifecycle/productsThe products and their version cycles, with state, for the correction form
POST/lifecycle/refreshFetch the lifecycle data again from endoflife.date (platform admin); a product that fails keeps its previous data → {fetched_at, products, failed}
GET/resources/:id/lifecycleOne resource's components, state and origin
PUT/resources/:id/lifecycleSet the components by hand: {components: [{product, cycle}], reason} (authors; at most five; reason ≥ 10 characters; an unknown product or cycle is 400)
POST/resources/:id/lifecycle/resetHand the components back to the collected facts (409 when already derived)
GET/applications/:id/legacyThe application's legacy standing, its assessment history, the template and the allowed results
POST/applications/:id/legacy-assessmentsRecord a legacy assessment: {result, summary_md, reference?} (authors; result is satisfactory, satisfactory_with_remarks or unsatisfactory; summary ≥ 10 characters; reference an http(s) link only)
POST/applications/:id/legacy-assessments/draftAI draft of the assessment under the template; nothing stored (409 when Assessment Drafting is off)

#Third Parties

MethodPathPurpose
GET/third-partiesThe designations in force (ctp: regime, instrument, effective, entries of provider and entity), providers with the applications on each, their criticality, resources, regions, regulated services and share, concentration, exit_plans with each one's status and latest plan, counts, and the allowed substitutability values
PUT/third-parties/ctpReplace the designations list: {regime?, instrument, effective, entries: [{provider, entity}]} (platform admin)
GET/applications/:id/third-partiesThe application's providers with each exit plan's standing, the template, the allowed results and the substitutability values
POST/applications/:id/exit-plansRecord an exit plan: {provider, result, substitutability, summary_md, tested_at?, reference?} (authors; result is satisfactory, satisfactory_with_remarks or unsatisfactory; substitutability is not_substitutable, highly_complex, medium_complexity or easily_substitutable; summary ≥ 10 characters; tested_at a date not in the future; reference an http(s) link only; a provider the application does not rely on is 400)
POST/applications/:id/exit-plans/draftAI draft of the plan for {provider} under the template; nothing stored (409 when Assessment Drafting is off)

#Risk Register and Architecture Debt

MethodPathPurpose
GET/risks[?application=&decision=]The risk register: {risks, counts, severities, statuses}, where counts has open, accepted, proposed, review_overdue, high_or_critical, from_exceptions and total. Each risk is {id, code, title, description, severity, status, stored_status, owner, review_by, review_overdue, source, origin, decision, applications, created_by, closed_by, closed_at, closure_note, editable}; source is decision, exception or manual. An active exception's risk has id exception:<id>, no code and editable: false. Read-only, for everyone who can read
POST/risksLog a risk: {title, description?, severity, owner?, review_by?, decision_id?, application_ids?, origin?} (authors; title ≥ 5 characters; severity is low, medium, high or critical; owner defaults to the caller; a decision's applications are added automatically; origin is human or ai_assisted). A short title, an unknown severity, owner or application is 400; an unknown decision is 404
PUT/risks/:idChange a risk: {status?, severity?, owner?, review_by?, note?} (its owner or whoever logged it; anyone else gets 403). status is open, accepted, mitigated or closed; moving to mitigated or closed needs a note ≥ 10 characters
GET/debt[?application=]Architecture debt, derived on read: {finding_days, items, by_application, counts, total}. Each item is {kind, application, title, detail, since, link}; kind is aged_finding, drift, condition_overdue, exception_expired, end_of_life, legacy_assessment_due or exit_plan_due. An unknown application is 404
POST/decisions/:id/suggest-risksAI Risk Extraction: up to five {title, description, severity} the decision's text supports → {risks, origin, provider, model}; nothing stored (authors; 409 when Risk Extraction is off)

#Governance Catalogue

MethodPathPurpose
GET/artefacts, /artefacts/:id, /artefacts/kindsList, read, kinds. An adopted item carries reaffirmation — on the list {due, status, revision_needed}, on the read the full record described under Reaffirmations; null otherwise
POST/artefacts; PUT /artefacts/:idCreate or edit a draft
POST/artefacts/:id/submit, /retire, /verifyLifecycle actions
GET/artefacts/:id/dry-runEvaluate a draft's rule without storing anything
POST/artefacts/draft-rule, /artefacts/suggest-referencesAI drafting (409 when off)
GET/standards/packs; POST /standards/packs/:id/importPacks
POST/import/artefacts, /import/artefacts/csvImport artefacts as drafts
—/standards/*Aliases of /artefacts/* for older clients

#Decisions

MethodPathPurpose
GET/decisions, /decisions/:idList and read, with links and the review in flight. An accepted decision carries reaffirmation — on the list {due, status, revision_needed}, on the read the full record described under Reaffirmations; null otherwise
POST/decisions; PUT /decisions/:idCreate and edit (authors)
POST/decisions/:id/statusChange status (chair); 409 while under review for accepted/rejected
POST/decisions/:id/verifyVerify
POST/decisions/review-draftAI decision review (409 when off)
POST/decisions/:id/assessments, /decisions/:id/assessments/provideEvidence on a draft decision
GET/risks?decision=<id>The risks the decision accepts (see Risk Register)

#Reaffirmations

One reaffirmation is a sign-off in the API, so the routes, the sign_offs work list and the signoff:* audit actions keep that word.

MethodPathPurpose
GET/sign-offs[?status=]Every adopted catalogue item and accepted decision with its reaffirm-by date: {items, cadence_months: {artefact, decision}}. Each item is {subject: {kind, id, code, title, type, since}, board, due, status, revision_needed, last: {outcome, note, signed_by, signed_at}, can_sign}; last is null before the first reaffirmation. status filters by overdue, due_soon, current or revision_needed. Read-only, for everyone who can read
POST/sign-offsReaffirm an item, or mark it for revision: {subject_kind, subject_id, outcome, note?}, where subject_kind is artefact or decision and outcome is reaffirmed or revision_needed → the item with its new date. The chair of the owning board only; everyone else gets 403. An item that is not adopted or accepted is 404; an unknown outcome, or a revision with a note under 10 characters, is 400

On GET /decisions/:id and GET /artefacts/:id, reaffirmation is {subject, board, due, status, revision_needed, last, can_sign, cadence_months, history}, where history is every reaffirmation of the item, newest first: {outcome, note, board_id, signed_by, signed_by_name, signed_at, next_due}.

#Roadmap

MethodPathPurpose
GET/roadmap[?application=]The roadmap, computed on read: {generated_at, application, lanes: {now, next, later, done}, counts, kinds}, where counts has now, next, later, done and total, and kinds is [{kind, n}]. Each item is {id, kind, lane, title, code, status, due, progress, applications, link: {kind, id}, detail, changes}: kind is decision, change, condition, lifecycle or exception; progress is {done, total} for a measurable decision, otherwise null; changes (decisions only) lists the planned changes under it. With application, that application's items plus the decisions that apply to every application; an unknown application is 404. Read-only, for everyone who can read

#Reviews, Positions and Assessments

MethodPathPurpose
GET/reviews, /reviews/:idList (filters by stage, type, board, session) and read, with progress and can. progress.fast_lane is the board's fast-lane assessment of a design (risk tier, patterns, checks; null when the board offers no lane), and progress.via_fast_lane is true when the lane, not positions, satisfies the policy. A design review also returns its claimed patterns
POST/reviewsSubmit a review; a design review may claim patterns: [id or code] (adopted patterns only, otherwise 400)
PUT/reviews/:id/patternsChange a design's claimed patterns: {patterns} (the submitter only; 409 once decided)
POST/reviews/:id/pre-review, /comment, /resubmitPre-review, comment, resubmit
PUT/reviews/:id/areasCorrect the touched areas
POST/reviews/:id/positionsRecord a position: {area?, areas?, position, text?}
POST/reviews/:id/approvalsCount-mode alias: approve / request changes
POST/positions/:id/resolveChair resolves a conditional
POST/reviews/:id/dependenciesLink or create a dependent decision
POST/reviews/:id/decideDeclare an outcome: {outcome, rationale?, conditions?, circulation_due?, board_id?}
POST/conditions/:id/closeMark a condition met
POST/conditions/:id/raiseRaise the condition as a work item in Azure DevOps: {work_item_id?, title?} → 200 {ok, raised}; 202 {unconfirmed, raised} when Azure DevOps gave no answer (asking again finds the work item, never makes a second); 409 when the capability is off, the review covers no Azure DevOps work item, or it is already raised; 502 when Azure DevOps refused. The condition's owner, the review's submitter, or the chair or secretary of its board
POST/review-events/:id/verifyVerify an AI or rules pre-review
GET/assessments/typesTypes and their templates
POST/reviews/:id/assessmentsRequest an assessment (board seat)
POST/reviews/:id/assessments/provide; PUT /assessments/:id/providedProvide / update (submitter)
PUT/assessments/:idReassign or move the due date
POST/assessments/:id/result, /assessments/:id/waiveRecord (assignee) or waive (chair)
POST/reviews/:id/assessments/draftAI summary draft (409 when off)

#Boards and Sessions

MethodPathPurpose
GET/boards, /boards/:id, /boards/routeBoards, detail, and which board a review would route to (?type=&kind=&category=&application=; repeat application for a decision's applications)
POST/boards; PUT, DELETE /boards/:idCreate (platform admin), edit, remove
POST, PUT, DELETE/boards/:id/members…, /routing…, /policies…Seats and areas, routing (each rule review_type, kind, category, priority, and for design, decision and exception rules application_ids and owner), approval policies
PUT/boards/:id/policies/designThe design policy may carry policy.fast_lane: {enabled, require_pattern} (require_pattern defaults to true; a fast lane on any other review type is 400)
GET/boards/:id/fast-laneThe open design reviews the fast lane satisfies, each with can_declare for the caller
POST/boards/:id/fast-lane/declareDeclare them approved: {review_ids?, rationale?} → {declared, skipped}; each item is checked again (chair)
GET, POST/boards/:id/sessionsList or plan sessions
GET/sessions, /sessions/:id, /sessions/:id/minutesSessions, detail with agenda and quorum, minutes
POST/sessions/:id/open, /closeOpen and close (chair)
POST, PUT/sessions/:id/agenda/refresh, /sessions/:id/agendaRefresh or reorder the agenda
POST/sessions/:id/attendance, /delegations; DELETE /delegations/:didAttendance and delegation
POST/sessions/:id/items/:reviewId/call, /nominate, /pull, /defer, /declareRun an item
POST/sessions/:id/consent/declareDeclare the consent agenda
PUT/sessions/:id/notes; POST /sessions/:id/draft-notesNotes; AI draft

#Conformance and Evidence

MethodPathPurpose
GET/conformanceFindings, exceptions, conditions, runs
POST/evaluateRun an evaluation now
POST/findings/:id/resolveClose a finding with a reason (chair)
POST/exceptionsGrant an exception (chair)
GET/evidence, /evidence/summaryImported evidence
POST/evidence/importImport evidence (platform admin)
POST/evidence/suggest-mappingAI mapping suggestions (platform admin)
GET/evidence-pack, /evidence-pack/verify?hash=Export and verify the signed pack; verify checks a board pack the same way: {found, hash_ok, signature_ok, key_is_current, chain_ok, chain_head, generated_at, scope}

#Governance Metrics and Board Packs

MethodPathPurpose
GET/metrics?days=The governance metrics, computed on read: {generated_at, period_days, from, reviews, decisions, conditions, exceptions, conformance, coverage, risks, debt, registers, roadmap}; conformance.trend is the last evaluation run of each day; coverage.sign_offs is the reaffirmation coverage, {current, total, overdue, due_soon}; risks carries the risk register's counts and debt the architecture debt's counts by kind. days defaults to 90 and is clamped to 7–730. A figure with no data is null, never 0. Read-only, for everyone who can read
GET/board-packsThe signed board packs, newest first: hash, title, period, board, narrative origin, who prepared each and when (export_evidence)
POST/board-packsPrepare and sign a pack: {days?, title?, board_id?, narrative_md?, narrative_origin?} → {id, hash, title, signed_at}. days is 7–730 (default 90); narrative_origin is human or ai_assisted; the narrative is at most 20,000 characters. A board's chair or secretary only; everyone else gets 403
GET/board-packs/:hash[?download=1]One signed pack as signed; download=1 sends it as an attachment (export_evidence)
POST/board-packs/draft-narrativeAI draft of the narrative from the figures for {days?} → {narrative_md, origin, provider, model}; nothing stored (409 when Board Pack Narrative is off; a board's chair or secretary only)

#Sources and Planned Change

MethodPathPurpose
GET/sourcesSources and their last runs
POST/sources/azure/test, /sources/azure/sync, /sources/defender/sync, /sources/policy/syncAzure collection
POST/sources/ado/test, /sources/ado/syncAzure DevOps backfill
GET/sources/ado/writebackWrite-back to Azure DevOps: the switches, the stage tags, and counts of work items in scope, shown, tagged and failing, and of those already carrying a tag under the prefix that archigov did not write (prefix_in_use)
POST/sources/ado/writebackTurn write-back on or off and choose what is written: {enabled?, link?, stage?, comment?, raise?, request?, tag_prefix?, raise_type?, remove_tags?}. Turning it on writes at once; turning it off takes the stage tags off unless remove_tags is false, and cleanup in the answer says how many were removed and how many could not be reached (already off, remove_tags: true tries again). 409 for "on" without a connected backlog; 400 for a bad prefix or for "on" with nothing to write (platform admin)
POST/sources/ado/writeback/testWhether the identity may edit a work item; nothing is saved (platform admin)
GET/sources/ado/writeback/previewWhat would be written now, with the saved switches or ?link=&stage=&comment=&tag_prefix=; nothing is sent
POST/sources/ado/writeback/runWrite now what differs, failed writes included without waiting out their delay; 409 when write-back is off (platform admin)
POST/sources/demo/load, /resync, /perturbDemo tools
POST/hooks/adoService hook receiver (own secret)
POST/import/csv, /import/archimate; GET /import/templates/csvModel imports
GET, POST/work-items; PUT /work-items/:idPlanned changes, each with its lifecycle_stage, whether a review is being asked for from the backlog (review_requested) and, where write-back wrote to it, writeback ({tag, links, written_at, error}); manual ones by authors
POST/work-items/:id/link, /acknowledge-change, /draft-decisionLink, acknowledge, draft a decision

#Exports

MethodPathPurpose
GET/exports/oscal[?application=]OSCAL assessment results
GET/exports/dora-roi.csvDORA register of information (simplified)
GET/exports/archimate[?application=]ArchiMate Open Exchange XML
GET/runs/:idOne evaluation or sync run

See Exports for formats.