curl
curl -sS "https://gateway.orbit/api/v1/instances/12/analytics/stats" \
--cacert /path/to/orbit-root-ca.pem \
-H 'Accept: application/json' \
-H 'X-Orbit-Request-Id: 9d6b1e5c-4a3f-4a1b-9f0e-6d2c3f5a7b81'{
"data": {
"available": true,
"readable": true,
"driver": "plausible_ce",
"site_domain": "<string>",
"live_visitors": 123,
"visitors": {
"past_24h": 123,
"past_7d": 123,
"past_30d": 123
},
"pages": [
{
"path": "<string>",
"visitors": 123
}
],
"error_code": "<string>",
"error": "<string>"
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Instances
Read Instance analytics stats
Returns live visitors, visitors for Plausible’s day, 7-day, and 30-day periods, and the top ten pages for the Instance’s tracked site. available is false when the analytics role is not active or the Instance has no tracking host. A failed Stats API read is readable: false with no visitor numbers.
GET
/
api
/
v1
/
instances
/
{instance}
/
analytics
/
stats
curl
curl -sS "https://gateway.orbit/api/v1/instances/12/analytics/stats" \
--cacert /path/to/orbit-root-ca.pem \
-H 'Accept: application/json' \
-H 'X-Orbit-Request-Id: 9d6b1e5c-4a3f-4a1b-9f0e-6d2c3f5a7b81'{
"data": {
"available": true,
"readable": true,
"driver": "plausible_ce",
"site_domain": "<string>",
"live_visitors": 123,
"visitors": {
"past_24h": 123,
"past_7d": 123,
"past_30d": 123
},
"pages": [
{
"path": "<string>",
"visitors": 123
}
],
"error_code": "<string>",
"error": "<string>"
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}