Using Swagger "Try it out" in the API Catalog
Using Swagger "Try it out" in the API Catalog
The API Catalog makes it possible for users to call service APIs through the Try it out functionality. There are 2 types of endpoints:
-
Public endpoints
Endpoints that are accessible without entering user credentials.
-
Protected endpoints
Endpoints that are only accessible by entering user credentials. These endpoints are marked with a lock icon.
Example:
Before making requests to protected endpoints, authorize your session by clicking the lock icon and complete the required information in the Authorization modal:
Example:
To demonstrate Try it out, we use the example of the Swagger Petstore.
Example:
Make a request​
Follow this procedure to make a request.
-
Expand the POST Pet endpoint.
-
Click Try it out.
Example:
After you click Try it out, the example value in the Request Body field becomes editable.
-
In the Example Value field, change the first
id
value to a random value. Change the secondname
value to a value of your choice, such as the name of a pet. -
Click Execute.
Example:
The API Catalog Swagger UI submits the request and shows the curl that was submitted. The Responses section shows the response.
Example: