Listing REST endpoints

Enonic version: 6.11.1
OS: Win 8.1

Is there a way to list all the endpoints for REST services?
I have a service implementing JaxRsComponent that returns 404 when i try to call it, and would like to see if it’s responding to a different url.

In Java, you could use the service JaxRsService and iterate through the collection of JaxRsComponent.
But my guess it that something is not correctly configured in your service.
Could I look at the code of the service?

This is the relevant parts of the service:

@Path("api/v1.0/organization")
@Produces(MediaType.APPLICATION_JSON)
@Component(immediate = true, configurationPid = {CONFIGURATION_PID})
public class OrganizationResource implements JaxRsComponent {

    @GET
    @Path("/org-number/{orgNumber}")
    public OrgInfoContainer infoByOrgNumber(@PathParam(value = "orgNumber") String orgNumber) throws Exception {
    ...
    }
}

There may be other problems here but it is missing at least: property = “group=api”

@Component(immediate = true, configurationPid = {CONFIGURATION_PID, property = “group=api”)

1 Like

Thank you! That did the trick. :slight_smile:

This topic was automatically closed after 4 hours. New replies are no longer allowed.