Expand my Community achievements bar.

Join us January 15th for an AMA with Champion Achaia Walton, who will be talking about her article on Event-Based Reporting and Measuring Content Groups!

Can I get the native metrics, dimensions and segments through API 2.0? It seems I can only get some of them.

Avatar

Level 1

I'm trying to leverage API 2.0 to build a system like Powever BI (https://experienceleague.adobe.com/en/docs/analytics-learn/tutorials/integrations/power-bi/adobe-ana...) and get the data but have some issues.

1. For metrics, I can't get the ones with a small Adobe logo like below, it seems to be a calculated metric based on "Orders" and "Unique Visitor" (which I can get from the API response), and I also can't get it from the CalculatedMetrics API.

ZhenYa2_0-1729061598700.png

 

2. The same thing happened with "Segments", for all the items I can only get the ones without the "Adobe" logo, and I don't know if others can be fetched.

ZhenYa2_1-1729061991324.png

 

3. I noticed in the Adobe Analytics Workspace that there's a feature called "Enabled Debugger", which can give me the necessary payload to run a report, just wonder if it's possible to get that payload through API? Like retrieving the definition of a freeform table.

 

Thanks.

 

 

5 Replies

Avatar

Level 1

Update: I managed to get all the segments by adding both includeType "template" and "all", but there's no such thing for the metrics API.

ZhenYa2_0-1729063283496.png

 

Avatar

Community Advisor and Adobe Champion

I am not sure what the PowerBI capabilities are, but if it's similar to Report Builder (which uses APIs) calculated metrics may not be available. Same with the segment, there are some segments which are incompatible with Report Builder and Data Warehouse, but work fine in Workspace and direct APIs calls.

 

However, if you can run APIs directly, you can use the Debugger to help get the API calls. I am not sure what you mean by "which can give me the necessary payload to run a report, just wonder if it's possible to get that payload through API".... the Debugger will give you the API calls. Workspace is built using the API, and what the debugger provides you is the exact calls that were used.

 

Now, obviously you would need to make some adjustments... you would want to parameterize the date range, and you might not need all the "Freeform Table" title information, etc... but the basics of what you need to pull should all be there.

 

Just note that depending on the complexity of your table (i.e. if you have breakdowns) you will need to run multiple API calls, one for each breakdown.

Avatar

Administrator

Hi @ZhenYa2  Did you find the suggestions helpful? Let us know if you need any further information! If the solution works for you, please mark the answer as correct to help others. And if you’ve found your own solution, we’d love for you to share it with the community. Thank you!

Avatar

Level 1

@Jennifer_Dungan   Thanks for your response, now I understand the limitations for me. And it seems not possible to deal with a project in one single API call.

 

However I still wonder that in API 2.0, is there anything like "Report.Run" in API 1.4 that I can simply provide the dimensions, metrics, and segments that the server would handle all the things internally? Because as of now it seems very unfriendly to developers who are trying to do some integrations here (T_T).

ZhenYa2_0-1729655141507.png

 

Avatar

Community Advisor and Adobe Champion

If you don't need breakdowns.. then the API 2.0 isn't too bad... You can use segments and pull multiple metrics... 

 

It's only if you need Dimension A broken down by Dimension B broken down by Dimension C that the API becomes clunky....

 

Example:

      Page Views
Page Name     X
  Site Section   X
    Sub Section X
    Sub Section 2  
  Site Section 2    
    Sub Section 3  
    Sub Section 4  
Page Name 2      
  Site Section 3    

 

 

But if you only need something like:

  Metric A Metric B Metric C
Page Name 1 X Y Z
Page Name 2 X Y Z

(and even filtered by segments, this should be doable in a single API call)