Reputation: 3359
In Jira Plugin development, i have created a rest resource class at location - "[FOLDER]/Src/Main/JAVA/com.company.jira.plugin.REST/PlanIssuesRestResources"
Now, when i try to access below url in browser then,
http://[host]:2990/jira/rest/auth/1/PlanIssuesRestResource
then it shows below error message in browser:
<status-code>404</status-code>
<message>null for uri: http://localhost:2990/jira/rest/auth/1/PlanIssuesRestResource
</message>
</status>
My Rest resource class is looks as below:
@Path("/message")
public class PlanIssuesRestResource {
@GET
@AnonymousAllowed
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Path("/{key}")
public Response getMessageFromPath(@PathParam("key") String key)
{
return Response.ok(new PlanIssuesResourceModel(key, getMessageFromKey(key))).build();
}
How can i access this URL ?
Thanks
Upvotes: 2
Views: 2629
Reputation: 3359
As found,
Follow below link for details about Rest resource URL composition:
https://developer.atlassian.com/display/DOCS/REST+Plugin+Module
Below is related communication ticket at answers.atalssianc.com. https://answers.atlassian.com/questions/156650/development-in-jira-plugin-how-to-use-rest-api-in-velocity-template-through-json
Thank You Dhaval Soni
Upvotes: 1