Expand my Community achievements bar.

SOLVED

Breaking out dimensions in a single API call

Avatar

Level 3

I have the need to use Adobe's API to pull the top 5 URLs daily. The top URLs change change daily.
That's a simple API call.
However, I have the need to break out the top 5 URLs by Marketing Channel.
Unfortunately, Adobe's API requires me to post the item ID for each URL for breaking out items.
Using the Adobe API, how would I pull the top 5 URLs broken out by Marketing Channel in a single API call?
Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor and Adobe Champion

As far as I understand, Adobe's API 2.0 must be run in multiple calls if you want to do a breakdown, this was to get around the performance issues of API 1.4/1.3/etc

 

Back in the 1.x API days, you could run breakdowns in the API, but essentially you had to:

  1. Send the initial request with all your breakdown data to the Queue (you would get a request id back)
  2. Then you had to keep checking the Queue for your request id and checking the status
  3. When the status for your request finally came back as completed, you could then query the project by the request id

Sometimes the Queue would get stuck and you would have to get Client Care to clear the queue so that you could try again.

 

 

With the new API, the responses are almost immediate.. there is no queue that needs to be checked for a completed report... whatever data you ask for is returned upon success.

 

However, this means that for Breakdowns, you must make multiple API requests.

 

And no matter if you are using API 2.0 or 1.4, you will have to make multiple calls in one way or another (whether its to facilitate the breakdown of data or to poll the queue looking for the report to be finished)

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor and Adobe Champion

As far as I understand, Adobe's API 2.0 must be run in multiple calls if you want to do a breakdown, this was to get around the performance issues of API 1.4/1.3/etc

 

Back in the 1.x API days, you could run breakdowns in the API, but essentially you had to:

  1. Send the initial request with all your breakdown data to the Queue (you would get a request id back)
  2. Then you had to keep checking the Queue for your request id and checking the status
  3. When the status for your request finally came back as completed, you could then query the project by the request id

Sometimes the Queue would get stuck and you would have to get Client Care to clear the queue so that you could try again.

 

 

With the new API, the responses are almost immediate.. there is no queue that needs to be checked for a completed report... whatever data you ask for is returned upon success.

 

However, this means that for Breakdowns, you must make multiple API requests.

 

And no matter if you are using API 2.0 or 1.4, you will have to make multiple calls in one way or another (whether its to facilitate the breakdown of data or to poll the queue looking for the report to be finished)

Avatar

Level 3

Thanks for the reply.

If this was your project, would you use Javascript to pull the item IDs from the Adobe API response? Thanks

Avatar

Community Advisor and Adobe Champion

That is hard to answer since I don't know the context around the use and what info you are trying to pull, and how often.

 

When we were using API calls (this was before API 2.0 was a thing), we were running them directly from MSSQL jobs, so it was our DevOPs and DBA who had written the code, and they were doing the queue polling and placing the final response into a DB table....

 

But depending on what you are doing, there may be a better method entirely....