Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Using search clause in reporting API and sorting data by metric

Avatar

Avatar
Validate 1
Level 1
truptig90
Level 1

Likes

3 likes

Total Posts

3 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
truptig90
Level 1

Likes

3 likes

Total Posts

3 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
truptig90
Level 1

07-11-2018

Hi,

I am trying to retrieve data provided in a report using the Adobe Reporting API.

I have a pages report and would like to get top 20 pages containing a specific keyword and sorted by pageviews on a specific date. I see that search clause helps you search by dimension but not sure how to use it in the json response code. Also, is there a way to sort by metric. My dimension is Page and Metric is Pageviews.

Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 1
truptig90
Level 1

Likes

3 likes

Total Posts

3 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
truptig90
Level 1

Likes

3 likes

Total Posts

3 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
truptig90
Level 1

16-11-2018

Yes, I was able to get the exact json request required using the below steps:

Using Adobe Analytics interface

Using the debugger to get request and access_token

  1. Go to Analysis Workspace and open the report that you want to reproduce via API.
  2. Open a the developer console in your browser and input

    1. adobe.tools.debug.includeOberonXml = true 
  3. Reload the page and you should see an orange bug next to each table and visualisations
  4. Click on the orange bug
  5. Click on Freeform tables
  6. Select entry with the most up to date date
  7. A screen should be displayed with title Oberon request

Analytics API thanks to

Alexis Cazes Adobe

Answers (6)

Answers (6)

Avatar

Avatar
Validate 1
Level 1
truptig90
Level 1

Likes

3 likes

Total Posts

3 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
truptig90
Level 1

Likes

3 likes

Total Posts

3 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
truptig90
Level 1

16-11-2018

We are using API 2.0. I was able to search pages by adding search clause:

"dimension": "variables/page",

    "search": {

        "clause": "( CONTAINS 'contact' )"

    },

Avatar

Avatar
Boost 5
Level 2
keremkulak
Level 2

Likes

7 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
View profile

Avatar
Boost 5
Level 2
keremkulak
Level 2

Likes

7 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
View profile
keremkulak
Level 2

03-05-2019

"dimension": "variables/page" this statement saved my whole week.Thank you

Avatar

Avatar
Coach
MVP
ursboller
MVP

Likes

525 likes

Total Posts

1,020 posts

Correct Reply

257 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile

Avatar
Coach
MVP
ursboller
MVP

Likes

525 likes

Total Posts

1,020 posts

Correct Reply

257 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile
ursboller
MVP

16-11-2018

exactly what I was looking for. thanks for posting it!

Avatar

Avatar
Coach
MVP
ursboller
MVP

Likes

525 likes

Total Posts

1,020 posts

Correct Reply

257 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile

Avatar
Coach
MVP
ursboller
MVP

Likes

525 likes

Total Posts

1,020 posts

Correct Reply

257 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile
ursboller
MVP

16-11-2018

if you are using API 2.0 and open console to inspect the API calls. that means you can build the desired table in workspace and have your API call in the network traffic.

There is even a hidden feature which allows you to show a debug mode and directly inspect the API for each table. can't find the link anymore, maybe ericmatisoff​ or Gigazelle​ have the link?

Avatar

Avatar
Coach
MVP
ursboller
MVP

Likes

525 likes

Total Posts

1,020 posts

Correct Reply

257 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile

Avatar
Coach
MVP
ursboller
MVP

Likes

525 likes

Total Posts

1,020 posts

Correct Reply

257 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile
ursboller
MVP

14-11-2018

In API 1.4 you can't filter on a dimension directly, a call like "where page contains 'help' or 'contact'" does not work. the "contains" is only supported for classifications. what you need here are inline segments: https://github.com/AdobeDocs/analytics-1.4-apis/blob/master/docs/reporting-api/inline_segments.md

as a workaround you could add a classification to the desired dimension (eg. "page copy") and just copy the original value to the classified one by simply use a regex rule ".*"

havin g the classified value (which is basically the original one) allows to filter by a "contains"

and as Gigazelle​ said, it's always ordered by the metric by default or what you indicate in the API call. see "sortby" here: https://github.com/AdobeDocs/analytics-1.4-apis/blob/master/docs/reporting-api/data_types/r_reportDe...

Avatar

Avatar
Coach
Employee
Gigazelle
Employee

Likes

473 likes

Total Posts

1,947 posts

Correct Reply

740 solutions
Top badges earned
Coach
Contributor 2
Validate 1
Ignite 80
Ignite 70
View profile

Avatar
Coach
Employee
Gigazelle
Employee

Likes

473 likes

Total Posts

1,947 posts

Correct Reply

740 solutions
Top badges earned
Coach
Contributor 2
Validate 1
Ignite 80
Ignite 70
View profile
Gigazelle
Employee

14-11-2018

You would want to use a segment instead of search. If you only pull in a single dimension, it will automatically sort by that.

Are you using the v1.4 or v2.0 API?