curl --request GET \
--url https://api.checklyhq.com/v1/usage/summary \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.checklyhq.com/v1/usage/summary"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.checklyhq.com/v1/usage/summary', 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.checklyhq.com/v1/usage/summary",
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.checklyhq.com/v1/usage/summary"
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.checklyhq.com/v1/usage/summary")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.checklyhq.com/v1/usage/summary")
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{
"usageTermsId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"period": {
"from": "2023-12-25",
"to": "2023-12-25"
},
"totals": {
"credits": {
"used": 1,
"percentOfBudget": 1
},
"meters": [
{
"meterType": "<string>",
"measures": {}
}
]
},
"projections": {
"weeksSinceStart": 1,
"weeksRemaining": 1,
"remainingCredits": 123,
"windows": {
"sinceStart": {
"usage": {
"credits": {
"used": 1,
"percentOfBudget": 1
},
"meters": [
{
"meterType": "<string>",
"measures": {}
}
]
},
"projectedAnnualPercentOfBudget": 1,
"projectedCreditsAtContractEnd": 1,
"projectedPercentAtContractEnd": 1,
"projectedWeeksUntilExhausted": 1
},
"last30Days": {
"usage": {
"credits": {
"used": 1,
"percentOfBudget": 1
},
"meters": [
{
"meterType": "<string>",
"measures": {}
}
]
},
"projectedAnnualPercentOfBudget": 1,
"projectedCreditsAtContractEnd": 1,
"projectedPercentAtContractEnd": 1,
"projectedWeeksUntilExhausted": 1
},
"last7Days": {
"usage": {
"credits": {
"used": 1,
"percentOfBudget": 1
},
"meters": [
{
"meterType": "<string>",
"measures": {}
}
]
},
"projectedAnnualPercentOfBudget": 1,
"projectedCreditsAtContractEnd": 1,
"projectedPercentAtContractEnd": 1,
"projectedWeeksUntilExhausted": 1
},
"last1Day": {
"usage": {
"credits": {
"used": 1,
"percentOfBudget": 1
},
"meters": [
{
"meterType": "<string>",
"measures": {}
}
]
},
"projectedAnnualPercentOfBudget": 1,
"projectedCreditsAtContractEnd": 1,
"projectedPercentAtContractEnd": 1,
"projectedWeeksUntilExhausted": 1
}
}
}
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}Get usage summary
Get usage totals and contract projections for a date range.
curl --request GET \
--url https://api.checklyhq.com/v1/usage/summary \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.checklyhq.com/v1/usage/summary"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.checklyhq.com/v1/usage/summary', 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.checklyhq.com/v1/usage/summary",
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.checklyhq.com/v1/usage/summary"
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.checklyhq.com/v1/usage/summary")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.checklyhq.com/v1/usage/summary")
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{
"usageTermsId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"period": {
"from": "2023-12-25",
"to": "2023-12-25"
},
"totals": {
"credits": {
"used": 1,
"percentOfBudget": 1
},
"meters": [
{
"meterType": "<string>",
"measures": {}
}
]
},
"projections": {
"weeksSinceStart": 1,
"weeksRemaining": 1,
"remainingCredits": 123,
"windows": {
"sinceStart": {
"usage": {
"credits": {
"used": 1,
"percentOfBudget": 1
},
"meters": [
{
"meterType": "<string>",
"measures": {}
}
]
},
"projectedAnnualPercentOfBudget": 1,
"projectedCreditsAtContractEnd": 1,
"projectedPercentAtContractEnd": 1,
"projectedWeeksUntilExhausted": 1
},
"last30Days": {
"usage": {
"credits": {
"used": 1,
"percentOfBudget": 1
},
"meters": [
{
"meterType": "<string>",
"measures": {}
}
]
},
"projectedAnnualPercentOfBudget": 1,
"projectedCreditsAtContractEnd": 1,
"projectedPercentAtContractEnd": 1,
"projectedWeeksUntilExhausted": 1
},
"last7Days": {
"usage": {
"credits": {
"used": 1,
"percentOfBudget": 1
},
"meters": [
{
"meterType": "<string>",
"measures": {}
}
]
},
"projectedAnnualPercentOfBudget": 1,
"projectedCreditsAtContractEnd": 1,
"projectedPercentAtContractEnd": 1,
"projectedWeeksUntilExhausted": 1
},
"last1Day": {
"usage": {
"credits": {
"used": 1,
"percentOfBudget": 1
},
"meters": [
{
"meterType": "<string>",
"measures": {}
}
]
},
"projectedAnnualPercentOfBudget": 1,
"projectedCreditsAtContractEnd": 1,
"projectedPercentAtContractEnd": 1,
"projectedWeeksUntilExhausted": 1
}
}
}
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}Authorizations
The Checkly Public API uses API keys to authenticate requests. You can get the API Key here. Your API key is like a password: keep it secure!
Authentication to the API is performed using the Bearer auth method in the Authorization header and using the account ID.
For example, set Authorization header while using cURL: curl -H "Authorization: Bearer [apiKey]" "X-Checkly-Account: [accountId]"
Headers
Your Checkly account ID, you can find it at https://app.checklyhq.com/settings/account/general
Query Parameters
Date used to resolve usage terms. Defaults to today.
Start date, inclusive. Defaults to the resolved usage start date.
Account IDs included in the resolved usage terms. Repeat or comma-separate values.
Check types to include. Repeat or comma-separate values.
AGENTIC, API, BROWSER, HEARTBEAT, ICMP, MULTI_STEP, TCP, PLAYWRIGHT, URL, DNS, SSL, GRPC, TRACEROUTE Was this page helpful?