curl --request PUT \
--url https://api.honeycomb.io/1/query_annotations/{datasetSlug}/{queryAnnotationId} \
--header 'Content-Type: application/json' \
--header 'X-Honeycomb-Team: <api-key>' \
--data '
{
"name": "My Updated Annotation",
"description": "A nice description of My Update Annotation",
"query_id": "mabAMpSPDjH",
"id": "sGUnkBHgRFN",
"created_at": "2022-10-26T21:36:04Z",
"updated_at": "2022-12-16T10:44:08Z"
}
'import requests
url = "https://api.honeycomb.io/1/query_annotations/{datasetSlug}/{queryAnnotationId}"
payload = {
"name": "My Updated Annotation",
"description": "A nice description of My Update Annotation",
"query_id": "mabAMpSPDjH",
"id": "sGUnkBHgRFN",
"created_at": "2022-10-26T21:36:04Z",
"updated_at": "2022-12-16T10:44:08Z"
}
headers = {
"X-Honeycomb-Team": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Honeycomb-Team': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Updated Annotation',
description: 'A nice description of My Update Annotation',
query_id: 'mabAMpSPDjH',
id: 'sGUnkBHgRFN',
created_at: '2022-10-26T21:36:04Z',
updated_at: '2022-12-16T10:44:08Z'
})
};
fetch('https://api.honeycomb.io/1/query_annotations/{datasetSlug}/{queryAnnotationId}', 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/query_annotations/{datasetSlug}/{queryAnnotationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My Updated Annotation',
'description' => 'A nice description of My Update Annotation',
'query_id' => 'mabAMpSPDjH',
'id' => 'sGUnkBHgRFN',
'created_at' => '2022-10-26T21:36:04Z',
'updated_at' => '2022-12-16T10:44:08Z'
]),
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/query_annotations/{datasetSlug}/{queryAnnotationId}"
payload := strings.NewReader("{\n \"name\": \"My Updated Annotation\",\n \"description\": \"A nice description of My Update Annotation\",\n \"query_id\": \"mabAMpSPDjH\",\n \"id\": \"sGUnkBHgRFN\",\n \"created_at\": \"2022-10-26T21:36:04Z\",\n \"updated_at\": \"2022-12-16T10:44:08Z\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.honeycomb.io/1/query_annotations/{datasetSlug}/{queryAnnotationId}")
.header("X-Honeycomb-Team", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Updated Annotation\",\n \"description\": \"A nice description of My Update Annotation\",\n \"query_id\": \"mabAMpSPDjH\",\n \"id\": \"sGUnkBHgRFN\",\n \"created_at\": \"2022-10-26T21:36:04Z\",\n \"updated_at\": \"2022-12-16T10:44:08Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honeycomb.io/1/query_annotations/{datasetSlug}/{queryAnnotationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Honeycomb-Team"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Updated Annotation\",\n \"description\": \"A nice description of My Update Annotation\",\n \"query_id\": \"mabAMpSPDjH\",\n \"id\": \"sGUnkBHgRFN\",\n \"created_at\": \"2022-10-26T21:36:04Z\",\n \"updated_at\": \"2022-12-16T10:44:08Z\"\n}"
response = http.request(request)
puts response.read_body{
"name": "My Updated Annotation",
"description": "A nice description of My Update Annotation",
"query_id": "mabAMpSPDjH"
}Update a Query Annotation
Update a Query Annotation by specifying its ID. The Query ID associated with the Query Annotation cannot be updated. Partial updates are not supported.
curl --request PUT \
--url https://api.honeycomb.io/1/query_annotations/{datasetSlug}/{queryAnnotationId} \
--header 'Content-Type: application/json' \
--header 'X-Honeycomb-Team: <api-key>' \
--data '
{
"name": "My Updated Annotation",
"description": "A nice description of My Update Annotation",
"query_id": "mabAMpSPDjH",
"id": "sGUnkBHgRFN",
"created_at": "2022-10-26T21:36:04Z",
"updated_at": "2022-12-16T10:44:08Z"
}
'import requests
url = "https://api.honeycomb.io/1/query_annotations/{datasetSlug}/{queryAnnotationId}"
payload = {
"name": "My Updated Annotation",
"description": "A nice description of My Update Annotation",
"query_id": "mabAMpSPDjH",
"id": "sGUnkBHgRFN",
"created_at": "2022-10-26T21:36:04Z",
"updated_at": "2022-12-16T10:44:08Z"
}
headers = {
"X-Honeycomb-Team": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Honeycomb-Team': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Updated Annotation',
description: 'A nice description of My Update Annotation',
query_id: 'mabAMpSPDjH',
id: 'sGUnkBHgRFN',
created_at: '2022-10-26T21:36:04Z',
updated_at: '2022-12-16T10:44:08Z'
})
};
fetch('https://api.honeycomb.io/1/query_annotations/{datasetSlug}/{queryAnnotationId}', 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/query_annotations/{datasetSlug}/{queryAnnotationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My Updated Annotation',
'description' => 'A nice description of My Update Annotation',
'query_id' => 'mabAMpSPDjH',
'id' => 'sGUnkBHgRFN',
'created_at' => '2022-10-26T21:36:04Z',
'updated_at' => '2022-12-16T10:44:08Z'
]),
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/query_annotations/{datasetSlug}/{queryAnnotationId}"
payload := strings.NewReader("{\n \"name\": \"My Updated Annotation\",\n \"description\": \"A nice description of My Update Annotation\",\n \"query_id\": \"mabAMpSPDjH\",\n \"id\": \"sGUnkBHgRFN\",\n \"created_at\": \"2022-10-26T21:36:04Z\",\n \"updated_at\": \"2022-12-16T10:44:08Z\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.honeycomb.io/1/query_annotations/{datasetSlug}/{queryAnnotationId}")
.header("X-Honeycomb-Team", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Updated Annotation\",\n \"description\": \"A nice description of My Update Annotation\",\n \"query_id\": \"mabAMpSPDjH\",\n \"id\": \"sGUnkBHgRFN\",\n \"created_at\": \"2022-10-26T21:36:04Z\",\n \"updated_at\": \"2022-12-16T10:44:08Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honeycomb.io/1/query_annotations/{datasetSlug}/{queryAnnotationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Honeycomb-Team"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Updated Annotation\",\n \"description\": \"A nice description of My Update Annotation\",\n \"query_id\": \"mabAMpSPDjH\",\n \"id\": \"sGUnkBHgRFN\",\n \"created_at\": \"2022-10-26T21:36:04Z\",\n \"updated_at\": \"2022-12-16T10:44:08Z\"\n}"
response = http.request(request)
puts response.read_body{
"name": "My Updated Annotation",
"description": "A nice description of My Update Annotation",
"query_id": "mabAMpSPDjH"
}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
The dataset slug or use __all__ for endpoints that support environment-wide operations.
The unique identifier (ID) of the annotation.
Body
A Query Annotation consists of a name and description associated with a query to add context when collaborating.
A name for the Query.
1 - 320"My Named Query"
The ID of the Query that the annotation describes. Note: Once created, it is NOT possible to change the query ID associated with an annotation. It is possible to have multiple annotations associated with a Query.
"mabAMpSPDjH"
A description of the Query.
1023"A nice description of My Named Query"
Response
Success
A Query Annotation consists of a name and description associated with a query to add context when collaborating.
A name for the Query.
1 - 320"My Named Query"
The ID of the Query that the annotation describes. Note: Once created, it is NOT possible to change the query ID associated with an annotation. It is possible to have multiple annotations associated with a Query.
"mabAMpSPDjH"
A description of the Query.
1023"A nice description of My Named Query"
The unique identifier (ID) of a Query Annotation.
"sGUnkBHgRFN"
ISO8601 formatted time when the Query Annotation was created.
"2022-10-26T21:36:04Z"
ISO8601 formatted time when the Query Annotation was updated.
"2022-12-04T08:14:26Z"
The source of the Query Annotation.
query, board "query"