Get project statistics
curl --request GET \
--url https://api.justanotheruptime.com/projects/{id}/statistics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.justanotheruptime.com/projects/{id}/statistics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.justanotheruptime.com/projects/{id}/statistics', 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.justanotheruptime.com/projects/{id}/statistics",
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.justanotheruptime.com/projects/{id}/statistics"
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.justanotheruptime.com/projects/{id}/statistics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.justanotheruptime.com/projects/{id}/statistics")
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{
"monitors": {
"total": 123,
"up": 123,
"down": 123,
"maintenance": 123
},
"incidents": {
"total": 123,
"active": 123,
"resolved": 123
},
"team": {
"total": 123,
"admins": 123,
"users": 123,
"projectManagers": 123
},
"uptime": {
"last24h": 123,
"last7d": 123,
"last30d": 123,
"current": 123
},
"performance": {
"avgResponseTime": 123,
"p95ResponseTime": 123,
"p99ResponseTime": 123,
"minResponseTime": 123,
"maxResponseTime": 123,
"responseTimeByRegion": {}
}
}Projects
Get project statistics
Get comprehensive statistics for a project including monitors, incidents, team, and uptime
GET
/
projects
/
{id}
/
statistics
Get project statistics
curl --request GET \
--url https://api.justanotheruptime.com/projects/{id}/statistics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.justanotheruptime.com/projects/{id}/statistics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.justanotheruptime.com/projects/{id}/statistics', 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.justanotheruptime.com/projects/{id}/statistics",
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.justanotheruptime.com/projects/{id}/statistics"
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.justanotheruptime.com/projects/{id}/statistics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.justanotheruptime.com/projects/{id}/statistics")
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{
"monitors": {
"total": 123,
"up": 123,
"down": 123,
"maintenance": 123
},
"incidents": {
"total": 123,
"active": 123,
"resolved": 123
},
"team": {
"total": 123,
"admins": 123,
"users": 123,
"projectManagers": 123
},
"uptime": {
"last24h": 123,
"last7d": 123,
"last30d": 123,
"current": 123
},
"performance": {
"avgResponseTime": 123,
"p95ResponseTime": 123,
"p99ResponseTime": 123,
"minResponseTime": 123,
"maxResponseTime": 123,
"responseTimeByRegion": {}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Project ID
Response
Project statistics
Monitor statistics
Show child attributes
Show child attributes
Incident statistics
Show child attributes
Show child attributes
Team statistics
Show child attributes
Show child attributes
Uptime statistics
Show child attributes
Show child attributes
Performance statistics
Show child attributes
Show child attributes
⌘I