Specifying the testing preferences for an API

By default, when you test an API with the Test tab, a range of test parameters are preconfigured. For example, a default Product is automatically generated, to which the API is added, and that Product is published to the Sandbox Catalog. However, you can configure testing preferences for each of your APIs, including the required Product and target Catalog.

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: This feature is not available if you are using the Local Test Environment.

Procedure

  1. Open the required API for editing, in either of the following ways:
    • During the initial creation of an API, the API wizard guides you to enter the minimum configuration settings; on completion of the initial configuration, click Edit API.
    • To open an existing API for editing, complete the following steps:
      1. In the navigation pane, click Develop icon in the API UI navigation pane Develop, then select the APIs tab.
      2. Click the title of the API version that you want to work with.
  2. Under the Test tab, click Target Configuration.
    The Preferences page opens.
  3. Use the Edit links to configure the following testing preferences, as required:
    Auto-publish
    In order to execute an API for testing purposes, you must make it online. To make the API online and auto-publish your API document, set the Auto-publish toggle to the On position.
    Target catalog
    The Catalog to which you want to publish the Product that contains the API. The selected Catalog is used as the scope for the other preference settings. You can select a Catalog of your choice, or you can opt to use the Sandbox Catalog by selecting Use the default built-in Sandbox Catalog.
    Target Gateway service
    The gateway service to which you want to publish the Product that contains the API.
    Target product
    The Product that will contain the API; you can select any of the Products from the selected Target catalog, or you can opt to use an automatically generated Product by selecting Generate Product on Save. The auto-generated Product has the title api_title auto product.
    Target product rate limit
    If you opted to use an automatically generated Product, you can configure a rate limit to control calls to the API. If you selected your own Product, the Target product rate limit option is not available; instead, the rate limits that are configured in the selected Product and Plan are applied.
    Target Plan
    The Plan in the selected Product that you want the test application to subscribe to. If you opted to use an automatically generated Product, the Target Plan option is not available; instead, the application is subscribed to the Default Plan in the automatically generated Product.
    Test application
    The application that you want to subscribe to the selected Plan. You can select an application of your choice or, if you opted to use the Sandbox Catalog, you can instead use the pre-supplied test application by selecting Use the built-in Test Application.
    Test Consumer Org
    The consumer organization that you want to subscribe to the selected Plan. If you selected your own application, the consumer organization is preset to that which contains the application, and cannot be changed. If you opted to use the pre-supplied test application you can, if required, select a consumer organization of your choice.

    Click Reset to reset preferences to the default values.

  4. Click Save Preferences when done.
    The Test page header displays the following details:
    • The target catalog.
    • The target gateway services.
    • The target product associated with the current API.
    • If the current status of API is Online or Offline. You can configure this in the API's Design page header.

Results

The next time you bring the API online, the API is published as specified by the preference settings, ready for testing.
Note: These settings are stored in your browser's local storage and will be used for your API testing in subsequent sessions. The following settings are specific to each individual API:
  • Target product
  • Target product rate limit
  • Target Plan
The remaining settings will be applied to all your APIs.