Getting data through API 2.0 using mutiple breakdowns for many metrics | Community
Skip to main content
October 20, 2022
Solved

Getting data through API 2.0 using mutiple breakdowns for many metrics

  • October 20, 2022
  • 1 reply
  • 629 views

Hello everyone,

 

I would like to import some data to my jupyter notebook (python) using API and aanalytics2 package. In general the structure of the report that I would like to get has the structure as following:

  1. All visits
    • Product Group 1
      • Week 1
      • Week 2
    • Product Group 2
      • Week 1
      • Week 2
    • Product Group 3
      • Week 1
      • Week 2

The problem that I have is that when I am using a debugger to get the JSON code it only includes the last product group divided into weeks.

 

It looks like this:

  • Week 1 - some data
  • Week 2 - some data

Is there any way to generate a JSON that would include all of the product groups divided into different weeks?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jennifer_Dungan

Hi @hstk have you tried building out this report (with the formatting) in Workspace? There is a trick that you may or many not know about....

 

Under the help menu, you can enable Debugging....  this will show a new icon on each visualization that will show timestamps of all the API calls used to build the data, each of these is clickable and will take you to a page that shows you the API call in multiple formats.

This can be a great way to start with a base API call that you can tweak afterwards. But since I know you can build the format you mentioned in Workspace, these debug API calls should allow you to replicate the data format as you would like to see it.

1 reply

Jennifer_Dungan
Community Advisor and Adobe Champion
Jennifer_DunganCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
October 21, 2022

Hi @hstk have you tried building out this report (with the formatting) in Workspace? There is a trick that you may or many not know about....

 

Under the help menu, you can enable Debugging....  this will show a new icon on each visualization that will show timestamps of all the API calls used to build the data, each of these is clickable and will take you to a page that shows you the API call in multiple formats.

This can be a great way to start with a base API call that you can tweak afterwards. But since I know you can build the format you mentioned in Workspace, these debug API calls should allow you to replicate the data format as you would like to see it.