Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Analytics reporting API

Avatar

Level 2

Hi,

I am trying to fetch some variables(both conversion & traffic variables) using reporting API , tried the QUEUE method which is step-1 in API explorer. PFB the code .

{

  "reportDescription":{

  "reportSuiteID":"XXXXXdev",

  "dateFrom":"2017-12-01",

  "dateTo":"2017-12-25",

  "metrics":[

  {

  "id":"Visits"

  }

  ],

  "sortBy":"Visits",

  "elements":[

  {

  "id":"eVar1",

   "top":2

  }

  ],

  }

}

The above code is working and i am getting the response with the report ID. But , if i change the "id" in "elements"  to some out-of-the box variable name , i am getting error. PFB the code and error message .  Please help me on this.

CODE :

{

  "reportDescription":{

  "reportSuiteID":"XXXXXXdev",

  "dateFrom":"2017-12-01",

  "dateTo":"2017-12-25",

  "metrics":[

  {

  "id":"Visits"

  }

  ],

  "sortBy":"Visits",

  "elements":[

  {

  "id":"cities",

  "top":2

  }

  ],

  }

}

ERROR:

{

  "error":"element_id_invalid",

  "error_description":"Element \"cities\" not found",

  "error_uri":"https:\/\/marketing.adobe.com\/developer\/en_US\/documentation\/analytics-reporting-1-4\/elements"

}

"cities" is the out-of-the-box variable in Visitor Profile -> GeoSegmentation . There is no eVar/prop allocated , hence i am giving name of the variable only in "id" .

1 Accepted Solution

Avatar

Correct answer by
Level 9

Look at the content of the error response. The error response attempts to give you information to point you in the right direction for what's going wrong. If you go to the URL shown in the error_uri response (Analytics Elements | Adobe Developer Connection) you will see that "cities" is not listed as valid element (which is also reflected in the error_message itself).

Perhaps you meant to use "geocity" ? Note that you must have geo-segmentation enabled on the report suite to use this element (which you may have not asked client care to do, since it looks like you used a dev report suite in your JSON).

Alternatively, is this actually a classification column for an actual variable (e.g. eVar1) ?  If this is the case, then "id" should be the parent/root variable for the classification, and the "classification" property should be used to specify the classification column.

Example (assuming eVar1 is the root/parent dimension):

"elements": [

    {

        "id": "eVar1",

        "classification": "cities",

        "top": 2

    }

],

View solution in original post

1 Reply

Avatar

Correct answer by
Level 9

Look at the content of the error response. The error response attempts to give you information to point you in the right direction for what's going wrong. If you go to the URL shown in the error_uri response (Analytics Elements | Adobe Developer Connection) you will see that "cities" is not listed as valid element (which is also reflected in the error_message itself).

Perhaps you meant to use "geocity" ? Note that you must have geo-segmentation enabled on the report suite to use this element (which you may have not asked client care to do, since it looks like you used a dev report suite in your JSON).

Alternatively, is this actually a classification column for an actual variable (e.g. eVar1) ?  If this is the case, then "id" should be the parent/root variable for the classification, and the "classification" property should be used to specify the classification column.

Example (assuming eVar1 is the root/parent dimension):

"elements": [

    {

        "id": "eVar1",

        "classification": "cities",

        "top": 2

    }

],