Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

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

Documentation

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

Configuration Options

Wiki Markup
{html}<dl>
<dt><b>webservices.rest.maxResultsDefault</b></dt>
<dd>This [Global Property|docs:Global Properties Descriptions] determines the maximum number of resources that can be accessed on any webservice call.&nbsp; The default is *50*.</dd>

<dt><b>webservices.rest.maxResultsAbsolute</b></dt>
<dd> This [Global Property|docs:Global Properties Descriptions] 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*.</dd>

<dt><b>webservices.rest.uriPrefix</b></dt>
<dd>This should point at the root of your exposed web application.&nbsp; This is typically <i>http://localhost:8080/openmrs</i> during testing, but after being deployed will be something like <i>http://192.168.1.100/openmrs</i> or <i>http://yourdomainname.org/openmrs</i>. If this is empty or not filled in, the user will see NEEDSTOBECONFIGURED/ws/rest/ as the "self" urls on all objects.</dd>

<dt><b>webservices.rest.allowedips</b></dt>
<dd>By default this is an empty string: "",&nbsp;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&nbsp;with bit masks to denote whole subdomains e.g. 10.0.0.0/30 matches&nbsp;10.0.0.0 - 10.0.0.3 and 10.0.0.0/24 matches 10.0.0.0 - 10.0.0.255.&nbsp;Non matching IP addresses will receive a 403 HTTP error. Both IPv4 and IPv6 addresses are supported.</dd>

</dl>{html}

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.

...

For Web Service Client Developers

See REST Web Services API For Clients

For more information on individual objects within the API, see REST Web Service Resources in OpenMRS 1.8

...