Datasets API | Honeycomb

We use cookies or similar technologies to personalize your online experience & tailor marketing to you. Many of our product features require cookies to function properly.

Read our privacy policy I accept cookies from this site

Datasets API

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.

Authorization and Headers 

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.

Create a Dataset 

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.

Create Example Request 

curl https://api.honeycomb.io/1/datasets \
    -X POST \
    -H "X-Honeycomb-Team: YOUR_API_KEY" \
    -d '{"name": "my dataset!"}'

Create Example Response 

{
  "name": "my dataset!",
  "slug": "my-dataset-"
}

Get One Dataset 

A singular Dataset may be retrieved by sending a GET request to /1/datasets/$DATASET_SLUG.

Get One Example Request 

curl https://api.honeycomb.io/1/datasets/my-dataset- \
    -X GET \
    -H "X-Honeycomb-Team: YOUR_API_KEY"

Get One Example Response 

{
  "name": "my dataset!",
  "slug": "my-dataset-"
}

Get All Datasets 

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.

Get All Example Request 

curl https://api.honeycomb.io/1/datasets \
    -X GET \
    -H "X-Honeycomb-Team: YOUR_API_KEY"

Get All Example Response 

[
  {
    "name": "my dataset!",
    "slug": "my-dataset-"
  }
]

Did you find what you were looking for?