> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chronosphere.io/llms.txt
> Use this file to discover all available pages before exploring further.

# ReadMappingRule



## OpenAPI

````yaml openapi/api_v1_config_openapi3_DOCUMENTATION_ONLY.json GET /api/v1/config/mapping-rules/{slug}
openapi: 3.0.3
info:
  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:

    <a href="/api/v1/config/swagger.json">/api/v1/config/swagger.json</a>
  title: Config V1 API
  version: v1
servers:
  - url: https://{tenant}.chronosphere.io
    variables:
      tenant:
        default: tenant
        description: tenant ID assigned by the service provider
security:
  - ApiKeyAuth: []
tags:
  - name: ConfigV1
paths:
  /api/v1/config/mapping-rules/{slug}:
    get:
      tags:
        - MappingRule
      operationId: ReadMappingRule
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/configv1ReadMappingRuleResponse'
          description: A successful response.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiError'
          description: Cannot read the MappingRule because the slug does not exist.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiError'
          description: An unexpected error response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/genericError'
          description: An undefined error response.
components:
  schemas:
    configv1ReadMappingRuleResponse:
      properties:
        mapping_rule:
          $ref: '#/components/schemas/configv1MappingRule'
      type: object
    apiError:
      properties:
        message:
          description: An error message describing what went wrong.
          type: string
      type: object
    genericError:
      additionalProperties: true
      type: object
    configv1MappingRule:
      properties:
        aggregation_policy:
          allOf:
            - $ref: '#/components/schemas/MappingRuleAggregationPolicy'
          description: |-
            Specifies how to aggregate the metric. Cannot be set if the `drop`
            parameter is set.
        bucket_slug:
          description: The slug of the bucket the MappingRule belongs to.
          type: string
        created_at:
          description: >-
            Timestamp of when the MappingRule was created. Cannot be set by
            clients.
          format: date-time
          readOnly: true
          type: string
        drop:
          description: >-
            Specifies whether to drop the given set of metrics. Cannot be set if
            the

            `aggregation_policy` object is set.
          type: boolean
        filters:
          description: >-
            The filters that determine which metrics should have rules applied
            to them.

            To be considered a match, a metric must meet the criteria for all of
            the

            filters specified in this array.
          items:
            $ref: '#/components/schemas/configv1LabelFilter'
          type: array
        mode:
          allOf:
            - $ref: '#/components/schemas/configv1MappingRuleMode'
          description: >-
            The operational mode for this mapping rule. If set to `enabled`, the
            rule

            is applied. If set to `preview`, the rule is not applied, but
            shaping

            impact statistics for the rule are recorded. Default: `enabled`.
        name:
          description: >-
            The name of the MappingRule. You can modify this value after the
            MappingRule is created.
          type: string
        slug:
          description: >-
            The unique identifier of the MappingRule. If a `slug` isn't
            provided, one is generated based on the `name` field. You can't
            modify this field after the MappingRule is created.
          type: string
        updated_at:
          description: >-
            Timestamp of when the MappingRule was last updated. Cannot be set by
            clients.
          format: date-time
          readOnly: true
          type: string
      required:
        - filters
        - name
      type: object
    MappingRuleAggregationPolicy:
      properties:
        aggregation:
          allOf:
            - $ref: '#/components/schemas/configv1AggregationType'
          description: Defines the method by which metrics are aggregated.
        drop_timestamp:
          description: 'Deprecated: This parameter is no longer supported.'
          type: boolean
        interval:
          description: The interval between aggregated data points.
          type: string
        storage_policy:
          allOf:
            - $ref: '#/components/schemas/configv1MappingRuleStoragePolicy'
          description: 'Deprecated: Use `interval` instead.'
      type: object
    configv1LabelFilter:
      properties:
        name:
          description: The name of the label to match.
          example: job
          type: string
        value_glob:
          description: The glob value of the label to match.
          example: myservice*
          type: string
      type: object
    configv1MappingRuleMode:
      description: |2-
         - ENABLED: ENABLED rules are applied. Rules default to ENABLED.
         - PREVIEW: PREVIEW rules are not applied, but shaping impact stats
        for them rule are recorded.
      enum:
        - ENABLED
        - PREVIEW
      type: string
    configv1AggregationType:
      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
      type: string
    configv1MappingRuleStoragePolicy:
      properties:
        resolution:
          description: 'Deprecated: This parameter is no longer supported.'
          type: string
        retention:
          description: 'Deprecated: This parameter is no longer supported.'
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: Chronosphere API token
      in: header
      name: API-Token
      type: apiKey

````