> ## 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.

# ReadDerivedLabel



## OpenAPI

````yaml openapi/api_v1_config_openapi3_DOCUMENTATION_ONLY.json GET /api/v1/config/derived-labels/{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/derived-labels/{slug}:
    get:
      tags:
        - DerivedLabel
      operationId: ReadDerivedLabel
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/configv1ReadDerivedLabelResponse'
          description: A successful response.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiError'
          description: Cannot read the DerivedLabel 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:
    configv1ReadDerivedLabelResponse:
      properties:
        derived_label:
          $ref: '#/components/schemas/configv1DerivedLabel'
      type: object
    apiError:
      properties:
        message:
          description: An error message describing what went wrong.
          type: string
      type: object
    genericError:
      additionalProperties: true
      type: object
    configv1DerivedLabel:
      properties:
        created_at:
          description: >-
            Timestamp of when the DerivedLabel was created. Cannot be set by
            clients.
          format: date-time
          readOnly: true
          type: string
        description:
          description: Optional. Description of the derived label.
          type: string
        existing_label_policy:
          allOf:
            - $ref: '#/components/schemas/configv1DerivedLabelLabelPolicy'
          description: >-
            Specifies the action taken when there's a metric label with the same
            name as

            this derived label, on the same time series. If the label is present
            on another

            time series, this field doesn't apply. Default: `KEEP`.

            - If set to `KEEP`, the label that already exists on the metric is
            used instead of the derived label.

            - If set to `OVERRIDE`, the derived label is used instead of the
            metric's existing label.
        label_name:
          description: Name of the derived label. Must be unique across the system.
          type: string
        metric_label:
          allOf:
            - $ref: '#/components/schemas/DerivedLabelMetricLabel'
          description: Sets the metric labels to map to `label_name`.
        name:
          description: >-
            The name of the DerivedLabel. You can modify this value after the
            DerivedLabel is created.
          type: string
        slug:
          description: >-
            The unique identifier of the DerivedLabel. If a `slug` isn't
            provided, one is generated based on the `name` field. You can't
            modify this field after the DerivedLabel is created.
          type: string
        span_tag:
          allOf:
            - $ref: '#/components/schemas/DerivedLabelSpanTag'
          description: Sets the span tags to map to `label_name`.
        updated_at:
          description: >-
            Timestamp of when the DerivedLabel was last updated. Cannot be set
            by clients.
          format: date-time
          readOnly: true
          type: string
      required:
        - label_name
        - name
      type: object
    configv1DerivedLabelLabelPolicy:
      enum:
        - KEEP
        - OVERRIDE
      type: string
    DerivedLabelMetricLabel:
      properties:
        constructed_label:
          allOf:
            - $ref: '#/components/schemas/MetricLabelConstructedLabel'
          description: >-
            A constructed label creates a label where none previously existed,
            in contrast

            to a mapping derived label. For example, this mapping constructs a
            label

            that's defined only when an `instance` begins with

            `m3coordinator-{read,write,admin}`, and where the value is
            statically

            defined.

            ```yaml

            label_name: tier

            constructed_label:
              value_definitions:
                 - filters:
                    - name: instance
                      value_glob: m3coordinator-read*
                   value: read
                 - filters:
                    - name: instance
                      value_glob: m3coordinator-write*
                   value: write
                 - filters:
                    - name: instance
                      value_glob: m3coordinator-admin*
                   value: admin
            ```
        mapping_label:
          allOf:
            - $ref: '#/components/schemas/MetricLabelMappingLabel'
          description: >-
            A mapping label is a type of derived label that's generated by
            pulling values

            from some other label on the time series. For example, this mapping
            matches a

            label that's defined only when `__name__` begins with `envoy_` or
            `grpc_,` and

            where the value is copied from `backend_service` or `grpc_service`:

            ```yaml

            label_name: chronosphere_service

            mapping_label:
              name_mappings:
                 - filters:
                    - name: __name__
                      value_glob: grpc_*
                   source_label: grpc_service
                 - filters:
                    - name: __name__
                      value_glob: envoy_*
                   source_label: backend_service
            ```
      type: object
    DerivedLabelSpanTag:
      properties:
        name_mappings:
          description: >-
            Determines where the input data for a derived label comes from. For
            each

            name mapping, you must define a `source_label`. If multiple name
            mappings

            are defined, the first name mapping that matches is used to map the
            source

            tag to the derived tag.
          items:
            $ref: '#/components/schemas/DerivedLabelSpanTagNameMapping'
          type: array
      type: object
    MetricLabelConstructedLabel:
      properties:
        value_definitions:
          items:
            $ref: '#/components/schemas/ConstructedLabelValueDefinition'
          type: array
      type: object
    MetricLabelMappingLabel:
      properties:
        name_mappings:
          description: >-
            Determines where the input data for a derived label comes from. For
            each

            name mapping, you must define a `source_label`. If multiple name
            mappings

            are defined, the first name mapping that matches is used to map the
            source

            label to the derived label.
          items:
            $ref: '#/components/schemas/MetricLabelMappingLabelNameMapping'
          type: array
        value_mappings:
          description: >-
            These value mappings apply to the whole mapping label.

            If there's no name_mappings, these value mappings apply to the label
            that exists on the metric.
          items:
            $ref: '#/components/schemas/MappingLabelValueMapping'
          type: array
      required:
        - name_mappings
      type: object
    DerivedLabelSpanTagNameMapping:
      properties:
        source_tag:
          description: The source span tag name.
          type: string
      type: object
    ConstructedLabelValueDefinition:
      properties:
        filters:
          description: >-
            Determine when to apply `name_mappings`, filtering out all other
            values.
          items:
            $ref: '#/components/schemas/configv1LabelFilter'
          type: array
        value:
          type: string
      type: object
    MetricLabelMappingLabelNameMapping:
      properties:
        filters:
          items:
            $ref: '#/components/schemas/configv1LabelFilter'
          type: array
        source_label:
          description: The source label name on the time series from when it was ingested.
          type: string
        value_mappings:
          description: These value mappings apply only to the name mapping they belong to.
          items:
            $ref: '#/components/schemas/MappingLabelValueMapping'
          type: array
      type: object
    MappingLabelValueMapping:
      properties:
        source_value_globs:
          description: >-
            Defines the source label values that map into the given
            `target_value`.
          items:
            type: string
          type: array
        target_value:
          description: >-
            The value that `source_value_globs` are mapped into. For example,
            this

            mapping indicates that the target value `cat` maps to the source
            label's

            values of `Cat` and `CAT`.:

            ```yaml

            value_mappings:
             - source_value_globs:
                 - Cat
                 - CAT
               target_value: cat
            ```
          type: string
      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
  securitySchemes:
    ApiKeyAuth:
      description: Chronosphere API token
      in: header
      name: API-Token
      type: apiKey

````