Expand my Community achievements bar.

Join us January 15th for an AMA with Champion Achaia Walton, who will be talking about her article on Event-Based Reporting and Measuring Content Groups!

Data Source API - save

Avatar

Level 2

Hi,
I am creating a data source using API. I am encountering some error. below is my api assuming client id and access token is correct. Event1 is configured as "Registrations" and eVar1 is configured as "Channel"

 

curl -X POST "https://api.omniture.com/admin/1.4/rest/?method=DataSources.Save" \
    -H "x-api-key: xxx" \
    -H "Authorization: Bearer xxx" \
    -H "Content-Type: application/json" \
    -d '{
            "id": "1",
            "reportSuiteID":"xxx",
            "email": "xxx",
            "name": "xxx",
            "processing_type": "generic",
            "settings": {
                "allowOutOfOrderHits": true,
                "stopOnWarning": false,
                "metricNames": ["Registrations"],
                "metricEvents": ["Event 1"],
                "dimensionNames": ["Channel"],
                "dimensionVariables": ["Evar 1"]
            }
        }'

 

 error I am getting : 

Can someone help here metrics name is correct? Am I missing something here?

 

{
    "error": "Bad Request",
    "error_description": "invalid metric in metricEvents, should be a data sources metric or a custom event",
    "error_uri": null
}

 

 

2 Replies

Avatar

Community Advisor and Adobe Champion

This might sound silly, but have you tried using:

  • "event1" instead of "Event 1"
  • "evar1" or "eVar1" instead of "Evar 1"

 

I think the "name" fields are probably fine, but the actual metric and dimension references have to match exactly what Adobe is looking for, just like when you are sending data to Adobe via JS, you don't use:

 

s.events = "Event 1";

 

You use:

 

s.events = "event1";