You can test the API from within API Manager to ensure that is defined and
implemented correctly.
About this task
The API Manager user interface has
an integrated test tool. As part of the testing process the test tool stages and publishes a Product
for you. The test tool then calls the API and displays the result of that call.
Procedure
To test an API, complete the following steps.
-
If you have not previously pinned the UI navigation pane then
click the Navigate to icon
.
The
API Manager UI navigation pane opens. To pin the
UI navigation pane, click the
Pin menu icon

.
-
Click Drafts in the UI navigation pane, and then click APIs.
The APIs tab opens.
-
Click the name of the API that you want to test.
-
Click the Assemble tab.
-
Click the Test icon
.
-
If you have not yet configured the test tool for the API you are testing, or if you want to
change the configuration of the test tool for your API, complete the following steps:
-
If you have already configured the test tool, click Change setup.
-
In the Catalog field, select the Catalog in which you want to test. The Catalog must be a development Catalog; for information on enabling development mode for a Catalog, see Creating and configuring Catalogs.
-
To use an existing Product, in the Product field, select the Product
with which you want to test your API.
-
If your API is not included in the Product, click Add API.
-
If you have made changes since you last published your Product, click Republish
product.
-
If you want to create a new Product to test the API with, provide a name for the Product in the
Name field, and then click Create and publish.
-
If there are multiple Plans in your chosen Product that contain your API, select the Plan you
want to use in the Plan section's Name field.
Note: If automatic subscription is enabled for the selected Catalog, you do not need to select a Plan because a test application, which is subscribed to all the Plans in the Catalog, is used automatically.
For information on enabling automatic subscription for a Catalog, see Creating and configuring Catalogs.
-
If you want to test by using an existing application, select the application from the
Application field and then, if it is not already subscribed to the Product
you are using, click Subscribe.
Note: If automatic subscription is enabled for the selected Catalog, you do not need to provide an application because a test application is used automatically. For information on enabling automatic subscription for a Catalog, see Creating and configuring Catalogs.
-
If you want to create a new application to test with, provide a name for the application in the App name field and then click Create and subscribe.
Note:
- You cannot access this application through the Developer Portal. Record the client ID and secret for your new application.
If automatic subscription is enabled for the selected Catalog, you do not need to provide an application because a test application is used automatically. For information on enabling automatic subscription for a Catalog, see Creating and configuring Catalogs.
-
Click Next.
-
If your API is not included in the Product for which your test tool is configured, click
Add API.
-
If you have made changes since you last published the Product with which you are testing your
API, click Republish product.
-
In the Operation field, select the operation you want to test.
The fields necessary to call your operation are populated by the test
tool.
-
If you have input parameters, complete the corresponding fields.
-
If you want to run the test multiple times, select Repeat and then, in
the Stop after: field, specify how many times you want your test to call the
API. Select Stop on error to stop the test if it encounters an error.
-
Click Invoke to run the test.
- Optional:
Click Debug to view information about the API configuration.

Additional debug information, such as the input and output
of the policy, is available for the invoke,
map, and
proxy
policies.
Restriction: If no API configuration information is
displayed when you click the
Debug button, a possible reason might be that
access to analytics data within
API Connect has been switched off. Contact
your cloud administrator for confirmation. (For more information, see
Configuring destination targets for API Connect analytics data.)
Results
You successfully tested an API.Note: You can also use the Explore tool within
API Manager to test API endpoints. Click

and select
Drafts or a specific Catalog. The API Explore tool opens
and shows the operations for all of the APIs that are contained in your
Drafts
view or in the specified Catalog. The left pane of the
Explore window can be
used to select an operation to test. The center pane displays summary information about the
endpoint, including its parameters, model instance data, and response codes, and the right pane
provides template code to call the endpoint.