- 2 Minutes to read
Panaya ForeSight - Getting started with Panaya APIs
- 2 Minutes to read
Step 1 - Download an API Connection Software
We recommend using Postman as a tool for running the API connection. While there are many other tools available that will work for this purpose, in this guide, we will be demonstrating the use of Postman. If you are already using Postman, be sure to upgrade to the latest version before proceeding with the next steps.
Step 2 - Import a collection of Panaya ForeSight API calls
After you have imported the collection into Panaya, you should see the Panaya ForeSight API examples and an environment called "ForeSight Shared Environment" as highlighted below:
Step 3 - Create your Access Token in Panaya
Follow the steps in this article to create an access token in Panaya.
Step 4 - Set the username, accesstoken and URL in Postman
Select the Panaya Shared Environment, and click on the "eye" icon to display the available variables. Then set the accesstoken variable like shown below with the value you received in Step 3 as well as your Panaya username or the Panaya API user you are using like shown here:
Note: The username is case sensitive, so it must be the same as configured in Panaya User Management and how it appears in your User Profile. Do not insert any additional spaces in the values of any of the variables.
Be sure to set at least the "CURRENT VALUE" column of each variable.
If you log into Panaya using emea.panaya.com, populate the URL variable as follows:
If you log into Panaya using my.panaya.com, populate the URL variable as follows:
Step 5 - Set the projectId variable
Click on the "access token login" API call and click "Send." You will see that you receive a temporary session token valid for 15 minutes. This token is then being used by all the rest of the API calls:
Next, click on "Get Projects" API call, and click on Send. You should receive a similar response, but with your projectId or several if you are connected to several projects. In our example below, the projectId is 32896:
So now, just set the projectId of the Panaya project you would like to work within the "ForeSight Shared Environment" projectId variable and "Save" your changes
You should now try out and experiment with the rest of the ForeSight API examples. See this article for more information.
You can easily display the full API request headers and body in many different code formats such as Python, C#, Ruby, curl, etc. by choosing the required one from the Code snippet window: