Scenarios

Let's walk through several common reporting scenarios using examples of API calls and responses.

Country-based Data: Bid Latency

Daily

The publisher in this scenario is curious about how their bidders performed across different countries during a particular two-day window several days ago; specifically, February 12, 2017 and February 13, 2017.

The publisher (userID=9671111) queries the country-based Pulse API (/v2/api/) for a report that starts on February 12 (start=1486857600) , and covers two days (period=2), as below:

https://pulse.indexexchange.com/v2/api/stats/bidvolume/daily?userID=9671111&start=1486857600&period=2

In response, the publisher receives bid volume values for their two bidders ("INDX" and "RUBI"), each one divided into two countries ("CA" and "FR"). The values are divided into two one-day periods: February 12 ("2017-02-12") and February 13 ("2017-02-12").

 [{
    date: "2017-10-05T23:00:00",
    partnerEntries: [{
        partner: "INDX",
        values: [12, 14, 354, ..., 0]
    },{
        partner: "RUBI",
        values: [15, 20, 35, ..., 11]
    }]
},{
    date: "2017-10-06T00:00:00",
    partnerEntries: [{
        partner: "INDX",
        values: [42, 22, 104, ..., 5]
    },{
        partner: "RUBI",
        values: [0, 15, 32, ..., 51]
    }]
}]

Global Data: Bid Latency

Hourly

The publisher in this scenario is curious about how their bidders performed during a particular two-hour window several days ago; specifically, from October 5, 2017 at 11:00 PM to October 6, 2017 at 1:00 AM.

The publisher (userID=9671111) queries the Pulse API (/api/stats/) for a report that starts on October 5 at 11:00 PM (start=1507244400) , and covers two hours ( period=2) , as below:

https://pulse.indexexchange.com/api/stats/latency/hourly?userID=9671111&start=1507244400&period=2

In response, the publisher receives latency values for their two bidders ("INDX" and "RUBI"). The values are divided into two one-hour periods: 11-11:59 PM on October 5 ("2017-10-05T23:00:00") and 12-12:59 AM on October 6 ("2017-10-06T00:00:00").

[{
    date: "2017-10-05T23:00:00",
    partnerEntries: [{
        partner: "INDX",
        values: [12, 14, 354, ..., 0]
    },{
        partner: "RUBI",
        values: [15, 20, 35, ..., 11]
    }]
},{
    date: "2017-10-06T00:00:00",
    partnerEntries: [{
        partner: "INDX",
        values: [42, 22, 104, ..., 5]
    },{
        partner: "RUBI",
        values: [0, 15, 32, ..., 51]
    }]
}]

Daily

The publisher in this scenario is curious about how their bidders performed during a particular two-day window several days ago; specifically, October 5, 2017 and October 6, 2017.

The publisher (userID=9671111) queries the Pulse API (/api/stats/) for a report that starts on October 5 (start=1507161600) and covers two days (period=2), as below:

https://pulse.indexexchange.com/api/stats/latency/daily?userID=9671111&start=1507161600&period=2

In response, the publisher receives latency values for their two bidders ("INDX" and "RUBI"). The values are divided into two one-day periods: October 5 ("2017-10-05") and October 6 ("2017-10-06").


[{
    date: "2017-10-05",
    partnerEntries: [{
        partner: "INDX",
        values: [600, 614, 954, ..., 0]
    },{
        partner: "RUBI",
        values: [300, 300, 600, ..., 400]
    }]
},{
    date: "2017-10-06",
    partnerEntries: [{
        partner: "INDX",
        values: [967, 674, 734, ..., 13]
    },{
        partner: "RUBI",
        values: [0, 500, 567, ..., 1245]
    }]

Global Data: Bid Volume

Hourly

The publisher in this scenario is curious about how their bidders performed during a particular two-hour window several days ago; specifically, from October 5, 2017 at 11:00 PM to October 6, 2017 at 1:00 AM.

The publisher (userID=9671111) queries the Pulse API (/api/stats/) for a report that starts on October 5 (start=1507244400) and covers two hours (period=2), as below:

https://pulse.indexexchange.com/api/stats/bidvolume/hourly?userID=9671111&start=1507244400&period=2

In response, the publisher receives bid volume values for their two bidders ("INDX" and "RUBI"). The values are divided into two one-hour periods: 11-11:59 PM on October 5 ("2017-10-05T23:00:00") and 12-12:59 AM on October 6 ("2017-10-06T00:00:00").


				
[{
    date: "2017-10-05T23:00:00",
    partnerEntries: [{
        partner: "INDX",
        values: {
            "req": 60,
            "res": 40,
            "pass": 10,
            "timeout": 2,
            "err": 8
        }
    },{
        partner: "RUBI",
        values: {
            "req": 80,
            "res": 50,
            "pass": 25,
            "timeout": 0,
            "err": 5
        }
    }]
},{
    date: "2017-10-06T00:00:00",
    partnerEntries: [{
        partner: "INDX",
        values: {
            "req": 140,
            "res": 132,
            "pass": 0,
            "timeout": 8,
            "err": 0
        }
    },{
        partner: "RUBI",
        values: {
            "req": 110,
            "res": 60,
            "pass": 45,
            "timeout": 2,
            "err": 3
        }
    }]
}]

Daily

The publisher in this scenario is curious about how their bidders performed during a particular two-day window several days ago; specifically, October 5, 2017 and October 6, 2017. The publisher (userID=9671111) queries the Pulse API (/api/stats/) for a report that starts on October 5 (start=1507161600) and covers two days (period=2), as below:

https://pulse.indexexchange.com/api/stats/bidvolume/daily?userID=9671111&start=1507161600&period=2

In response, the publisher receives bid volume values for their two bidders ("INDX" and "RUBI"). The values are divided into two one-day periods: October 5 ("2017-10-05") and October 6 ("2017-10-06").


[{
    date: "2017-10-05",
    partnerEntries: [{
        partner: "INDX",
        values: {
            "req": 300,
            "res": 200,
            "pass": 50,
            "timeout": 30,
            "err": 20
        }
    },{
        partner: "RUBI",
        values: {
            "req": 250,
            "res": 100,
            "pass": 25,
            "timeout": 75,
            "err": 50
        }
    }]
},{
    date: "2017-10-06",
    partnerEntries: [{
        partner: "INDX",
        values: {
            "req": 360,
            "res": 320,
            "pass": 30,
            "timeout": 10,
            "err": 0
        }
    },{
        partner: "RUBI",
        values: {
            "req": 245,
            "res": 190,
            "pass": 0,
            "timeout": 45,
            "err": 10
        }
    }]
}]