# \#api

**URL:** https://talk.openmrs.org/tag/api/201.md

[Latest](https://talk.openmrs.org/latest.md) · [Categories](https://talk.openmrs.org/categories.md) · [Tags](https://talk.openmrs.org/tags.md)

---

## [Seeking Volunteer for Docs Task](https://talk.openmrs.org/t/seeking-volunteer-for-docs-task/47011)

<div class="topic-metadata">

**Author:** [@grace](https://talk.openmrs.org/u/grace)\
**Replies:** 8\
**Last updated:** [September 12, 2025, 7:37am UTC](https://talk.openmrs.org/t/seeking-volunteer-for-docs-task/47011 "2025-09-12T07:37:56Z")

</div>

Hi Community, The Wiki page explaining our API is super out of date (last updated 2011!). Would anyone be interested in updating this to: Include updates about the REST API (including reference to rest.openmrs.org; …

---

## [Can't create a deceased Patient via FHIR](https://talk.openmrs.org/t/cant-create-a-deceased-patient-via-fhir/42564)

<div class="topic-metadata">

**Author:** [@mayank.raj](https://talk.openmrs.org/u/mayank.raj)\
**Replies:** 2\
**Last updated:** [April 26, 2024, 4:26pm UTC](https://talk.openmrs.org/t/cant-create-a-deceased-patient-via-fhir/42564 "2024-04-26T16:26:29Z")

</div>

It appears that there isn’t a way to create a deceased patient via FHIR api of OMRS. See this simple notebook to reproduce the issue: omrs-create-patient-fhir-issue | Kaggle Also, there is another issue of identifie…

---

## [\[ERROR\] Source option 6 is no longer supported. Use 7 or later](https://talk.openmrs.org/t/error-source-option-6-is-no-longer-supported-use-7-or-later/42387)

<div class="topic-metadata">

**Author:** [@suubi7](https://talk.openmrs.org/u/suubi7)\
**Replies:** 5\
**Last updated:** [April 6, 2024, 5:30pm UTC](https://talk.openmrs.org/t/error-source-option-6-is-no-longer-supported-use-7-or-later/42387 "2024-04-06T17:30:38Z")

</div>

I am getting an error while running mvn clean install for the web.service.rest Here is the error log. Is this a problem only on my end? \[ERROR\] Source option 6 is no longer supported. Use 7 or later. \[ERROR\] Target optio…

---

## [Error and NullPointer Exeption for a Cohort Indicator evaluation API](https://talk.openmrs.org/t/error-and-nullpointer-exeption-for-a-cohort-indicator-evaluation-api/40199)

<div class="topic-metadata">

**Author:** [@josephatj](https://talk.openmrs.org/u/josephatj)\
**Replies:** 0\
**Last updated:** [August 5, 2023, 11:26am UTC](https://talk.openmrs.org/t/error-and-nullpointer-exeption-for-a-cohort-indicator-evaluation-api/40199 "2023-08-05T11:26:49Z")

</div>

OPENMRS: 2.3.2: Question: Hello, am a bit new on the OpenMRS Reports module. Am getting a “Null pointer exception” on server logs and an error response when i send a get request (“reportingrest/cohort/749870b2-7cf5-46ab…

---

## [Unable to make API requests against openmrs-core](https://talk.openmrs.org/t/unable-to-make-api-requests-against-openmrs-core/38615)

<div class="topic-metadata">

**Author:** [@pgregorio](https://talk.openmrs.org/u/pgregorio)\
**Replies:** 3\
**Last updated:** [February 17, 2023, 2:54am UTC](https://talk.openmrs.org/t/unable-to-make-api-requests-against-openmrs-core/38615 "2023-02-17T02:54:23Z")

</div>

I recently cloned the openmrs-core repo and modified the following lines on the docker-compose.yml file for the api service: image: openmrs/openmrs-core:${TAG:-2.6.0} OMRS\_ADMIN\_USER\_PASSWORD: ${OMRS\_ADMIN\_USER\_PASSWORD…

---

## [Full stack developer](https://talk.openmrs.org/t/full-stack-developer/37813)

<div class="topic-metadata">

**Author:** [@michaelbontyes](https://talk.openmrs.org/u/michaelbontyes)\
**Replies:** 0\
**Last updated:** [November 1, 2022, 11:01pm UTC](https://talk.openmrs.org/t/full-stack-developer/37813 "2022-11-01T23:01:33Z")

</div>

Signalytic is looking for a Full stack developer Remote first full-time employment Front-end: JavaScript, React, Typescript Back-end: MySQL, Java, Tomcat, Docker, OpenMRS Linux as a server Based in Canada The positio…

---

## [java.lang.ClassCastException: org.hibernate.type.StringType cannot be cast to org.hibernate.type.Type](https://talk.openmrs.org/t/java-lang-classcastexception-org-hibernate-type-stringtype-cannot-be-cast-to-org-hibernate-type-type/33390)

<div class="topic-metadata">

**Author:** [@anatoleabe](https://talk.openmrs.org/u/anatoleabe)\
**Replies:** 2\
**Last updated:** [December 10, 2021, 4:44pm UTC](https://talk.openmrs.org/t/java-lang-classcastexception-org-hibernate-type-stringtype-cannot-be-cast-to-org-hibernate-type-type/33390 "2021-12-10T16:44:14Z")

</div>

Hello I am developing a new OpenMRS module using Hibernate and when deploying this module I have this error: \`java.lang.ClassCastException: org.hibernate.type.StringType cannot be cast to org.hibernate.type.Type\` Here …

---

## [Adding new REST URL: Unable to getRepresentationDescription for a Class object I created](https://talk.openmrs.org/t/adding-new-rest-url-unable-to-getrepresentationdescription-for-a-class-object-i-created/33261)

<div class="topic-metadata">

**Author:** [@anatoleabe](https://talk.openmrs.org/u/anatoleabe)\
**Replies:** 2\
**Last updated:** [April 27, 2021, 8:30am UTC](https://talk.openmrs.org/t/adding-new-rest-url-unable-to-getrepresentationdescription-for-a-class-object-i-created/33261 "2021-04-27T08:30:34Z")

</div>

Hello everyone, I am developing a restful API that deserves some services to a front end module using OpenMRS rest API. For example, I have two Classes Region and District, where one class (District) contains an attribut…

---

## [How to create a new api end point in open-mrs core or in a new module.](https://talk.openmrs.org/t/how-to-create-a-new-api-end-point-in-open-mrs-core-or-in-a-new-module/32506)

<div class="topic-metadata">

**Author:** [@atiq](https://talk.openmrs.org/u/atiq)\
**Replies:** 2\
**Last updated:** [March 5, 2021, 9:42am UTC](https://talk.openmrs.org/t/how-to-create-a-new-api-end-point-in-open-mrs-core-or-in-a-new-module/32506 "2021-03-05T09:42:06Z")

</div>

Hello There, I have created a table in openmrs database and wanted to perform the action on that table using api. Is there any default way to create the new methods to save, edit, update the data of the table. Please su…

---

## [Any web rest end point to download patient attachments.](https://talk.openmrs.org/t/any-web-rest-end-point-to-download-patient-attachments/32152)

<div class="topic-metadata">

**Author:** [@atiq](https://talk.openmrs.org/u/atiq)\
**Replies:** 2\
**Last updated:** [February 27, 2021, 2:50pm UTC](https://talk.openmrs.org/t/any-web-rest-end-point-to-download-patient-attachments/32152 "2021-02-27T14:50:06Z")

</div>

Hello There, I am looking for the api end point to download the uploaded attachments of patient but haven’t found any end point for it. Thanks in advance.

---

## [Creating new API in openmrs-core and using it in Attachment module](https://talk.openmrs.org/t/creating-new-api-in-openmrs-core-and-using-it-in-attachment-module/32105)

<div class="topic-metadata">

**Author:** [@pratikbiz24](https://talk.openmrs.org/u/pratikbiz24)\
**Replies:** 13\
**Last updated:** [February 11, 2021, 2:23pm UTC](https://talk.openmrs.org/t/creating-new-api-in-openmrs-core-and-using-it-in-attachment-module/32105 "2021-02-11T14:23:41Z")

</div>

I have created a new method i.e getAllAttachments in obsServiceImpl in openmrs-core and trying to use it in attachment module but not able to access it in attachment controller. What should i do to get openmrs-core metho…

---

## [Getting location attribute through the API?](https://talk.openmrs.org/t/getting-location-attribute-through-the-api/2619)

<div class="topic-metadata">

**Author:** [@gitahi86](https://talk.openmrs.org/u/gitahi86)\
**Replies:** 5\
**Last updated:** [November 4, 2020, 11:21am UTC](https://talk.openmrs.org/t/getting-location-attribute-through-the-api/2619 "2020-11-04T11:21:31Z")

</div>

How do you get the location attribute of a given location attribute type for a given location through the OpenMRS API? I've looked through the LocationService and seen nothing I can use for this. Am I missing something…

---

## [Hisp India Modules, Openmrs API with angular](https://talk.openmrs.org/t/hisp-india-modules-openmrs-api-with-angular/29290)

<div class="topic-metadata">

**Author:** [@echo2roy](https://talk.openmrs.org/u/echo2roy)\
**Replies:** 4\
**Last updated:** [July 9, 2020, 8:39am UTC](https://talk.openmrs.org/t/hisp-india-modules-openmrs-api-with-angular/29290 "2020-07-09T08:39:42Z")

</div>

Hello, I have Hisp India openmrs modules (Hospitalcore, billing module, patient-queue…) set up on reference application 2.8.1. It runs okay. I will like to build angular app and will have to leverage openmrs API. How be…

---

## [Creating a patient without creating a person, using REST API](https://talk.openmrs.org/t/creating-a-patient-without-creating-a-person-using-rest-api/28380)

<div class="topic-metadata">

**Author:** [@meullah](https://talk.openmrs.org/u/meullah)\
**Replies:** 4\
**Last updated:** [May 10, 2020, 9:09am UTC](https://talk.openmrs.org/t/creating-a-patient-without-creating-a-person-using-rest-api/28380 "2020-05-10T09:09:48Z")

</div>

Hello guys! i am trying to figuring out a way to create a patient directly without going through a series of steps mentioned here which uses two POSTs and multiple GET APIs. Create Patient - Documentation - OpenMRS Wik…

---

## [Enter vitals and Diagnostics through a REST API](https://talk.openmrs.org/t/enter-vitals-and-diagnostics-through-a-rest-api/28322)

<div class="topic-metadata">

**Author:** [@meullah](https://talk.openmrs.org/u/meullah)\
**Replies:** 8\
**Last updated:** [May 8, 2020, 10:17am UTC](https://talk.openmrs.org/t/enter-vitals-and-diagnostics-through-a-rest-api/28322 "2020-05-08T10:17:31Z")

</div>

Hi fellas! I hope all of you are doing well, i need some help regarding openMRS REST APIs. I want to do following using REST APIs: Start a patient visit Enter Patent Vitals Enter Patient Diagnostics Details Also GET(fe…

---

## [Public API to fetch global\_property in OpenMRS.](https://talk.openmrs.org/t/public-api-to-fetch-global-property-in-openmrs/24976)

<div class="topic-metadata">

**Author:** [@mddubey](https://talk.openmrs.org/u/mddubey)\
**Replies:** 12\
**Last updated:** [October 7, 2019, 2:15pm UTC](https://talk.openmrs.org/t/public-api-to-fetch-global-property-in-openmrs/24976 "2019-10-07T14:15:41Z")

</div>

Hello People, We are working on https://talk.openmrs.org/t/running-bahmni-appointments-scheduling-on-openmrs/24935. As part of this, while initializing the app we are trying to figure out if this app is running on Bahmn…

---

## [Error creating Obs: "converting class org.openmrs.Obs to ...DefaultRepresentation"](https://talk.openmrs.org/t/error-creating-obs-converting-class-org-openmrs-obs-to-defaultrepresentation/24691)

<div class="topic-metadata">

**Author:** [@norman](https://talk.openmrs.org/u/norman)\
**Replies:** 22\
**Last updated:** [October 3, 2019, 8:55pm UTC](https://talk.openmrs.org/t/error-creating-obs-converting-class-org-openmrs-obs-to-defaultrepresentation/24691 "2019-10-03T20:55:04Z")

</div>

Hi everyone, I am trying to debug an API request. I’m getting an error when creating an Observation. This is the request being sent to OpenMRS: POST https://www.example.com/openmrs/ws/rest/v1/obs { "concept": "f09e…

---

## [How to relate patient to bed with API?](https://talk.openmrs.org/t/how-to-relate-patient-to-bed-with-api/23836)

<div class="topic-metadata">

**Author:** [@bgevam](https://talk.openmrs.org/u/bgevam)\
**Replies:** 1\
**Last updated:** [July 5, 2019, 11:29am UTC](https://talk.openmrs.org/t/how-to-relate-patient-to-bed-with-api/23836 "2019-07-05T11:29:32Z")

</div>

Hi everyone :slight\_smile: I am currently investigating whether or not it is possible to add a sales order to OpenERP once a patient is discharged. In order to create a valid invoice I need to know what kind of bed the …

---

## [List of all OpenMRS APIs](https://talk.openmrs.org/t/list-of-all-openmrs-apis/22201)

<div class="topic-metadata">

**Author:** [@pbkeating](https://talk.openmrs.org/u/pbkeating)\
**Replies:** 3\
**Last updated:** [March 12, 2019, 8:29am UTC](https://talk.openmrs.org/t/list-of-all-openmrs-apis/22201 "2019-03-12T08:29:33Z")

</div>

Hi all, New to OpenMRS and wondered whether a list exists for all available APIs for OpenMRS or to have an idea about which other software it’s possible to connect with OpenMRS. Thanks a lot. Best, Patrick

---

## [Openmrs Rest API Send Observation not working.](https://talk.openmrs.org/t/openmrs-rest-api-send-observation-not-working/19451)

<div class="topic-metadata">

**Author:** [@engr.riyad](https://talk.openmrs.org/u/engr.riyad)\
**Replies:** 28\
**Last updated:** [August 27, 2018, 8:37am UTC](https://talk.openmrs.org/t/openmrs-rest-api-send-observation-not-working/19451 "2018-08-27T08:37:05Z")

</div>

I want to send Form data using the rest API. Here is my JSON: https://pastebin.com/YnMMN0AX And endpoint is “openmrs/ws/rest/v1/obs/” But it gives me error. https://pastebin.com/BbMtWpYn So, What should I have to d…

---

## [Need help getting the currently logged in User](https://talk.openmrs.org/t/need-help-getting-the-currently-logged-in-user/10403)

<div class="topic-metadata">

**Author:** [@fortune](https://talk.openmrs.org/u/fortune)\
**Replies:** 9\
**Last updated:** [August 8, 2018, 2:27pm UTC](https://talk.openmrs.org/t/need-help-getting-the-currently-logged-in-user/10403 "2018-08-08T14:27:35Z")

</div>

Hello everyone, Please, I need to get the currently logged in user that can be rendered on the standardEmrPage when that user is logged in. Does anyone know if there's a REST API I can call to achieve this or is there a…

---

## [Unable to guess FieldBridge for order in org.openmrs.Order](https://talk.openmrs.org/t/unable-to-guess-fieldbridge-for-order-in-org-openmrs-order/17925)

<div class="topic-metadata">

**Author:** [@owais.hussain](https://talk.openmrs.org/u/owais.hussain)\
**Replies:** 1\
**Last updated:** [May 8, 2018, 11:31am UTC](https://talk.openmrs.org/t/unable-to-guess-fieldbridge-for-order-in-org-openmrs-order/17925 "2018-05-08T11:31:24Z")

</div>

Hi devs, I’m trying to write some unit tests for API of this module. I’ve used Order entity as one-to-one identifying dependency in LabTest class. On executing CommonLabTestServiceTest as JUnit, I’m thrown this excepti…

---

## [Python API Library](https://talk.openmrs.org/t/python-api-library/17498)

<div class="topic-metadata">

**Author:** [@isears](https://talk.openmrs.org/u/isears)\
**Replies:** 3\
**Last updated:** [April 15, 2018, 8:06pm UTC](https://talk.openmrs.org/t/python-api-library/17498 "2018-04-15T20:06:13Z")

</div>

To my knowledge there isn’t a python client for the rest API, so I’ve started building one here: https://github.com/isears/openmrsapi It’s something I’m personally using to more efficiently manage an OpenMRS installatio…

---

## [GET /cohort/{parent-uuid}/member on OpenMRS v2.1.0 returns Response Code 400](https://talk.openmrs.org/t/get-cohort-parent-uuid-member-on-openmrs-v2-1-0-returns-response-code-400/10175)

<div class="topic-metadata">

**Author:** [@vshankar](https://talk.openmrs.org/u/vshankar)\
**Replies:** 6\
**Last updated:** [January 26, 2018, 5:45pm UTC](https://talk.openmrs.org/t/get-cohort-parent-uuid-member-on-openmrs-v2-1-0-returns-response-code-400/10175 "2018-01-26T17:45:58Z")

</div>

I was trying out the REST API on platform 2.1.0 on my local server instance. The aforementioned rest call seems to be returning a response code 400 with the following response body: Response URL: http://localhost:808…

---

## [Article: Context.APIException - User context must first be passed to setUserContext](https://talk.openmrs.org/t/article-context-apiexception-user-context-must-first-be-passed-to-setusercontext/2837)

<div class="topic-metadata">

**Author:** [@ch3ck](https://talk.openmrs.org/u/ch3ck)\
**Replies:** 3\
**Last updated:** [June 14, 2017, 7:27am UTC](https://talk.openmrs.org/t/article-context-apiexception-user-context-must-first-be-passed-to-setusercontext/2837 "2017-06-14T07:27:24Z")

</div>

Hello Everyone, I have come to realise that there is a popular error developers have been facing while hacking OpenMRS which is: org.openmrs.api.Context.APIException: A user context must first be passed to setUserCont…

---

## [Modules with CCD (Continuity of Care Document) API](https://talk.openmrs.org/t/modules-with-ccd-continuity-of-care-document-api/11662)

<div class="topic-metadata">

**Author:** [@mkruszynski](https://talk.openmrs.org/u/mkruszynski)\
**Replies:** 0\
**Last updated:** [May 29, 2017, 9:30am UTC](https://talk.openmrs.org/t/modules-with-ccd-continuity-of-care-document-api/11662 "2017-05-29T09:30:15Z")

</div>

Hello, I'm looking for a module which is containing an API to getting CCD from OpenMRS. I was trying to install Export CCD Module, but this module don't seem to have any API. Next I tried to install RG CCD. This module…

---

## [We should not have methods on our domain objects that remove a collection member](https://talk.openmrs.org/t/we-should-not-have-methods-on-our-domain-objects-that-remove-a-collection-member/11172)

<div class="topic-metadata">

**Author:** [@darius](https://talk.openmrs.org/u/darius)\
**Replies:** 5\
**Last updated:** [April 25, 2017, 7:32pm UTC](https://talk.openmrs.org/t/we-should-not-have-methods-on-our-domain-objects-that-remove-a-collection-member/11172 "2017-04-25T19:32:31Z")

</div>

I was having a discussion with @wyclif about https://issues.openmrs.org/browse/TRUNK-4906 and I discovered that we have a convention in our API that I think is terrible: for our domain objects that have collection proper…

---

## [RESTful Patient Search](https://talk.openmrs.org/t/restful-patient-search/8894)

<div class="topic-metadata">

**Author:** [@missilen](https://talk.openmrs.org/u/missilen)\
**Replies:** 5\
**Last updated:** [November 30, 2016, 3:32pm UTC](https://talk.openmrs.org/t/restful-patient-search/8894 "2016-11-30T15:32:33Z")

</div>

Hello, i am looking for a way to get a limited list of patients using rest service I have tried get first nnn Patient by using GET patient api with set limit but it does not work so hopefully i could filter on the loc…

---

## [Making Spring DI work in an Activator (on the API side)](https://talk.openmrs.org/t/making-spring-di-work-in-an-activator-on-the-api-side/3050)

<div class="topic-metadata">

**Author:** [@mksd](https://talk.openmrs.org/u/mksd)\
**Replies:** 8\
**Last updated:** [September 16, 2015, 6:37pm UTC](https://talk.openmrs.org/t/making-spring-di-work-in-an-activator-on-the-api-side/3050 "2015-09-16T18:37:53Z")

</div>

Hi all, I would like to instantiate org.openmrs.module.formentryapp.FormManager in my module's activator. How do I achieve this so that all its @Autowired members are constructed properly? If I simply do this: Fo…

---

## [GETtting all results from REST API returns empty array](https://talk.openmrs.org/t/gettting-all-results-from-rest-api-returns-empty-array/2622)

<div class="topic-metadata">

**Author:** [@jacek](https://talk.openmrs.org/u/jacek)\
**Replies:** 5\
**Last updated:** [July 31, 2015, 1:27pm UTC](https://talk.openmrs.org/t/gettting-all-results-from-rest-api-returns-empty-array/2622 "2015-07-31T13:27:55Z")

</div>

For some reason REST calls for fetching all results return empty array, ie /openmrs/ws/rest/v1/patient?q=John correctly returns one patient, John Max, but when I call /openmrs/ws/rest/v1/person It returns nothing…

[Next page](https://talk.openmrs.org/tag/api/201.md?match_all_tags=true&page=1&tags%5B%5D=api)
