Forming the API URL

Each API listed in published-apis.yaml is addressable through the REST servlet. You form the path for each Swagger operation by adding the API base path to the path for the operation. For example, suppose that an API has a base path (basePath) of /users/v1. In this case, a GET /users/{userId} operation then has a URL of /users/v1/users/{userId} relative to the servlet.

The full URL at runtime depends upon the application server URL, the servlet context, and REST servlet mapping. Thus, the full URL format looks something similar to the following:
<schema> + <appserver URL> + ":" + <appserver port> + <servlet context>
     + <REST servlet path> + <API basePath> + <operation path>
For example, suppose that you have the following values for a PolicyCenter installation:
Application server mycompany.com
Port 8180
Servlet context /pc
Default REST servlet mapping /rest/*
Using these values, the following string defines the full URL for the GET operation for a user with ID 12345:
  • https://mycompany.com:8180/pc/rest/user/v1/users/12345