ALTR Rules API

The Rules API from ALTR — 6 operation(s) for rules.

Documentation

📖
Documentation
https://altrnet.live.altr.com/api/swagger/
📖
APIReference
https://altrnet.live.altr.com/api/swagger/
📖
Authentication
https://raw.githubusercontent.com/api-evangelist/altr/refs/heads/main/authentication/altr-authentication.yml
📖
Documentation
https://api.live.altr.com/v1/unified-policy/docs
📖
APIReference
https://api.live.altr.com/v1/unified-policy/docs
📖
Documentation
https://api.live.altr.com/v1/rbac/api-docs/index.html
📖
APIReference
https://api.live.altr.com/v1/rbac/api-docs/index.html
📖
Documentation
https://docs.classification.live.altr.com/v1/docs
📖
APIReference
https://docs.classification.live.altr.com/v1/docs
📖
Documentation
https://api.live.altr.com/v1/tag/auto-tagging-api-docs/index.html
📖
APIReference
https://api.live.altr.com/v1/tag/auto-tagging-api-docs/index.html
📖
Documentation
https://api.live.altr.com/v1/tag/masking-api-docs/index.html
📖
APIReference
https://api.live.altr.com/v1/tag/masking-api-docs/index.html
📖
Documentation
https://api.live.altr.com/v1/tag/refresh-api-docs/index.html
📖
APIReference
https://api.live.altr.com/v1/tag/refresh-api-docs/index.html
📖
Documentation
https://api.live.altr.com/v1/alpha/dbx/tag-policy/docs/index.html
📖
APIReference
https://api.live.altr.com/v1/alpha/dbx/tag-policy/docs/index.html
📖
Documentation
https://api.live.altr.com/v1/dis/swagger/
📖
APIReference
https://api.live.altr.com/v1/dis/swagger/
📖
Documentation
https://api.live.altr.com/v1/snowflake/metadata-api-docs/index.html
📖
APIReference
https://api.live.altr.com/v1/snowflake/metadata-api-docs/index.html
📖
Documentation
https://api.live.altr.com/v1/query-audits/api-docs/index.html
📖
APIReference
https://api.live.altr.com/v1/query-audits/api-docs/index.html
📖
Documentation
https://api.live.altr.com/v1/dam/docs
📖
APIReference
https://api.live.altr.com/v1/dam/docs
📖
Documentation
https://docs.dam-alerting.live.altr.com/v1/dam-alerting/docs
📖
APIReference
https://docs.dam-alerting.live.altr.com/v1/dam-alerting/docs
📖
Documentation
https://docs.audit-report.live.altr.com/v1/audit-reports/docs
📖
APIReference
https://docs.audit-report.live.altr.com/v1/audit-reports/docs
📖
Documentation
https://docs.notifications.live.altr.com/v1/notification-integration/docs
📖
APIReference
https://docs.notifications.live.altr.com/v1/notification-integration/docs
📖
Documentation
https://docs.critical.live.altr.com/v2
📖
APIReference
https://docs.critical.live.altr.com/v2
📖
Documentation
https://docs.sc-control.live.altr.com/v1/repo-config-docs
📖
APIReference
https://docs.sc-control.live.altr.com/v1/repo-config-docs
📖
Documentation
https://docs.sc-control.live.altr.com/v1/audits/docs
📖
APIReference
https://docs.sc-control.live.altr.com/v1/audits/docs
📖
Documentation
https://docs.sc-control.live.altr.com/v1/sidecars/telemetry/docs
📖
APIReference
https://docs.sc-control.live.altr.com/v1/sidecars/telemetry/docs
📖
Documentation
https://docs.sc-control.live.altr.com/v1/access-tokens/docs
📖
APIReference
https://docs.sc-control.live.altr.com/v1/access-tokens/docs
📖
Documentation
https://docs.service-user.live.altr.com/v1/docs
📖
APIReference
https://docs.service-user.live.altr.com/v1/docs

Specifications

OpenAPI Specification

altr-rules-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Altr Rules API
  version: '1.0'
  description: 'Operations tagged Rules across 2 of this provider''s published API definitions: altr-dam-alerting-openapi.yml, altr-unified-policy-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://{orgID}.dam-alerting.live.altr.com/v1/dam-alerting
  variables:
    orgID:
      default: ''
- url: https://api.live.altr.com/v1/unified-policy/management/
tags:
- name: Rules
paths:
  /rules:
    servers:
    - url: https://{orgID}.dam-alerting.live.altr.com/v1/dam-alerting
      variables:
        orgID:
          default: ''
    post:
      description: Creates a new rule with filters, severity, and delivery configuration
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/models.CreateRuleRequest'
              summary: rule
              description: Rule Request
        description: Rule Request
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Rule'
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Invalid request or validation error
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Internal server error
      security:
      - BasicAuth: []
      summary: Create a Rule.
      tags:
      - Rules
  /rules/:
    servers:
    - url: https://{orgID}.dam-alerting.live.altr.com/v1/dam-alerting
      variables:
        orgID:
          default: ''
    get:
      description: Returns a paginated list of DAM alerting rules
      parameters:
      - description: 'Maximum number of results (default: 25, max: 100)'
        example: 25
        in: query
        name: limit
        schema:
          type: integer
      - description: Pagination token from previous response
        in: query
        name: contiguous_id
        schema:
          type: string
      - description: Filter by enabled flag
        in: query
        name: enabled
        schema:
          type: boolean
      - description: Filter by severity
        in: query
        name: severity
        schema:
          enum:
          - low
          - medium
          - high
          - critical
          type: string
      - description: Filter by rule type
        in: query
        name: rule_type
        schema:
          enum:
          - match
          - threshold
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ListRulesResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Invalid query parameter
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Internal server error
      security:
      - BasicAuth: []
      summary: List Rules.
      tags:
      - Rules
  /rules/{rule_id}:
    servers:
    - url: https://{orgID}.dam-alerting.live.altr.com/v1/dam-alerting
      variables:
        orgID:
          default: ''
    delete:
      description: Permanently deletes a rule and stops further evaluation against it.
      parameters:
      - description: Rule ID
        in: path
        name: rule_id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Rule not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Internal server error
      security:
      - BasicAuth: []
      summary: Delete a rule.
      tags:
      - Rules
    get:
      description: Returns a single rule by ID
      parameters:
      - description: Rule ID
        in: path
        name: rule_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Rule'
          description: OK
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Rule not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Internal server error
      security:
      - BasicAuth: []
      summary: Get a Rule.
      tags:
      - Rules
    patch:
      description: Patches the mutable fields on a rule. Immutable fields (rule_type, filter_tree, data_source_scope, window_type, threshold, timezone) cannot be changed and must be set via delete+recreate.
      parameters:
      - description: Rule ID
        in: path
        name: rule_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/models.UpdateRuleRequest'
              summary: rule
              description: Mutable rule fields
        description: Mutable rule fields
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Rule'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Invalid request or validation error
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Rule not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Internal server error
      security:
      - BasicAuth: []
      summary: Update a rule.
      tags:
      - Rules
  /policy/{policy_id}/rules/batch:
    servers:
    - url: https://api.live.altr.com/v1/unified-policy/management/
    patch:
      operationId: updateBatchRules
      tags:
      - Rules
      summary: Creates a new rule
      parameters:
      - in: path
        name: policy_id
        required: true
        schema:
          type: string
        description: The unique identifier for the policy
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                rules:
                  type: array
                  items:
                    type: object
                    properties:
                      rule_id:
                        type: string
                        description: The unique id of the rule if this is a DELETE operation
                      action:
                        type: string
                        enum:
                        - DELETE
                        - PUT
                        description: The action to take on the rule
                      rule:
                        type: object
                        properties:
                          access_rate_thresholds:
                            $ref: '#/components/schemas/AccessRateThreshold'
                          time_window_thresholds:
                            $ref: '#/components/schemas/TimeWindowThreshold'
                          masking_policy:
                            type: integer
                            enum:
                            - 10000
                            - 10001
                            - 10002
                            - 10003
                            - 10004
                            description: "The id of the masking policy which should be applied. If you have multiple conflicting masking policies applied to a query the lowest id is used.\n * 10000 - No mask \n 10001 - Full Mask \n 10002 - Email Mask \n 10004 - Constant Mask"
                          role:
                            type: string
                            description: The name of the role associated with this rule, if this is a CREATE operation
                          tag_value:
                            type: string
                            description: The tag value to match for this rule. If you wish to use a regex, use 'tag_value_regex' instead. Only valid on CREATE operations.
                          tag_value_regex:
                            type: string
                            enum:
                            - '*'
                            description: The REGEX for matching tag values to which this rule applies. If you with to use an exact string match, you may use 'tag_value' instead. Only * is currently supported. Only valid on CREATE operations.
                policy:
                  type: object
                  properties:
                    active:
                      type: boolean
                      description: Whether to policy is applied or not. Defaults to null.
                      example: true
                    database_ids:
                      type: object
                      example:
                        '4': add
                        '5': delete
                        '6': force-delete
      responses:
        '204':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
      - basicAuth: []
  /policy/{policy_id}/rules:
    servers:
    - url: https://api.live.altr.com/v1/unified-policy/management/
    post:
      operationId: createRule
      tags:
      - Rules
      summary: Creates a new rule
      parameters:
      - in: path
        name: policy_id
        required: true
        schema:
          type: string
        description: The unique identifier for the policy
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                access_rate_thresholds:
                  $ref: '#/components/schemas/AccessRateThreshold'
                time_window_thresholds:
                  $ref: '#/components/schemas/TimeWindowThreshold'
                masking_policy:
                  type: integer
                  enum:
                  - 10000
                  - 10001
                  - 10002
                  - 10003
                  - 10004
                  description: "The id of the masking policy which should be applied. If you have multiple conflicting masking policies applied to a query the lowest id is used.\n * 10000 - No mask \n 10001 - Full Mask \n 10002 - Email Mask \n 10004 - Constant Mask"
                role:
                  type: string
                tag_value:
                  type: string
                  description: The tag value to match for this rule. If you wish to use a regex, use 'tag_value_regex' instead.
                tag_value_regex:
                  type: string
                  enum:
                  - '*'
                  description: The REGEX for matching tag values to which this rule applies. If you with to use an exact string match, you may use 'tag_value' instead. Only * is currently supported.
      responses:
        '204':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      rule_id:
                        type: string
                        description: The unique id of the rule
                        example: TAG#896c2bbf427ca7fe55e2bb30dfd722c1eb91a09c44e6d14bd5a754754c1ee79e#ROLE#a0192a8d618436d26d78ac6df5bfa2455e1fae549577282669d37d8cfb1ebe1c#TAG_VALUE#7b546b3e08faa6882d4b1f762f9c76492168144d864668776fe9ffb2af018805
                  success:
                    type: boolean
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
      - basicAuth: []
    get:
      operationId: getRules
      tags:
      - Rules
      summary: Get all the rules associated with the given policy_id
      parameters:
      - in: path
        name: policy_id
        required: true
        schema:
          type: string
        description: The unique identifier for the policy
      - name: limit
        schema:
          type: integer
        description: The number of rules to return
        example: 10
        in: query
      - name: exclusive_start_key
        schema:
          type: string
        description: The last evaluated key for pagination. This can be found in the response body under `last_evaluated_key`. If the value is present, it can be used to get the next set of policies.
        in: query
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: The number of rule groups returned.
                        example: 1
                      items:
                        type: object
                        additionalProperties:
                          type: array
                          description: The rules associated with the policy, the key is the rule_hash.
                          items:
                            type: object
                            properties:
                              rule_id:
                                type: string
                                description: The unique id of the rule.
                                example: TAG#54a4834928b937b549a367f85b11b30d0e07da0276df98c48bc09680a83c3343#ROLE#0ad4fa3dac4f39ca0d653cfaa47182dafa5b8923dec019a5ecafeca3aa6d55a7#TAG_VALUE#99443317afac8b4204d2c07e8b8ae3cdb1633016e7142b8ba77ad1615cfbb409
                              rule_hash:
                                type: string
                                description: The hash of the rule.
                                example: 9417c2bc077fda72be5677930613049eCREDIT_CARD
                              pending_rule_json:
                                type: object
                                description: The object we are attempting to update the policy state to.
                                example: {}
                              success_rule_json:
                                type: object
                                description: The currently applied policy.
                                properties:
                                  masking_policy:
                                    type: string
                                    example: '10001'
                              failed_rule_json:
                                type: object
                                description: The object representing a failed rule.
                                example: {}
                              policy_id:
                                type: string
                                description: The unique identifier for the policy.
                                example: TAG#54a4834928b937b549a367f85b11b30d0e07da0276df98c48bc09680a83c3343
                              role:
                                type: string
                                description: The name of the role associated with this rule.
                                example: DEVELOPER_ROLE
                              tag_value:
                                type: string
                                description: The tag value associated with the rule.
                                example: CREDIT_CARD
                              updated_at:
                                type: string
                                format: date-time
                                description: The last updated timestamp of the rule.
                                example: '2023-10-01T12:00:00Z'
                        example:
                          9417c2bc077fda72be5677930613049eCREDIT_CARD:
                          - rule_id: TAG#54a4834928b937b549a367f85b11b30d0e07da0276df98c48bc09680a83c3343#ROLE#0ad4fa3dac4f39ca0d653cfaa47182dafa5b8923dec019a5ecafeca3aa6d55a7#TAG_VALUE#99443317afac8b4204d2c07e8b8ae3cdb1633016e7142b8ba77ad1615cfbb409
                            rule_hash: 9417c2bc077fda72be5677930613049eCREDIT_CARD
                            pending_rule_json: {}
                            success_rule_json:
                              masking_policy: '10001'
                            failed_rule_json: {}
                            policy_id: TAG#54a4834928b937b549a367f85b11b30d0e07da0276df98c48bc09680a83c3343
                            role: DEVELOPER_ROLE
                            tag_value: CREDIT_CARD
                            updated_at: '2023-10-01T12:00:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
      - basicAuth: []
  /policy/{policy_id}/rules/{rule_id}:
    servers:
    - url: https://api.live.altr.com/v1/unified-policy/management/
    get:
      operationId: getRuleById
      tags:
      - Rules
      summary: Get details for a specific rule
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  rule_id:
                    type: string
                    description: The unique id of the rule
                    example: TAG#896c2bbf427ca7fe55e2bb30dfd722c1eb91a09c44e6d14bd5a754754c1ee79e#ROLE#a0192a8d618436d26d78ac6df5bfa2455e1fae549577282669d37d8cfb1ebe1c#TAG_VALUE#7b546b3e08faa6882d4b1f762f9c76492168144d864668776fe9ffb2af018805
                  pending_rule_json:
                    type: object
                    description: The object we are attempting to update the policy state to.
                    properties:
                      time_window_thresholds:
                        $ref: '#/components/schemas/TimeWindowThreshold'
                      masking_policy:
                        type: integer
                        enum:
                        - 10000
                        - 10001
                        - 10002
                        - 10003
                        - 10004
                        description: "The id of the masking policy which should be applied. If you have multiple conflicting masking policies applied to a query the lowest id is used.\n * 10000 - No mask \n 10001 - Full Mask \n 10002 - Email Mask \n 10004 - Constant Mask"
                      access_rate_thresholds:
                        $ref: '#/components/schemas/AccessRateThreshold'
                  success_rule_json:
                    type: object
                    description: The currently applied policy.
                    properties:
                      time_window_thresholds:
                        $ref: '#/components/schemas/TimeWindowThreshold'
                      masking_policy:
                        type: integer
                        enum:
                        - 10000
                        - 10001
                        - 10002
                        - 10003
                        - 10004
                        description: "The id of the masking policy which should be applied. If you have multiple conflicting masking policies applied to a query the lowest id is used.\n * 10000 - No mask \n 10001 - Full Mask \n 10002 - Email Mask \n 10004 - Constant Mask"
                      access_rate_thresholds:
                        $ref: '#/components/schemas/AccessRateThreshold'
                  role:
                    type: string
                    description: The name of the role associated with this rule
                    example: ACCOUNTADMIN
                  tag_value:
                    type: string
                    description: The name of the tag value associated with the rule if present
                    example: yellow
                  tag_value_regex:
                    type: string
                    description: The name of the tag value regex associated with the rule if present
                    example: '*'
                  updated_at:
                    type: string
                    format: date-time
                    description: The last updated timestamp of the rule
                    example: '2023-10-01T12:00:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
      parameters:
      - in: path
        name: policy_id
        required: true
        schema:
          type: string
        description: The unique identifier for the policy
      - name: rule_id
        in: path
        required: true
        schema:
          type: string
      security:
      - basicAuth: []
    delete:
      operationId: deleteRule
      tags:
      - Rules
      summary: Delete an existing rule
      parameters:
      - in: path
        name: policy_id
        required: true
        schema:
          type: string
        description: The unique identifier for the policy
      - name: rule_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
      - basicAuth: []
    patch:
      operationId: updateRule
      tags:
      - Rules
      summary: Updates an existing rule
      parameters:
      - in: path
        name: policy_id
        required: true
        schema:
          type: string
        description: The unique identifier for the policy
      - name: rule_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                access_rate_thresholds:
                  $ref: '#/components/schemas/AccessRateThreshold'
                time_window_thresholds:
                  $ref: '#/components/schemas/TimeWindowThreshold'
                masking_policy:
                  type: integer
                  enum:
                  - 10000
                  - 10001
                  - 10002
                  - 10003
                  - 10004
                  description: "The id of the masking policy which should be applied. If you have multiple conflicting masking policies applied to a query the lowest id is used.\n * 10000 - No mask \n 10001 - Full Mask \n 10002 - Email Mask \n 10004 - Constant Mask"
      responses:
        '204':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      rule_id:
                        type: string
                  success:
                    type: boolean
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
      - basicAuth: []
components:
  schemas:
    ApiError:
      type: object
      properties:
        message:
          type: string
          example: Internal Server Error
        statusCode:
          type: integer
          example: 500
    auditfilter.KeyEqValue:
      description: 'KeyEq is required for: key_eq.'
      properties:
        key:
          maxLength: 256
          type: string
        value:
          maxLength: 256
          type: string
      required:
      - key
      - value
      type: object
    models.UpdateRuleRequest:
      properties:
        comment_required:
          type: boolean
        description:
          maxLength: 2000
          type: string
        email_rate_limit_seconds:
          description: 'EmailRateLimitSeconds sets the per-rule email window. nil = no change;

            non-nil must be 0 (reset to platform default) or in [60, 86400].'
          maximum: 86400
          minimum: 0
          type: integer
        email_recipients:
          items:
            type: string
          maxItems: 100
          type: array
          uniqueItems: false
        enabled:
          type: boolean
        name:
          maxLength: 255
          minLength: 1
          type: string
        severity:
          enum:
          - low
          - medium
          - high
          - critical
          type: string
      type: object
    models.Rule:
      properties:
        comment_required:
          type: boolean
        created_at:
          type: string
        data_source_scope:
          enum:
          - snowflake
          - oltp
          - all
          type: string
        description:
          maxLength: 2000
          type: string
        email_rate_limit_seconds:
          description: 'EmailRateLimitSeconds is the per-rule email send-once window in seconds.

            0 = use platform default (300 s). Must be in [60, 86400] when non-zero.'
          maximum: 86400
          minimum: 60
          type: integer
        email_recipients:
          items:
            type: string
          maxItems: 100
          type: array
          uniqueItems: false
        enabled:
          type: boolean
        filter_tree:
          $ref: '#/components/schemas/auditfilter.FilterNode'
        name:
          maxLength: 255
          type: string
        rule_id:
          type: string
        rule_type:
          enum:
          - match
          - threshold
          type: string
        severity:
          enum:
          - low
          - medium
          - high
          - critical
          type: string
        threshold:
          minimum: 1
          type: integer
        timezone:
          description: IANA timezone (e.g. "America/New_York"). Required on threshold rules; required on match rules whose filter_tree contains a time_of_day filter; must be empty on match rules without one.
          type: string
        updated_at:
          type: string
        window_type:
          enum:
          - hourly
          - daily
          - weekly
          - monthly
          type: string
      required:
      - data_source_scope
      - filter_tree
      - name
      - rule_id
      - rule_type
      - severity
      type: object
    auditfilter.Dimension:
      enum:
      - user
      - database
      - schema
      - table
      - column
      - statement_type
      - statement_text
      - query_status
      - event_name
      - time_of_day
      - repo_user
      - client_ip
      - client_app
      - client_port
      - repo_type
      - repo_host
      - sidecar_id
      - connection_authorized
      - authorization_type
      - oltp_row_count
      - bytes_returned
      - policy_applied
      - policy_type
      - user_email
      - user_group
      - snowflake_role
      - snowflake_roles
      - snowflake_warehouse
      - snowflake_warehouse_size
      - snowflake_ip_address
      - snowflake_client
      - snowflake_session_id
      - snowflake_query_tag
      - snowflake_row_count
      - snowflake_account
      - snowflake_account_region
      - snowflake_masking_policy
      - snowflake_column_policy
      - snowflake_execution_duration
      - snowflake_tag_name
      - snowflake_tag_value
      type: string
      x-enum-varnames:
      - DimUser
      - DimDatabase
      - DimSchema
      - DimTable
      - DimColumn
      - DimStatementType
      - DimStatementText
      - DimQueryStatus
      - DimEventName
      - DimTimeOfDay
      - DimRepoUser
      - DimClientIP
      - DimClientApp
      - DimClientPort
      - DimRepoType
      - DimRepoHost
      - DimSidecarID
      - DimConnectionAuthorized
      - DimAuthorizationType
      - DimRowCount
      - DimBytesReturned
      - DimPolicyApplied
      - DimPolicyType
      - DimUserEmail
      - DimUserGroup
      - DimSnowflakeRole
      - DimSnowflakeRoles
      - DimSnowflakeWarehouse
      - DimSnowflakeWarehouseSize
      - DimSnowflakeIPAddress
      - DimSnowflakeClient
      - DimSnowflakeSessionID
      - DimSnowflakeQueryTag
      - DimSnowflakeRowCount
      - DimSnowflakeAccount
      - DimSnowflakeAccountRegion
      - DimSnowflakeMaskingPolicy
      - DimSnowflakeColumnPolicy
      - DimSnowflakeExecutionDuration
      - DimSnowflakeTagName
      - DimSnowflakeTagValue
    auditfilter.RangeValue:
      description: 'Range is required for: range.'
      properties:
        max:
          type: number
        min:
          type: number
      required:
      - max
      - min
      type: object
    auditfilter.Op:
      enum:
      - and
      - or
      - eq
      - neq
      - in
      - contains
      - regex
      - cidr
      - gt
      - gte
      - lt
      - lte
      - range
      - between
      - exists
      - key_exists
      - key_eq
      type: string
      x-enum-varnames:
      - OpAnd
      - OpOr
      - OpEq
      - OpNeq
      - OpIn
      - OpContains
      - OpRegex
      - OpCIDR
      - OpGt
      - OpGte
      - OpLt
      - OpLte
      - OpRange
      - OpBetween
      - OpExists
      - OpKeyExists
      - OpKeyEq
    auditfilter.FilterNode:
      properties:
        between:
          $ref: '#/components/schemas/auditfilter.BetweenValue'
        children:
          description: 'Children is required for: and, or. Depth is bounded by MaxFilterDepth

            (enforced in validateBounded).'
          items:
            $ref: '#/components/schemas/auditfilter.FilterNode'
          type: array
          uniqueItems: false
        dimension:
          $ref: '#/components/schemas/auditfilter.Dimension'
        key_eq:
          $ref: '#/components/schemas/auditfilter.KeyEqValue'
        list_value:
          description: 'ListValue is required for: in. Per-entry max=256 caps individual list

            items; the slice-level min=1 enforces non-empty for `in`.'
    

# --- truncated at 32 KB (39 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/altr/refs/heads/main/openapi/altr-rules-api-openapi.yml