EHRbase Item Tag Experimental API (v1)
Download OpenAPI specification:Download
Experimental API for working with Item Tags
Get tags
Returns all tags for or filters based on the given ids and/or keys.
path Parameters
| ehr_id required | string($uuid) Identifier of owner object, such as EHR. | 
| versioned_object_uid required | string($uuid|$version) Identifier of target, which may be a VERSIONED_OBJECT | 
query Parameters
| ids | string($uuid) Filter for tag Identifier. | 
| keys | string($key) Filter for tag keys. | 
header Parameters
| openEHR-VERSION | string | 
| openEHR-AUDIT_DETAILS | string | 
Responses
Response samples
- 200
[- {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "target": "65a17d54-9c67-4477-8b80-d3f97e165aa5",
- "key": "string",
- "value": "string",
- "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05",
- "target_type": "EHR_STATUS",
- "target_path": "string"
 }
]Create or Update tags
Bulk creation/update of tags. Tags without IDs are created, those with IDs are updated.
path Parameters
| ehr_id required | string($uuid) Identifier of owner object, such as EHR. | 
| versioned_object_uid required | string($uuid|$version) Identifier of target, which may be a VERSIONED_OBJECT | 
header Parameters
| openEHR-VERSION | string | 
| openEHR-AUDIT_DETAILS | string | 
| Prefer | string($prefer)  Enum: "return=minimal" "return=representation"  Preferred response type. | 
Request Body schema: application/jsonrequired
| id | string <uuid>  | 
| target | string <uuid>  | 
| key | string | 
| value | string | 
| owner_id | string <uuid>  | 
| target_type | string  Enum: "EHR_STATUS" "COMPOSITION"  | 
| target_path | string | 
Responses
Request samples
- Payload
[- {- "key": "tag::1",
- "value": "some textual value",
- "target_path": "/context/end_time[at0001]|value"
 }
]Response samples
- 200
[- {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "target": "65a17d54-9c67-4477-8b80-d3f97e165aa5",
- "key": "string",
- "value": "string",
- "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05",
- "target_type": "EHR_STATUS",
- "target_path": "string"
 }
]Deletes tags
Deletes all tags for matching the given uuid or ItemTag.id.
path Parameters
| ehr_id required | string($uuid) Identifier of owner object, such as EHR. | 
| versioned_object_uid required | string($uuid|$version) Identifier of target, which may be a VERSIONED_OBJECT | 
header Parameters
| openEHR-VERSION | string | 
| openEHR-AUDIT_DETAILS | string | 
Request Body schema: application/jsonrequired
List of ItemTag string($uuid) or entries to delete
Responses
Request samples
- Payload
"string"Get tags
Returns all tags for or filters based on the given ids and/or keys.
path Parameters
| ehr_id required | string($uuid) Identifier of owner object, such as EHR. | 
| versioned_object_uid required | string($uuid|$version) Identifier of target, which may be a VERSIONED_OBJECT | 
query Parameters
| ids | string($uuid) Filter for tag Identifier. | 
| keys | string($key) Filter for tag keys. | 
header Parameters
| openEHR-VERSION | string | 
| openEHR-AUDIT_DETAILS | string | 
Responses
Response samples
- 200
[- {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "target": "65a17d54-9c67-4477-8b80-d3f97e165aa5",
- "key": "string",
- "value": "string",
- "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05",
- "target_type": "EHR_STATUS",
- "target_path": "string"
 }
]Create or Update tags
Bulk creation/update of tags. Tags without IDs are created, those with IDs are updated.
path Parameters
| ehr_id required | string($uuid) Identifier of owner object, such as EHR. | 
| versioned_object_uid required | string($uuid|$version) Identifier of target, which may be a VERSIONED_OBJECT | 
header Parameters
| openEHR-VERSION | string | 
| openEHR-AUDIT_DETAILS | string | 
| Prefer | string($prefer)  Enum: "return=minimal" "return=representation"  Preferred response type. | 
Request Body schema: application/jsonrequired
| id | string <uuid>  | 
| target | string <uuid>  | 
| key | string | 
| value | string | 
| owner_id | string <uuid>  | 
| target_type | string  Enum: "EHR_STATUS" "COMPOSITION"  | 
| target_path | string | 
Responses
Request samples
- Payload
[- {- "key": "tag::1",
- "value": "some textual value",
- "target_path": "/context/end_time[at0001]|value"
 }
]Response samples
- 200
[- {- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "target": "65a17d54-9c67-4477-8b80-d3f97e165aa5",
- "key": "string",
- "value": "string",
- "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05",
- "target_type": "EHR_STATUS",
- "target_path": "string"
 }
]Deletes tags
Deletes all tags for matching the given uuid or ItemTag.id.
path Parameters
| ehr_id required | string($uuid) Identifier of owner object, such as EHR. | 
| versioned_object_uid required | string($uuid|$version) Identifier of target, which may be a VERSIONED_OBJECT | 
header Parameters
| openEHR-VERSION | string | 
| openEHR-AUDIT_DETAILS | string | 
Request Body schema: application/jsonrequired
List of ItemTag string($uuid) or entries to delete
Responses
Request samples
- Payload
"string"