Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!

Retrieving details for a Calculated Metric using API

Avatar

Level 4

I am trying to get some information about calculated metrics using the Reports & Analytics API v1.4

The documentation at: analytics-1.4-apis/calculated_metrics.md at master · AdobeDocs/analytics-1.4-apis · GitHub includes the following example:

{

     "accessLevel": "(string)",

     "fields": ["(string)"],

     "filters": {

          "name": "(string)",

          "tags": "(string)",

          "owner": "(string)",

          "reportSuiteID": "(string)",

          "approved": "(boolean)",

          "favorite": "(boolean)"

     },

     "selected": ["(string)"],

     "sort": "(string)"

}

And suggests that I will get a response that looks like:

{

      "id": "sample_string_id",

      "name": "12432",

      "description": "",

      "reportSuiteID": "sample_rs_1",

      "owner": "sample_owner",

      "polarity": "positive",

      "precision": 4,

      "type": "decimal",

      "definition": {

           "metric": "visits"

      },

      "tags": [],

      "shares": [{

           "type": "organization",

           "name": "all"

      }],

      "modified": "2015-06-12 09:13:04"

},

So I was able to successfully make a request using:

curl - X POST\ 'https://api.omniture.com/admin/1.4/rest/?method=CalculatedMetrics.Get'\

- H 'Cache-Control: no-cache'\

- H 'Content-Type: application/javascript'\

- H 'X-WSSE: UsernameToken Username=\"abc:deg\", PasswordDigest=\"1k3SlbE4qPhtuwj95Gm+AtGDp7VE85bNNJpByoxyf+I=\", Nonce=\"NjQzYTAwMDQtZTJhMy00MGQ4LTk0MjUtYzY1NmI5YzNhZTQ3\", Created=\"2018-08-28T04:31:40.594Z\", Algorithm=\"SHA256\"'


But I only get the following back:

    {

    "id": "cm200000783_59a50bb498ca3a40244da249",

    "name": "CUG2 Prospects"

    }, {

    "id": "cm200000783_59a50a1bb9b6c36211b58e6b",

    "name": "Mobiles Customers*"

    }, {

    "id": "cm200000783_59a612a205871b726d608d3b",

    "name": "Prospect Visitors"

    }, {

    "id": "cm200000783_59a6261d1a444f048d78a66a",

    "name": "Reset Password Change Error"

    }, {

    "id": "cm200000783_59af5b531a444f048d1855ac",

    "name": "Combo Customers*"

    }, ...

What else can I do so that I get more detail about the calculated metric. Specifically I am interested in the definition field.

Formatting was edited by: Joris de Beer

3 Replies