---
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.

---

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