Every API here is available over the APIs.io API and to AI agents over MCP.
{"openapi":"3.1.0","info":{"title":"EHRbase API","description":"EHRbase implements the [official openEHR REST API](https://specifications.openehr.org/releases/ITS-REST/latest/). Additionally, EHRbase provides a custom `status` heartbeat endpoint, an [Admin API](https://docs.ehrbase.org/docs/EHRbase/Explore/Admin-REST) (if activated) and a [Status and Metrics API](https://docs.ehrbase.org/docs/EHRbase/Explore/Status-And-Metrics) (if activated) for monitoring and maintenance. Note: The openEHR REST API is documented in their official documentation, not here. Please refer to their separate documentation.","license":{"name":"Apache 2.0","url":"https://github.com/ehrbase/ehrbase/blob/develop/LICENSE.md"},"version":"v1"},"externalDocs":{"description":"EHRbase Documentation","url":"https://docs.ehrbase.org/"},"servers":[{"url":"https://sandkiste.ehrbase.org/ehrbase","description":"Generated server url"}],"tags":[{"name":"Status","description":"Heartbeat, Version info, Status"}],"paths":{"/rest/openehr/v1/ehr/{ehr_id}":{"get":{"tags":["EHR"],"summary":"Get EHR by id","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#tag/EHR/operation/ehr_get_by_id"},"operationId":"getEhrById","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK, is returned when the requested EHR resource is successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ehr"}}}},"404":{"description":"Not Found, is returned when an EHR with <code>ehr_id</code> does not exist."}}},"put":{"tags":["EHR"],"summary":"Create EHR with id","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/1.0.3/ehr.html#tag/EHR/operation/ehr_get_by_id"},"operationId":"createEhrWithId","parameters":[{"name":"openEHR-VERSION","in":"header","required":false,"schema":{"type":"string"}},{"name":"openEHR-AUDIT_DETAILS","in":"header","required":false,"schema":{"type":"string"}},{"name":"Prefer","in":"header","required":false,"schema":{"type":"string"}},{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EhrStatus"}}}},"responses":{"201":{"description":"Created, is returned when the EHR has been successfully created. The new EHR resource is returned in the body when the request's <code>Prefer</code> header value is <code>return=representation</code> , otherwise only headers are returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ehr"}}}},"400":{"description":"Bad Request, is returned when the request URL or body (if provided) could not be parsed or has invalid content."},"409":{"description":"Conflict, Unable to create a new EHR due to a conflict with an already existing EHR with the same subject id, namespace pair, whenever EHR_STATUS is supplied."}}}},"/rest/openehr/v1/ehr/{ehr_id}/ehr_status":{"get":{"tags":["EHR_STATUS"],"summary":"Get EHR_STATUS version by time","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#ehr_status-ehr_status-get"},"operationId":"getEhrStatusVersionByTime","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version_at_time","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK, is returned when the requested EHR_STATUS is successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EhrStatus"},"example":{"archetype_node_id":"openEHR-EHR-EHR_STATUS.generic.v1","name":{"value":"EHR status"},"uid":{"_type":"OBJECT_VERSION_ID","value":"9e3eb79b-1caa-4ab9-8cd4-d374b7c42bb4::local.ehrbase.org::1"},"subject":{"_type":"PARTY_SELF"},"is_queryable":true,"is_modifiable":true}}}},"400":{"description":"Bad Request, is returned when the request has invalid content such as an invalid <code>version_at_time</code> format."},"404":{"description":"Not Found, is returned when an EHR with <code>ehr_id</code> does not exist, or when a version of the resource identified by the request parameters (at specified <code>version_at_time</code>) does not exist."}}},"put":{"tags":["EHR_STATUS"],"summary":"Update EHR_STATUS","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#ehr_status-ehr_status-put"},"operationId":"updateEhrStatus","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"}},{"name":"Prefer","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EhrStatus"},"example":{"archetype_node_id":"openEHR-EHR-EHR_STATUS.generic.v1","name":{"value":"EHR status"},"uid":{"_type":"OBJECT_VERSION_ID","value":"9e3eb79b-1caa-4ab9-8cd4-d374b7c42bb4::local.ehrbase.org::1"},"subject":{"_type":"PARTY_SELF"},"is_queryable":true,"is_modifiable":true}}},"required":true},"responses":{"200":{"description":"OK, is returned when the EHR_STATUS is successfully updated, and the updated resource is returned in the body when <code>Prefer</code> header value is <code>return=representation</code>.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EhrStatus"},"example":{"archetype_node_id":"openEHR-EHR-EHR_STATUS.generic.v1","name":{"value":"EHR status"},"uid":{"_type":"OBJECT_VERSION_ID","value":"9e3eb79b-1caa-4ab9-8cd4-d374b7c42bb4::local.ehrbase.org::1"},"subject":{"_type":"PARTY_SELF"},"is_queryable":true,"is_modifiable":true}}}},"204":{"description":"No Content, is returned when the <code>Prefer</code> header is missing or is set to <code>return=minimal</code>"},"400":{"description":"Bad Request, is returned when the request URL or body (if provided) could not be parsed or has invalid content."},"404":{"description":"Not Found, is returned when an EHR with <code>ehr_id</code> does not exist."},"412":{"description":"Precondition Failed, is returned when <code>If-Match</code> request header doesn't match the latest version on the service side. Returns also latest <code>version_uid</code> in the <code>Location</code> and <codeETag></code> headers."}}}},"/rest/openehr/v1/ehr/{ehr_id}/directory":{"get":{"tags":["DIRECTORY"],"summary":"Get folder in directory version at time","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#directory-directory-get-1"},"operationId":"getFolderInDirectoryVersionAtTime","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version_at_time","in":"query","required":false,"schema":{"type":"string"}},{"name":"path","in":"query","required":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"204":{"description":"No Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}}}},"put":{"tags":["DIRECTORY"],"summary":"Update directory","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#directory-directory-put"},"operationId":"updateDirectory","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":true,"schema":{"$ref":"#/components/schemas/ObjectVersionId"}},{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"}},{"name":"Prefer","in":"header","required":false,"schema":{"type":"string","default":"return=minimal"}},{"name":"openEHR-VERSION","in":"header","required":false,"schema":{"type":"string"}},{"name":"openEHR-AUDIT_DETAILS","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"204":{"description":"No Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"412":{"description":"Precondition Failed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}}}},"post":{"tags":["DIRECTORY"],"summary":"Create directory","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#directory-directory-post"},"operationId":"createDirectory","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"openEHR-VERSION","in":"header","required":false,"schema":{"type":"string"}},{"name":"openEHR-AUDIT_DETAILS","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"}},{"name":"Prefer","in":"header","required":false,"schema":{"type":"string","default":"return=minimal"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}}}},"delete":{"tags":["DIRECTORY"],"summary":"Delete directory","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#directory-directory-delete"},"operationId":"deleteDirectory","parameters":[{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"openEHR-VERSION","in":"header","required":false,"schema":{"type":"string"}},{"name":"openEHR-AUDIT_DETAILS","in":"header","required":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"}},{"name":"If-Match","in":"header","required":true,"schema":{"$ref":"#/components/schemas/ObjectVersionId"}}],"responses":{"204":{"description":"No Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"412":{"description":"Precondition Failed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Folder"}}}}}}},"/rest/openehr/v1/ehr/{ehr_id}/composition/{versioned_object_uid}":{"get":{"tags":["COMPOSITION"],"summary":"Get composition at time","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#composition-composition-get"},"operationId":"getComposition","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"versioned_object_uid","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","description":"Composition format","required":false,"schema":{"type":"string","enum":["JSON","XML","STRUCTURED","FLAT"]}},{"name":"version_at_time","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}},"application/xml":{"schema":{"type":"string"}},"application/openehr.wt.flat.schema+json":{"schema":{"type":"string"}},"application/openehr.wt.structured.schema+json":{"schema":{"type":"string"}}}}}},"put":{"tags":["COMPOSITION"],"summary":"Update composition","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#composition-composition-put"},"operationId":"updateComposition","parameters":[{"name":"openehrVersion","in":"query","required":true,"schema":{"type":"string"}},{"name":"openEHR-AUDIT_DETAILS","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"Prefer","in":"header","required":false,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"}},{"name":"ehr_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"versioned_object_uid","in":"path","required":true,"schema":{"type":"string"}},{"name":"templateId","in":"query","required":false,"schema":{"type":"string"}},{"name":"format","in":"query","description":"Composition format","required":false,"schema":{"type":"string","enum":["JSON","XML","STRUCTURED","FLAT"]}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}},"application/xml":{"schema":{"type":"string"}},"application/openehr.wt.flat.schema+json":{"schema":{"type":"string"}},"application/openehr.wt.structured.schema+json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}},"application/xml":{"schema":{"type":"string"}},"application/openehr.wt.flat.schema+json":{"schema":{"type":"string"}},"application/openehr.wt.structured.schema+json":{"schema":{"type":"string"}}}}}}},"/rest/openehr/v1/definition/query/{qualified_query_name}/{version}":{"get":{"tags":["STORED_QUERY"],"summary":"Get stored query and info/metadata","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/definitions.html#definitions-stored-query-get-1"},"operationId":"getStoredQueryVersion","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"qualified_query_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryDefinitionResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/QueryDefinitionResponseData"}}}}}},"put":{"tags":["STORED_QUERY"],"summary":"Store a query","description":"Content type application/json is still supported but it's deprecated, please use text/plain instead.","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/definitions.html#definitions-stored-query-put"},"operationId":"putStoredQuery","parameters":[{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"qualified_query_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"query_type","in":"query","required":false,"schema":{"type":"string","default":"AQL"}}],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryDefinitionResponseData"}}}}}}},"/rest/openehr/v1/definition/query/{qualified_query_name}":{"get":{"tags":["STORED_QUERY"],"summary":"List stored queries","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/definition.html#tag/Query/operation/definition_query_list"},"operationId":"getStoredQueryList","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"qualified_query_name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QueryDefinitionResponseData"}}},"application/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QueryDefinitionResponseData"}}}}}}},"put":{"tags":["STORED_QUERY"],"summary":"Store a query","description":"Content type application/json is still supported but it's deprecated, please use text/plain instead.","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/definitions.html#definitions-stored-query-put"},"operationId":"putStoredQuery_1","parameters":[{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"qualified_query_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"query_type","in":"query","required":false,"schema":{"type":"string","default":"AQL"}}],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryDefinitionResponseData"}}}}}}},"/rest/ecis/v1/composition/{uid}":{"get":{"tags":["COMPOSITION"],"summary":"Deprecated since 2.0.0 and marked for removal","description":"Replaced by [/rest/openehr/v1/ehr/{ehr_id}/composition/{versioned_object_uid}](./index.html?urls.primaryName=1.%20openEHR%20API#/COMPOSITION/getComposition)","operationId":"getComposition_1","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"XML","enum":["FLAT","STRUCTURED","RAW","XML","ECISFLAT","EXPANDED","JSON"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompositionResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CompositionResponseData"}}}}},"deprecated":true},"put":{"tags":["COMPOSITION"],"summary":"Deprecated since 2.0.0 and marked for removal","description":"Replaced by [/rest/openehr/v1/ehr/{ehr_id}/composition/{versioned_object_uid}](./index.html?urls.primaryName=1.%20openEHR%20API#/COMPOSITION/updateComposition)","operationId":"update","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"XML","enum":["FLAT","STRUCTURED","RAW","XML","ECISFLAT","EXPANDED","JSON"]}},{"name":"templateId","in":"query","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionRestResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ActionRestResponseData"}}}}},"deprecated":true},"delete":{"tags":["COMPOSITION"],"summary":"Deprecated since 2.0.0 and marked for removal","description":"Replaced by [/rest/openehr/v1/ehr/{ehr_id}/composition/{versioned_object_uid}](./index.html?urls.primaryName=1.%20openEHR%20API#/COMPOSITION/deleteComposition)","operationId":"delete","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionRestResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ActionRestResponseData"}}}}},"deprecated":true}},"/rest/admin/template/{template_id}":{"put":{"tags":["Admin - Template"],"operationId":"updateTemplate","parameters":[{"name":"Accept","in":"header","description":"Client should specify expected format","required":false,"schema":{"type":"string","default":"application/xml"}},{"name":"Content-Type","in":"header","description":"Client may request content format","required":true,"schema":{"type":"string"}},{"name":"template_id","in":"path","description":"Target template id to update. The value comes from the 'template_id' property.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/xml":{"schema":{"type":"string","description":"New template content to replace old one with"}}},"required":true},"responses":{"200":{"description":"Template has been updated successfully.","headers":{"Content-Type":{"description":"Format of response","style":"simple"}},"content":{"application/xml":{"schema":{"type":"string"}}}},"401":{"description":"Client credentials are invalid or have expired.","content":{"application/xml":{"schema":{"type":"string"}}}},"403":{"description":"Client has no access permission since admin role is missing.","content":{"application/xml":{"schema":{"type":"string"}}}},"404":{"description":"Template could not be found.","content":{"application/xml":{"schema":{"type":"string"}}}},"422":{"description":"Template could not be replaced since it is used in at least one Composition.","content":{"application/xml":{"schema":{"type":"string"}}}}}},"delete":{"tags":["Admin - Template"],"operationId":"deleteTemplate","parameters":[{"name":"template_id","in":"path","description":"Target template id to delete. The value comes from the 'template_id' property.","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Template has been deleted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}}}},"401":{"description":"Client credentials are invalid or have expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}}}},"403":{"description":"Client has no access permission since admin role is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}}}},"404":{"description":"Template could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}}}},"422":{"description":"The template is still used by compositions and cannot be deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}}}}}}},"/rest/admin/ehr/{ehr_id}":{"put":{"tags":["Admin - EHR"],"operationId":"updateEhr","parameters":[{"name":"Accept","in":"header","description":"Client requested response content type","required":false,"schema":{"type":"string"}},{"name":"ehr_id","in":"path","description":"Target EHR id to update","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"EHR has been updated and number of updated items will be returned in the body.","headers":{"Content-Type":{"description":"Format of response","style":"simple"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AdminUpdateResponseData"}}}},"401":{"description":"Client credentials are invalid or have been expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AdminUpdateResponseData"}}}},"403":{"description":"Client is not permitted to access this resource since the admin role is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AdminUpdateResponseData"}}}},"404":{"description":"EHR with id could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AdminUpdateResponseData"}}}}}},"delete":{"tags":["Admin - EHR"],"operationId":"deleteEhr","parameters":[{"name":"ehr_id","in":"path","description":"Target EHR id to delete","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"EHR has been deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}}}},"401":{"description":"Client credentials are invalid or have been expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}}}},"403":{"description":"Client is not permitted to access this resource since the admin role is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}}}},"404":{"description":"EHR with id could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}}}}}}},"/rest/admin/ehr/{ehr_id}/contribution/{contribution_id}":{"put":{"tags":["Admin - Contribution"],"operationId":"updateContribution","parameters":[{"name":"ehr_id","in":"path","description":"Target EHR id to update contribution inside.","required":true,"schema":{"type":"string"}},{"name":"contribution_id","in":"path","description":"Target Contribution id to update","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Contribution has been updated successfully.","headers":{"Content-Type":{"description":"Format of response","style":"simple"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AdminUpdateResponseData"}}}},"401":{"description":"Client credentials invalid or have expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AdminUpdateResponseData"}}}},"403":{"description":"Client does not have permission to access since admin role is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AdminUpdateResponseData"}}}},"404":{"description":"EHR or Contribution could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AdminUpdateResponseData"}}}}}},"delete":{"tags":["Admin - Contribution"],"summary":"Not supported since 2.0.0","operationId":"deleteContribution","parameters":[{"name":"ehr_id","in":"path","description":"Target EHR id to update contribution inside.","required":true,"schema":{"type":"string"}},{"name":"contribution_id","in":"path","description":"Target Contribution id to update","required":true,"schema":{"type":"string"}}],"responses":{"501":{"description":"Contribution delete is not supported since 2.0.0.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponseData"}}}}}}},"/rest/openehr/v1/query/{qualified_query_name}/{version}":{"get":{"tags":["QUERY"],"summary":"Execute stored query","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/query.html#query-execute-query-get-1"},"operationId":"executeStoredQuery","parameters":[{"name":"qualified_query_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"fetch","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}}}}}},"post":{"tags":["QUERY"],"summary":"Execute stored query","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/query.html#query-execute-query-post-1"},"operationId":"executeStoredQuery_1","parameters":[{"name":"qualified_query_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}},"application/xml":{"schema":{"type":"object","additionalProperties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}}}}}}},"/rest/openehr/v1/query/{qualified_query_name}":{"get":{"tags":["QUERY"],"summary":"Execute stored query","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/query.html#query-execute-query-get-1"},"operationId":"executeStoredQuery_2","parameters":[{"name":"qualified_query_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"fetch","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}}}}}},"post":{"tags":["QUERY"],"summary":"Execute stored query","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/query.html#query-execute-query-post-1"},"operationId":"executeStoredQuery_3","parameters":[{"name":"qualified_query_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}},"application/xml":{"schema":{"type":"object","additionalProperties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}}}}}}},"/rest/openehr/v1/query/aql":{"get":{"tags":["QUERY"],"summary":"Execute ad-hoc (non-stored) AQL query","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/query.html#query-execute-query-get"},"operationId":"executeAdHocQuery","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"fetch","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/QueryResponseData"}}}}}},"post":{"tags":["QUERY"],"summary":"Execute ad-hoc (non-stored) AQL query","externalDocs":{"url":"https://specifications.openehr.org/releases/ITS-REST/latest/query.html#query-execute-query-post"},"operationId":"executeAdHocQuery_1","parameters":[{"name":"Accept","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object",
# --- truncated at 32 KB (83 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/vitagroup/refs/heads/main/openapi/vitagroup-ehrbase-sandbox-live.json