Exposing services and data entities as REST APIs
So far we have seen various methods to perform various operations in JIRA via REST. What about operations that are not supported by REST? That little something that prevents you from integrating your JIRA with your third-party app? That is where the REST plugin module type comes handy. Using the REST plugin module, services or data can be exposed to the outside world.
In this recipe, we will see how to expose the getProjectCategories
method we have used as examples in the previous recipes using the REST interface.
Getting ready
Create a skeleton plugin using the Atlassian Plugin SDK. The plugin should be v2 for it to work.
How to do it...
The following is a step-by-step procedure to create a REST
plugin to expose the getProjectCategories
method.
Add the Maven dependencies required for REST to the
pom.xml
file:<dependency> <groupId>javax.ws.rs</groupId> <artifactId>jsr311-api</artifactId> <version>1.0...