Generated at:
Create a dataset
/api/datasetsCreates a dataset. The slug supplied as metadata.labels["dash0.com/id"] is the dataset's
permanent identifier and cannot be changed afterwards. A slug or origin that is already in
use, as a slug or as an origin, in your organization is rejected with 400.
Creating a dataset whose slug belongs to a deleted dataset restores it. A restore sets the
origin like a create: the origin in the request; else an api-<uuid> origin for a machine
token that has no user; else none, and the old origin is dropped.
spec.permissions sets the dataset's grants. Without it, the organization's members get
dataset:read. A restore with spec.permissions replaces the deleted dataset's grants;
without it, they come back as they were.
apiVersion is required. A missing or unsupported value returns 400.
Sample requestcurl --request POST 'https://api.eu-west-1.aws.dash0.com/api/datasets' \
--header "Authorization: Bearer ${DASH0_AUTH_TOKEN}" \
--header 'Content-Type: application/json' \
--data-raw '{
"apiVersion": "dash0.com/v1alpha1",
"kind": "Dash0Dataset",
"metadata": {
"name": "Example"
},
"spec": {}
}'Request body required
A Dash0 dataset. See Datasets.
Version of the dataset document format. The only supported value is dash0.com/v1alpha1.
"Dash0Dataset"Every field is optional. A field omitted on create takes the server default; a field omitted on update keeps its stored value. Enumerations may gain values in later versions, so clients must accept values they do not recognize.
Responses
The dataset was created.
A Dash0 dataset. See Datasets.
Version of the dataset document format. The only supported value is dash0.com/v1alpha1.
"Dash0Dataset"Every field is optional. A field omitted on create takes the server default; a field omitted on update keeps its stored value. Enumerations may gain values in later versions, so clients must accept values they do not recognize.