To Host an Additional API Console

  1. In the Package Explorer, select the API name in src/main/app.

  2. On the Global Elements tab, click Create and select Connector Configuration > HTTP Listener Configuration.

    • Change the Port setting from 8081 to another port, for example 8083.

    • Set the Base Path to remote-vending/api/*, the same base path you used for the first HTTP listener configuration. Click OK.

  3. On the Message Flow tab, drag an HTTP Connector onto the canvas to create a new flow in the project.

  4. Give the new flow an arbitrary name. For example, api-console2.

  5. In the properties editor, in Connector Configuration, select the new global HTTP listener configuration you created from the drop-down.

  6. In the Properties editor, set Path to a different path than you used for the first HTTP listener configuration. For example, set the path to /console2/*. Save the changes.

  7. Drag an APIkit Console standalone endpoint from the Mule Palette to the right of the HTTP listener.

    The following code snippet shows the configurations added to enable a second console.

    <http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8083" basePath="remote-vending/api/*" doc:name="HTTP Listener Configuration"/>
    <flow name="api-console2">
       <http:listener config-ref="HTTP_Listener_Configuration" path="/console2/*" doc:name="HTTP"/>
       <apikit:console config-ref="api-config" doc:name="APIkit Console"/>
  8. Save all, right-click the API in Project Explorer, and choose Run As > Mule Application.

    The additional console tab appears.

  9. Click the new tab.

    apikit using 0b49a

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub
Give us your feedback!
We want to build the best documentation experience for you!
Help us improve with your feedback.
Take the survey!