openapi: 3.0.1 info: title: Config V1 Bucket RollupRule API description: ' The Config API provides standard HTTP/JSON REST endpoints for creating, reading, updating, deleting, and listing configurable Chronosphere resources. Use this link to download the raw Swagger specification: /api/v1/config/swagger.json ' version: v1 servers: - url: / tags: - name: RollupRule paths: /api/v1/config/rollup-rules: get: tags: - RollupRule operationId: ListRollupRules parameters: - name: page.max_size in: query description: 'Page size preference (i.e. how many items are returned in the next page). If zero, the server will use a default. Regardless of what size is given, clients must never assume how many items will be returned.' schema: type: integer format: int64 - name: page.token in: query description: 'Opaque page token identifying which page to request. An empty token identifies the first page.' schema: type: string - name: slugs in: query description: Filters results by slug, where any RollupRule with a matching slug in the given list (and matches all other filters) is returned. style: form explode: true schema: type: array items: type: string - name: names in: query description: Filters results by name, where any RollupRule with a matching name in the given list (and matches all other filters) is returned. style: form explode: true schema: type: array items: type: string - name: bucket_slugs in: query description: Filters results by bucket_slug, where any RollupRule with a matching bucket_slug in the given list (and matches all other filters) is returned. style: form explode: true schema: type: array items: type: string responses: '200': description: A successful response. content: application/json: schema: $ref: '#/components/schemas/configv1ListRollupRulesResponse' '500': description: An unexpected error response. content: application/json: schema: $ref: '#/components/schemas/apiError' default: description: An undefined error response. content: application/json: schema: $ref: '#/components/schemas/genericError' post: tags: - RollupRule operationId: CreateRollupRule requestBody: content: application/json: schema: $ref: '#/components/schemas/configv1CreateRollupRuleRequest' required: true responses: '200': description: A successful response containing the created RollupRule. content: application/json: schema: $ref: '#/components/schemas/configv1CreateRollupRuleResponse' '400': description: Cannot create the RollupRule because the request is invalid. content: application/json: schema: $ref: '#/components/schemas/apiError' '409': description: Cannot create the RollupRule because there is a conflict with an existing RollupRule. content: application/json: schema: $ref: '#/components/schemas/apiError' '500': description: An unexpected error response. content: application/json: schema: $ref: '#/components/schemas/apiError' default: description: An undefined error response. content: application/json: schema: $ref: '#/components/schemas/genericError' x-codegen-request-body-name: body /api/v1/config/rollup-rules/{slug}: get: tags: - RollupRule operationId: ReadRollupRule parameters: - name: slug in: path required: true schema: type: string responses: '200': description: A successful response. content: application/json: schema: $ref: '#/components/schemas/configv1ReadRollupRuleResponse' '404': description: Cannot read the RollupRule because the slug does not exist. content: application/json: schema: $ref: '#/components/schemas/apiError' '500': description: An unexpected error response. content: application/json: schema: $ref: '#/components/schemas/apiError' default: description: An undefined error response. content: application/json: schema: $ref: '#/components/schemas/genericError' put: tags: - RollupRule operationId: UpdateRollupRule parameters: - name: slug in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/ConfigV1UpdateRollupRuleBody' required: true responses: '200': description: A successful response containing the updated RollupRule. content: application/json: schema: $ref: '#/components/schemas/configv1UpdateRollupRuleResponse' '400': description: Cannot update the RollupRule because the request is invalid. content: application/json: schema: $ref: '#/components/schemas/apiError' '404': description: Cannot update the RollupRule because the slug does not exist. content: application/json: schema: $ref: '#/components/schemas/apiError' '409': description: Cannot update the RollupRule because there is a conflict with an existing RollupRule. content: application/json: schema: $ref: '#/components/schemas/apiError' '500': description: An unexpected error response. content: application/json: schema: $ref: '#/components/schemas/apiError' default: description: An undefined error response. content: application/json: schema: $ref: '#/components/schemas/genericError' x-codegen-request-body-name: body delete: tags: - RollupRule operationId: DeleteRollupRule parameters: - name: slug in: path required: true schema: type: string responses: '200': description: A successful response. content: application/json: schema: $ref: '#/components/schemas/configv1DeleteRollupRuleResponse' '400': description: Cannot delete the RollupRule because it is in use. content: application/json: schema: $ref: '#/components/schemas/apiError' '404': description: Cannot delete the RollupRule because the slug does not exist. content: application/json: schema: $ref: '#/components/schemas/apiError' '500': description: An unexpected error response. content: application/json: schema: $ref: '#/components/schemas/apiError' default: description: An undefined error response. content: application/json: schema: $ref: '#/components/schemas/genericError' components: schemas: configv1AggregationType: type: string enum: - LAST - MIN - MAX - MEAN - MEDIAN - COUNT - SUM - SUMSQ - STDEV - P10 - P20 - P30 - P40 - P50 - P60 - P70 - P80 - P90 - P95 - P99 - P999 - P9999 - P25 - P75 - COUNT_SAMPLES - HISTOGRAM configv1RollupRuleLabelPolicy: type: object properties: keep: type: array description: 'Labels that should be retained in the output metric. If set, then the discard field must be empty.' items: type: string discard: type: array description: 'Labels that should be discarded in the output metric. If set, then the keep field must be empty.' items: type: string description: "TODO: consolidate w/ RecordingRule.LabelPolicy once both of these\n entities implement the same label semantics." GraphiteLabelPolicyReplace: type: object properties: name: type: string description: 'Required name of the label whose value should be replaced. Only `__gX__` labels are allowed (aka positional Graphite labels).' example: __g1__ new_value: type: string description: Required new value of the replaced label. example: ALL_HOSTS ConfigV1UpdateRollupRuleBody: type: object properties: rollup_rule: $ref: '#/components/schemas/configv1RollupRule' create_if_missing: type: boolean description: If true, the RollupRule will be created if it does not already exist, identified by slug. If false, an error will be returned if the RollupRule does not already exist. dry_run: type: boolean description: If true, the RollupRule isn't created or updated, and no response RollupRule will be returned. The response will return an error if the given RollupRule is invalid. configv1RollupRuleMode: title: '- PREVIEW: TODO: DISABLED = 2;' type: string enum: - ENABLED - PREVIEW RollupRuleLabelReplace: type: object description: 'Must keep this around for backwards compatibility because terraform will still send this key w/ a null value.' genericError: type: object additionalProperties: true configv1RollupRuleStoragePolicy: type: object properties: resolution: type: string description: Required resolution of the aggregated metrics. retention: type: string description: Required retention of the aggregated metrics. configv1RollupRule: type: object properties: slug: type: string description: Unique identifier of the RollupRule. If a `slug` isn't provided, one will be generated based of the `name` field. You can't modify this field after the RollupRule is created. name: type: string description: Required. Name of the RollupRule. You can modify this value after the RollupRule is created. created_at: type: string description: Timestamp of when the RollupRule was created. Cannot be set by clients. format: date-time readOnly: true updated_at: type: string description: Timestamp of when the RollupRule was last updated. Cannot be set by clients. format: date-time readOnly: true bucket_slug: type: string description: Required. Slug of the bucket the RollupRule belongs to. filters: type: array description: "Filters incoming metrics by label. If multiple label filters are specified, an\nincoming metric must match every label filter to match the rule. Label values\nsupport glob patterns, including matching multiple patterns with an `OR`, such\nas `service:{svc1,svc2}`. These special filters are available for matching\nmetrics by non-label request metadata:\n * `__metric_type__`: Matches the incoming metric's [Observability Platform\n metric\n type](https://docs.chronosphere.io/control/shaping/types#observability-platform-types).\n This is the recommended method for filtering on metric type. Valid values:\n `cumulative_counter`, `cumulative_exponential_histogram`, `delta_counter`,\n `delta_exponential_histogram`, `gauge`, `measurement`.\n * `__metric_source__`: Matches the incoming metric's [source\n format](https://docs.chronosphere.io/control/shaping/types#supported-formats).\n Valid values: `carbon`, `chrono_gcp`, `dogstatsd`, `open_metrics`,\n `open_telemetry`, `prometheus`, `signalfx`, `statsd`, `wavefront`.\n * `__m3_prom_type__`: When ingesting with Prometheus, matches the incoming\n metric's [Prometheus metric\n type](https://docs.chronosphere.io/control/shaping/types#prometheus). Valid\n values: `counter`, `gauge`, `histogram`, `gauge_histogram`, `summary`,\n `info`, `state_set`, `quantile`.\n * `__otel_type__`: When ingesting with OpenTelemetry, matches on the incoming\n metric's [OpenTelemetry metric type](https://docs.chronosphere.io/control/shaping/types#opentelemetry).\n Valid values: `sum`, `monotonic_sum`, `gauge`, `histogram`, `exp_histogram`,\n `summary`.\nFor example, the following filter matches any cumulative counter metric with a\n`service=gateway` label whose metric name starts with `http_requests_`:\n```\n__metric_type__:cumulative_counter service:gateway __name__:http_requests_*\n```" items: $ref: '#/components/schemas/configv1LabelFilter' metric_name: type: string description: This field is optional for Graphite rollup rules. metric_type: $ref: '#/components/schemas/RollupRuleMetricType' aggregation: $ref: '#/components/schemas/configv1AggregationType' storage_policy: $ref: '#/components/schemas/configv1RollupRuleStoragePolicy' interval: type: string description: 'The distance in time between aggregated data points. Intervals are based on your [retention policy](https://docs.chronosphere.io/administer/licensing#retention-policies). Use this optional field to set a custom interval. This field was known as `storage_policies` in version 0.286.0-2023-01-06-release.1 and earlier.' expansive_match: type: boolean description: 'DEPRECATED. A series matches and aggregates only if each label defined by filters and `label_policy.keep` or `graphite_label_policy.replace` (respectively) exist in the series. Setting `expansive_match=true` removes this restriction. Default: `expansive_match=false`. If `false`, a series matches and aggregates only if each label defined by the provided `filters` and the `label_policy.keep` or `graphite_label_policy.replace` settings exist in the series.' add_metric_type_label: type: boolean description: Defines whether to add a `__rollup_type__` label in the new metric. drop_raw: type: boolean description: 'Defines whether to automatically generate drop rules for this rollup rule. Set to `true` to remove raw metrics that match this rollup rule. Default: `false`.' label_policy: $ref: '#/components/schemas/configv1RollupRuleLabelPolicy' label_replace: $ref: '#/components/schemas/RollupRuleLabelReplace' mode: $ref: '#/components/schemas/configv1RollupRuleMode' graphite_label_policy: $ref: '#/components/schemas/RollupRuleGraphiteLabelPolicy' RollupRuleMetricType: type: string description: " - CUMULATIVE_COUNTER: Alias of COUNTER.\n - DELTA_COUNTER: Alias of DELTA." enum: - COUNTER - GAUGE - DELTA - DISTRIBUTION - CUMULATIVE_EXPONENTIAL_HISTOGRAM - MEASUREMENT - CUMULATIVE_COUNTER - DELTA_COUNTER - DELTA_EXPONENTIAL_HISTOGRAM configv1ReadRollupRuleResponse: type: object properties: rollup_rule: $ref: '#/components/schemas/configv1RollupRule' apiError: type: object properties: code: type: integer description: An optional private error code whose values are undefined. format: int32 message: type: string description: An error message describing what went wrong. configv1CreateRollupRuleResponse: type: object properties: rollup_rule: $ref: '#/components/schemas/configv1RollupRule' configv1DeleteRollupRuleResponse: type: object configv1CreateRollupRuleRequest: type: object properties: rollup_rule: $ref: '#/components/schemas/configv1RollupRule' dry_run: type: boolean description: If true, the RollupRule isn't created, and no response RollupRule will be returned. The response will return an error if the given RollupRule is invalid. configv1PageResult: type: object properties: next_token: type: string description: 'Opaque page token which identifies the next page of items which the client should request. An empty next_token indicates that there are no more items to return.' RollupRuleGraphiteLabelPolicy: type: object properties: replace: type: array description: 'Required list of labels to replace. Useful for discarding high-cardinality values while still preserving the original positions of the Graphite metric.' items: $ref: '#/components/schemas/GraphiteLabelPolicyReplace' configv1LabelFilter: type: object properties: name: type: string description: Name of the label to match. example: job value_glob: type: string description: Glob value of the label to match. example: myservice* configv1ListRollupRulesResponse: type: object properties: page: $ref: '#/components/schemas/configv1PageResult' rollup_rules: type: array items: $ref: '#/components/schemas/configv1RollupRule' configv1UpdateRollupRuleResponse: type: object properties: rollup_rule: $ref: '#/components/schemas/configv1RollupRule' x-original-swagger-version: '2.0'