API Documentation
The UptimeTea API is easy to use and free for all plans.
Get dashboard stats
Returns your team's headline numbers for the last 24 hours, each with its change against the same 24 hours a week earlier. monitor_limit.limit is null on paid plans.
GET
https://api.uptimetea.com/dashboard/stats
Headers
-
AuthorizationREQUIREDSTRINGBearer $TOKEN
Response body
{
"uptime": {
"percentage": 99.8,
"change": 0.3
},
"average_response_time": {
"milliseconds": 245,
"change": -12
},
"active_watchers": {
"count": 12,
"change": 2
},
"open_incidents": {
"count": 1,
"change": 0
},
"monitor_limit": {
"count": 12,
"limit": 50,
"warning_threshold": 40
}
}
Code examples
curl -X GET "https://api.uptimetea.com/dashboard/stats" \
-H "Authorization: Bearer $TOKEN"
// Get dashboard stats
const response = await fetch('https://api.uptimetea.com/dashboard/stats', {
headers: {
'Authorization': 'Bearer ' + yourToken
}
});
const data = await response.json();
console.log(data);
# Get dashboard stats
import requests
headers = {'Authorization': f'Bearer {your_token}'}
response = requests.get(
'https://api.uptimetea.com/dashboard/stats',
headers=headers
)
print(response.json())
// Get dashboard stats
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.uptimetea.com/dashboard/stats", nil)
req.Header.Set("Authorization", "Bearer "+yourToken)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(resp.Status, string(data))
}
# Get dashboard stats
require 'net/http'
require 'uri'
uri = URI('https://api.uptimetea.com/dashboard/stats')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = "Bearer #{your_token}"
response = http.request(request)
puts response.code, response.body
<?php
// Get dashboard stats
$ch = curl_init('https://api.uptimetea.com/dashboard/stats');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $yourToken
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));
curl_close($ch);