curl --request GET \
--url https://api.honeycomb.io/1/slos/{datasetSlug}/{sloId}/counts/history \
--header 'X-Honeycomb-Team: <api-key>'import requests
url = "https://api.honeycomb.io/1/slos/{datasetSlug}/{sloId}/counts/history"
headers = {"X-Honeycomb-Team": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Honeycomb-Team': '<api-key>'}};
fetch('https://api.honeycomb.io/1/slos/{datasetSlug}/{sloId}/counts/history', 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.honeycomb.io/1/slos/{datasetSlug}/{sloId}/counts/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Honeycomb-Team: <api-key>"
],
]);
$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.honeycomb.io/1/slos/{datasetSlug}/{sloId}/counts/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Honeycomb-Team", "<api-key>")
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.honeycomb.io/1/slos/{datasetSlug}/{sloId}/counts/history")
.header("X-Honeycomb-Team", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honeycomb.io/1/slos/{datasetSlug}/{sloId}/counts/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Honeycomb-Team"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"slo_id": "bZ1aRHAUsjG",
"resolution_seconds": 3600,
"buckets": [
{
"start_time": 1745168400,
"end_time": 1745172000,
"total_count": 74520,
"error_count": 182,
"is_partial": false
},
{
"start_time": 1745172000,
"end_time": 1745175600,
"total_count": 71043,
"error_count": 97,
"is_partial": false
},
{
"start_time": 1745251200,
"end_time": 1745254800,
"total_count": 12300,
"error_count": 14,
"is_partial": true
}
]
}{
"status": 400,
"type": "https://api.honeycomb.io/problems/unparseable",
"title": "The request body could not be parsed.",
"error": "invalid gzip data"
}{
"error": "unknown API key - check your credentials"
}{
"error": "Your team has been denied access to Management APIs, please contact support to be unblocked."
}{
"error": "dataset not found"
}{
"error": "Rate Limited"
}{
"error": "<string>"
}Get SLO Hourly Counts History
Get hourly-bucketed total and error event counts for an SLO from the persistent historical store. Use this endpoint to retrieve completed historical hours; pair with the Get SLO Realtime Counts endpoint for the current in-progress hour.
Requirements:
- Available on the Enterprise plan only.
- This feature must be enabled for your team. Contact your account team to request access.
Partial buckets: The most recent bucket may be marked is_partial: true if it covers the current in-progress hour. Counts for that bucket will increase until the hour completes.
Budget resets: This endpoint returns raw counts that don’t account for budget resets, so failures from before a reset still appear in the counts. For reporting data that reflects budget resets, use the Get an SLO endpoint with the detailed parameter.
curl --request GET \
--url https://api.honeycomb.io/1/slos/{datasetSlug}/{sloId}/counts/history \
--header 'X-Honeycomb-Team: <api-key>'import requests
url = "https://api.honeycomb.io/1/slos/{datasetSlug}/{sloId}/counts/history"
headers = {"X-Honeycomb-Team": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Honeycomb-Team': '<api-key>'}};
fetch('https://api.honeycomb.io/1/slos/{datasetSlug}/{sloId}/counts/history', 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.honeycomb.io/1/slos/{datasetSlug}/{sloId}/counts/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Honeycomb-Team: <api-key>"
],
]);
$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.honeycomb.io/1/slos/{datasetSlug}/{sloId}/counts/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Honeycomb-Team", "<api-key>")
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.honeycomb.io/1/slos/{datasetSlug}/{sloId}/counts/history")
.header("X-Honeycomb-Team", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honeycomb.io/1/slos/{datasetSlug}/{sloId}/counts/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Honeycomb-Team"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"slo_id": "bZ1aRHAUsjG",
"resolution_seconds": 3600,
"buckets": [
{
"start_time": 1745168400,
"end_time": 1745172000,
"total_count": 74520,
"error_count": 182,
"is_partial": false
},
{
"start_time": 1745172000,
"end_time": 1745175600,
"total_count": 71043,
"error_count": 97,
"is_partial": false
},
{
"start_time": 1745251200,
"end_time": 1745254800,
"total_count": 12300,
"error_count": 14,
"is_partial": true
}
]
}{
"status": 400,
"type": "https://api.honeycomb.io/problems/unparseable",
"title": "The request body could not be parsed.",
"error": "invalid gzip data"
}{
"error": "unknown API key - check your credentials"
}{
"error": "Your team has been denied access to Management APIs, please contact support to be unblocked."
}{
"error": "dataset not found"
}{
"error": "Rate Limited"
}{
"error": "<string>"
}Authorizations
Authenticate using a Honeycomb Configuration Key.
Pass the Token in the X-Honeycomb-Team header:
X-Honeycomb-Team: 1234567890123456789012
If you created your key using the API, use data.attributes.secret; this is the same value as the Token in the UI.
To learn how to create a Configuration Key, visit Manage Environment API Keys. To learn more about authenticating requests, visit API Authentication.
Path Parameters
Query Parameters
Response
Success