Nav

About API Console

By default, APIkit automatically opens an APIkit Console panel in Studio when you run a RAML-based APIkit project. API Console gives you access to the generated documentation for the API. 

apiConsole

By default, the console is offered at the same host, port, and path as the routing flow listener, with the addition of the path /console. You can customize the path in the router global configuration. You can also disable the console completely.

routerconfig-console

To access the console in a browser, go to the full address of your project routing flow and append the console path, /console by default, to the end of the address. For example, if your API is hosted at http://localhost:8081/api, then the URL for accessing the console is http://localhost:8081/api/console.

The Show APIkit Console configuration determines whether or not API Console opens automatically when running an APIkit API.

Using API Console and a Reverse Proxy

APIkit 3.8.3 and later solves the problem accessing APIkit Console when a load balancer or reverse proxy is configured in front of an APIKit application. By default, the console uses the URL defined in the listener or provided by Cloudhub, making the console inaccessible.

If the RAML baseUri is relative, APIKit 3.8.3 and later uses the relative URI without overwriting it. When using a load balancer or reverse proxy, set the keepRamlBaseUri attribute in the apikit:config element to true. When you set the attribute to true, the console uses the URL of a the baseUri property of the RAML, and you can access API Console. By default, the attribute is false.

If the RAML baseUri is relative, APIKit 3.8.3 and later uses the relative URI without overwriting it.

Hosting Additional Consoles

Because the APIkit Console is a client that is accessing your API by making calls against it, hosting the console in the same URI as the API itself can cause policies to restrict calls more than you intended. Calls to populate the console and the favicon.ico count can have an impact, depending on applied policies. For example, if you applied a rate-limiting policy, loading the API Console consumes two of your allotted API calls, one to load the console in the browser and one for the favicon.ico. If your HTTP listener is protected with Basic Authentication, you need to authenticate in order to access or use the console. In particular, the APIkit Console doesn’t know the steps of the OAuth dance, so if you apply an OAuth policy to the API, you will not be able to access the API Console if you attempt to host multiple consoles in the same URI.