Skip to Content
ReferenceHTTP API
Reference · HTTPHTTPHypertext Transfer Protocol: the rules a browser or program uses to send a request to a web service and receive its response. APIAPIApplication programming interface: a defined way for one program to request data or actions from another.

Every route, named in the code.

A browser reaches the reasoning service only through the web application, which replaces any viewer with the signed-in session and adds the service token. The groups listed are the headings of the route tables below.

What it is for

The NovusLens screens call two sets of HTTP interfaces. The reasoning service answers questions about the twinTwinNovusLens’s model of one organisation, built from records about its teams, services and how they rely on one another. It is only as current as those records.. It handles operations that propose and commit organisation structure, plus the audit, evidence, federationFederationSharing selected signed facts and summaries between separate regional twins, while their detailed records stay in their own regions. and remitRemitA written list of an agent’s allowed actions, resources and destinations for information. The list states whether it is complete. routes. The UI is a Next.jsNext.jsThe web framework used to build and run the NovusLens interface. It provides pages, server code and request handlers. application. Its /api route handlers sit in front of the service. They work out who is signed in and pass that identity on, so the service never trusts a name typed by the browser. This page lists every route the code declares, and the rule that applies to each.

How access works

The rules below apply across the tables. Each row says which of them applies to that route.

  • Service tokenService tokenA secret value sent with requests between NovusLens services. The receiving service refuses requests with a missing or wrong value.. In the customer profileDeployment profileA setting that selects customer or development behaviour. Customer mode refuses development credentials and uses the signed-in session as the identity. (CONWAY_PROFILE=customer), every request to the reasoning service must carry the header X-Conway-Service-Token, set to the value of CONWAY_SERVICE_TOKEN. The only exceptions are /health and /ready. A missing or wrong token returns 401. The token comparison takes the same time whether or not the values match. The dev profile does not check the token.
  • Viewer. Most routes name the caller as a viewer, in the body or the query. The service looks that handle up in the account table (guards.resolve_viewer). An unknown viewer returns 403. Through the UI, the viewer is never taken from the request. The UI replaces it with the signed-in session.
  • Org binding. guards.require_org lets an actor act only inside their own organisation. The operator can work across organisations.
  • Writer. guards.require_writer refuses the board role on routes that require a writer. The board can read the organisation’s picture and save a copy of an assessment through /car/archive.
  • Named roles. Some routes name a role in their row: operator (the role that works across organisations), cxo (the Executive role for the organisation), board, or the owner of a cellCellA box on the map that stands for a team, service, supplier or AI agent. It is a unit you can inspect, not necessarily a department or a person..
  • Body size. The service refuses a request whose declared body is larger than 4 MiBKiB and MiBBinary size units: one KiB is 1,024 bytes; one MiB is 1,048,576 bytes. Evidence limits use these units., with 413.
  • Listening address. The service defaults to 127.0.0.1; --host selects another address. Compose sets 0.0.0.0 inside Docker and keeps the reasoning port private.

Reasoning service routes

The paths below are paths on the service. A browser does not call them directly. It calls the UI proxyProxyA service that receives a request and forwards it to another service. The NovusLens web proxy adds the signed-in identity and service token. at /api/reasoning/ followed by the same path (see the UI routes). The proxy forwards any path, so the service’s own route table decides what exists.

Questions and tools

MethodPathIdentity and accessPurpose
POST/questionsviewer in body, resolved by questions.submitSubmit a question to the twin. The question is queued and answered later. The queue is bounded.
GET/questionsviewer and org in queryList the viewer’s questions for an organisation.
GET/questions/{request_id}viewer and org in queryRead one question and its answer.
POST/questions/{request_id}/stop-waitingviewer and org in bodyStop waiting on a queued question.
POST/tools/{name}name must be query_graph, query_meaning, simulate_scenario, retrieve_evidence or highlight, otherwise 404. The viewer and org are bound through tools._actor.The five handlers that the substrateSubstrateThe shared Mycelium software beneath NovusLens. It stores records and lets NovusLens components exchange them. MCPMCPModel Context Protocol: a standard way for an AI application to discover and call named tools supplied by another program. tools also call. An unknown viewer or an org mismatch returns 403. Bad arguments return 400.

Health and discovery

MethodPathIdentity and accessPurpose
GET/healthNone. Outside the service token.Liveness, and whether the database and the meshMeshA set of connected Mycelium services that exchange updates and keep the NovusLens log. gatewayGatewayA service that accepts requests and passes them into another system. The Mycelium gateway gives NovusLens access to the mesh. answer. Returns 200 when both do, and 503 naming the one that does not.
GET/readyNone. Outside the service token. Takes org and max_age_s in query.Health, plus the age of the latest read-model projectionProjectionThe regular pass that brings the read model up to date with the canonical log. It runs every 30 seconds by default. for each organisation. Returns 503 when a projection is stale or failed. A degraded pass returns 200 with the status degraded.
GET/.well-known/agent.jsonThe service token, in the customer profile. No viewer.The agent card for the twin: its reasoning tools and their input schemas.
GET/.well-known/agent-facts.jsonviewer and region in query. guards.resolve_viewer. The operator, or a member of a group the region belongs to.The region’s signed AgentFactsAgentFactsA signed statement from an agent about its allowed work, its permissions and the person answerable for it. document: its published verifying key and its federation facts.

Composition

MethodPathIdentity and accessPurpose
POST/evidence/viewviewer and org in body. A view outside the viewer’s access returns 403.Return the evidence for one cell or one findingFindingA difference in the records that needs a decision. It includes its sources and can describe a slow handoff, disputed fact or missing owner.. The output passes through guards.guard_payload before it is returned.
POST/strategyviewer in body. guards.resolve_viewer.A strategic what-ifWhat-ifA scenario that changes one or more dependencies in the model and reports the result. A what-if changes nothing in the records, and its result is indicative. over the twin, answered by the guarded loop. InferenceInferenceThe work a language model does to produce an answer from its instructions and input. runs under a per-viewer slot, so one viewer cannot take every slot.
POST/compassviewer in body. guards.resolve_viewer.An answer from the Compass loop over one organisation’s twin. Inference runs under the same per-viewer slot.
POST/compass/groupviewer in body. The viewer must be a member of the group, otherwise 403.The same kind of answer across a group of organisations. Member viewers and the operator read the group.

Operations

MethodPathIdentity and accessPurpose
POST/operations/fulfilviewer and org. Org bound. Writer.Record a reply to an outstanding information request, with an optional document.
POST/operations/import-orgviewer and org. Writer. The viewer’s own organisation; the operator may pass any.Import an organisation structure from a document. The result is a proposal, held until it is committed or discarded.
GET/operations/import-progressviewer and job_id in query. The job’s organisation must be the viewer’s.Progress of an import job. A job belonging to another organisation is refused.
POST/operations/resolve-findingviewer and org. Org bound. The cxo of the organisation, or the accountable ownerAccountable ownerThe person recorded as answerable for a team, service or agent. NovusLens does not assume that this person is also the one who runs it day to day. of the cell the finding sits on (operations.may_resolve).Record a human resolution of a finding. The divergence stays on the permanent log.
GET/operations/export-orgchartviewer and org. Org bound.Export the organisation chart.
POST/operations/commit-orgviewer and org. Org bound. Writer. Write scopeScopeThe work, data, activity or access that a rule, statement or calculation covers. For access, it names the records an account can see. For team measures, “Own operations” covers the selected unit. “Including descendants” adds the units beneath it. is checked by operations.require_write_scope.Commit a reviewed proposal into the organisation’s structure.
GET/operations/pending-proposalviewer in query.Return the viewer’s recoverable proposal, if one is held.
POST/operations/discard-proposalviewer in body.Discard the viewer’s held proposal.

Capture

Capture sessions are live conversations with a contributor. The service holds each session in memory until it is committed or discarded.

MethodPathIdentity and accessPurpose
POST/capture/startviewer and org. Org bound. Writer. Interview mode is the cxo’s only. Cell chat is limited to the cells the viewer can see.Open a session: an organisation-wide interview, or chat about one cell. The service may refuse a new session while others are held.
POST/capture/answerThe viewer who opened the session. Another viewer gets 403. An unknown session gets 404.Give one answer in a live session.
POST/capture/attachAs for /capture/answer.Attach a document to a live session.
POST/capture/discardAs for /capture/answer.Discard a live session.
POST/capture/commitAs for /capture/answer.Commit a live session to the twin’s record.

Meaning and stewardship

MethodPathIdentity and accessPurpose
POST/meaning/ingestviewer and org. Writer, through ingest_document.IngestIngestRead supplied records or documents and add their information to NovusLens, after the required checks. a document into the meaning record. A predecessor that cannot be superseded returns 409.
GET/meaning/queryviewer and org. Org bound.Query the meaning record. The response carries the viewer’s role and the entries that viewer may see.
POST/meaning/visibilityviewer and org. Org bound. Writer; entry’s ingester, cxo or operator.Change which roles and teams may see a meaning entryMeaning entryA stored written account supplied by the organisation, such as a policy or definition. Answers can cite it without treating it as a measured fact..
POST/meaning/visibility-previewviewer in body. Selected teams outside the viewer’s records return 403.Preview the audience a visibility choice would give, before it is set.
POST/disputeviewer and org. Org bound. Writer; the board role reads and never disputes. The cell must be inside the viewer’s scope (403 otherwise), and the value must be recorded (404 otherwise).ChallengeChallengeA recorded dispute of a value. Both the original and the disputed version are kept, and the challenge is listed under Findings. a recorded value (cell_id, attribute, reason). Opens a disputed-value finding and sets the dispute marker. The value is not edited.
POST/meaning/retractviewer and org. Org bound. Writer; entry’s ingester, cxo or operator.Retract a meaning entry.
POST/steward/retract-findingviewer and org. Org bound. Writer. The organisation’s cxo, the operator, or the finding’s own speaker.Retract a finding.
POST/steward/retract-sessionviewer and org. Org bound. The cxo or the operator.Retract a session and purgePurgeRemoving a stored document’s contents while keeping a record that it was removed and why. Conclusions that used it must be checked again. its transcript.
POST/steward/purge-artifactviewer and org. Org bound. The cxo or the operator.Purge a document from the record.
POST/steward/deep-sweepviewer and org. Org bound. The cxo or the operator.Compare records across the organisation. The audit trail records the comparisons made.
GET/steward/auditviewer in query. The cxo, the board or the operator.Read the audit trail. The code narrows the view for every role other than the operator.

Notifications and assurance

MethodPathIdentity and accessPurpose
POST/notify/subscribeviewer and org. The operator only.Declare who is told about which findings, and at which endpointEndpointA particular address on a service that accepts a defined kind of request..
GET/notify/subscriptionsviewer and org. The operator only.List the subscriptions.
POST/notify/unsubscribeviewer and org. The operator only.Remove a subscription.
POST/notify/pollviewer and org. The operator only.One delivery pass. It issues the notices that each subscription has not yet received. Scope is checked again at delivery.
POST/assurance/bundleviewer and org. The issuer role: the operator or the cxo.Issue an assurance bundle for one scope and one period. It is the inputs an external assurer can use, not an opinion. Period modes other than the default may be refused with 422.
POST/assurance/acceptviewer and org. The issuer role: the operator or the cxo.Record an external party’s decision on an issued bundle. The decision is bound to the bundle’s hashHashA fixed-length fingerprint calculated from content. Comparing fingerprints helps detect changes and match records.. The record cites the decision and does not make one.
GET/assurance/acceptancesviewer and org.List the recorded acceptances.

Federation and groups

MethodPathIdentity and accessPurpose
POST/federation/emitviewer. Writer. The cxo or the operator, for the organisation the fact comes from.Sign a federation fact for the region.
POST/federation/ingestviewer. Writer. The operator, or the cxo of a member organisation of the target group.Admit a federation fact from another region.
POST/group/createviewer. The operator only.Create a group.
POST/group/add-memberviewer. The operator only.Add an organisation to a group.
GET/group/snapshotviewer. The viewer’s organisation must be a member, or the viewer is the operator.Snapshot of a group.
GET/groupsviewer. guards.resolve_viewer.List the groups the viewer may see.

Component assessments (Complexity, Agility and Recoverability)

C/A/RC/A/RThree separate scores for a team or service: Complexity, Agility and Recoverability. Each uses current evidence and the customer’s stated scoring rules. is the Complexity, Agility and RecoverabilityRecoverabilityThe R in C/A/R: how well a team or service restores acceptable service after a failure. Recovery times and tested alternatives can supply evidence. assessment of current structure. These routes read and publish it. The viewer and organisation are checked in the module each route calls. The role rule for each route lives in that module.

MethodPathIdentity and accessPurpose
GET/car/scoresviewer and org. Checked by car.read.The C/A/R scores for the organisation.
GET/car/assessmentviewer, org, cell and scope in query. As above.The assessment for one cell, over its subtreeSubtreeOne unit and every unit nested beneath it in the organisation's hierarchy. or the scope named.
POST/car/evidenceviewer and org. Checked by car.publish.Publish an evidence bundle for the assessment.
POST/car/captureviewer and org. Checked by car.capture.Record a dependencyDependencyA link where one unit needs something from another. A dependency is not a reporting line: it shows where work relies on something else. between a consumer and a provider for one capabilityCapabilityWhat a team can provide or an agent can do. NovusLens records the claim and the evidence that supports it. and role.
POST/car/retain-findingsviewer and org. Checked by car.retain_findings.Retain the findings for a cell and scope.
GET/car/evidence-templateviewer and org.The template for an evidence bundle.
POST/car/archiveviewer and org. Checked by car.archive.Archive a cell’s assessment for a scope.
GET/car/replayviewer, org and artifact_id in query. Checked by car.replay_record.Replay a published record.

When the storage behind these routes is unavailable, they return 503 and say that no new assessment is available.

Remits and catalogues

A remit is a declared scope of what a subject may do. A catalogue is a reviewed list. Both are authored by people and approved by people. Every route below takes viewer and org, and the viewer is checked in remit_authoring or catalogue.

MethodPathPurpose
GET/remits/product-sourceStatus of the remit authoring sourceSourceA document, interview statement, measurement or export that supports a value. Each source has a date and a stated scope. for the organisation.
POST/remits/product-source/rotateRotate the remit authoring source.
GET/remits/declarationsList the remit declarations.
POST/remits/declareDeclare a remit for a subject.
POST/remits/approveApprove a declaration. An approval may be made on behalf of another person.
POST/remits/withdrawWithdrawWithdrawalA source’s removal of a value or record from current use. Its history stays, and NovusLens checks conclusions that depended on it again. a declaration, with a reason.
POST/remits/templateCreate or change a remit template.
POST/remits/approve-templateApprove a revision of a remit template.
GET/remits/exportExport remit declarations. The format is set by the format query parameter.
GET/cataloguesList the catalogues.
POST/catalogues/revisionPropose a revision to a catalogue.
POST/catalogues/approveApprove a catalogue revision.

Agent evidence and findings

Agent evidence is the signed record of what customer agents did, as their systems report it. The routes below store it, read it and report on it. They do not decide what those agents may do.

MethodPathIdentity and accessPurpose
POST/agent-evidence/criteriaviewer and org. Checked by agent_policy.set_criterion.Set a criterion for an agent-evidence case.
POST/agent-evidence/ingestviewer and org. Writer and operator.Ingest a signed batch of agent evidence.
POST/agent-evidence/refreshviewer and org.Refresh the agent-evidence picture from the mesh.
GET/agent-evidence/caseviewer, org, request_id, known_at and policy_mode in query.Read a case as it was known at the time given, under the policy mode given.
GET/agent-evidence/requestsviewer and org.List the agent-evidence requests.
GET/agent-evidence/activitiesviewer and org.List the recorded agent activities.
GET/agent-evidence/deliveryviewer and org. Checked by agent_delivery.status.Delivery status of the agent-evidence stream. A background delivery worker starts only when CONWAY_AGENT_EVIDENCE_CONFIG is set.
POST/agent-evidence/policy/activateviewer and org. Checked by agent_policy.activate.Activate the agent-evidence policy the organisation has set.
GET/agent-evidence/receiptviewer, org, source and batch_id in query.A receiptReceiptA recorded acknowledgement of a request or action, with its identity, time and result. An evidence intake receipt confirms storage. It does not establish acceptance or prove that an agent acted. for one batch.
GET/agent-evidence/checkpointviewer, org, source and stream in query.A checkpoint for one stream.
GET/findings/current-generatedviewer and org.The findings whose support is current for the viewer, and the kinds that are tracked. Writes an audit entry.
GET/findings/support-reviewviewer and org.Review of the support behind generated findings.

UI routes

The UI’s /api routes are Next.js route handlers. The directory path gives the URL. Each one works out the signed-in viewer before it does anything else.

MethodPathIdentity and accessPurpose
GET/api/access/recordThe session. In the dev profile only, a viewer query parameter is used when there is no session. org in query is required.Says whether the reader may see the record a receipt refers to. It returns 204 (yes), 401 (no viewer or no organisation), 403 (not now) or 503 (the meaning check could not be made). It returns no body and says nothing else.
GET/api/guide/{id}The session. In the dev profile only, a viewer query parameter when there is no session.One GuideGuideThe help pages inside NovusLens. They explain the pages, input formats and tasks in the version you use. They are product instructions, not evidence about the organisation. page by its help_id, for the help drawer. The same page for every role. Returns 401 without a viewer, 404 for an unknown id, and 503 when the Guide is unavailable.
GET, POST/api/reasoning/{...path}The session. The signed-in viewer replaces any viewer in the body or query. In the customer profile a request with no session returns 401.Proxies the request to the reasoning service at CONWAY_REASONING_URL, which defaults to http://127.0.0.1:8500, and adds the service token. A POST may take up to 300 seconds, and a GET up to 30. When the service does not answer, the proxy returns 503 with a JSONJSONJavaScript Object Notation: a text format for data, using named fields, lists and values. Configuration files and service messages use it. message.

Profile rules

These rules come from the code. They describe what the customer profile does, and nothing more.

  • The customer profile is selected by CONWAY_PROFILE=customer.
  • The reasoning service refuses to start without CONWAY_SERVICE_TOKEN and MYCELIUM_GATEWAY_TOKEN set to values that are not the development values.
  • The UI refuses to sign sessions when CONWAY_SESSION_SECRET is unset, is the public development value, or is shorter than 24 characters.
  • In the customer profile the viewer query parameter is ignored. The session is the only identity.
  • Without a session, the UI refuses: the reasoning proxy, the record check and the Guide all return 401.
  • Every reasoning request except /health and /ready needs the service token.
Last updated