Wiki Spaces


Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack


Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Remove empty bullet, typo

This is the technical API documentation (focusing on client devs) for the REST Module. For general REST web service information and user documentation, see that the module page.

Table of Contents


Every available object in the web services (ws) module is written up as a resource. The resource class defines the properties that are exposed and the setters that are available. The class also defines the representations and what goes in them (ref vs default vs full, see below for more on representations).


Both the REST and Java API follow the same default behaviour except for the case of getting metadata from the Java API, see the summary table below:


GET dataresourceexcludes voided by default

getAll[Data] excludes voided by default

GET metadataresource excludes retired by default

getAll[Metadata] includes retired by default

Date/Time with Time Zones

It is strongly recommended to always submit the full date + time + timezone in any REST POST query.

The format of the date/time should be: 


(the milliseconds are optional)


Code Block
titleCreating an obs
POST /ws/rest/v1/obs
Body content:
{"obsDatetime": "2016-12-25T19:02:34.232+0700", /*... and other properties */}

If no time zone is provided or it is not formatted correctly, the service will suppose that the date and time are provided at local time (server time). This can have deep repercussions, so make sure to always send a valid time zone.