Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 1.7 KB

File metadata and controls

25 lines (17 loc) · 1.7 KB

Test the new API in the portal

You can call operations directly from the Azure portal, which provides a convenient way to view and test the operations of an API.

  1. Select the API you created in the previous step.

  2. Select the Test tab.

  3. Select an operation.

    The page displays fields for query parameters and fields for the headers.

    [!NOTE]

    In the test console, API Management automatically populates an Ocp-Apim-Subscription-Key header, and configures the subscription key of the built-in all-access subscription. This key enables access to every API in the API Management instance. Optionally display the Ocp-Apim-Subscription-Key header by selecting the "eye" icon next to the HTTP Request.

  4. Depending on the operation, enter query parameter values, header values, or a request body. Select Send.

    When the test is successful, the backend responds with a successful HTTP response code and some data.

    [!TIP]

    By default, the test console sends a request to API Management's CORS proxy, which forwards the request to the API Management instance, which then forwards it to the backend. This proxy uses public IP address 13.91.254.72 and can only reach public endpoints.

    If you want to send a request directly from the browser to the API Management service, select Bypass CORS proxy. Use this option when you want to use the test console and your API Management gateway is network-isolated or doesn't allow traffic from the CORS proxy.

To debug an API, see Tutorial: Debug your APIs using request tracing.