Expand my Community achievements bar.

Join us at Adobe Summit 2024 for the Coffee Break Q&A Live series, a unique opportunity to network with and learn from expert users, the Adobe product team, and Adobe partners in a small group, 30 minute AMA conversations.
SOLVED

Use of Analytics API to fetch report data

Avatar

Level 1

Has anyone used Adobe analytics api to get data from a project within a Workspace? 

I want to show, inside my product, a list of top 10 accessed pages from our public website . I have created a project in the workspace and have configured the project to display the top 10 pages. Is there a way to use the analytics API to get this data in the response?

1 Accepted Solution

Avatar

Correct answer by
Level 1

This is amazing!! Thank you for sharing this information @Jennifer_Dungan 

I just tried this out and it works (at least in Postman) with the CURL option

We will be using these API calls inside an an application, which prompts a couple of questions:

1. Will the API call expire at any point?

2. If the account associated with the adobe analytics account is deleted/removed, will the API call still work?

 

View solution in original post

6 Replies

Avatar

Community Advisor

You should be able to use the API to pull the top 10 pages directly.. you shouldn't need to pull the workspace report.

 

Basically, the API to pull projects is more about getting a list of projects and the configuration (and in theory copy projects to another company or organization).

 

But if you are trying to create a front end interface such as "most popular pages" or "most popular content", etc.. you would just query the data directly.

 

But here is a little cool trick you may not know about... In your workspace report, if you go to:

Help > Enable Debugger

 

This will add a new little bug icon on each of your visualizations... 

Jennifer_Dungan_0-1676090368416.png

 

Workspace uses the API to pull in content, and this will allow you to look at those API requests and copy the exact call that is being made.

 

Jennifer_Dungan_1-1676090512042.png

 

Each pull of data will have a timestamp, and when you click on it, you will open up a page that has XML, cURL, and JSON formatted information about the API calls that were used to build the visualization.

 

 

Jennifer_Dungan_2-1676090668043.png

 

Jennifer_Dungan_3-1676090766564.png

 

Avatar

Correct answer by
Level 1

This is amazing!! Thank you for sharing this information @Jennifer_Dungan 

I just tried this out and it works (at least in Postman) with the CURL option

We will be using these API calls inside an an application, which prompts a couple of questions:

1. Will the API call expire at any point?

2. If the account associated with the adobe analytics account is deleted/removed, will the API call still work?

 

Avatar

Community Advisor

Great! Glad to hear it...

 

As for the API Call expiring.. that I am not sure about I haven't had to use the API much (at least API 2.0.. we used to use API 1.4 years ago and they were fine, but things may have changed), I would be interested in that answer myself.

 

I believe if the account associated to the API call, if removed will cause the API to fail if removed. When we used API 1.4, I created a dedicated account just for the API (with a note "DO NOT DELETE" lol) This might be the safest way to proceed, rather than using one specific user's account

Avatar

Level 1

That's good idea to have a dedicated account for this!