Wiki Spaces


Get Help from Others

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


Skip to end of metadata
Go to start of metadata

What this module does

The module exposes the OpenMRS API as REST web services.  if an OpenMRS instance is running the Webservices.REST module, other programs (and languages) can connect to retrieve and post certain information to an OpenMRS database.


Source at:
Download at:

User Documentation

Required OpenMRS Version

The REST Web Services module requires at least OpenMRS 1.9.0 or 1.8.1 to run.

Configuration Options
    This setting determines the maximum number of resources that can be accessed on any webservice call.  The default is *50*.
    This setting determines the absolute maximum number of resources that can be accessed on any webservice call. If the client requests more than this limit, then receives an error. The default is *1000*.
    This should point at the root of your exposed web application.  This is typically http://localhost:8080/openmrs during testing, but after being deployed will be something like or If this is empty or not filled in, the user will see NEEDSTOBECONFIGURED/ws/rest/ as the "self" urls on all objects.
    By default this is an empty string: "", which means anyone can access the rest URLs. If you put any IP addresses into this list, only calls from those are allowed. IPs should be separated by a whitespace or a comma. IPs can be declared with bit masks to denote whole subdomains e.g. matches - and matches - Non matching IP addresses will receive a 403 HTTP error. Both IPv4 and IPv6 addresses are supported.

Technical Documentation

The module exposes the OpenMRS API through light-weight resource objects off of the core OpenMRS objects. The structure is very similar, but not guaranteed to match up exactly.

This module uses Spring 3 annotations to expose URLs. Primary transport language is currently JSON and XML (beta in 2.1).

For Creators of Web Service Core/Module Methods

Adding a Web Service Step by Step Guide for Core Developers
Adding a Web Service Step by Step Guide for Module Developers

For Web Service Client Developers

See REST Web Services API For Clients

Development History

Initial project page: Enhanced Web Services (Design Page)
Development sprint 1: 2011-05-16 Development Sprint
Followup sprint: 2011-05-30 Development Sprint
Development sprint 2: 2011-07-05 Development Sprint
Development sprint 3: 2013-02-07 Integration of RESTWS

Example Client code

Release Notes

New Features

    • [RESTWS-281] - REST does not expose relationships or relationship_types
    • [RESTWS-444] - Add brandName and dispenseAsWritten to DrugOrderSubclassHandler1_10


    • [RESTWS-426] - REST can return a Patient representation when we want a Person rep
    • [RESTWS-441] - User and concept search handlers do not work for OpenMRS 1.10
    • [RESTWS-442] - ProviderSearchHandler should handle OpenMRS 1.10


Download standalone with webservices module for an out of the box openmrs with rest web services ready to go.

1 Comment

  1. Is there any good reason it shouldn't be "requires at least OpenMRS 1.8.1 to run" instead of  "requires at least OpenMRS 1.9.0 or 1.8.1 to run"?