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

# ListRecordingRules



## OpenAPI

````yaml openapi/api_v1_config_openapi3_DOCUMENTATION_ONLY.json GET /api/v1/config/recording-rules
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/recording-rules:
    get:
      tags:
        - RecordingRule
      operationId: ListRecordingRules
      parameters:
        - description: >-
            Sets the preferred number of items to return per page. If set to
            `0`, the

            server will use its default value. Regardless of the value
            specified, clients

            must never assume how many items will be returned.
          in: query
          name: page.max_size
          schema:
            format: int64
            type: integer
        - description: >-
            An opaque page token that identifies which page the client should
            request.

            An empty value indicates the first page.
          in: query
          name: page.token
          schema:
            type: string
        - description: >-
            Filters results by slug, where any RecordingRule with a matching
            slug in the given list (and matches all other filters) will be
            returned.
          in: query
          name: slugs
          schema:
            items:
              type: string
            type: array
        - description: >-
            Filters results by name, where any RecordingRule with a matching
            name in the given list (and matches all other filters) will be
            returned.
          in: query
          name: names
          schema:
            items:
              type: string
            type: array
        - description: >-
            The execution_groups filter cannot be used when a bucket_slug filter
            is provided.
          in: query
          name: bucket_slugs
          schema:
            items:
              type: string
            type: array
        - description: >-
            The bucket_slugs filter cannot be used when an execution_group
            filter is provided.
          in: query
          name: execution_groups
          schema:
            items:
              type: string
            type: array
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/configv1ListRecordingRulesResponse'
          description: A successful response.
        '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:
    configv1ListRecordingRulesResponse:
      properties:
        page:
          $ref: '#/components/schemas/configv1PageResult'
        recording_rules:
          items:
            $ref: '#/components/schemas/configv1RecordingRule'
          type: array
      type: object
    apiError:
      properties:
        message:
          description: An error message describing what went wrong.
          type: string
      type: object
    genericError:
      additionalProperties: true
      type: object
    configv1PageResult:
      properties:
        next_token:
          description: |-
            An opaque page token that identifies the next page of items that the
            client should request. An empty value indicates that there are no
            more items to return.
          type: string
      type: object
    configv1RecordingRule:
      properties:
        bucket_slug:
          description: >-
            The slug of the bucket the recording rule belongs to. Required if

            `execution_group` is not set. If both `bucket_slug` and
            `execution_group`

            are set, their values must match.
          type: string
        created_at:
          description: >-
            Timestamp of when the RecordingRule was created. Cannot be set by
            clients.
          format: date-time
          readOnly: true
          type: string
        execution_group:
          description: >-
            The slug of the execution group in which the recording rule will be
            evaluated.

            Rules in the same execution group run at intervals. All rules in a
            group must

            complete before the rules in that group run again. Required if
            `bucket_slug`

            isn't set. If both `bucket_slug` and `execution_group` are set,
            their values

            must match.


            Creating too many rules in an execution group can cause delays in
            execution of

            the next iteration. Chronosphere recommends limiting the number of
            rules in an

            execution group to 200-300 maximum.
          type: string
        execution_mode:
          allOf:
            - $ref: '#/components/schemas/RecordingRuleExecutionMode'
          description: >-
            Controls how this rule is assigned to shards for execution.

            When set to SYNCHRONIZED, all rules in the same execution group with

            this mode are assigned to the same shard, which ensures that they
            execute

            together with the same evaluation timestamp.
        interval_secs:
          description: 'Specifies how often to evaluate the recording rule. Default: `60s`.'
          format: int32
          type: integer
        label_policy:
          allOf:
            - $ref: '#/components/schemas/configv1RecordingRuleLabelPolicy'
          description: >-
            Specifies label names to add to the output metric. If you attempt to
            add an

            existing label, the label isn't added. For example, `add
            (instance123:instance)`.
        metric_name:
          description: >-
            The name of the time series to use for the output of
            `prometheus_expr`.

            This value must be a valid metric name. If you don't set this value,

            the output of `prometheus_expr` is output to a time series with a
            name

            defined by the value of `name`.
          type: string
        name:
          description: >-
            The name of the RecordingRule. You can modify this value after the
            RecordingRule is created.
          type: string
        prometheus_expr:
          description: >-
            The PromQL expression to evaluate at the time of each evaluation
            cycle. The

            result is output to a new time series with a name defined by the
            value of

            `metric_name`. If `metric_name` is unset, the result is output to a

            time series defined by the value of `name`.
          type: string
        slug:
          description: >-
            The unique identifier of the RecordingRule. If a `slug` isn't
            provided, one is generated based on the `name` field. You can't
            modify this field after the RecordingRule is created.
          type: string
        updated_at:
          description: >-
            Timestamp of when the RecordingRule was last updated. Cannot be set
            by clients.
          format: date-time
          readOnly: true
          type: string
      required:
        - name
      type: object
    RecordingRuleExecutionMode:
      description: >-
        ExecutionMode controls how a recording rule is assigned to shards for
        execution.

         - EXECUTION_MODE_SYNCHRONIZED: Synchronized: shard rule by execution group, which ensures that all
        synchronized rules in the same group execute on the same shard.
      enum:
        - EXECUTION_MODE_SYNCHRONIZED
      type: string
    configv1RecordingRuleLabelPolicy:
      properties:
        add:
          additionalProperties:
            type: string
          description: A list of labels to add or overwrite before storing the result.
          type: object
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: Chronosphere API token
      in: header
      name: API-Token
      type: apiKey

````