Overview

Create dataset

Create dataset

POST/v2/datasets
Features

Send the token in the Authorization: Bearer API_TOKEN header. See Tokens for which token types this endpoint accepts.

Input7
Authorizationheaderrequired
Sent from your browser straight to the API — never to Docsbook, never stored.
referrerstring · body
(query) Referrer slug
descriptionstring · body
Dataset description
edgeDeploymentstring · body
Edge deployment of the dataset
kindstring · body
The kind of the dataset One of: otel:metrics:v1, otel:traces:v1, otel:logs:v1, axiom:events:v1.
namestring · bodyrequired
Dataset unique name
retentionDaysinteger · body
Number of days to retain data in the dataset
useRetentionPeriodboolean · body
Whether to use the retention period
Output14
canWriteboolean
Whether this dataset has write access
createdstring
The RFC3339-formatted time when the dataset was created.
descriptionstring
Dataset description
edgeDeploymentstring
Edge deployment of the dataset
edgeDeploymentUrlstring
URL of the edge deployment
idstring
Dataset ID
kindstring
The kind of the dataset One of: otel:metrics:v1, otel:traces:v1, otel:logs:v1, axiom:events:v1.
mapFieldsstring[]
namestring
Unique dataset name
retentionDaysinteger
Number of days to retain data in the dataset
sharedByOrgstring
ID of the org that shared this resource, if it's shared
updatedAtstring
The RFC3339-formatted time when the dataset was last updated.
useRetentionPeriodboolean
Whether to use the retention period
whostring
Name of the dataset creator
Responses
200Created
403Forbidden
Example input
curl -X POST 'https://api.axiom.co/v2/datasets' \
  -H 'Authorization: Bearer API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name":"string"}'
Example output
{
  "created": "2022-07-20T02:35:14.137Z",
  "description": "string",
  "id": "string",
  "kind": "axiom:events:v1",
  "name": "string",
  "updatedAt": "2022-07-20T02:35:14.137Z",
  "who": "string"
}

Updated

Was this page helpful?