Interactively testing a managed API
You can interactively test a managed API created for a REST API in a Swagger interface. You can view the API URL, the HTTP status codes, the request parameters, and the response parameters. You can also execute the API for testing purposes, or get a sample cURL command.
- In the
API Registry page, click to select a managed API, or click to open the Actions menu and select
View API Details.
The API details window appears.
- Select the
- If the API requires authentication, the
Authorization dialog box appears. Enter the username and password of a user who is authorized to access the API.
- To expand the view in the
Swagger tab, click the arrows in the upper right corner.
- To view the API request body and response codes, click any button that displays an API method.
For example, for an API with a POST method, a
POST button is displayed. Click the
POST button to view the API request body.
- To view the request body in JSON format, select
application/json. To view the request body in XML format, select
- To test the API semantics, in the request body panel, perform the following steps:
Try it out.
- Edit the request body. Replace any parameter type with a value.
- To test the updated request body, click
Server response panel displays the response body, response headers, and request duration time.
- To clear the server response, click
- To cancel the request body changes, click
Cancel. To change the request body again, click
- To view the request or response syntax, in the
Models panel, click the right arrow near the request or response entry.
The model request or response body is displayed. A red asterisk next to an element indicates a required element.