Quickstart: Get an answer from knowledge base using Postman

This Postman-based quickstart walks you through getting an answer from your knowledge base.


Publish to get endpoint

When you are ready to generate an answer to a question from your knowledge base, publish your knowledge base.

Use production endpoint with Postman

When your knowledge base is published, the Publish page displays the HTTP request settings to generate an answer. The default view shows the settings required to generate an answer from Postman.

The yellow numbers in the following image indicate which name/value pairs to use in the following steps.

Publish results

To generate an answer with Postman, complete the following steps:

  1. Open Postman. If you're asked to choose a building block, select the Basic Request building block. Set the Request name as Generate QnA Maker answerand the collection as Generate QnA Maker answers. If you don't want to save to a collection, select the Cancel button.

  2. In the workspace, select the HTTP method of POST.

    In Postman, set POST Method

  3. For the URL, concatenate the HOST value (#2 from image) and the Post value (#1 from image) to create the complete URL. A complete example URL looks like:


    In Postman, set the complete URL

  4. Select the Headers tab under the URL, then select Bulk Edit.

  5. Copy the headers (#3 and #4 from image) into the text area.

    In Postman, set the headers

  6. Select the Body tab.

  7. Select the raw format and enter the JSON (#5 from image) that represents the question.

    {"question":"How do I programmatically update my Knowledge Base?"}

    In Postman, set the body JSON value

  8. Select the Send button.

  9. The response contains the answer along with other information that may be important to the client application.

    In Postman, set the body JSON value

Use staging endpoint

If you want to get an answer from the staging endpoint, append the URL with the isTest body property.

Next steps

The publish page also provides information to generate an answer with cURL.