Status Page Statistics: Retrieve One
This documentation entry provides a clear and detailed guide on how to retrieve statistics for a specific status page using the API, including the necessary parameters, headers, and expected response.
Endpoint
GET /api/statistics/{status_page_id}
/api/statistics/{status_page_id}Retrieve detailed statistics for a specific status page within a given date range.
Request
HTTP Request
GET https://uptimekeep.com/api/statistics/{status_page_id}Replace {status_page_id} with the ID of the status page for which you want to retrieve statistics.
Headers
Authorization
String
Bearer token for API authentication.
Query Parameters
start_date
String
Yes
Start date for the statistics in Y-m-d format.
end_date
String
Yes
End date for the statistics in Y-m-d format.
type
String
No
Type of data to be returned. Allowed values: overview, referrer_host, referrer_path, country_code, city_name, os_name, browser_name, device_type, browser_language, utm_source, utm_medium, utm_campaign. Defaults to overview.
country_code
String
No
Available only for the city_name type, to filter by specific country code.
utm_source
String
No
Available only for the utm_medium and utm_campaign types, to filter by UTM source.
utm_medium
String
No
Available only for the utm_campaign type, to filter by UTM medium.
Example of a request:
Response
A successful response returns a JSON object containing the requested statistics for the specified status page.
Response Example
Fields
Data Object
pageviews
Integer
Number of pageviews recorded for the status page.
visitors
Integer
Number of unique visitors to the status page.
formatted_date
String
The date for which the statistics apply, formatted as YYYY-MM.
Errors
If the request fails, the API will return an error message with an appropriate HTTP status code, such as 400 Bad Request if required parameters are missing or invalid, or 404 Not Found if the status page ID does not exist.
Last updated