POST /stats
Retrieve the statistics of your organizations in JSON Format.
Overall statistics
curl -X 'POST' \
'https://exclusive-demand-report-api.ogury.co/stats' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer TOKEN' \
-d '{
"filters": {
"from": "2021-09-10",
"to": "2021-10-10"
}
}'
{
"params": {
"filters": {
"from": "2021-09-10",
"to": "2021-10-10"
}
},
"stats": [
{
"group": {},
"metrics": {
"impressions": 123123,
"revenues": 765.82,
"requests": 232323,
"ecpm": 6.22
}
}
],
"total": 1
}
Overall statistics by day
curl -X 'POST' \
'https://exclusive-demand-report-api.ogury.co/stats' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer TOKEN' \
-d '{
"filters": {
"from": "2021-10-06",
"to": "2021-10-10"
},
"groups": [
"date"
],
"orders": [
"date"
],
"date_group": "day"
}'
{
"params": {
"filters": {
"from": "2021-10-06",
"to": "2021-10-10",
"organizations": [
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
]
},
"groups": [
"date"
],
"orders": [
"date"
],
"date_group": "day"
},
"stats": [
{
"group": {
"date": "2021-10-06"
},
"metrics": {
"impressions": 123123,
"revenues": 765.82,
"requests": 232323,
"ecpm": 6.22
}
},
{
"group": {
"date": "2021-10-07"
},
"metrics": {
"impressions": 123123,
"revenues": 765.82,
"requests": 232323,
"ecpm": 6.22
}
},
{
"group": {
"date": "2021-10-08"
},
"metrics": {
"impressions": 123123,
"revenues": 765.82,
"requests": 232323,
"ecpm": 6.22
}
},
{
"group": {
"date": "2021-10-09"
},
"metrics": {
"impressions": 123123,
"revenues": 765.82,
"requests": 232323,
"ecpm": 6.22
}
},
{
"group": {
"date": "2021-10-09"
},
"metrics": {
"impressions": 123123,
"revenues": 765.82,
"requests": 232323,
"ecpm": 6.22
}
}
],
"total": 5
}
Overall statistics by day in descending order
curl -X 'POST' \
'https://exclusive-demand-report-api.ogury.co/stats' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer TOKEN' \
-d '{
"filters": {
"from": "2021-10-06",
"to": "2021-10-10"
},
"groups": [
"date"
],
"orders": [
"date:desc"
],
"date_group": "day"
}'
{
"params": {
"filters": {
"from": "2021-10-06",
"to": "2021-10-10",
"organizations": [
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
]
},
"groups": [
"date"
],
"orders": [
"date:desc"
],
"date_group": "day"
},
"stats": [
{
"group": {
"date": "2021-10-10"
},
"metrics": {
"impressions": 123123,
"revenues": 765.82,
"requests": 232323,
"ecpm": 6.22
}
},
{
"group": {
"date": "2021-10-09"
},
"metrics": {
"impressions": 123123,
"revenues": 765.82,
"requests": 232323,
"ecpm": 6.22
}
},
{
"group": {
"date": "2021-10-08"
},
"metrics": {
"impressions": 123123,
"revenues": 765.82,
"requests": 232323,
"ecpm": 6.22
}
},
{
"group": {
"date": "2021-10-07"
},
"metrics": {
"impressions": 123123,
"revenues": 765.82,
"requests": 232323,
"ecpm": 6.22
}
},
{
"group": {
"date": "2021-10-06"
},
"metrics": {
"impressions": 123123,
"revenues": 765.82,
"requests": 232323,
"ecpm": 6.22
}
}
],
"total": 5
}
Statistics by day and asset
curl -X 'POST' \
'https://exclusive-demand-report-api.ogury.co/stats' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer TOKEN' \
-d '{
"filters": {
"from": "2021-10-06",
"to": "2021-10-10"
},
"groups": [
"date", "asset"
],
"orders": [
"date:desc", "asset"
],
"date_group": "day"
}'
{
"params": {
"filters": {
"from": "2021-10-06",
"to": "2021-10-10",
"organizations": [
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
]
},
"groups": [
"date", "asset"
],
"orders": [
"date:desc", "asset"
],
"date_group": "day"
},
"stats": [
{
"group": {
"date": "2021-10-10",
"asset": "OGY-12312312"
},
"metrics": {
"impressions": 123123,
"revenues": 765.82,
"requests": 232323,
"ecpm": 6.22
}
},
{
"group": {
"date": "2021-10-09"
},
"metrics": {
"impressions": 123123,
"revenues": 765.82,
"requests": 232323,
"ecpm": 6.22
}
},
{
"group": {
"date": "2021-10-08"
},
"metrics": {
"impressions": 123123,
"revenues": 765.82,
"requests": 232323,
"ecpm": 6.22
}
},
{
"group": {
"date": "2021-10-07"
},
"metrics": {
"impressions": 123123,
"revenues": 765.82,
"requests": 232323,
"ecpm": 6.22
}
},
{
"group": {
"date": "2021-10-06"
},
"metrics": {
"impressions": 123123,
"revenues": 765.82,
"requests": 232323,
"ecpm": 6.22
}
}
],
"total": 5
}
POST /stats/xls
This has the same API as the /stats route. It returns an excel version of the stats instead of a JSON.
POST /stats/csv
This has the same API as the /stats route. It returns a CSV version of the stats instead of a JSON.
Body parameters
The parameters with a star "*" are mandatory.
filters*: object
Filtering to apply to the stats
from*: string
, required
Format: YYYY-MM-DD
to*: string
, required
Format: YYYY-MM-DD
organizations: uuid[]
Format: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", ...]
assets: string[]
Format: ["OGY-XXXXXXXX", ...]
asset_types: string[]
Format: ["ANDROID", "IOS", "WEB"]
ad_units: uuid[]
Format: ["yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",…]
countries: string[]
Format: ["FR", "IT", …]
formats: string[]
Format: ["interstitial", ...]
integration_types: string[]
Format: ["standard_integration", "header_bidding"]
device_types: string[]
Format: ["mobile", "desktop"]
metrics: string[]
One or more of:
Format: ["impressions", ...]
groups: string[]
One or more of:
Format: ["date", ...]
orders: string[]
Any fields in metrics and groups with support of descending order.
Format: ["date", "revenues", "organization"]
For descending order: ["date:desc", ...]
You can mixed both.
date_group: string (default day)
When date is grouped, aggregate by
date_group_limit: integer
Pickup dates across the available dates from the groups
offset: integer
You can use offset and limit to get a part of the result (pagination).
limit: integer
Limit the number of date after the offset