Running an API command within the Swagger interface
To run an API call from the Swagger UI it requires user authentication with a valid API token. If you have already logged in to Blue Planet in the same browser, it is not necessary to log in to the Swagger UI since the session cookie from that login provides sufficient authentication.
To obtain an API token for a new browser session:
-
Log in to the Swagger user interface by entering http://<server_IP>/bpocore/swagger in your web browser, where <server_IP> is the IP address or DNS name of your Blue Planet host server.
-
Click Login and follow the prompts.
-
Do the following:
-
Navigate to a component (for example, Market), and click an API (for example, domains) to view the available operations.
-
Click the link for the intended API to expand the API description. For example, * GET domains*.
-
-
To display a list of domains (assuming you have some configured), click Try It Out!
-
To display a list using a specific filter, enter any required parameter values in the q parameter field and click Try It Out!
The API call results display beneath the API description.
"Try It Out!" executes the command against the BP system you are pointing to in your URL. -
To log out of the Swagger interface session, click Logoff, or close your browser session.