---
title: "Get folder in directory version at time"
method: GET
path: "/ehr/{ehr_id}/directory"
tags: ["DIRECTORY"]
---

# Get folder in directory version at time

`GET /ehr/{ehr_id}/directory`

Retrieves the version of the directory FOLDER associated with the EHR identified by `ehr_id`. 
If `version_at_time` is supplied, retrieves the version extant _at specified time_, otherwise retrieves the _latest_ directory FOLDER version. 

If `path` is supplied, retrieves from the directory only the sub-FOLDER that is associated with that path.

## Path parameters

- `ehr_id` string, uuid, required

## Query parameters

- `version_at_time` string, datetime
- `path` string

## Headers

- `Accept` 'application/json' | 'application/xml' | 'application/openehr.wt.flat+json' | 'application/openehr.wt.structured+json'

## Response `200`

`200 OK` is returned when the FOLDER is successfully retrieved.

- Folder
  - `_type` string

## Other responses

- `204` — `204 No Content` is returned when the resource identified by the request parameters (at specified `version_at_time`) time has been deleted.
- `404` — `404 Not Found` is returned when an EHR with `ehr_id` does not exist, or when a directory does not exist at the specified `version_at_time`, or when `path` does not exist within the directory.

## Changes

- **2026-04-27** `a81c0c47d29d` — 11 info
  - added `SECTION` discriminator mapping keys to the `allOf[subschema #1: Versionable]/allOf[subschema #1: LOCATABLE]/` response property for the response status `200`
  - added `SECTION` discriminator mapping keys to the `allOf[subschema #1: Versionable]/allOf[subschema #1: LOCATABLE]/allOf[subschema #1: PATHABLE]/` response property for the response status `200`
  - the `allOf[subschema #1: Versionable]/allOf[subschema #1: LOCATABLE]/feeder_audit/feeder_system_audit/time/allOf[subschema #1: DV_TEMPORAL]/accuracy/allOf[subschema #1: DV_AMOUNT]/allOf[subschema #1: DV_QUANTIFIED]/allOf[subschema #1: DV_ORDERED]/other_reference_ranges/items/meaning/mappings/items/match` response's property pattern was changed from `/^[><=?]$/` to `^[><=?]$` for the status `200`
  - the `allOf[subschema #1: Versionable]/allOf[subschema #1: LOCATABLE]/feeder_audit/feeder_system_audit/time/allOf[subschema #1: DV_TEMPORAL]/allOf[subschema #1: DV_QUANTIFIED]/allOf[subschema #1: DV_ORDERED]/other_reference_ranges/items/meaning/mappings/items/match` response's property pattern was changed from `/^[><=?]$/` to `^[><=?]$` for the status `200`
  - …7 more
- **2025-11-05** `660ec5865c0d` — 1 info
  - added the new optional `header` request parameter `Accept`
- …earlier changes not shown

[Full history](https://skmtc.dev/openehr/apis/ehr-api/changes/ehr/:ehr_id/directory/get.md)

---

[API](https://skmtc.dev/openehr/apis/ehr-api.md) · [All operations](https://skmtc.dev/openehr/apis/ehr-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openehr/ehr-api/revisions/a0e37a217524/schema)
