View External demand sample report

View External demand sample report

GET https://api.ocamba.com/v2/adex/reports/external-demand-sample
Obtains sample report on External demand

Query parameters

parameters

Response schemas

curl -X GET \
 "https://api.ocamba.com/v2/adex/reports/external-demand-sample" \
  -H "Authorization: Bearer {TOKEN}"
const url = 'https://api.ocamba.com/v2/adex/reports/external-demand-sample';
const options = {
  method: 'GET',
  headers: {
    Authorization: `Bearer {TOKEN}`
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
$ch = curl_init("https://api.ocamba.com/v2/adex/reports/external-demand-sample");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

200 OK

[
  {
    "zone_id": "1000001",
    "zone_name": "EXAMPLE PUSH ZONE",
    "exchange_id": "101",
    "exchange_name": "Example PUSH Adult CPC",
    "partner_id": "1",
    "partner_name": "Example - Push CPC",
    "country_code": "GB",
    "country_name": "United Kingdom",
    "stat_date": "2022-05-23T00:00:00Z",
    "sample": "{\"req\":{\"host\":\"www.example.com\",\"method\":\"GET\",\"target\":\"/search?user_id=123456789&domain=https%3A%2F%2Fexample.info%2F&domainId=654321&format=jsonv2&ip=101.0.0.101&lang=en-US%2Cen%3Bq%3D0.9&secure=true&ua=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F101.0.4951.67+Safari%2F537.36\",\"hdrs\":{\"Host\":\"www.example.com\",\"User-Agent\":\"Hydra v1.0\",\"Accept-Encoding\":\"gzip, deflate\"}},\"res\":{\"code\":200,\"hdrs\":{\"Date\":\"Mon, 23 May 2022 08:35:00 GMT\",\"Content-Type\":\"text/json;charset=UTF-8\",\"Transfer-Encoding\":\"chunked\",\"Connection\":\"keep-alive\",\"vary\":\"accept-encoding\",\"Content-Encoding\":\"gzip\"},\"body\":{\"title\":\"Example title\",\"token\":\"_lhJxadKQd7dwvldcnT1_um0mVkEZ6E7EfUr36A=.d9Qk9D1T4s26RrRsyMTOyQ==\",\"link\":\"https://example.com/c/3bc7d951-da73-11ec-81d4-12d1e567c9b5/2/ecaecdb0-d9f3-11e9-8d9d-0a97765f9322/{token}\",\"imp_url\":\"https://example.com/imp/3bc7d951-da73-11ec-81d4-12d1e567c9b5/2/ecaecdb0-d9f3-11e9-8d9d-0a97765f9322/{token}\",\"image_url\":\"https://example.com/imp/3bc7d951-da73-11ec-81d4-12d1e567c9b5/2/ecaecdb0-d9f3-11e9-8d9d-0a97765f9322/{token}\",\"description\":\"Example description.\",\"price\":0,\"cpc\":0.0068,\"ad_id\":\"fd320164-fe6c-43c3-9109f035a04c\"}}}"
  },
  {
    "zone_id": "1000002",
    "zone_name": "EXAMPLE PUSH MAINSTREAM ZONE",
    "exchange_id": "102",
    "exchange_name": "Example PUSH Mainstream CPC",
    "partner_id": "2",
    "partner_name": "Example2 - Push CPC",
    "country_code": "GR",
    "country_name": "Greece",
    "stat_date": "2022-05-23T00:00:00Z",
    "sample": "{\"req\":{\"host\":\"xml.example.com\",\"method\":\"GET\",\"target\":\"/search?auth=I1eGbG&count=1&empty=204&feed=114358&format=json&lang=el-GR%2Cel%3Bq%3D0.9&pub_sublt=1605877213&query=mainstream%2Cadult&subid=subid_example&ua=Mozilla%2F5.0+%28Linux%3B+Android+8.1.0%3B+SAMSUNG+SM-J730F%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+SamsungBrowser%2F14.0+Chrome%2F87.0.4280.141+Mobile+Safari%2F537.36&url=https%3A%2F%2Fexample2.net%2Fjs%2Fosw.js&user_ip=102.0.0.102\",\"hdrs\":{\"Host\":\"xml.example.com\",\"User-Agent\":\"Hydra v1.0\",\"Accept-Encoding\":\"gzip, deflate\"}},\"res\":{\"code\":200,\"hdrs\":{\"Cache-Control\":\"no-store\",\"Content-Type\":\"application/json; charset=utf-8\",\"Age\":\"0\",\"Content-Length\":\"390\",\"Connection\":\"keep-alive\",\"Pragma\":\"no-cache\"},\"body\":{\"result\":{\"listing\":[{\"title\":\"Διαβητικούς! Παρακαλώ διαβάστε\",\"url\":\"https://click.example.name/click?i=1whFP0GrStk_0\",\"descr\":\"Ο διαβήτης θεραπεύεται σε 7 ημέρες...\",\"site\":\"u.example.com\",\"bid\":0.004857,\"image\":\"https://click.example.name/thumbnail?i=1whBV0QlZsn_0\",\"icon\":\"https://click.example.name/thumbnail?i=1btRZ0QlSmn_0&imgt=icon\"}]}}}}"
  }
]
Responses

Tip

Sortable fields are: stat_date, exchange_id, exchange_name, partner_id, partner_name, country_code, country_name, zone_id and zone_name.

To get data by the time in your local time zone, you should set tz query parameter to the specific time zone. See the list of valid time zones here -> https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List.

For easier search, Reports API gives you the possibility of using one of the following labels: today, yesterday, last-7-days, last-30-days, last-24-hours,this-month,last-month.

Note

When filtering stat_date use one of the following formats:
- Single format: YYYY-mm-dd;

Displaying stats for this specific day

  • Range format: rf:YYYY-mm-dd,YYYY-mm-dd;
    Requires usage of the range operators:
    • r - range - The value must be in a specified open range, where both endpoints are excluded.
    • rf - range full - The value must be in a specified closed range, where both endpoints are included.
    • rl - range left - The value must be in a specified half-open range, where only left or start point is included.
    • rr - range right - The value must be in a specified half-open range, where only right or end point is included.

      Displaying stats in this specific range.
  • Hour range format: rl: YYYY-mm-dd hh:00:00,YYYY-mm-dd hh:00:00
    If you exclude this parameter, the default setup displays “today” stats.