📈Statistics

POST /stats

Retrieve the statistics of your organizations in JSON Format.

Overall statistics

Try it out

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"
  }
}'

Overall statistics by day

Try it out

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"
}'

Overall statistics by day in descending order

Try it out

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"
}'

Statistics by day and asset

Try it out

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"
}'

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:

  • impressions

  • revenues

  • ecpm

  • requests

Format: ["impressions", ...]

groups: string[]

One or more of:

  • date

  • organization

  • asset

  • asset_type

  • country

  • ad_unit

  • format

  • integration_type

  • device_types

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

  • month

  • week

  • day

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

Last updated