List all API Keys
curl --request GET \
--url https://api.honeycomb.io/2/teams/{teamSlug}/api-keys \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.honeycomb.io/2/teams/{teamSlug}/api-keys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.honeycomb.io/2/teams/{teamSlug}/api-keys', 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/2/teams/{teamSlug}/api-keys",
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.honeycomb.io/2/teams/{teamSlug}/api-keys"
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.honeycomb.io/2/teams/{teamSlug}/api-keys")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honeycomb.io/2/teams/{teamSlug}/api-keys")
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{
"data": [
{
"id": "hcxik_12345678901234567890123456",
"type": "api-keys",
"attributes": {
"key_type": "ingest",
"name": "us-west-2 collectors key",
"description": "Used by the checkout service in prod. Rotate in AWS Secrets Manager.",
"disabled": false,
"permissions": {
"create_datasets": false
},
"timestamps": {
"created": "2022-09-22T17:32:11Z",
"updated": "2022-10-31T15:08:11Z"
}
},
"relationships": {
"environment": {
"data": {
"id": "hxenv_12345678901234567890123456",
"type": "environments"
}
},
"creator": {
"data": {
"id": "hcxus_01hzqr5g7jg9qz40xtgx7rjwj0",
"type": "users"
}
},
"editor": {
"data": {
"id": "hcxus_01hzqr5g7jg9qz40xtgx7rjwj0",
"type": "users"
}
}
},
"links": {
"self": "/2/teams/my-team/api-keys/hcxik_12345678901234567890123456"
}
}
],
"links": {
"next": "/2/teams/my-team/api-keys?page[after]=3025fa645ad1100d&page[size]=10"
}
}{
"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"
}{
"status": 422,
"type": "https://api.honeycomb.io/problems/validation-failed",
"error": "The provided input is invalid.",
"title": "The provided input is invalid",
"type_detail": [
{
"field": "type",
"code": "invalid",
"description": "type: must be a valid value"
}
]
}{
"error": "Rate Limited"
}{
"error": "something went wrong!",
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"instance": "<string>"
}List all API Keys
List all API Keys for a Team.
GET
/
2
/
teams
/
{teamSlug}
/
api-keys
List all API Keys
curl --request GET \
--url https://api.honeycomb.io/2/teams/{teamSlug}/api-keys \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.honeycomb.io/2/teams/{teamSlug}/api-keys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.honeycomb.io/2/teams/{teamSlug}/api-keys', 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/2/teams/{teamSlug}/api-keys",
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.honeycomb.io/2/teams/{teamSlug}/api-keys"
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.honeycomb.io/2/teams/{teamSlug}/api-keys")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honeycomb.io/2/teams/{teamSlug}/api-keys")
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{
"data": [
{
"id": "hcxik_12345678901234567890123456",
"type": "api-keys",
"attributes": {
"key_type": "ingest",
"name": "us-west-2 collectors key",
"description": "Used by the checkout service in prod. Rotate in AWS Secrets Manager.",
"disabled": false,
"permissions": {
"create_datasets": false
},
"timestamps": {
"created": "2022-09-22T17:32:11Z",
"updated": "2022-10-31T15:08:11Z"
}
},
"relationships": {
"environment": {
"data": {
"id": "hxenv_12345678901234567890123456",
"type": "environments"
}
},
"creator": {
"data": {
"id": "hcxus_01hzqr5g7jg9qz40xtgx7rjwj0",
"type": "users"
}
},
"editor": {
"data": {
"id": "hcxus_01hzqr5g7jg9qz40xtgx7rjwj0",
"type": "users"
}
}
},
"links": {
"self": "/2/teams/my-team/api-keys/hcxik_12345678901234567890123456"
}
}
],
"links": {
"next": "/2/teams/my-team/api-keys?page[after]=3025fa645ad1100d&page[size]=10"
}
}{
"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"
}{
"status": 422,
"type": "https://api.honeycomb.io/problems/validation-failed",
"error": "The provided input is invalid.",
"title": "The provided input is invalid",
"type_detail": [
{
"field": "type",
"code": "invalid",
"description": "type: must be a valid value"
}
]
}{
"error": "Rate Limited"
}{
"error": "something went wrong!",
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"instance": "<string>"
}Authorizations
Authenticate using a Honeycomb Management Key.
Pass the Management Key as a Bearer token in the Authorization header:
Authorization: Bearer hcxmk_12345678901234567890123456:12345678901234567890123456789012
Construct the key value by joining the Key ID and Secret with a colon (:).
To learn how to create a Management Key, visit Manage Team API Keys. To learn more about authenticating requests, visit API Authentication.
Query Parameters
Specifies the type of API key to return. This parameter accepts the following values:
ingest: Returns only ingest API keys.configuration: Returns only configuration API keys.management: Returns only Management API keys.
The endpoint will default to fetching all API keys regardless of type if this filter is omitted.
Environment-scoped Management API keys are only returned for teams that have them enabled.
Available options:
configuration, ingest, management