# Compositions list from OpenEHR REST API

**URL:** https://discourse.openehr.org/t/compositions-list-from-openehr-rest-api/2467
**Category:** SM
**Created:** [25 March 2022 11:11 UTC](https://discourse.openehr.org/t/compositions-list-from-openehr-rest-api/2467 "2022-03-25T11:11:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![surfer](https://discourse.openehr.org/user_avatar/discourse.openehr.org/surfer/32/2326_2.png) [@surfer](https://discourse.openehr.org/u/surfer)
#### Post date: [25 March 2022 11:11 UTC](https://discourse.openehr.org/t/compositions-list-from-openehr-rest-api/2467/1 "2022-03-25T11:11:45Z")

</div>

I have a probably naive question. Is there a way through the openEHR REST API to get the list of compositions for a selected EHR?  
I mean without using a query. In fact, I managed to do it only with the help of an AQL query.

---

<div class="post-metadata">

### Author: ![birger.haarbrandt](https://discourse.openehr.org/user_avatar/discourse.openehr.org/birger.haarbrandt/32/24_2.png) [@birger.haarbrandt](https://discourse.openehr.org/u/birger.haarbrandt)
#### Post date: [25 March 2022 11:22 UTC](https://discourse.openehr.org/t/compositions-list-from-openehr-rest-api/2467/2 "2022-03-25T11:22:42Z")

</div>

Hi @surfer,

nope, this is actually the a case for AQL.

There could be a case to list the compositions when retrieving the EHR object, but this part (to my knowledge) is not well-defined in the spec.

---

<div class="post-metadata">

### Author: ![surfer](https://discourse.openehr.org/user_avatar/discourse.openehr.org/surfer/32/2326_2.png) [@surfer](https://discourse.openehr.org/u/surfer)
#### Post date: [25 March 2022 11:40 UTC](https://discourse.openehr.org/t/compositions-list-from-openehr-rest-api/2467/3 "2022-03-25T11:40:23Z")

</div>

Hi @birger.haarbrandt ,  
Quoting the [Architecture Overview](https://specifications.openehr.org/releases/BASE/latest/architecture_overview.html) :  
“A central EHR object identified by an EHR id specifies references to a number of types of structured, versioned information, plus a list of Contribution objects that act as audits for changes made to the EHR”

So I interpret it as the references to the versioned compositions should exist in a ehr. Right now only the opposite it’s true if I’m not mistaken both for your EHRBase and for Better.

@thomas.beale @ian.mcnicoll may I ask you what do you think about it?
