Custom rest api is null

Javier Perez
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 22, 2017

Issue:

I've created a custom rest API call that works well when run within the sdk

http://jirasandbox:2990/jira/rest/custom/1.0/option/branch

which yields

"optionsValues": [

    "one",
    "two"
]

However, when installed on my production server

http://jira/rest/custom/1.0/option/branch

  jira responds with

<status>
        <status-code>404</status-code>
        <message>null for uri: http://jira/rest/custom/1.0/option/branch</message>
</status>

Nothing shows up in the jira log

These are my entry points

  • atlassian-plugin-xml
<rest key="customFieldOptionRESTpoint" path="/custom" version="1.0">
    <description>pick list custom fields</description>
</rest>`
  • class
@Path("/option")
public class CustomFieldOption {
    
    @GET
    @Path("/branch")
    @Produces ({ MediaType.APPLICATION_JSON })
    public Response branchOption() {

Question:

What can be wrong, how can I track what's going on?

1 answer

1 accepted

1 vote
Answer accepted
Javier Perez
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 23, 2017

I had another custom/1.0 rest end point in a different plugin. Changing to 2.0 in my new plugin fixed the issue

Abhijeet Kamble January 23, 2018

Thanks Javier .. it fixed the similar issue for me.

Suggest an answer

Log in or Sign up to answer