Expand my Community achievements bar.

Announcement: Calling all learners and mentors! Applications are now open for the Adobe Analytics 2024 Mentorship Program! Come learn from the best to prepare for an official certification in Adobe Analytics.
SOLVED

Getting data through API 2.0 using mutiple breakdowns for many metrics

Avatar

Level 1

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?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

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.