Skip to main content
POST
/
1
/
datasets
Create a Dataset
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
}
'
{
  "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"
}

Authorizations

X-Honeycomb-Team
string
header
required

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

application/json

The dataset will be created within the environment associated with your API key.

an object to send to the Dataset API via PUT

name
string
required

The name of the dataset.

Required string length: 1 - 255
description
string
default:""

A description for the dataset.

Maximum string length: 1024
Example:

"A nice description of my dataset"

expand_json_depth
integer
default:0

The maximum unpacking depth of nested JSON fields.

Required range: 0 <= x <= 10
Example:

3

Response

OK - Dataset already exists

Datasets are a collection of events from a specific source or related source.

name
string
required

The name of the dataset.

Required string length: 1 - 255
Example:

"My Dataset!"

description
string
default:""

A description for the dataset.

Maximum string length: 1024
Example:

"A nice description of my dataset"

settings
object
expand_json_depth
integer
default:0

The maximum unpacking depth of nested JSON fields.

Required range: 0 <= x <= 10
Example:

3

slug
string
read-only

The 'slug' of the dataset to be used in URLs.

Example:

"my-dataset-"

regular_columns_count
null | integer
read-only

The total number of unique fields for this Dataset. The value will be null if the dataset does not contain any fields yet.

Example:

100

last_written_at
null | string
read-only

The ISO8601-formatted time when the dataset last received event data. The value will be null if no data has been received yet.

Example:

"2022-07-21T18:39:23Z"

created_at
string
read-only

The ISO8601-formatted time when the dataset was created.

Example:

"2022-09-22T17:32:11Z"

dataset_type
enum<string>
read-only

The type of data contained in the dataset. Only present for time-series metrics datasets.

Available options:
metrics
Example:

"metrics"