Use the Run in Postman button
Use the Run in Postman button
This is for:
DeveloperProgrammers around the world widely use Postman, an application that provides an extensive API development environment.
Some Coveo documentation pages include a Run in Postman button allowing to easily test in Postman the API requests that are presented in the page or in a set of pages (such as in a tutorial).
The Push API Tutorial 1 features a Run in Postman button.
In short, the Run in Postman button opens your Postman application with:
-
A shared Postman collection containing all the API requests covered in the page or set of pages.
-
A Postman environment containing the required variables (some with empty values).
You must set your environment variable values and ensure that your API key or OAuth2 token carries the required Coveo privileges to perform the API requests included in the collection. You should find this information in the page containing the Run in Postman button.
Test API requests in Postman
If you’re not familiar with Postman, the following procedure will help you get started:
-
On the
docs.coveo.com
page featuring a Run in Postman button, click it. -
In the Open with panel that appears, select your Postman application.
ExampleOn a Mac computer:
-
In your Postman application:
-
If you get a Create New panel, close it.
In the lower-left corner of the panel, clear the Show this window on launch checkbox to prevent getting having to close this panel every time.
You can go back to this panel by clicking New in the upper-left corner of the Postman application.
-
If you get a Collection Exists dialog box:
-
If you imported the collection some time ago, click Replace to ensure that you get the latest updated collection.
OR
-
If you recently imported the collection, to prevent duplicating the collection, close the dialog by clicking X in the upper-right corner.
NoteWhen an environment is bundled with the shared collection, you may end up with duplicated environments.
-
-
In the sidebar on the left, select the Collections tab.
-
In the list of collections, click the collection prefixed with Coveo - and matching the title of the
docs.coveo.com
page on which you clicked the button. -
In the upper-right corner of the application:
-
Click the Environment dropdown menu, and then select the environment matching the collection name.
-
Click the Environment quick look (eye) icon on the right of the dropdown menu.
-
In the Environment quick look panel, if some environment variables are empty or don’t have an appropriate value, click Edit to change the values.
Ensure that the API key or OAuth2 token carries the required Coveo privileges to perform the API requests included in the collection.
You’ll find information about which environment values to use and the required privileges in the
docs.coveo.com
page on which you clicked the button.ExampleIn the Coveo - Push API Tutorials environment, you must set the organizationId, apiKey, and myEmailAddress variables.
-
-
Back in the list of collections, expand the collection.
-
In the expanded collection, click the API request you want to test.
-
Send the API request.
-