# REST Web Services API on Obs endpoint

**URL:** <https://talk.openmrs.org/t/rest-web-services-api-on-obs-endpoint/23817>\
**Category:** Ask OpenMRS\
**Created:** [July 4, 2019, 9:33am UTC](https://talk.openmrs.org/t/rest-web-services-api-on-obs-endpoint/23817 "2019-07-04T09:33:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbaluku](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dbaluku/32/10437_2.png) [@dbaluku](https://talk.openmrs.org/u/dbaluku)\
**Post date:** [July 4, 2019, 9:33am UTC](https://talk.openmrs.org/t/rest-web-services-api-on-obs-endpoint/23817/1 "2019-07-04T09:33:18Z")

</div>

Web-services REST API

version 2.24.0

Currently this REST API allows you to do a get request on Obs table by passing concept together with patient uuid parameters, however how can i query the obs table with only concept and value parameters while using this API. And if not possible , what are the reasons for this restrictions.

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [July 4, 2019, 11:50pm UTC](https://talk.openmrs.org/t/rest-web-services-api-on-obs-endpoint/23817/2 "2019-07-04T23:50:35Z")

</div>

Can you explain, with some bit of details, about the use case that you are trying to address?

---

<div class="post-metadata">

**Author:** ![dbaluku](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dbaluku/32/10437_2.png) [@dbaluku](https://talk.openmrs.org/u/dbaluku)\
**Post date:** [July 5, 2019, 6:03am UTC](https://talk.openmrs.org/t/rest-web-services-api-on-obs-endpoint/23817/3 "2019-07-05T06:03:37Z")

</div>

Am trying to count the number of observations with a certain concept and a particular value without considering the patient. For example to get observations with concept = 48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA and valueCoded = 1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA, my urlbe would be [https://demo.openmrs.org/openmrs/ws/rest/v1/obs/?concept=48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&valueCoded=1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA](https://demo.openmrs.org/openmrs/ws/rest/v1/obs/?concept=48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&valueCoded=1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA). From the documentation about the obs endpoint, this is not possible. It only recommends that you use the concept in combination with the patient . e.g [https://demo.openmrs.org/openmrs/ws/rest/v1/obs/](https://demo.openmrs.org/openmrs/ws/rest/v1/obs/)? patient = patientUuid& concept=conceptUuid&valueCoded=codeUuuid. So my question is on how else to get observations with concept uuid and value parameters as it is in the first url.

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [July 5, 2019, 11:07am UTC](https://talk.openmrs.org/t/rest-web-services-api-on-obs-endpoint/23817/4 "2019-07-05T11:07:39Z")

</div>

> [@WebServices Rest - Ability to Return a count how many Observations for a Specified Concept match a value](https://talk.openmrs.org/t/webservices-rest-ability-to-return-a-count-how-many-observations-for-a-specified-concept-match-a-value/23157):
>
> Is it possible to query the webservices end points for counts say How many observations have a concept that matches a specified value How many patients have an observation that matches such a value Or are these done via the Reporting Rest API?
