Create Kinesis Events
curl --request POST \
--url https://api.honeycomb.io/1/kinesis_events/{datasetSlug} \
--header 'Content-Type: application/json' \
--header 'X-Amz-Firehose-Access-Key: <api-key>' \
--header 'X-Amz-Firehose-Request-Id: <x-amz-firehose-request-id>' \
--data '
{
"requestId": "<string>",
"timestamp": 123,
"records": [
{
"data": "<string>"
}
]
}
'import requests
url = "https://api.honeycomb.io/1/kinesis_events/{datasetSlug}"
payload = {
"requestId": "<string>",
"timestamp": 123,
"records": [{ "data": "<string>" }]
}
headers = {
"X-Amz-Firehose-Request-Id": "<x-amz-firehose-request-id>",
"X-Amz-Firehose-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Amz-Firehose-Request-Id': '<x-amz-firehose-request-id>',
'X-Amz-Firehose-Access-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({requestId: '<string>', timestamp: 123, records: [{data: '<string>'}]})
};
fetch('https://api.honeycomb.io/1/kinesis_events/{datasetSlug}', 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/kinesis_events/{datasetSlug}",
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([
'requestId' => '<string>',
'timestamp' => 123,
'records' => [
[
'data' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Amz-Firehose-Access-Key: <api-key>",
"X-Amz-Firehose-Request-Id: <x-amz-firehose-request-id>"
],
]);
$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/kinesis_events/{datasetSlug}"
payload := strings.NewReader("{\n \"requestId\": \"<string>\",\n \"timestamp\": 123,\n \"records\": [\n {\n \"data\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Amz-Firehose-Request-Id", "<x-amz-firehose-request-id>")
req.Header.Add("X-Amz-Firehose-Access-Key", "<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/kinesis_events/{datasetSlug}")
.header("X-Amz-Firehose-Request-Id", "<x-amz-firehose-request-id>")
.header("X-Amz-Firehose-Access-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"requestId\": \"<string>\",\n \"timestamp\": 123,\n \"records\": [\n {\n \"data\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honeycomb.io/1/kinesis_events/{datasetSlug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Amz-Firehose-Request-Id"] = '<x-amz-firehose-request-id>'
request["X-Amz-Firehose-Access-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"requestId\": \"<string>\",\n \"timestamp\": 123,\n \"records\": [\n {\n \"data\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"requestId": "<string>",
"timestamp": 123,
"errorMessage": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Create Kinesis Events
This endpoint processes events and metrics coming from AWS through Kinesis Firehose.
POST
/
1
/
kinesis_events
/
{datasetSlug}
Create Kinesis Events
curl --request POST \
--url https://api.honeycomb.io/1/kinesis_events/{datasetSlug} \
--header 'Content-Type: application/json' \
--header 'X-Amz-Firehose-Access-Key: <api-key>' \
--header 'X-Amz-Firehose-Request-Id: <x-amz-firehose-request-id>' \
--data '
{
"requestId": "<string>",
"timestamp": 123,
"records": [
{
"data": "<string>"
}
]
}
'import requests
url = "https://api.honeycomb.io/1/kinesis_events/{datasetSlug}"
payload = {
"requestId": "<string>",
"timestamp": 123,
"records": [{ "data": "<string>" }]
}
headers = {
"X-Amz-Firehose-Request-Id": "<x-amz-firehose-request-id>",
"X-Amz-Firehose-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Amz-Firehose-Request-Id': '<x-amz-firehose-request-id>',
'X-Amz-Firehose-Access-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({requestId: '<string>', timestamp: 123, records: [{data: '<string>'}]})
};
fetch('https://api.honeycomb.io/1/kinesis_events/{datasetSlug}', 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/kinesis_events/{datasetSlug}",
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([
'requestId' => '<string>',
'timestamp' => 123,
'records' => [
[
'data' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Amz-Firehose-Access-Key: <api-key>",
"X-Amz-Firehose-Request-Id: <x-amz-firehose-request-id>"
],
]);
$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/kinesis_events/{datasetSlug}"
payload := strings.NewReader("{\n \"requestId\": \"<string>\",\n \"timestamp\": 123,\n \"records\": [\n {\n \"data\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Amz-Firehose-Request-Id", "<x-amz-firehose-request-id>")
req.Header.Add("X-Amz-Firehose-Access-Key", "<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/kinesis_events/{datasetSlug}")
.header("X-Amz-Firehose-Request-Id", "<x-amz-firehose-request-id>")
.header("X-Amz-Firehose-Access-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"requestId\": \"<string>\",\n \"timestamp\": 123,\n \"records\": [\n {\n \"data\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honeycomb.io/1/kinesis_events/{datasetSlug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Amz-Firehose-Request-Id"] = '<x-amz-firehose-request-id>'
request["X-Amz-Firehose-Access-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"requestId\": \"<string>\",\n \"timestamp\": 123,\n \"records\": [\n {\n \"data\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"requestId": "<string>",
"timestamp": 123,
"errorMessage": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
We recommend using a Honeycomb Ingest Key to authenticate, though a Configuration Key will work.
To learn more about authenticating requests, visit API Authentication.
Headers
AWS Request ID associated with the Kinesis Firehose.
Path Parameters
The dataset slug.
Body
application/json
The request body expected from Amazon Kinesis Firehose. Events and metrics have the same shape but the base64 encoded data blob for metrics is expected to be Protowire-encoded as well. CloudWatch Logs data coming through Amazon Kinesis Firehose is expected to have a gzip Content-Encoding.
⌘I