/domains/{name}/stats
0.1.0Unchanged since publicationGet a domain's traffic statistics for a period
domainsreadallHuman traffic figures appear at the top level and robot traffic figures appear under robots. When human traffic statistics are available but separate robot statistics are absent, robots.available is 0. The response includes apart_since when UrbeStack has a recorded start date for counting robots separately.
The months array lists months with recorded data, newest first. Each entry gives the first and last recorded days, the number of recorded days, and totals for visitors, requests and bytes for people and robots. For a monthly period, days gives that month's daily figures. When the preceding month has data, previous gives its month and daily figures.
The enabled field is 1 when statistics collection is enabled for both the server and the domain. When statistics are available, updated gives the time of the last statistics run and utc_offset gives the server's UTC offset for interpreting hourly visit times. A request for all-time statistics returns available set to 0 if no statistics are available.
An invalid period returns 400. An unknown domain or a month for which no statistics are kept returns 404. Access to an existing domain is limited to administrators, the domain owner and the owner's reseller. Other callers receive 403.
Parameters
namepath ·DomainNameRequiredperiodquery ·string, matching ^(all|latest|[0-9]{4}-(0[1-9]|1[0-2]))$Example
See the API overview for how to set $API and $TOKEN.curl -sS -X GET "$API/domains/example.com/stats?period=text" \ -H "Authorization: Bearer $TOKEN"
200 OK{
"apart_since": "text",
"available": true,
"days": [
{}
],
"domain": "example.com",
"enabled": true,
"general": {},
"months": [
{
"days": 1,
"first": "text",
"last": "text",
"month": "text",
"people": {},
"robots": {}
}
],
"period": "text",
"previous": {},
"robots": {},
"updated": "text",
"utc_offset": "text"
}Errors
8 errors, each a status and a sentence400A period is all, latest, or a month as YYYY-MM400Domain name required400Domain name too long400Invalid domain name401Authentication required403Insufficient privileges404Domain '<name>' not found404No statistics are kept for <month>urbestack.com/docs/api/get-domains-name-stats/