Analytics API

Get usage analytics timeline

GET https://service.maptiler.com/v1/analytics/api_usage/timeline

Request

You must include an Service Token with every API request

Query Parameters

Parameters Type Description
period
string
  • billing periods are based on account subscription
  • for classifiers api_keys and service_credentials are supported only daily periods: current_billing_period, last_billing_period, past_30_days, past_90_days
Allowed values: current_billing_period last_billing_period past_30_days past_90_days past_12_billing_periods past_12_months all
classifier
string
classifies datasets
Allowed values: services api_keys service_credentials
group
string
group ID filter, mandatory for CSV format
Allowed values: request session export
format
string
response media type
Allowed values: json csv
Default: json

Responses

Responses headers
Code Key Description
200 Content-Disposition

only for CSV format - contains filename timeline_{classifier}_{group}_{since}_{until}.csv

Responses schemas
Code Content Description
200 application/json TimelineResponseJSON
200 text/csv TimelineResponseCSV
400
  • period_not_found: Selected time period does not exist (for example last_billing_period of new account)
  • account_over_limit: Account currently has too many entities (api_keys or service_credentials) to be queried.
  • response_too_large: There were too much data in the result (could be historical).

Get top usage analytics

GET https://service.maptiler.com/v1/analytics/api_usage/top

Request

You must include an Service Token with every API request

Query Parameters

Parameters Type Description
period
string
  • billing periods are based on account subscription
  • for classifiers api_keys and service_credentials are supported only daily periods: current_billing_period, last_billing_period, past_30_days, past_90_days
Allowed values: current_billing_period last_billing_period past_30_days past_90_days past_12_billing_periods past_12_months all
classifier
string
classifies datasets
Allowed values: services api_keys service_credentials
group
string
group ID filter, mandatory for CSV format
Allowed values: request session export
format
string
response media type
Allowed values: json csv
Default: json
limit
integer
number of top items within response group
Default: 10

Responses

Responses headers
Code Key Description
200 Content-Disposition

only for CSV format - contains filename top{limit}_{classifier}_{group}_{since}_{until}.csv

Responses schemas
Code Content Description
200 application/json TopResponseJSON
200 text/csv TopResponseCSV
400
  • period_not_found: Selected time period does not exist (for example last_billing_period of new account)

TimelineResponseJSON Object

contains also estimated data for entire current period (except for last_billing_period).

Property Type Description
since
string <date>
until
string <date>
datasets
array [ Time dataset Object ]
legend
array [ Legend]

Time dataset Object

Property Type Description
group_id
string
Allowed values: request export session
item_id
string
data
array [ TimelineData]
estimated_data
TimelineData

TimelineData Object

Property Type Description
date
string <date>
value
integer

Legend Object

Property Type Description
item_id
string
label
string
description
string or null

TimelineResponseCSV

CSV header row is date,item,count

TimelineResponseCSV example


  date,item,count
2023-05-01,Tiles,5399
2023-06-01,Tiles,7510
2023-07-01,Tiles,7831
2023-06-01,Rendered maps (256px),678
2023-07-01,Rendered maps (256px),1001
2023-06-01,Datasets,65
2023-07-01,Datasets,19

TopResponseJSON Object

Property Type Description
since
string <date>
until
string <date>
datasets
array [ Top dataset Object ]
legend
array [ Legend]

Top dataset Object

Property Type Description
group_id
string
Allowed values: request export session
data
array [ TopData]

TopData Object

Property Type Description
item_id
string
value
integer

TopResponseCSV

CSV header row is item,count

TopResponseCSV example


  item,count
Tiles,13608483
Datasets,51546
Rendered maps (256px),10302