Expose services and data entities as REST APIs
Now that we have seen how to expose JIRA functionalities via SOAP and XML-RPC interfaces, it is time to move to REST APIs. Similar to the RPC Endpoint Plugin Module Type, JIRA also has a REST Plugin module type using which 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 Atlassian Plugin SDK. The plugin should be v2 for it to work.
How to do it...
Following is a step-by-step procedure to create a REST plugin to expose the
getProjectCategories
method.
Add the maven dependencies require for REST to the
pom.xml
file:<dependency> <groupId>javax.ws.rs</groupId> <artifactId>jsr311-api</artifactId> <version>1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId...