curl --request GET \
--url https://api.hakumedia.ai/v2/reports/demand-source \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.hakumedia.ai/v2/reports/demand-source', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/reports/demand-source"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/reports/demand-source",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"type": "zone",
"id": 776552,
"summary": {
"requests": 98,
"wins": 50,
"views": 48,
"revenue": 100,
"publisherRevenue": 15.5,
"minCPM": 0.76,
"maxCPM": 4.63,
"totalCPM": 235.5,
"financials": {
"revenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"publisherRevenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"minCPM": [
{
"cur": "USD",
"amount": 42.81
}
],
"maxCPM": [
{
"cur": "USD",
"amount": 42.81
}
],
"totalCPM": [
{
"cur": "USD",
"amount": 42.81
}
]
},
"emptyResponses": 15,
"filledResponses": 65,
"breakdown": [
{
"requests": 98,
"wins": 50,
"views": 48,
"revenue": 100,
"publisherRevenue": 15.5,
"minCPM": 0.76,
"maxCPM": 4.63,
"totalCPM": 235.5,
"financials": {
"revenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"publisherRevenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"minCPM": [
{
"cur": "USD",
"amount": 42.81
}
],
"maxCPM": [
{
"cur": "USD",
"amount": 42.81
}
],
"totalCPM": [
{
"cur": "USD",
"amount": 42.81
}
]
},
"emptyResponses": 15,
"filledResponses": 65,
"zone": {
"type": "standard_zone",
"id": 66251
},
"publisher": 48486
}
]
},
"details": [
{
"requests": 98,
"wins": 50,
"views": 48,
"revenue": 100,
"publisherRevenue": 15.5,
"minCPM": 0.76,
"maxCPM": 4.63,
"totalCPM": 235.5,
"financials": {
"revenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"publisherRevenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"minCPM": [
{
"cur": "USD",
"amount": 42.81
}
],
"maxCPM": [
{
"cur": "USD",
"amount": 42.81
}
],
"totalCPM": [
{
"cur": "USD",
"amount": 42.81
}
]
},
"emptyResponses": 15,
"filledResponses": 65,
"breakdown": [
{
"requests": 98,
"wins": 50,
"views": 48,
"revenue": 100,
"publisherRevenue": 15.5,
"minCPM": 0.76,
"maxCPM": 4.63,
"totalCPM": 235.5,
"financials": {
"revenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"publisherRevenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"minCPM": [
{
"cur": "USD",
"amount": 42.81
}
],
"maxCPM": [
{
"cur": "USD",
"amount": 42.81
}
],
"totalCPM": [
{
"cur": "USD",
"amount": 42.81
}
]
},
"emptyResponses": 15,
"filledResponses": 65,
"zone": {
"type": "standard_zone",
"id": 66251
},
"publisher": 48486
}
],
"start_date": "2023-11-07T05:31:56Z"
}
]
}
],
"meta": {
"type": "zone",
"period": "day",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"timezone": "America/Los_Angeles"
},
"object": "demand_source_report",
"url": "/v2/reports/demand-source"
}Retrieve Demand Source Stats
Retrieve an overview of your programmatic demand sources, which can be filtered using the parameters below.
curl --request GET \
--url https://api.hakumedia.ai/v2/reports/demand-source \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.hakumedia.ai/v2/reports/demand-source', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hakumedia.ai/v2/reports/demand-source"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hakumedia.ai/v2/reports/demand-source",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"type": "zone",
"id": 776552,
"summary": {
"requests": 98,
"wins": 50,
"views": 48,
"revenue": 100,
"publisherRevenue": 15.5,
"minCPM": 0.76,
"maxCPM": 4.63,
"totalCPM": 235.5,
"financials": {
"revenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"publisherRevenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"minCPM": [
{
"cur": "USD",
"amount": 42.81
}
],
"maxCPM": [
{
"cur": "USD",
"amount": 42.81
}
],
"totalCPM": [
{
"cur": "USD",
"amount": 42.81
}
]
},
"emptyResponses": 15,
"filledResponses": 65,
"breakdown": [
{
"requests": 98,
"wins": 50,
"views": 48,
"revenue": 100,
"publisherRevenue": 15.5,
"minCPM": 0.76,
"maxCPM": 4.63,
"totalCPM": 235.5,
"financials": {
"revenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"publisherRevenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"minCPM": [
{
"cur": "USD",
"amount": 42.81
}
],
"maxCPM": [
{
"cur": "USD",
"amount": 42.81
}
],
"totalCPM": [
{
"cur": "USD",
"amount": 42.81
}
]
},
"emptyResponses": 15,
"filledResponses": 65,
"zone": {
"type": "standard_zone",
"id": 66251
},
"publisher": 48486
}
]
},
"details": [
{
"requests": 98,
"wins": 50,
"views": 48,
"revenue": 100,
"publisherRevenue": 15.5,
"minCPM": 0.76,
"maxCPM": 4.63,
"totalCPM": 235.5,
"financials": {
"revenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"publisherRevenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"minCPM": [
{
"cur": "USD",
"amount": 42.81
}
],
"maxCPM": [
{
"cur": "USD",
"amount": 42.81
}
],
"totalCPM": [
{
"cur": "USD",
"amount": 42.81
}
]
},
"emptyResponses": 15,
"filledResponses": 65,
"breakdown": [
{
"requests": 98,
"wins": 50,
"views": 48,
"revenue": 100,
"publisherRevenue": 15.5,
"minCPM": 0.76,
"maxCPM": 4.63,
"totalCPM": 235.5,
"financials": {
"revenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"publisherRevenue": [
{
"cur": "USD",
"amount": 42.81
}
],
"minCPM": [
{
"cur": "USD",
"amount": 42.81
}
],
"maxCPM": [
{
"cur": "USD",
"amount": 42.81
}
],
"totalCPM": [
{
"cur": "USD",
"amount": 42.81
}
]
},
"emptyResponses": 15,
"filledResponses": 65,
"zone": {
"type": "standard_zone",
"id": 66251
},
"publisher": 48486
}
],
"start_date": "2023-11-07T05:31:56Z"
}
]
}
],
"meta": {
"type": "zone",
"period": "day",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"timezone": "America/Los_Angeles"
},
"object": "demand_source_report",
"url": "/v2/reports/demand-source"
}Authorizations
API key en el header Authorization: Basic TU_API_KEY. La key va tal cual, sin codificar en base64. Las credenciales se entregan al comenzar la integración.
Query Parameters
Specifies the focus of the statistics you are interested in viewing. The value must be one of overview, publisher, zone, demand_source, or endpoint.
The range of time you are interested in viewing. The value must be one of day, week, month, or year.
Frequently used time frames for reporting statistics are bundled as "presets". You can pick a value from the presets instead of creating your own custom date range using the from and to fields. A preset range value must be one of the following: today, last-24-hours, yesterday, this-week, last-week, this-month, last-month, year-to-date, last-year, last-7-days, last-14-days, last-30-days, last-3-months, last-6-months, or last-12-months.
Either a preset or a valid to and from must be specified.
A valid ISO 8601 formatted date denoting the inclusive start of the period. For example: 2020-01-01T00:00:00+00:00 (greater than or equal to). This field along with the to field lets you specify a custom date and time interval if no preset options suit your needs. The timezone offsets must match in the specified from and to fields.
You may not run a report for an interval larger than a year.
Either a preset or a valid to and from must be specified.
A valid ISO 8601 formatted date denoting the exclusive end of the period. For example: 2020-02-01T00:00:00+00:00. This field along with the from field lets you specify a custom date and time interval if no preset options suit your needs. The timezone offsets must match the specified to and from fields.
You cannot run a report for an interval larger than a year.
Either a preset or a valid to and from must be specified.
Whether to show a summary (true) or not (false). Defaults to true.
Whether to show details (true) or not (false). Defaults to false.
Whether to show breakdown of placements in summary and details (true) or not (false). Defaults to false.
Submit this parameter to filter your report by a list of publisher IDs. The IDs must be submitted as a comma-separated list.
Submit this parameter to filter your report by a list of zone IDs. The IDs must be submitted as a comma-separated list.
Submit this parameter to filter your report by a list of VAST zone IDs. The IDs must be submitted as a comma-separated list.
Submit this parameter to filter your report by a list of Demand Endpoint IDs. The IDs must be submitted as a comma-separated list.
Response
successful operation