This document details the process of using the Audience Manager REST API to return trend metrics for Traits and Segments.

Note: As of 9/12/2018 these APIs have not yet been added to the standard Audience Manager API documentation found at https://bank.demdex.com/portal/swagger/index.html

The trend metrics used in the AAM trend reports can be returned via the AAM APIs as follows:

Trait

POST	https://api.demdex.com/v1/reports/traits-trend

Body
{
    "startDate": 1535760000000,
    "endDate": 1536710400000,
    "interval": "1D",
    "sids": [3750058]
}

Response
[
    {
        "createTime": 1461337050000,
        "updateTime": 1528876965000,
        "sid": 3750002,
        "traitType": "RULE_BASED_TRAIT",
        "name": "(updated) WTB WW6500 AddWash™ Washing Machine 8 kg_VRT",
        "description": "revised WTB",
        "status": "ACTIVE",
        "pid": 1975,
        "crUID": 23333,
        "upUID": 104394,
        "folderId": 734357,
        "dataSourceId": 11288,
        "metrics": {
            "1535760000000": {
                "count": 0,
                "uniques": 0,
                "populationCount": 0,
                "populationUniques": 1007
            },
            "1535846400000": {
                "count": 1,
                "uniques": 1,
                "populationCount": 0,
                "populationUniques": 1007
            }, …
	}
]

All timestamps expected and returned are in the form of an Epoch or Unix timestamp.

The "interval" attribute is used to specify the day range / lookback for the trend report.  Any of the standard AAM trend values can be used.

The "sids" argument expects a list of trait IDs, with a minimum of one value being passed.

The metrics returned are as follows:

"count" - A total count of realizations for the day.
"uniques" - A unique count of realizations for the day.  This corresponds with the Unique Realizations metric in the AAM UI.
"populationCount" - A count of the population for the day.  Please note that this metric is generally not utilized and no value is returned.
"populationUniques" - The total population for the day.  This corresponds with the Total Trait Population in the AAM UI.

 

Segments

POST	https://api.demdex.com/v1/reports/segments-trend

Body
{
    "startDate": 1535760000000,
    "endDate": 1536710400000,
    "interval": "1D",
    "sids": [3750058]
}

Response
[
    {
        "pid": 1975,
        "sid": 3750058,
        "mergeRuleDataSourceId": 32340,
        "name": "Revised WTB Addwash",
        "description": "",
        "status": "ACTIVE",
        "createTime": 1461338708000,
        "updateTime": 1503314210000,
        "crUID": 23333,
        "upUID": 23333,
        "integrationCode": "",
        "segmentRule": "frequency([3749998T,3750049T,3750001T,3750000T,3750051T,3750050T,3750002T,3750053T,3749989T,3750052T,3750054T] <= 7D) >= 1",
        "segmentRuleVersion": 3,
        "folderId": 148800,
        "legacyId": 587480,
        "dataSourceId": 11288,
        "metrics": {
            "1535760000000": {
                "instantUniques": 19,
                "totalUniques": 108
            },
            "1535846400000": {
                "instantUniques": 15,
                "totalUniques": 102
            }, …
	}
]

All timestamps expected and returned are in the form of an Epoch or Unix timestamp.

The "interval" attribute is used to specify the day range / lookback for the trend report.  Any of the standard AAM trend values can be used.

The "sids" argument expects a list of segment IDs, with a minimum of one value being passed.

The metrics returned are as follows:

"instantUniques" - A count of real-time realizations on the day.  This corresponds with the Real-Time Population metric in the AAM UI.
"totalUniques" - A total count of realizations as of the day.  This corresponds with the Total Population metric in the AAM UI.

Esta obra está autorizada con arreglo a la licencia de Reconocimiento-NoComercial-CompartirIgual 3.0 Unported de Creative Commons.  Los términos de Creative Commons no cubren las publicaciones en Twitter™ y Facebook.

Avisos legales   |   Política de privacidad en línea