curl --request POST \
--url https://api.honeycomb.io/1/datasets \
--header 'Content-Type: application/json' \
--header 'X-Honeycomb-Team: <api-key>' \
--data '
{
"name": "<string>",
"description": "A nice description of my dataset",
"expand_json_depth": 3
}
'import requests
url = "https://api.honeycomb.io/1/datasets"
payload = {
"name": "<string>",
"description": "A nice description of my dataset",
"expand_json_depth": 3
}
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({
name: '<string>',
description: 'A nice description of my dataset',
expand_json_depth: 3
})
};
fetch('https://api.honeycomb.io/1/datasets', 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/datasets",
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([
'name' => '<string>',
'description' => 'A nice description of my dataset',
'expand_json_depth' => 3
]),
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/datasets"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"A nice description of my dataset\",\n \"expand_json_depth\": 3\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/datasets")
.header("X-Honeycomb-Team", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"A nice description of my dataset\",\n \"expand_json_depth\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honeycomb.io/1/datasets")
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 \"name\": \"<string>\",\n \"description\": \"A nice description of my dataset\",\n \"expand_json_depth\": 3\n}"
response = http.request(request)
puts response.read_body{
"name": "My Dataset!",
"description": "A nice description of my dataset",
"settings": {
"delete_protected": true
},
"expand_json_depth": 3,
"slug": "my-dataset-",
"regular_columns_count": 100,
"last_written_at": "2022-07-21T18:39:23Z",
"created_at": "2022-09-22T17:32:11Z",
"dataset_type": "metrics"
}{
"name": "MyDataset!",
"slug": "mydataset-",
"description": "A nice description of my dataset",
"expand_json_depth": 3,
"created_at": "2022-07-21T18:39:23.000Z",
"last_written_at": null,
"regular_columns_count": 0
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "we could not create a dataset with that name"
}{
"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": "<string>"
}Create a Dataset
Create a Dataset in the environment associated with your API key. If a Dataset already exists by that name (or slug), then the existing dataset will be returned.
curl --request POST \
--url https://api.honeycomb.io/1/datasets \
--header 'Content-Type: application/json' \
--header 'X-Honeycomb-Team: <api-key>' \
--data '
{
"name": "<string>",
"description": "A nice description of my dataset",
"expand_json_depth": 3
}
'import requests
url = "https://api.honeycomb.io/1/datasets"
payload = {
"name": "<string>",
"description": "A nice description of my dataset",
"expand_json_depth": 3
}
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({
name: '<string>',
description: 'A nice description of my dataset',
expand_json_depth: 3
})
};
fetch('https://api.honeycomb.io/1/datasets', 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/datasets",
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([
'name' => '<string>',
'description' => 'A nice description of my dataset',
'expand_json_depth' => 3
]),
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/datasets"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"A nice description of my dataset\",\n \"expand_json_depth\": 3\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/datasets")
.header("X-Honeycomb-Team", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"A nice description of my dataset\",\n \"expand_json_depth\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honeycomb.io/1/datasets")
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 \"name\": \"<string>\",\n \"description\": \"A nice description of my dataset\",\n \"expand_json_depth\": 3\n}"
response = http.request(request)
puts response.read_body{
"name": "My Dataset!",
"description": "A nice description of my dataset",
"settings": {
"delete_protected": true
},
"expand_json_depth": 3,
"slug": "my-dataset-",
"regular_columns_count": 100,
"last_written_at": "2022-07-21T18:39:23Z",
"created_at": "2022-09-22T17:32:11Z",
"dataset_type": "metrics"
}{
"name": "MyDataset!",
"slug": "mydataset-",
"description": "A nice description of my dataset",
"expand_json_depth": 3,
"created_at": "2022-07-21T18:39:23.000Z",
"last_written_at": null,
"regular_columns_count": 0
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "we could not create a dataset with that name"
}{
"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": "<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
The dataset will be created within the environment associated with your API key.
an object to send to the Dataset API via PUT
The name of the dataset.
1 - 255A description for the dataset.
1024"A nice description of my dataset"
The maximum unpacking depth of nested JSON fields.
0 <= x <= 103
Response
OK - Dataset already exists
Datasets are a collection of events from a specific source or related source.
The name of the dataset.
1 - 255"My Dataset!"
A description for the dataset.
1024"A nice description of my dataset"
Show child attributes
Show child attributes
The maximum unpacking depth of nested JSON fields.
0 <= x <= 103
The 'slug' of the dataset to be used in URLs.
"my-dataset-"
The total number of unique fields for this Dataset. The value will be null if the dataset does not contain any fields yet.
100
The ISO8601-formatted time when the dataset last received event data. The value will be null if no data has been received yet.
"2022-07-21T18:39:23Z"
The ISO8601-formatted time when the dataset was created.
"2022-09-22T17:32:11Z"
The type of data contained in the dataset. Only present for time-series metrics datasets.
metrics "metrics"