v41
latestOpenAPI 3.0.3Creative Commons Attribution-NoDerivs 3.0 Unportedraw.githubusercontent.com2026-06-1133105142.4 KBDIRECTORY
Create directory
Creates a new directory FOLDER associated with the EHR identified by ehr_id.
post/ehr/{ehr_id}/directory
Path parameters
ehr_idstring uuid required
Example:7d44b88c-4199-4bad-97dc-d78268e01398
EHR identifier taken from EHR.ehr_id.value.
Headers
Prefer'return=representation' | 'return=minimal' | 'return=identifier'
Request header to indicate the preference over response details. The response will contain the entire resource when the Prefer header has a value of return=representation, or only the resource identifier (e.g., the uid) when the value is return=identifier.
Accept'application/json' | 'application/xml' | 'application/openehr.wt.flat+json' | 'application/openehr.wt.structured+json'
Content-Type'application/json' | 'application/xml' | 'application/openehr.wt.flat+json' | 'application/openehr.wt.structured+json'
Request body
Response
201 Created is returned when the FOLDER is successfully created. If Prefer header is return=representation, the full resource is included in the response body; if is return=identifier, only its unique identifier is included. If the Prefer header is missing or set to return=minimal, the body is empty.
Example response
{
"uid": "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2"
}