curl --request GET \
--url https://api.tented.ai/v1/analytics/org \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tented.ai/v1/analytics/org"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tented.ai/v1/analytics/org', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tented.ai/v1/analytics/org",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tented.ai/v1/analytics/org"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tented.ai/v1/analytics/org")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tented.ai/v1/analytics/org")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"tent_id": "<string>",
"visits": 123,
"pageviews": 123,
"date_range": {
"start_date": "<string>",
"end_date": "<string>",
"days": 123
},
"sample_interval": 123,
"daily_pageviews": [
{
"date": "<string>",
"pageviews": 123
}
],
"by_country": [
{
"country": "<string>",
"views": 123
}
],
"by_device": [
{
"device": "<string>",
"views": 123
}
],
"by_browser": [
{
"browser": "<string>",
"views": 123
}
],
"by_os": [
{
"os": "<string>",
"views": 123
}
],
"by_referrer": [
{
"referrer": "<string>",
"views": 123
}
],
"by_path": [
{
"path": "<string>",
"views": 123
}
],
"recent_pageviews": [
{
"timestamp": "2023-11-07T05:31:56Z",
"country": "<string>",
"device": "<string>",
"browser": "<string>",
"os": "<string>",
"referrer": "<string>"
}
]
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}Get workspace analytics
Aggregate traffic analytics across all published tents in the workspace, including a per-path breakdown. tent_id is the literal string org in the response.
curl --request GET \
--url https://api.tented.ai/v1/analytics/org \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tented.ai/v1/analytics/org"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tented.ai/v1/analytics/org', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tented.ai/v1/analytics/org",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tented.ai/v1/analytics/org"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tented.ai/v1/analytics/org")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tented.ai/v1/analytics/org")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"tent_id": "<string>",
"visits": 123,
"pageviews": 123,
"date_range": {
"start_date": "<string>",
"end_date": "<string>",
"days": 123
},
"sample_interval": 123,
"daily_pageviews": [
{
"date": "<string>",
"pageviews": 123
}
],
"by_country": [
{
"country": "<string>",
"views": 123
}
],
"by_device": [
{
"device": "<string>",
"views": 123
}
],
"by_browser": [
{
"browser": "<string>",
"views": 123
}
],
"by_os": [
{
"os": "<string>",
"views": 123
}
],
"by_referrer": [
{
"referrer": "<string>",
"views": 123
}
],
"by_path": [
{
"path": "<string>",
"views": 123
}
],
"recent_pageviews": [
{
"timestamp": "2023-11-07T05:31:56Z",
"country": "<string>",
"device": "<string>",
"browser": "<string>",
"os": "<string>",
"referrer": "<string>"
}
]
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}Authorizations
Workspace API key, e.g. Authorization: Bearer tented_.... Create keys in Workspace Settings → API Keys.
Query Parameters
Days to include (1–7). Out-of-range values fall back to 7.
1 <= x <= 7Response
Workspace analytics.
Tent ID, or the literal org for workspace-level analytics.
Unique visits in the date range.
Total pageviews in the date range.
Show child attributes
Show child attributes
Resolution of the counts. 1 means every count is exact. A value N greater than 1 means Cloudflare served a 1-in-N sample and every count in the response is extrapolated by N. This is rare and only happens when the analytics backend could not obtain full-resolution data after retrying.
Pageviews per day.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Most recent individual pageviews.
Show child attributes
Show child attributes