---
title: "PUT /api/v1/config/datasets/{slug}"
method: PUT
path: "/api/v1/config/datasets/{slug}"
tags: ["Dataset"]
---

# PUT /api/v1/config/datasets/{slug}

`PUT /api/v1/config/datasets/{slug}`

## Path parameters

- `slug` string, required

## Request body

- ConfigV1UpdateDatasetBody
  - `dataset` Configv1Dataset
    - `name` string — Required. Name of the Dataset. You can modify this value after the Dataset is created.
    - `slug` string — Unique identifier of the Dataset. If a `slug` isn't provided, one will be generated based of the `name` field. You can't modify this field after the Dataset is created.
    - `created_at` string, date-time — Timestamp of when the Dataset was created. Cannot be set by clients.
    - `updated_at` string, date-time — Timestamp of when the Dataset was last updated. Cannot be set by clients.
    - `description` string — Required. Description of the dataset.
    - `configuration` DatasetDatasetConfiguration
      - `type` 'TRACES' | 'LOGS'
      - `trace_dataset` Configv1TraceDataset
        - `match_criteria` Configv1TraceSearchFilter
          - `trace` TraceSearchFilterTraceFilter
            - `duration` TraceSearchFilterDurationFilter
              - …
            - `error` TraceSearchFilterBoolFilter
              - …
          - `span` TraceSearchFilterSpanFilter[] — Specifies the span conditions to match on. All conditions must be true in a single span for the span to be considered a match. If `span_count` is specified, the number of spans within the trace that match span conditions must be within `[min, max]`. You can specify multiple span conditions, and each can be satisfied by any number of spans within the trace.
            - `match_type` 'INCLUDE' | 'EXCLUDE'
            - `service` TraceSearchFilterStringFilter
              - …
            - `operation` TraceSearchFilterStringFilter
              - …
            - `parent_service` TraceSearchFilterStringFilter
              - …
            - `parent_operation` TraceSearchFilterStringFilter
              - …
            - `duration` TraceSearchFilterDurationFilter
              - …
            - `error` TraceSearchFilterBoolFilter
              - …
            - `tags` TraceSearchFilterTagFilter[] — Matches the tags of the candidate span.
              - …
            - `span_count` TraceSearchFilterCountFilter
              - …
            - `is_root_span` TraceSearchFilterBoolFilter
              - …
      - `log_dataset` Configv1LogDataset
        - `match_criteria` Configv1LogSearchFilter
          - `query` string — Returns logs that match this query. The query can include only top-level operations. Nested clauses aren't supported. Only one type of `AND` or `OR` operator is allowed.
  - `create_if_missing` boolean — If true, the Dataset will be created if it does not already exist, identified by slug. If false, an error will be returned if the Dataset does not already exist.
  - `dry_run` boolean — If true, the Dataset isn't created or updated, and no response Dataset will be returned. The response will return an error if the given Dataset is invalid.

## Response `200`

A successful response containing the updated Dataset.

- Configv1UpdateDatasetResponse
  - `dataset` Configv1Dataset
    - `name` string — Required. Name of the Dataset. You can modify this value after the Dataset is created.
    - `slug` string — Unique identifier of the Dataset. If a `slug` isn't provided, one will be generated based of the `name` field. You can't modify this field after the Dataset is created.
    - `created_at` string, date-time — Timestamp of when the Dataset was created. Cannot be set by clients.
    - `updated_at` string, date-time — Timestamp of when the Dataset was last updated. Cannot be set by clients.
    - `description` string — Required. Description of the dataset.
    - `configuration` DatasetDatasetConfiguration
      - `type` 'TRACES' | 'LOGS'
      - `trace_dataset` Configv1TraceDataset
        - `match_criteria` Configv1TraceSearchFilter
          - `trace` TraceSearchFilterTraceFilter
            - `duration` TraceSearchFilterDurationFilter
              - …
            - `error` TraceSearchFilterBoolFilter
              - …
          - `span` TraceSearchFilterSpanFilter[] — Specifies the span conditions to match on. All conditions must be true in a single span for the span to be considered a match. If `span_count` is specified, the number of spans within the trace that match span conditions must be within `[min, max]`. You can specify multiple span conditions, and each can be satisfied by any number of spans within the trace.
            - `match_type` 'INCLUDE' | 'EXCLUDE'
            - `service` TraceSearchFilterStringFilter
              - …
            - `operation` TraceSearchFilterStringFilter
              - …
            - `parent_service` TraceSearchFilterStringFilter
              - …
            - `parent_operation` TraceSearchFilterStringFilter
              - …
            - `duration` TraceSearchFilterDurationFilter
              - …
            - `error` TraceSearchFilterBoolFilter
              - …
            - `tags` TraceSearchFilterTagFilter[] — Matches the tags of the candidate span.
              - …
            - `span_count` TraceSearchFilterCountFilter
              - …
            - `is_root_span` TraceSearchFilterBoolFilter
              - …
      - `log_dataset` Configv1LogDataset
        - `match_criteria` Configv1LogSearchFilter
          - `query` string — Returns logs that match this query. The query can include only top-level operations. Nested clauses aren't supported. Only one type of `AND` or `OR` operator is allowed.

## Other responses

- `400` — Cannot update the Dataset because the request is invalid.
- `404` — Cannot update the Dataset because the slug does not exist.
- `409` — Cannot update the Dataset because there is a conflict with an existing Dataset.
- `500` — An unexpected error response.
- `default` — An undefined error response.

---

[API](https://skmtc.net/chronosphere/apis/config-v1-api.md) · [All operations](https://skmtc.net/chronosphere/apis/config-v1-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/chronosphere/config-v1-api/versions/530951bd2ccf/schema)
