This API allows you to create a dataset. Datasets are created automatically for you when events are received. The intended use case of this API is for creating a dataset programmatically in a Config-as-Code/Infrastructure-as-Code context as a preface to using the Columns or Derived Columns APIs.
The only expected header is X-Honeycomb-Team
,
which is your API key, and it is required.
The API key must have the Create Datasets permission.
Learn more about API keys.
Datasets are created by sending a POST request to /1/datasets
.
The dataset will be created within the environment associated with your API key.
The body should be a JSON encoded object containing a name
.
Response status should be 201
, and the body will contain the created dataset, including its slug.
curl https://api.honeycomb.io/1/datasets \
-X POST \
-H "X-Honeycomb-Team: YOUR_API_KEY" \
-d '{"name": "my dataset!"}'
{
"name": "my dataset!",
"slug": "my-dataset-"
}
A singular Dataset may be retrieved by sending a GET
request to /1/datasets/$DATASET_SLUG
.
curl https://api.honeycomb.io/1/datasets/my-dataset- \
-X GET \
-H "X-Honeycomb-Team: YOUR_API_KEY"
{
"name": "my dataset!",
"slug": "my-dataset-"
}
All Datasets for an environment may be retrieved by sending a GET
request to /1/datasets
.
In Honeycomb Classic, all datasets in Classic are returned.
curl https://api.honeycomb.io/1/datasets \
-X GET \
-H "X-Honeycomb-Team: YOUR_API_KEY"
[
{
"name": "my dataset!",
"slug": "my-dataset-"
}
]
Did you find what you were looking for?