Testing an API with the Assembly tab

IBM® API Connect provides a basic test environment in the Assembly tab so that you can ensure that your APIs are defined and implemented correctly.

About this task

You can complete this task either by using the API Designer UI application, or by using the browser based API Manager UI.

Note:
  • If you are testing an API that contains references to API properties, only those references that are defined inside the API assembly are resolved and replaced with their corresponding values when you invoke the API in the assembly test tool; property references that are defined outside of the API assembly are not resolved.
  • Due to Cross-Origin Resource Sharing (CORS) restrictions, the assembly test tool cannot be used with the Chrome or Safari browsers on the macOS Catalina platform.

Procedure

To test an API, complete the following steps.

  1. If you are using API Designer, set the mode to Online using the Options menu Options menu on the main page.
  2. In the navigation pane, click Develop icon in the API UI navigation pane Develop, then select the APIs tab.
  3. Click the title of the API that you want to work with.
  4. Click Assemble to open the Assemble view, then click the Test icon Test icon (right arrow).
  5. If, you are testing the API for the first time and, when you created the API definition, you selected the Activate API option, your test setup will already be configured and you can proceed immediately to the next step to test your API. Otherwise, click Activate API to have your test setup configured.
    Note: If you are retesting your API after making changes, click Republish product to make your changes available.
  6. In the Operation section, select the API operation that you want to test, then click Invoke.
    The API response is displayed in the Response section.
    Note: If you receive a message relating to an untrusted certificate, click the link provided, accept the certificate, then return to the test environment and click Invoke again. The message also mentions a lack of CORS support on the server, but this is just one possible cause for the connection failing.