Aller au contenu

← Tous les contrats

OHN-07 Network Organization and Membership Registry

Version
1.0.0
OpenAPI
3.1.0
Source dans le dépôt
modules/OHN-07/api/openapi.yaml
Serveurs
https://opeshealthnetwork.com/api/ohn/v1/network-registry
Authentification
bearer: http bearer (JWT)

Télécharger le contrat (YAML)

Les contrats sont rédigés en anglais.

Authoritative registry of network organizations, hierarchy, member agreements and endpoints. All paths are jurisdiction-scoped to the bearer principal. Every POST requires `Idempotency-Key` (successful responses are replayed; key reuse with another body = 409). Version-checked writes take `expected_version` and return 409 `concurrent_mutation` on a stale version. Errors: 401 unauthenticated, 403 denied_by_policy / separation_of_duties, 404 not_found, 409 concurrent_mutation / invalid_transition / duplicate / membership_not_active / challenge_expired, 422 domain_validation_failed (zod `details`) / untrusted_assessment / untrusted_certificate / challenge_mismatch / policy_refused, 429 rate_limited, 503 not_configured (names the OHN07_* setting) / dependency_unavailable / server_unavailable.

Opérations

Autres opérations

POST/auth/tokenSynthetic sign-in (404 unless OHN07_SYNTHETIC_AUTH=true and NODE_ENV!=production)

Réponses

CodeDescriptionType de média
200token—
404disabled—
422invalid—
GET/configPolicy configuration

Authentification: bearer

Réponses

CodeDescriptionType de média
200ok—
GET/dashboardP001 KPIs, status distribution, 14-day trend, exceptions

Authentification: bearer

Réponses

CodeDescriptionType de média
200ok—
GET/organizationsList organizations

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
limitqueryintegernon
offsetqueryintegernon
qquerystringnon
organization_typequerystringnon
statequeryMembershipStatenon

Réponses

CodeDescriptionType de média
200ok—
POST/organizationsF001 organization application (creates organization + membership in state applied; emits organization.updated)

Identifiant d’opération: OHN-07-API-001

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201created—
403other jurisdiction—
409duplicate registry_ref—
422validation—
503dependency or policy unavailable—
GET/organizations/treeP002 hierarchy (roots with nested children)

Authentification: bearer

Réponses

CodeDescriptionType de média
200ok—
GET/organizations/{id}Organization detail with ancestors

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200ok—
404not in scope—
POST/organizations/{id}/amendAmend organization (cycle-safe parent change; emits organization.updated)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête

Réponses

CodeDescriptionType de média
200ok—
409stale—
422cycle or validation—
GET/organizations/{id}/certificatesCertificate picker source: the organization's certificates held by OHN-39 (GET /api/ohn/v1/trust/certificates, organization-scoped). certificate_ref is the value POST /endpoints checks; usable = active, current/rollover/overlap and not expired. Audited (certificate.list).

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200ok—
404not in scope—
503OHN-39 unavailable—
GET/organizations/{id}/standingRouting decision for an organization (roles network_service

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200ok
application/json: Standing
GET/routing-decisionsRouting decision by organization_id or endpoint_url

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
organization_idquerystring (uuid)non
endpoint_urlquerystringnon

Réponses

CodeDescriptionType de média
200ok
application/json: Standing
GET/membershipsList memberships

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
statequeryMembershipStatenon
limitqueryintegernon
offsetqueryintegernon

Réponses

CodeDescriptionType de média
200ok—
POST/membershipsF002 membership approval — signs agreement version n+1 (trust_assessed → agreement_signed, or amendment while active)

Identifiant d’opération: OHN-07-API-002

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201signed—
403role or separation_of_duties—
409state or version—
422untrusted_assessment or validation—
GET/memberships/{id}Membership with organization

Identifiant d’opération: OHN-07-API-003

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200ok—
404not in scope—
POST/memberships/{id}/transitionsW001 steps: documents_verified (officer), trust_assessed (reviewer, OHN-39 check), active (officer; emits membership.approved)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête

Réponses

CodeDescriptionType de média
200ok—
403wrong role—
409invalid transition—
422untrusted—
POST/memberships/{id}/suspensionsF004 open suspension review (officer; active → suspension_review; routing blocked immediately)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête

Réponses

CodeDescriptionType de média
201ok—
409not active—
POST/memberships/{id}/revokeRevoke (reviewer ≠ requester): disables endpoints, terminates agreements, emits membership.revoked; 200 when downstream confirmed, 202 when pending

Identifiant d’opération: OHN-07-API-004

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête

Réponses

CodeDescriptionType de média
200downstream_notified—
202revoked—
403separation_of_duties—
POST/memberships/{id}/reinstateReinstate after review (reviewer ≠ requester)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête

Réponses

CodeDescriptionType de média
200active again—
GET/agreementsList agreements

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
organization_idquerystringnon
statusquery"approved" | "terminated"non

Réponses

CodeDescriptionType de média
200ok—
GET/agreements/diffP007 field diff between two agreement versions

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
organization_idquerystringoui
from_versionqueryintegernon
to_versionqueryintegernon

Réponses

CodeDescriptionType de média
200ok—
GET/endpointsP006 server-paginated endpoint list (filters state, service_type, environment, organization_id, q; sort endpoint_url|state|certificate_expires_at|created_at, dir)

Authentification: bearer

Réponses

CodeDescriptionType de média
200ok—
POST/endpointsF003 register endpoint (active member, OHN-39-trusted certificate, https)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête

Réponses

CodeDescriptionType de média
201registered—
409membership_not_active—
422untrusted_certificate—
GET/endpoints/{id}Endpoint detail with probes and history

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200ok—
POST/endpoints/{id}/challengeW002 issue ownership challenge (officer); returns one-time token and publish_at

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête

  • application/json: Step

Réponses

CodeDescriptionType de média
200challenge_sent—
POST/endpoints/{id}/proveW002 submit challenge_response (officer)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200ownership_proved—
409challenge_expired—
422challenge_mismatch—
POST/endpoints/{id}/policy-checkW002 attestation checks (reviewer): OHN-39 certificate trusted and unexpired, environment permitted, https

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200policy_checked—
422policy_refused with checks—
POST/endpoints/{id}/enableW002 enable (reviewer)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200enabled—
POST/endpoints/{id}/disableDisable endpoint with reason

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200disabled—
POST/endpoints/{id}/probesRecord a reachability probe for an enabled endpoint (officer)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
201recorded—
GET/auditAudit receipts (filter resource_id)

Authentification: bearer

Réponses

CodeDescriptionType de média
200ok—
GET/outboxPending outbox events (status=all for all)

Authentification: bearer

Réponses

CodeDescriptionType de média
200ok—
POST/outbox/dispatchRetry delivery of pending events (reviewer)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200{published, pending}—
GET/reports/{id}R001/R002/R003 with metrics and provenance

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpath"OHN-07-R001" | "OHN-07-R002" | "OHN-07-R003"oui

Réponses

CodeDescriptionType de média
200ok—
404unknown—
POST/reports/{id}/exportSigned CSV/PDF export (HMAC-SHA256, OHN07_EXPORT_SIGNING_KEY); returns single-use 5-minute retrieval path

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstringoui
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
201ok—
503not_configured—
GET/exports/{token}Download once (same principal); X-OHN-Export-Signature header

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
tokenpathstringoui

Réponses

CodeDescriptionType de média
200file—
404expired or used—

Schémas

Uuid

string (uuid)

Receipt

NomTypeObligatoireDescription
receipt_idUuidoui
committed_atstring (date-time)oui
aggregate_typestringoui
aggregate_idstringoui
versionintegeroui
status"committed" | "pending"oui

Error

NomTypeObligatoireDescription
errorstringoui
messagestringnon
detailsobjectnon
settingstringnon

MembershipState

"applied" | "documents_verified" | "trust_assessed" | "agreement_signed" | "active" | "suspension_review" | "revoked" | "downstream_notified"

EndpointState

"registered" | "challenge_sent" | "ownership_proved" | "policy_checked" | "enabled" | "disabled"

OrganizationApplication

NomTypeObligatoireDescription
legal_namestringoui
jurisdiction_idUuidoui
organization_typestringouiMember of OHN07_ORGANIZATION_TYPES.
registry_refstringouiMust resolve in OHN-05.
accountable_officerUuidoui
terms_versionstringoui
parent_organization_idUuid | nullnon

OrganizationAmend

NomTypeObligatoireDescription
legal_namestringnon
organization_typestringnon
registry_refstringnon
accountable_officerUuidnon
terms_versionstringnon
parent_organization_idUuid | nullnon
expected_versionintegeroui
reasonstringoui

MembershipApproval

NomTypeObligatoireDescription
organization_idUuidoui
agreement_refUuidoui
trust_assessment_idUuidoui
approved_scopestringoui
reviewerUuidouiMust equal the bearer principal.
expected_versionintegeroui

Transition

NomTypeObligatoireDescription
to_state"documents_verified" | "trust_assessed" | "active"oui
expected_versionintegeroui
reasonstringoui
trust_assessment_idUuidnon

Suspension

NomTypeObligatoireDescription
organization_idUuidoui
suspension_reasonstringoui
effective_atstring (date-time)oui
affected_endpointsstringoui
expected_versionintegeroui

Decision

NomTypeObligatoireDescription
expected_versionintegeroui
reasonstringoui

EndpointRegistration

NomTypeObligatoireDescription
organization_idUuidoui
endpoint_urlstring (uri)oui
service_typestringoui
environmentstringoui
certificate_refUuidoui
jurisdiction_idUuidoui

Step

NomTypeObligatoireDescription
expected_versionintegeroui

Standing

Routing decision contract v1.0.0 for clinical gateways (OHN-20 etc.). Never cache beyond cache_ttl_seconds (0).

NomTypeObligatoireDescription
contract_version"1.0.0"oui
organization_idUuidoui
jurisdiction_idUuidnon
legal_namestringnon
membership_stateMembershipState | "none"oui
trust_tierstring | nullnon
membership_activebooleannon
routablebooleanouitrue only if membership active AND at least one enabled endpoint with unexpired certificate.
reason"active_member" | "no_enabled_endpoint" | "not_a_member" | "unknown_endpoint" | "membership_applied" | "membership_documents_verified" | "membership_trust_assessed" | "membership_agreement_signed" | "membership_suspension_review" | "membership_revoked" | "membership_downstream_notified" | "endpoint_registered" | …oui
enabled_endpointsarray of Standing.enabled_endpoints.itemoui
evaluated_atstring (date-time)oui
cache_ttl_seconds0oui

Standing.enabled_endpoints.item défini sur place

NomTypeObligatoireDescription
idstringnon
endpoint_urlstringnon
service_typestringnon
environmentstringnon
certificate_expires_atstring | nullnon