Testing Public API with Postman

Prerequisites

  1. Locate your API Key. You can find your Ocp-Apim-Subscription-Key in your Profile or the Try It section of the API Documentation Site.

  2. In the API Docs note the verb (GET, POST, PUT, PATCH, and DELETE) used.

  3. Find the Request URL of the call you’d like to make.

  4. Note the endpoint's Request Parameters (for example, {customerId}). You’ll be inserting the parameter values in the URL as part of the call.



Creating a Request in Postman

Open Postman and create a New Request.

  1. Paste the Request URL and enter any Request Parameter values in the URL.

  2. Select the proper verb from the dropdown.

  3. Under the Headers tab:

    1. In the KEY column, enter "ocp-apim-subscription-key"
    2. In the VALUE column, enter your secret API Key.

  4. You can leave all other settings to the default.

  5. If doing a non-GET call, add a JSON request body.

    1. In the API Docs, copy the endpoint's request body.
    2. In Postman, click the Body tab.
    3. Click the dropdown and select Raw.
    4. Select JSON from the language dropdown.
    5. Paste the request body.

  6. Click the Send button.

    If successful, the response body will appear.


Did this page help you?