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.
The first thing to do is to read through the conventions section on the REST Web Services API For Clients page. Your module should follow similar conventions.
Getting the REST Web Services Jar into your project
You will need to check out the webservices.rest project and mvn clean install it to make it available to your module project. You will also need to add a few dependencies in your module's pom.xml files:
Adding new Web Service URLs
The documentation on how to create methods is the same as for the core developers. See that page for more information.
The only difference is that you want to expose your objects under /ws/rest/v1/yourmoduleid/yourresourcename and you need to add a controller in:
and name your resources accordingly @Resource(name=RestConstants.VERSION_1 + "/yourmoduleid/yourresourcename"...
Then you can proceed and add your rest module's resources with org.openmrs.module.yourmoduleid.web.resource package
To be provided.