curl --request POST \
--url https://api.honeycomb.io/1/reporting/slos/historical \
--header 'Content-Type: application/json' \
--header 'X-Honeycomb-Team: <api-key>' \
--data '
{
"ids": [
"2LBq9LckbcA",
"CzcpPs7cJ4d"
],
"start_time": 1742230800,
"end_time": 1745254800
}
'import requests
url = "https://api.honeycomb.io/1/reporting/slos/historical"
payload = {
"ids": ["2LBq9LckbcA", "CzcpPs7cJ4d"],
"start_time": 1742230800,
"end_time": 1745254800
}
headers = {
"X-Honeycomb-Team": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Honeycomb-Team': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: ['2LBq9LckbcA', 'CzcpPs7cJ4d'],
start_time: 1742230800,
end_time: 1745254800
})
};
fetch('https://api.honeycomb.io/1/reporting/slos/historical', 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/reporting/slos/historical",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'2LBq9LckbcA',
'CzcpPs7cJ4d'
],
'start_time' => 1742230800,
'end_time' => 1745254800
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.honeycomb.io/1/reporting/slos/historical"
payload := strings.NewReader("{\n \"ids\": [\n \"2LBq9LckbcA\",\n \"CzcpPs7cJ4d\"\n ],\n \"start_time\": 1742230800,\n \"end_time\": 1745254800\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Honeycomb-Team", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.honeycomb.io/1/reporting/slos/historical")
.header("X-Honeycomb-Team", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"2LBq9LckbcA\",\n \"CzcpPs7cJ4d\"\n ],\n \"start_time\": 1742230800,\n \"end_time\": 1745254800\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honeycomb.io/1/reporting/slos/historical")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Honeycomb-Team"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"2LBq9LckbcA\",\n \"CzcpPs7cJ4d\"\n ],\n \"start_time\": 1742230800,\n \"end_time\": 1745254800\n}"
response = http.request(request)
puts response.read_body{
"2LBq9LckbcA": [
{
"timestamp": 1744650000,
"compliance": 91.44851657940663,
"budget_remaining": 14.48516579406632
},
{
"timestamp": 1744653600,
"compliance": 97.98746514671242,
"budget_remaining": 88.13453467953423
}
],
"CzcpPs7cJ4d": [
{
"timestamp": 1744650000,
"compliance": 93.53414567784128,
"budget_remaining": -71.02966841186735
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "something went wrong!",
"status": 422,
"type": "https://api.honeycomb.io/problems/validation-failed",
"title": "The provided input is invalid.",
"detail": "<string>",
"instance": "<string>",
"type_detail": [
{
"field": "<string>",
"code": "invalid",
"description": "<string>"
}
]
}{
"error": "Rate Limited"
}{
"error": "something went wrong!",
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"instance": "<string>"
}{
"error": "<string>"
}Get SLO History
Get a weekly breakdown of historical data for a list of SLOs for a given time range.
curl --request POST \
--url https://api.honeycomb.io/1/reporting/slos/historical \
--header 'Content-Type: application/json' \
--header 'X-Honeycomb-Team: <api-key>' \
--data '
{
"ids": [
"2LBq9LckbcA",
"CzcpPs7cJ4d"
],
"start_time": 1742230800,
"end_time": 1745254800
}
'import requests
url = "https://api.honeycomb.io/1/reporting/slos/historical"
payload = {
"ids": ["2LBq9LckbcA", "CzcpPs7cJ4d"],
"start_time": 1742230800,
"end_time": 1745254800
}
headers = {
"X-Honeycomb-Team": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Honeycomb-Team': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: ['2LBq9LckbcA', 'CzcpPs7cJ4d'],
start_time: 1742230800,
end_time: 1745254800
})
};
fetch('https://api.honeycomb.io/1/reporting/slos/historical', 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/reporting/slos/historical",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'2LBq9LckbcA',
'CzcpPs7cJ4d'
],
'start_time' => 1742230800,
'end_time' => 1745254800
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.honeycomb.io/1/reporting/slos/historical"
payload := strings.NewReader("{\n \"ids\": [\n \"2LBq9LckbcA\",\n \"CzcpPs7cJ4d\"\n ],\n \"start_time\": 1742230800,\n \"end_time\": 1745254800\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Honeycomb-Team", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.honeycomb.io/1/reporting/slos/historical")
.header("X-Honeycomb-Team", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"2LBq9LckbcA\",\n \"CzcpPs7cJ4d\"\n ],\n \"start_time\": 1742230800,\n \"end_time\": 1745254800\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honeycomb.io/1/reporting/slos/historical")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Honeycomb-Team"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"2LBq9LckbcA\",\n \"CzcpPs7cJ4d\"\n ],\n \"start_time\": 1742230800,\n \"end_time\": 1745254800\n}"
response = http.request(request)
puts response.read_body{
"2LBq9LckbcA": [
{
"timestamp": 1744650000,
"compliance": 91.44851657940663,
"budget_remaining": 14.48516579406632
},
{
"timestamp": 1744653600,
"compliance": 97.98746514671242,
"budget_remaining": 88.13453467953423
}
],
"CzcpPs7cJ4d": [
{
"timestamp": 1744650000,
"compliance": 93.53414567784128,
"budget_remaining": -71.02966841186735
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "something went wrong!",
"status": 422,
"type": "https://api.honeycomb.io/problems/validation-failed",
"title": "The provided input is invalid.",
"detail": "<string>",
"instance": "<string>",
"type_detail": [
{
"field": "<string>",
"code": "invalid",
"description": "<string>"
}
]
}{
"error": "Rate Limited"
}{
"error": "something went wrong!",
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"instance": "<string>"
}{
"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.
Body
A list of SLO IDs to retrieve history for. Cannot be an empty array or more than 24 in length.
1 - 24 elements["2LBq9LckbcA", "CzcpPs7cJ4d"]
The starting Unix timestamp, in seconds since the epoch, to retrieve historical data for. Cannot be more than a year in the past.
1742230800
The ending Unix timestamp, in seconds since the epoch, to retrieve historical data for. Must be greater than start_time. Cannot be a future timestamp.
1745254800
Response
A mapping from SLO IDs (e.g., "2LBq9LckbcA") to their historical data. Each SLO ID maps to an array of compliance and budget intervals.
Note: An empty array indicates that no historical data was found for the given time range for that SLO.
A mapping from SLO IDs (e.g., "2LBq9LckbcA") to their historical data. Each SLO ID maps to an array of compliance and budget intervals.
Show child attributes
Show child attributes