← Tous les contrats
OHN-42 Sensitive Data Segmentation
- Version
- 1.0.0
- OpenAPI
- 3.1.0
- Source dans le dépôt
modules/OHN-42/api/openapi.json- Serveurs
https://opeshealthnetwork.com/api/ohn/v1
- Authentification
bearer: http bearer
Télécharger le contrat (JSON)
Les contrats sont rédigés en anglais.
Base path /api/ohn/v1. Every POST requires Idempotency-Key; mutations use expected_version. Routes default-deny on role AND purpose (sensitive_data_governance). Anything unlabeled, pending or unpolicied is withheld.
Opérations
OHN-42
GET/classification/decisionsDecisions (status, resource_ref)
Identifiant d’opération: listDecisions
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
status | query | string | non | |
resource_ref | query | string (uuid) | non | |
cursor | query | string | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/classification/decisionsClassify a resource against published policies (API-001; W001)
Identifiant d’opération: classify
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
201 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/classification/decisions/{id}Decision with history
Identifiant d’opération: getDecision
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/classification/decisions/{id}/reviewClinical review of a held decision (not the classifier)
Identifiant d’opération: reviewDecision
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/classification/labelsLabels in force (status, patient_ref)
Identifiant d’opération: listLabels
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
status | query | string | non | |
patient_ref | query | string (uuid) | non | |
cursor | query | string | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/classification/labels/{id}Label inspector for a resource ref
Identifiant d’opération: getLabel
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/classification/policiesSensitivity policies (API-002)
Identifiant d’opération: listPolicies
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
state | query | string | non | |
resource_category | query | string | non | |
cursor | query | string | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/classification/policiesDraft a sensitivity policy (F001)
Identifiant d’opération: createPolicy
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
201 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/classification/policies/{id}One policy
Identifiant d’opération: getPolicy
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/classification/policies/{id}/publishPublish a policy (author cannot publish; API-003)
Identifiant d’opération: publishPolicy
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/classification/evaluationsEvaluate/enforce disclosure for resources (F002; W002)
Identifiant d’opération: evaluate
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/classification/exceptionsExceptions (state, sensitivity_type)
Identifiant d’opération: listExceptions
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
state | query | string | non | |
sensitivity_type | query | string | non | |
cursor | query | string | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/classification/exceptionsRequest a time-bounded exception (F003; W003)
Identifiant d’opération: requestException
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
201 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/classification/exceptions/{id}Exception with reviews and history
Identifiant d’opération: getException
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/classification/exceptions/{id}/reviewsReview an exception; needs one approval per reviewer role
Identifiant d’opération: reviewException
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/classification/exceptions/{id}/revokeRevoke an approved exception (privacy officer)
Identifiant d’opération: revokeException
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/classification/settingsRead settings (unset = fail closed)
Identifiant d’opération: readSettings
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/classification/settingsWrite settings
Identifiant d’opération: writeSettings
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/classification/code-lists/{list}Read code list
Identifiant d’opération: listCodes
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
list | path | "resource_category" | "sensitivity_label" | "requester_role" | "purpose" | "exception_basis" | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/classification/code-lists/{list}Upsert code list entries
Identifiant d’opération: upsertCodes
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
list | path | "resource_category" | "sensitivity_label" | "requester_role" | "purpose" | "exception_basis" | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/classification/maintenance/expire-sweepRecord expiry of approved exceptions past their time limit
Identifiant d’opération: expireSweep
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/classification/maintenance/drain-outboxDrain outbox (no sink => nothing marked delivered)
Identifiant d’opération: drainOutbox
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/classification/report-catalogReport catalog
Identifiant d’opération: reportCatalog
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/classification/reports/{reportId}Run report
Identifiant d’opération: runReport
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
reportId | path | "OHN-42-R001" | "OHN-42-R002" | "OHN-42-R003" | oui | |
purpose | query | string | non | |
label | query | string | non | |
status | query | string | non | |
source | query | string | non | |
period_from | query | string | non | |
period_to | query | string | non | |
cursor | query | string | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/classification/reports/{reportId}/exportCreate signed single-use export
Identifiant d’opération: createExport
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
reportId | path | "OHN-42-R001" | "OHN-42-R002" | "OHN-42-R003" | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
201 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/classification/exports/{token}Download export (owner only, single use, 5 min)
Identifiant d’opération: fetchExport
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
token | path | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient out of scope, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
Autres opérations
GET/health/ohn-42Liveness incl. DB and dependency modes
Identifiant d’opération: health
Réponses
| Code | Description | Type de média |
|---|
200 | ok | — |
503 | unavailable | — |
Schémas
Error
| Nom | Type | Obligatoire | Description |
|---|
error | string | oui | |
message | string | non | |
details | any | non | |
Policy
| Nom | Type | Obligatoire | Description |
|---|
resource_category | string | oui | |
sensitivity_label | string | oui | |
matching_criteria | string | oui | JSON: {"codes":["system|code"],"code_prefixes":["system|prefix"]}; at least one entry |
purpose_limitations | string | oui | JSON: {"allowed_purposes":[...],"allowed_roles":[...],"on_restricted":"redact"|"deny"}; empty lists mean nobody |
policy_version | string | oui | |
Publish
| Nom | Type | Obligatoire | Description |
|---|
expected_version | integer | oui | |
reason | string | oui | |
Classify
| Nom | Type | Obligatoire | Description |
|---|
resource_ref | string (uuid) | oui | |
resource_category | string | oui | |
source_system | string | oui | |
patient_ref | string (uuid) | non | |
codes | array of string | oui | |
ReviewDecision
| Nom | Type | Obligatoire | Description |
|---|
labels | array of string | oui | |
reason | string | oui | |
expected_version | integer | oui | |
Evaluation
| Nom | Type | Obligatoire | Description |
|---|
patient_ref | string (uuid) | oui | |
requester_role | string | oui | |
purpose | string | oui | |
requested_categories | array of string | non | |
mode | "preview" | "enforce" | non | enforce returns only allowed_resource_refs; no counts, labels or reasons, never cacheable |
resources | array of string (uuid) | oui | |
ExceptionRequest
| Nom | Type | Obligatoire | Description |
|---|
patient_ref | string (uuid) | oui | |
sensitivity_type | string | oui | |
exception_basis | string | oui | |
requester_role | string | oui | |
purpose | string | oui | |
resource_refs | array of string (uuid) | oui | |
reason | string | oui | |
expires_at | string (date-time) | oui | Must be in the future and within the configured maximum; no indefinite exceptions |
ExceptionReview
| Nom | Type | Obligatoire | Description |
|---|
decision | "approve" | "deny" | oui | |
reason | string | oui | |
expected_version | integer | oui | |
ExceptionRevoke
| Nom | Type | Obligatoire | Description |
|---|
reason | string | oui | |
expected_version | integer | oui | |
Settings
| Nom | Type | Obligatoire | Description |
|---|
default_label | string | null | oui | |
max_exception_days | integer | null | oui | |
approval_reference | string | oui | |
ExportCommand
| Nom | Type | Obligatoire | Description |
|---|
format | "csv" | "pdf" | oui | |
filters | object | non | Report filters (purpose, label, status, source, period_from, period_to); unknown keys are refused with 422 |
Report
| Nom | Type | Obligatoire | Description |
|---|
report_id | "OHN-42-R001" | "OHN-42-R002" | "OHN-42-R003" | non | |
title | string | non | |
columns | array of any | non | |
rows | array of any | non | |
summary | object | non | |
state | "rendered" | "no_authorized_data" | non | |
generated_at | string (date-time) | non | |
CodeListUpsert.entries.item défini sur place
| Nom | Type | Obligatoire | Description |
|---|
code | string | oui | |
label_en | string | oui | |
label_fr | string | oui | |
active | boolean | non | |