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.
Required OpenMRS Version
The REST Web Services module requires at least OpenMRS 1.9.0 or 1.8.1 to run.
This Global Property determines the maximum number of resources that can be accessed on any webservice call. The default is *50*.
This Global Property 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 http://192.168.1.100/openmrs or http://yourdomainname.org/openmrs. 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. 10.0.0.0/30 matches 10.0.0.0 - 10.0.0.3 and 10.0.0.0/24 matches 10.0.0.0 - 10.0.0.255. Non matching IP addresses will receive a 403 HTTP error. Both IPv4 and IPv6 addresses are supported.
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
For Web Service Client Developers
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
- Quick java swing client that displays patients and encounters: http://svn.openmrs.org/openmrs-contrib/examples/webservices/hackyswingexample/
- In the following link you can download a client (api) java that allows add - edit a person (any resource) and make a query to Webservice.Rest https://project-development-software-victor-aravena.googlecode.com/svn/trunk/ClientOpenMRSRest/
- 2.9 Released January 15th 2015
Key Summary T Assignee Reporter P RESTWS-468 Support referring to concepts by SAME-AS mapping Lluis Martinez Darius Jazayeri RESTWS-479 DrugOrder needs to have a display property that shows dosing instructions Andrew Clarke Andrew Clarke RESTWS-486 Add order to EncounterSearchHandler Rafal Korytkowski Rafal Korytkowski RESTWS-482 Performance Issue Converting Resources to json Wesley Brown Wesley Brown RESTWS-403 BaseDelegatingResource.setProperty method does not fully support generic properties Wesley Brown Wesley Brown RESTWS-484 BaseRestController is not logging exceptions Vikash Gupta Vikash Gupta RESTWS-481 Add Search Handler to search for Patient by identifier Mark Goodrich Mark Goodrich
Release Date: Wednesday November 26th 2014
2.7 represents version: 20afb1bcdbc46a75859e2c736a8651fa38614720
A huge thank you goes out to the following contributors: Daniel Kayiwa, Darius Jazayeri, Jon Skeet, Paweł Muchowski, Rafal Korytkowski, Willa Ahmed, Wyclif Luyima
- [RESTWS-453] - Expose login locations via REST
- [RESTWS-455] - Add ConceptSearchResource
- [RESTWS-457] - orderfrequency resource should have a representation that includes the full concept representation
- [RESTWS-461] - Should automatically convert to Double
- [RESTWS-463] - encounter resource should let you create real-time encounters without explicitly specifying encounterDatetime
- [RESTWS-465] - Get inactive orders
- [RESTWS-451] - Nested custom type will fail with conversion exception
- [RESTWS-454] - deathDate property should be editable on the person resource
- [RESTWS-458] - orderfrequency resource should have display property
- [RESTWS-464] - encounter resource has a typo that prevents creating an encounter with orders easily
- [RESTWS-467] - Going to catalog API using JSON causes stack overflow due to subtypes
- [RESTWS-469] - NPE generating catalog
- [RESTWS-470] - Catalog incorrectly shows sub-resources
- [RESTWS-471] - A resource implementing Listable without Searchable fails in MainResourceController
RESTWS-371 RESTWS-395 RESTWS-394 RESTWS-397 RESTWS-399 RESTWS-393 RESTWS-400 RESTWS-401 RESTWS-396 RESTWS-402 RESTWS-398
- New Features
- RESTWS-392 - APIAuthenticationException handler always adds WWW-Authenticate header when user is not logged in.
- Bug Fixes
- Changed setMembers to full representation
- New Features
- New Features
- Bug Fixes
- [RESTWS-373] - Incorrect Converter returned in ConversionUtil convertToRepresentation()
- [RESTWS-381] - Return object representation instead of id for person attribute
- [RESTWS-384] - restService.getSearchHandler fails with ClassCastException
- [RESTWS-389] - Cannot set location person attribute with uuid
- [RESTWS-390] - PersonAttributeTypeResource should render hydrated concept
- New Features
- 2.0 (see Migration from REST 1.x to 2.x)
- Integrated Webservices.rest 1.9 extension module
- Removed controllers (single point of entry)
- Added search handlers
- Added support for Concept mappings
- (23 bugs/features fixed/added)
- Fixed concept.answers
- Fixed patient.identifiers
- Made more resources editable
- Added ability to return retired resources generally
- Added Provider and Visit support to the 1.9ext module
- Main functionality realized with no new bugs
- 0.9 (Beta)
- 0.8 (Alpha)
Download standalone with webservices module for an out of the box openmrs with rest web services ready to go.