---
title: "POST /api/v1/config/consumption-config"
method: POST
path: "/api/v1/config/consumption-config"
tags: ["ConsumptionConfig"]
---

# POST /api/v1/config/consumption-config

`POST /api/v1/config/consumption-config`

## Request body

- Configv1CreateConsumptionConfigRequest
  - `consumption_config` Configv1ConsumptionConfig
    - `created_at` string, date-time — Timestamp of when the ConsumptionConfig was created. Cannot be set by clients.
    - `partitions` ConsumptionConfigPartition[] — Partitions define non-overlapping groupings of telemetry data. Partitions are defined in order of precedence, where incoming requests are allocated to the first partition that matches. Requests that don't match any partition use an implicit `default` partition.
      - `filters` ConsumptionConfigPartitionFilter[], required — Criteria that defines which data matches the `partition`. Filters are concatenated together as implied `AND` operators. A request must match every filter to match the `partition`. At most one `IN` filter and one `NOT_IN` filter is allowed, since multiple filters of the same operator type are always reducible to a single filter.
        - `conditions` PartitionFilterCondition[] — Conditions for the query to match.
          - `dataset_slug` string — Deprecated. Use `log_filter`, `metric_filters`, or `trace_span_filters` instead.
          - `log_filter` 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.
          - `metric_filters` Configv1LabelFilter[] — If set, matches incoming metric data by label. If multiple label filters are specified, an incoming metric must match every label filter to match the condition. Label values support glob patterns, including matching multiple patterns with an `OR`, such as `service:{svc1,svc2}`. Exactly one of `log_filter`, `metric_filters`, or `trace_span_filters` must be set.
            - `name` string — The name of the label to match.
            - `value_glob` string — The glob value of the label to match.
          - `trace_span_filters` Configv1ConsumptionSpanFilter[] — If set, matches incoming trace data at the span level: a span matches the condition only if it satisfies every span filter. Match alternatives with an `IN` string filter or with separate conditions. Exactly one of `log_filter`, `metric_filters`, or `trace_span_filters` must be set.
            - `duration` TraceSearchFilterDurationFilter
              - …
            - `error` TraceSearchFilterBoolFilter
              - …
            - `is_root_span` TraceSearchFilterBoolFilter
              - …
            - `operation` TraceSearchFilterStringFilter
              - …
            - `parent_operation` TraceSearchFilterStringFilter
              - …
            - `parent_service` TraceSearchFilterStringFilter
              - …
            - `service` TraceSearchFilterStringFilter
              - …
            - `tags` TraceSearchFilterTagFilter[] — Matches the tags of the candidate span. A numeric matcher also compares numeric-looking string tag values. To match alternatives, use separate conditions.
              - …
        - `operator` 'IN' | 'NOT_IN', required
      - `name` string — Name of the partition. Must be unique within the parent partition. You can modify this value after the partition is created.
      - `partitions` ConsumptionConfigPartition[] — Optional. Child partitions of this partition. If set, requests that match the current partition are allocated to the first child partition that matches. Requests that don't match any child partition are assigned to an implicit `default` child partition.
      - `slug` string — Immutable identifier of the partition. Must be unique within the parent partition. You can't modify this value after the partition is created.
    - `updated_at` string, date-time — Timestamp of when the ConsumptionConfig was last updated. Cannot be set by clients.
  - `dry_run` boolean — If `true`, validates the specified configuration without creating the ConsumptionConfig. If the specified configuration is valid, the endpoint returns a partial response without the ConsumptionConfig. If the specified configuration is invalid, the endpoint returns an error.

## Response `200`

A successful response containing the created ConsumptionConfig.

- Configv1CreateConsumptionConfigResponse
  - `consumption_config` Configv1ConsumptionConfig
    - `created_at` string, date-time — Timestamp of when the ConsumptionConfig was created. Cannot be set by clients.
    - `partitions` ConsumptionConfigPartition[] — Partitions define non-overlapping groupings of telemetry data. Partitions are defined in order of precedence, where incoming requests are allocated to the first partition that matches. Requests that don't match any partition use an implicit `default` partition.
      - `filters` ConsumptionConfigPartitionFilter[], required — Criteria that defines which data matches the `partition`. Filters are concatenated together as implied `AND` operators. A request must match every filter to match the `partition`. At most one `IN` filter and one `NOT_IN` filter is allowed, since multiple filters of the same operator type are always reducible to a single filter.
        - `conditions` PartitionFilterCondition[] — Conditions for the query to match.
          - `dataset_slug` string — Deprecated. Use `log_filter`, `metric_filters`, or `trace_span_filters` instead.
          - `log_filter` 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.
          - `metric_filters` Configv1LabelFilter[] — If set, matches incoming metric data by label. If multiple label filters are specified, an incoming metric must match every label filter to match the condition. Label values support glob patterns, including matching multiple patterns with an `OR`, such as `service:{svc1,svc2}`. Exactly one of `log_filter`, `metric_filters`, or `trace_span_filters` must be set.
            - `name` string — The name of the label to match.
            - `value_glob` string — The glob value of the label to match.
          - `trace_span_filters` Configv1ConsumptionSpanFilter[] — If set, matches incoming trace data at the span level: a span matches the condition only if it satisfies every span filter. Match alternatives with an `IN` string filter or with separate conditions. Exactly one of `log_filter`, `metric_filters`, or `trace_span_filters` must be set.
            - `duration` TraceSearchFilterDurationFilter
              - …
            - `error` TraceSearchFilterBoolFilter
              - …
            - `is_root_span` TraceSearchFilterBoolFilter
              - …
            - `operation` TraceSearchFilterStringFilter
              - …
            - `parent_operation` TraceSearchFilterStringFilter
              - …
            - `parent_service` TraceSearchFilterStringFilter
              - …
            - `service` TraceSearchFilterStringFilter
              - …
            - `tags` TraceSearchFilterTagFilter[] — Matches the tags of the candidate span. A numeric matcher also compares numeric-looking string tag values. To match alternatives, use separate conditions.
              - …
        - `operator` 'IN' | 'NOT_IN', required
      - `name` string — Name of the partition. Must be unique within the parent partition. You can modify this value after the partition is created.
      - `partitions` ConsumptionConfigPartition[] — Optional. Child partitions of this partition. If set, requests that match the current partition are allocated to the first child partition that matches. Requests that don't match any child partition are assigned to an implicit `default` child partition.
      - `slug` string — Immutable identifier of the partition. Must be unique within the parent partition. You can't modify this value after the partition is created.
    - `updated_at` string, date-time — Timestamp of when the ConsumptionConfig was last updated. Cannot be set by clients.

## Other responses

- `400` — Cannot create the ConsumptionConfig because the request is invalid.
- `409` — Cannot create the ConsumptionConfig because there is a conflict with an existing ConsumptionConfig.
- `500` — An unexpected error response.
- `default` — An undefined error response.

---

[API](https://skmtc.dev/chronosphere/apis/data-v1-api.md) · [All operations](https://skmtc.dev/chronosphere/apis/data-v1-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/chronosphere/data-v1-api/revisions/ee91fd539ced/schema)
