OHN-45 Cryptographic Trust Services
- Version
- 1.0.0
- OpenAPI
- 3.1.0
- Source dans le dépôt
modules/OHN-45/api/openapi.yaml- Serveurs
https://opeshealthnetwork.com- Authentification
bearerAuth: http bearer (JWT)
Les contrats sont rédigés en anglais.
Synthetic-ready trust service contracts. Production use requires accepted OHN-01/OHN-38/OHN-16 integrations and security authorization.
Opérations
- Autres opérations (17)
Autres opérations
GET/api/ohn/v1/crypto/health
Identifiant d’opération: ohn45_health
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Service health | application/json: object |
POST/api/ohn/v1/crypto/auth/token
Available only outside production when OHN45_SYNTHETIC_AUTH=true.
Identifiant d’opération: ohn45_issueSyntheticToken
Corps de la requête (obligatoire)
application/json:SyntheticTokenCommand
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Synthetic token | application/json: post-api-ohn-v1-crypto-auth-token.response-200 |
404 | Non-disclosing not-found response | application/json: Error |
422 | Field or domain validation failed | application/json: Error |
POST/api/ohn/v1/crypto/keys/register
Identifiant d’opération: ohn45_registerKey
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:KeyRegistrationCommand
Réponses
| Code | Description | Type de média |
|---|---|---|
201 | Key registered in requested state | application/json: KeyView |
400 | Malformed request | application/json: Error |
401 | Unauthenticated | application/json: Error |
403 | Default-deny policy refusal | application/json: Error |
409 | Stale version or idempotency conflict | application/json: Error |
422 | Field or domain validation failed | application/json: Error |
429 | Retry after the stated window | application/json: Error |
503 | Dependency unavailable; no fabricated success | application/json: Error |
GET/api/ohn/v1/crypto/certificates
Read-only, jurisdiction-wide list of certificates/keys other modules may reference (OHN-30 insurer endpoints). Active keys only; label, purpose, owner organisation, expiry (certificate expiry, else activation + rotation interval). Never the KMS/HSM reference or the key owner. Roles key_custodian, security_officer, and certificate_reader (gateway service tokens only, token_use=service, purpose certificate_reference; it can read nothing else). Audited.
Identifiant d’opération: ohn45_listCertificates
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
purpose | query | string | non | |
include_inactive | query | boolean | non | staff roles only |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Certificates | application/json: get-api-ohn-v1-crypto-certificates.response-200 |
401 | Unauthenticated | application/json: Error |
403 | Default-deny policy refusal | application/json: Error |
422 | Malformed purpose | — |
GET/api/ohn/v1/crypto/key-status
Identifiant d’opération: ohn45_getKeyStatus
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
cursor | query | string (uuid) | non | |
page_size | query | integer | non | |
service_id | query | string (uuid) | non |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Scoped key status and operational evidence | application/json: KeyStatusResponse |
401 | Unauthenticated | application/json: Error |
403 | Default-deny policy refusal | application/json: Error |
429 | Retry after the stated window | application/json: Error |
503 | Dependency unavailable; no fabricated success | application/json: Error |
POST/api/ohn/v1/crypto/artifacts
Identifiant d’opération: ohn45_registerArtifact
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:ArtifactCommand
Réponses
| Code | Description | Type de média |
|---|---|---|
201 | Artifact reference created | application/json: ArtifactView |
422 | Field or domain validation failed | application/json: Error |
GET/api/ohn/v1/crypto/signaturesSigned items of the organisation with their last check (F003 chooses from it). Never the content, the signature value or the public key.
Identifiant d’opération: ohn45_listSignedItems
Authentification: bearerAuth
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Signed items | application/json: SignedItemList |
401 | Unauthenticated | application/json: Error |
403 | Default-deny policy refusal | application/json: Error |
POST/api/ohn/v1/crypto/signatures
Identifiant d’opération: ohn45_registerSignature
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:SignatureCommand
Réponses
| Code | Description | Type de média |
|---|---|---|
201 | Public signature evidence registered | application/json: SignatureView |
404 | Non-disclosing not-found response | application/json: Error |
422 | Field or domain validation failed | application/json: Error |
POST/api/ohn/v1/crypto/signatures/verify
Identifiant d’opération: ohn45_verifySignature
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:SignatureVerificationCommand
Réponses
| Code | Description | Type de média |
|---|---|---|
201 | Real verification result; no artifact or public key content returned | application/json: VerificationView |
404 | Non-disclosing not-found response | application/json: Error |
409 | Stale version or idempotency conflict | application/json: Error |
422 | Field or domain validation failed | application/json: Error |
POST/api/ohn/v1/crypto/keys/rotate
Identifiant d’opération: ohn45_rotateKey
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:KeyRotationCommand
Réponses
| Code | Description | Type de média |
|---|---|---|
201 | Dual-approved rollover created | application/json: WorkflowView |
404 | Non-disclosing not-found response | application/json: Error |
409 | Stale version or idempotency conflict | application/json: Error |
422 | Field or domain validation failed | application/json: Error |
POST/api/ohn/v1/crypto/keys/revoke
Identifiant d’opération: ohn45_revokeKey
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:KeyRevocationCommand
Réponses
POST/api/ohn/v1/crypto/workflows/{id}/transitions
Identifiant d’opération: ohn45_transitionWorkflow
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:WorkflowTransitionCommand
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Transition committed | application/json: WorkflowView |
404 | Non-disclosing not-found response | application/json: Error |
409 | Stale version or idempotency conflict | application/json: Error |
422 | Field or domain validation failed | application/json: Error |
GET/api/ohn/v1/crypto/rotationsPlanned key rotations with who asked, both named approvers, their decisions and whether the caller must decide (P004).
Identifiant d’opération: ohn45_listRotations
Authentification: bearerAuth
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Rotations | application/json: RotationList |
401 | Unauthenticated | application/json: Error |
403 | Default-deny policy refusal | application/json: Error |
POST/api/ohn/v1/crypto/rotations/{id}/approvalsA named approver records their own decision once (approved or rejected, reason 10-4096). The requester and anyone not named are refused (403). One refusal closes the rotation as rejected and the old key is active again. The rollover cannot leave rotation_due before both approved (transition answers 422 approvals_pending).
Identifiant d’opération: ohn45_decideRotation
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:RotationApprovalCommand
Réponses
| Code | Description | Type de média |
|---|---|---|
201 | Decision recorded | application/json: post-api-ohn-v1-crypto-rotations-id-approvals.response-201 |
403 | Default-deny policy refusal | application/json: Error |
404 | Non-disclosing not-found response | application/json: Error |
409 | Stale version or idempotency conflict | application/json: Error |
422 | Field or domain validation failed | application/json: Error |
GET/api/ohn/v1/crypto/reports/{id}
Identifiant d’opération: ohn45_getReport
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | "OHN-45-R001" | "OHN-45-R002" | "OHN-45-R003" | oui | |
service_id | query | string (uuid) | non | |
period_from | query | string (date-time) | non | |
period_to | query | string (date-time) | non |
Réponses
POST/api/ohn/v1/crypto/reports/{id}/export
Identifiant d’opération: ohn45_createExport
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | "OHN-45-R001" | "OHN-45-R002" | "OHN-45-R003" | oui | |
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:ExportCommand
Réponses
| Code | Description | Type de média |
|---|---|---|
201 | Signed one-time five-minute retrieval created | application/json: ExportReceipt |
403 | Default-deny policy refusal | application/json: Error |
503 | Dependency unavailable; no fabricated success | application/json: Error |
GET/api/ohn/v1/crypto/exports/{token}
Identifiant d’opération: ohn45_downloadExport
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
token | path | string | oui |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Signed private export; single successful download only | text/csv: stringapplication/pdf: string |
404 | Non-disclosing not-found response | application/json: Error |
Schémas
SignedItemList
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
total | integer | oui | |
data | array of SignedItemList.data.item | oui |
RotationApprovalCommand
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
decision | "approved" | "rejected" | oui | |
reason | string | oui |
RotationDetail
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
id | string (uuid) | oui | |
key_ref | string (uuid) | oui | |
new_key_ref | string (uuid) | oui | |
planned_cutover_at | string (date-time) | oui | |
rollback_plan | string | non | |
state | "rotation_due" | "new_key_generated" | "consumers_migrated" | "old_deactivated" | "verified" | "rejected" | oui | |
version | integer | oui | |
created_at | string (date-time) | non | |
requested_by | string | null (uuid) | non | |
approval_status | "pending" | "approved" | "rejected" | oui | |
awaiting_my_decision | boolean | oui | |
approvals | array of RotationDetail.approvals.item | oui |
RotationList
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
total | integer | oui | |
data | array of RotationDetail | oui |
Uuid
string (uuid)
Error
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
error | string | oui | |
message | string | non | |
details | object | non |
Receipt
KeyRegistrationCommand
KeyRotationCommand
key_ref differs from new_key_ref; approvers are distinct and exclude the requesting operator.
SignatureVerificationCommand
KeyRevocationCommand
ArtifactCommand
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
artifact_type | "signed_export" | "clinical_document" | "certificate" | oui | |
content_base64 | string | oui |
SignatureCommand
WorkflowTransitionCommand
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
expected_version | integer | oui | |
to_state | string | oui | |
evidence_ref | Uuid | oui | |
reason | string | oui |
ExportCommand
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
format | "csv" | "pdf" | oui | |
service_id | Uuid | non | |
period_from | string (date-time) | non | |
period_to | string (date-time) | non |
SyntheticTokenCommand
KeyView
KeyStatusResponse
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
data | array of KeyView | oui | |
next_cursor | string | null (uuid) | oui | |
page_size | integer | oui | |
summary | object | oui | |
rotations | array of object | oui | |
verifications | array of object | oui | |
leases | array of object | oui | |
workflows | array of object | oui | |
provenance | object | oui |
ArtifactView
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
id | Uuid | non | |
artifact_type | string | non | |
created_at | string (date-time) | non |
SignatureView
VerificationView
WorkflowView
Report
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
report_id | "OHN-45-R001" | "OHN-45-R002" | "OHN-45-R003" | oui | |
data | array of object | oui | |
metrics | object | oui | |
provenance | object | oui |
ExportReceipt
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
receipt | Receipt | oui | |
retrieval | ExportReceipt.retrieval | oui | |
signature | ExportReceipt.signature | oui |
post-api-ohn-v1-crypto-auth-token.response-200 défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
access_token | string | oui |
get-api-ohn-v1-crypto-certificates.response-200 défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
data | array of get-api-ohn-v1-crypto-certificates.response-200.data.item | oui | |
total | integer | oui | |
generated_at | string (date-time) | oui |
get-api-ohn-v1-crypto-certificates.response-200.data.item défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
id | string (uuid) | oui | |
label | string | oui | |
key_purpose | string | oui | |
service_id | string (uuid) | oui | |
organization_id | string (uuid) | oui | |
status | string | oui | |
expires_at | string | null (date-time) | oui | |
expired | boolean | oui | |
rotation_due | boolean | oui |
post-api-ohn-v1-crypto-rotations-id-approvals.response-201 défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
rotation | RotationDetail | oui | |
decision | "approved" | "rejected" | oui | |
state | string | oui | |
version | integer | oui | |
receipt | object | oui |
SignedItemList.data.item défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
id | string (uuid) | oui | |
artifact_ref | string (uuid) | oui | |
artifact_type | "signed_export" | "clinical_document" | "certificate" | oui | |
artifact_created_at | string (date-time) | non | |
trusted_signer_ref | string (uuid) | oui | |
algorithm | "Ed25519" | oui | |
signed_at | string (date-time) | oui | |
checks | integer | oui | |
last_check | null | SignedItemList.data.item.last_check.option-2 | oui |
SignedItemList.data.item.last_check.option-2 défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
result | "valid" | "invalid" | non | |
failure_cause | string | null | non | |
purpose | string | non | |
verified_at | string (date-time) | non |
RotationDetail.approvals.item défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
approver_id | string (uuid) | non | |
decision | "approved" | "rejected" | null | non | |
reason | string | null | non | |
decided_at | string | null (date-time) | non |
ExportReceipt.retrieval défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
path | string | oui | |
expires_at | string (date-time) | oui |
ExportReceipt.signature défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
algorithm | "HMAC-SHA256" | oui | |
value | string | oui | |
key_ref | string | oui |