This guide walks a module developer through adding a new set of web service methods for a core object. There is a separate guide for core developers.
Conventions
The first thing to do is to read through the conventions section on the REST Web Services API page. Your module should follow similar conventions.
...
The documentation on how to create methods is the same as for the core developers. See that page for more information.
...
Code Block |
---|
@RequestMapping(value = "/rest/yourmoduleid/yourobjectid") |
Examples
The idgenws module was built as an example maven module that uses the restws code. It is a rudimentary example and does not use a lot of the helper parent classes. See http://svn.openmrs.org/openmrs-modules/idgenws/trunk
The reportingrest module was also built as a PoC. It is based on ant/build.xml and so the library setup, etc is slightly different than the maven example on this page. See the code for that here: http://svn.openmrs.org/openmrs-modules/reportingrest