Every API here is available over the APIs.io API and to AI agents over MCP.
{
"openapi": "3.1.1",
"info": {
"title": "Admin API",
"version": "development",
"x-status": "DEVELOPMENT",
"x-spec": "admin"
},
"servers": [
{
"url": "https://{baseUrl}/v1",
"description": "An example openEHR server URL.",
"variables": {
"baseUrl": {
"default": "openEHRSys.example.com",
"description": "The (example) server base URL prefix providing openEHR services. This may contain server name, port and base path prefix."
}
}
}
],
"security": [],
"tags": [
{
"name": "EHR",
"description": "Admin management of [EHRs](https://specifications.openehr.org/releases/RM/latest/ehr.html#_ehr_class).\n"
}
],
"paths": {
"/admin/ehr/{ehr_id}": {
"delete": {
"operationId": "admin_ehr_delete",
"summary": "Delete EHR by id",
"description": "Deletes the EHR identified by `ehr_id`. \n\nAll resources associated with or owned by the specified EHR (such as COMPOSITION, EHR_STATUS, ITEM_TAG, CONTRIBUTION, and their historical versions) will also be **permanently** and physically deleted, in compliance with applicable data protection regulations (e.g., the GDPR in the European Union).\n\nThe server may execute this operation asynchronously (e.g. in batches), in which case returns status `202 Accepted`.\nIf the deletion is processed synchronously and completes successfully, the server returns status `204 No Content`.\n",
"tags": [
"EHR"
],
"parameters": [
{
"$ref": "#/components/parameters/ehr_id"
}
],
"responses": {
"202": {
"$ref": "#/components/responses/202"
},
"204": {
"$ref": "#/components/responses/204_deleted_hard"
},
"404": {
"$ref": "#/components/responses/404_unknown_ehr_id"
}
}
}
},
"/admin/ehr/all": {
"delete": {
"operationId": "admin_ehr_delete_all",
"summary": "Delete multiple EHRs",
"description": "\nDeletes all or multiple EHRs, or a specified subset of EHRs identified using the `ehr_id` query parameter. \n\n> NOTE: This functionality is intended primarily for **development** or **testing** purposes and may be disabled in **production** environments, in which case server may respond with `405 Method Not Allowed`.\n\nAll resources associated with or owned by the targeted EHRs (such as COMPOSITION, EHR_STATUS, ITEM_TAG, CONTRIBUTION, and their historical versions) will also be **permanently** and physically deleted, in compliance with applicable data protection regulations (e.g., the GDPR in the European Union).\n\nThe server may execute this operation asynchronously (e.g. in batches), in which case returns status `202 Accepted`.\nIf the deletion is processed synchronously and completes successfully, the server returns status `204 No Content`.\n",
"tags": [
"EHR"
],
"parameters": [
{
"$ref": "#/components/parameters/ehr_id_Admin"
}
],
"responses": {
"202": {
"$ref": "#/components/responses/202"
},
"204": {
"$ref": "#/components/responses/204_deleted_hard"
},
"404": {
"$ref": "#/components/responses/404"
},
"405": {
"$ref": "#/components/responses/405"
}
}
}
},
"/admin/ehr/{ehr_id}/merge/{targetEhrUid}": {
"put": {
"operationId": "admin_ehr_merge",
"summary": "Merge EHRs",
"description": "\nMerges the source EHR identified by `ehr_id` into the target EHR identified by `targetEhrUid`.\n",
"tags": [
"EHR"
],
"parameters": [
{
"$ref": "#/components/parameters/ehr_id"
},
{
"name": "targetEhrUid",
"in": "path",
"description": "Target EHR identifier taken from EHR.ehr_id.value.\n",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"format": "uuid",
"examples": [
"297c3e91-7c17-4497-85dd-01e05aaae44e"
]
}
}
],
"responses": {
"200": {
"description": "`200 OK` is returned when the requested operation has been successfully completed.\n"
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"$ref": "#/components/responses/404_unknown_ehr_id"
}
}
}
},
"/admin/ehr/{ehr_id}/composition/{composition_id}": {
"delete": {
"operationId": "admin_ehr_delete_composition",
"summary": "Delete COMPOSITION by id within an EHR",
"description": "\nDeletes the COMPOSITION identified by `composition_id` within the EHR identified by `ehr_id`. \n",
"tags": [
"EHR"
],
"parameters": [
{
"$ref": "#/components/parameters/ehr_id"
},
{
"name": "composition_id",
"in": "path",
"description": "COMPOSITION identifier taken from COMPOSITION.uid.value.\n",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"format": "uuid",
"examples": [
"d290f1ee-6c54-4b01-90e6-d701748f0851"
]
}
}
],
"responses": {
"204": {
"$ref": "#/components/responses/204_deleted_hard"
},
"404": {
"$ref": "#/components/responses/404_unknown_ehr_id"
}
}
}
},
"/admin/template/{template_id}": {
"delete": {
"operationId": "admin_template_delete",
"summary": "Delete template by id",
"description": "\nDeletes the template identified by `template_id`. \n",
"tags": [
"EHR"
],
"parameters": [
{
"name": "template_id",
"in": "path",
"description": "Template identifier.\n",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"examples": [
"openEHR-EHR-OBSERVATION.blood_pressure.v1"
]
}
}
],
"responses": {
"204": {
"$ref": "#/components/responses/204_deleted_hard"
},
"404": {
"$ref": "#/components/responses/404"
}
}
}
}
},
"components": {
"parameters": {
"ehr_id": {
"name": "ehr_id",
"in": "path",
"description": "EHR identifier taken from EHR.ehr_id.value.\n",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"format": "uuid",
"examples": [
"7d44b88c-4199-4bad-97dc-d78268e01398"
]
}
},
"ehr_id_Admin": {
"name": "ehr_id",
"in": "query",
"description": "An optional parameter to perform the operation on a subset of EHRs.\n",
"style": "form",
"explode": true,
"schema": {
"type": "string",
"format": "uuid"
},
"examples": {
"single": {
"summary": "A single EHR identifier",
"value": "7d44b88c-4199-4bad-97dc-d78268e01398"
},
"multiple": {
"summary": "Multiple EHR identifiers",
"value": [
"7d44b88c-4199-4bad-97dc-d78268e01398",
"297c3e91-7c17-4497-85dd-01e05aaae44e"
]
}
}
}
},
"responses": {
"200": {
"description": "`200 OK` is returned when the requested operation has been successfully completed.\n"
},
"202": {
"description": "`202 Accepted` is returned when the requested operation has been accepted for processing, \nbut processing has not been completed or may not have started (i.e. when requests are processed asynchronously). \n"
},
"400": {
"description": "`400 Bad Request` is returned when the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).\n"
},
"404": {
"description": "`404 Not Found` is returned when, based on the request parameters, the server did not find a current representation of a target resource, or is not willing to disclose that one exists.\n"
},
"405": {
"description": "`405 Method Not Allowed` is returned when the service knows the request method, but the target resource doesn't support this method (e.g. due to security concerns). \n"
},
"204_deleted_hard": {
"description": "`204 No Content` is returned when the requested operation succeeded and the resource(s) identified by the request parameters has been physically deleted (i.e. hard-delete).\n"
},
"404_unknown_ehr_id": {
"description": "`404 Not Found` is returned when an EHR with `ehr_id` does not exist.\n"
}
},
"schemas": {}
},
"x-tagGroups": [
{
"name": "Resource endpoints",
"tags": [
"EHR"
]
}
],
"x-ext-urls": {}
}