Analytics

Generate a custom report with full access to all metrics and dimensions. Authentication: Required (Bearer Token) Role Required: Admin or Publisher

POST /api/reportv2/

{
  "startDate": "2024-01-01",
  "endDate": "2024-01-31",
  "dimensions": ["date", "publisher"],
  "metrics": ["impression", "revenue", "ecpm"],
  "filters": [
    {
      "key": "publisher",
      "value": "123",
      "operator": "="
    }
  ],
  "order": "revenue DESC",
  "limit": "100",
  "skip": "0",
  "csv": false,
  "totals": true
}

Pagination & Sorting Parameters

Parameter
Type
Default
Description

order

string

-

Sort order. Format: column [ASC|DESC]. Examples: "date", "revenue DESC", "impression

limit

string

-

Maximum number of rows to return. Example: "100"

skip

string

"0"

Number of rows to skip (for pagination). Example: "50" to get page 2 with limit 50

Pagination Example


Output Format Parameters

Parameter
Type
Default
Description

csv

boolean

false

If true, returns CSV file download instead of JSON

totals

boolean

false

If true, includes a totals row as the first element in the response

CSV Response

When CSV: true, the response is a downloadable CSV file:

Request

Response Headers

Response Body


Totals Response

When totals: true, the first row contains aggregated totals across all data

Request

Response


Complete Request Example

Response


Parameter Summary Table

Parameter
Type
Required
Default
Description

startDate

string

-

Start date (YYYY-MM-DD)

endDate

string

-

End date (YYYY-MM-DD)

dimensions

string[]

-

Grouping columns

metrics

string[]

-

Aggregation columns

filters

Filter[]

[]

Filter conditions

order

string

-

Sort column and direction

limit

string

-

Max rows to return

skip

string

"0"

Rows to skip (pagination)

csv

boolean

false

Return as CSV file

totals

boolean

false

Include totals row

Last updated