curl --request GET \
--url https://api.tented.ai/v1/analytics/tent \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tented.ai/v1/analytics/tent"
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/tent', 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/tent",
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/tent"
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/tent")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tented.ai/v1/analytics/tent")
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
},
"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
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}Get tent analytics
Traffic analytics for a single published tent over the last 1–7 days. Note: this endpoint uses camelCase query parameters.
curl --request GET \
--url https://api.tented.ai/v1/analytics/tent \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tented.ai/v1/analytics/tent"
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/tent', 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/tent",
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/tent"
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/tent")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tented.ai/v1/analytics/tent")
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
},
"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
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}{
"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
Tent ID, its current published alias, or / for the tent published at the domain root.
Days to include (1–7). Out-of-range values fall back to 7.
1 <= x <= 7Response
Analytics for the tent.
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
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