Exploring Adobe Analytics API 1.4 with POSTMAN
Adobe has released the new and enhanced version of the Analytics API.
One of the major change is that Version 1.4 of the reporting API supports OAuth2 authentication, and maintains support for the version 1.3 password digest authentication mechanism. The complete details for all the changes are listed in the official documentation. It is available on the link below:
https://marketing.adobe.com/developer/documentation/analytics-reporting-1-4/whatsnew
The Version 1.4 shows the error details, unlike the previous version. It helps to pin point the error. The previous version only returns “false” in case there is an error.
Screenshot from API Explorer available at https://marketing.adobe.com/developer/api-explorer#ReportSuite.GetProps
I am big fan of the tool. It helped me a lot while implementing Adobe Analytics. The API Explorer will be decommissioned on July 19, 2018.
But on the GitHub link on the above banner, Adobe introduced me to PostMan.
PostMan is an API Development Environment and an API Client. The PostMan app is available for Mac, Windows, and Linux. We can download it from https://www.getpostman.com/apps.
The installation is easy. The app is well documented. The complete docs are available in this link: https://www.getpostman.com/docs/v6/
It also allows us to send API requests. We can create requests and save them for reuse. https://www.getpostman.com/docs/v6/postman/sending_api_requests/requests
The step by step guide to send Analytics API V1.4 request is available on the Analytics API V1.4 GitHub page.
https://github.com/Adobe-Experience-Cloud/analytics-1.4-apis/tree/master/postman
The article is really well written, and I was able to set up the initial request very easily. The example request was for the “GetReportSuites” method of “Company” Analytics API. This request will return all the Report Suites for the given Company in JSON format.
I will try to provide steps to use the “GetEvars” method of “Report Suite” API. We will need to pass the name of the Report Suite as a parameter of the POST request to get all the eVars in JSON format.
I will at this moment we have already successfully created and executed the “AA -- GetReportSuites” request as described in the example.
This biggest advantage of using the PostMan is that the request once created can be saved and we can reuse it multiple time. We can duplicate the request. By only changing the Username and Secret in the Pre-request Script section, we can use it for different client as well.
To create the request for ReportSuite.GetEvars, right click on the existing “AA – GetReportSuites” and select the Duplicate option from the menu.
Now, we will have a copy of the request. This copy will inherit all the setting from the original one.
We will need to change the method to “ReportSuite.GetEvars”. Select “raw” in the “Body” section just below the POST URL. Now, add the “rsid_list” parameter for the GetEvars method here and provide the name of the Report Suite.
{
"rsid_list":[
"testreportsuite"
]
}
Rename the request and save the request. Once, we click the “Send” button, the list of all eVars in JSON format will be displayed in the response Body section. We can copy the response and carry out instant search for a specific variable.
We can also select the “Save and Download” form the drop down of the Save button. This will download the response as .json file without any formatting.
We can use the Analytics API to build our own explorer. But, I am really happy with functionality the PostMan app provides.
“Adobe Configuration Export” by Gene Jones and “PocketSDR Mobile App for Adobe Analytics” by Jenn Kunz are two awesome tools that also provide you the similar functionality.
I hope this article will help you use the PostMan app to create Adobe Analytics API requests. Please let me know if I have missed anything. Also, I would like to know that if you have found out any other hidden gems.
Senior Manager working in D2C Ecommerce
5 年Really helpful post, thanks so much for taking the time to document this!
Senior Marketing Data Analyst at Esri Marketing
6 年As a Postman newbie, this was a great followup to the GIT intro to Adobe Analytics and Postman. Thanks!