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

# Get counts for filter options

> Returns counts for different filter options based on the provided filters

Requires the following permissions:
- `alerts:ReadConfig`



## OpenAPI

````yaml openapi_v5.yaml get /alerts/alerts/v3/all/counts
openapi: 3.0.0
info:
  title: ''
  version: 1.0.0
servers:
  - url: https://api.coralogix.com/mgmt/openapi/5
  - url: https://api.eu2.coralogix.com/mgmt/openapi/5
  - url: https://api.coralogix.us/mgmt/openapi/5
  - url: https://api.cx498.coralogix.com/mgmt/openapi/5
  - url: https://api.coralogix.in/mgmt/openapi/5
  - url: https://api.coralogixsg.com/mgmt/openapi/5
  - url: https://api.ap3.coralogix.com/mgmt/openapi/5
security:
  - apiKeyAuth: []
tags:
  - name: AI Applications Service
    description: Manage the catalog of AI applications discovered from spans.
    externalDocs:
      url: ''
  - name: AI Evaluations Service
    description: >-
      Manage AI evaluations and the custom evaluation catalog for AI
      applications.
    externalDocs:
      url: ''
  - name: API Keys Admin Service
    description: Administrative operations for API Keys management.
    externalDocs:
      url: ''
  - name: API Keys Service
    description: Manage your API Keys.
    externalDocs:
      url: ''
  - name: Actions Service
    description: View and manage your Actions.
    externalDocs:
      url: ''
  - name: Alert Scheduler Rule service
    description: Manage your alert scheduler rules.
    externalDocs:
      url: ''
  - name: Alert definitions service
    description: >-
      View and manage your alerts using alert definitions - data structures that
      contain the configuration required to create an alert.
    externalDocs:
      description: Learn more about alerts in our documentation
      url: https://coralogix.com/docs/user-guides/alerting/introduction-to-alerts/
  - name: Alert events service
    description: >-
      Get information regarding your alert events - instances of alerts being
      triggered.
    externalDocs:
      description: Learn more about alert events and incidents in our documentation.
      url: https://coralogix.com/docs/user-guides/alerting/incidents/
  - name: Case Events service
    description: Manage case events, comments, and external thread synchronization.
    externalDocs:
      url: ''
  - name: Case Settings service
    description: Manage case settings team configurations.
    externalDocs:
      url: ''
  - name: Cases notification service
    description: Track notification adjacent data for cases.
    externalDocs:
      url: ''
  - name: Cases service
    description: >-
      Manage cases throughout their lifecycle. Create, view, assign,
      acknowledge, unacknowledge, resolve, and close cases to streamline
      investigations and follow-ups.
    externalDocs:
      description: Learn more about Cases in our documentation
      url: https://coralogix.com/docs/user-guides/cases/
  - name: Connector Schema service
    description: Retrieve connector schemas for notification center integrations
    externalDocs:
      description: Learn more about connectors in our documentation
      url: >-
        https://coralogix.com/docs/user-guides/notification-center/connectors/introduction/
  - name: Connectors service
    description: >-
      View and manage your connectors - integration instances for notification
      destinations
    externalDocs:
      description: Lean more about connectors in our documentation
      url: >-
        https://coralogix.com/docs/user-guides/notification-center/connectors/introduction/
  - name: Contextual data integration service
    description: Query for contextual data integration information.
    externalDocs:
      url: ''
  - name: Custom Enrichments Service
    description: Manage your enrichments.
    externalDocs:
      url: ''
  - name: Dashboard folders service
    description: Manage your dashboard folders.
    externalDocs:
      url: ''
  - name: Dashboard service
    description: Get information about the Coralogix Dashboard catalog.
    externalDocs:
      url: ''
  - name: Data Usage Query service
    description: >-
      Query billable data usage through the public Coralogix API using daily or
      hourly bucketed aggregations over supported labels.
    externalDocs:
      url: ''
  - name: Data Usage Service
    description: A service to manage data usage metrics.
    externalDocs:
      url: ''
  - name: Enrichments Service
    description: Manage your enrichments.
    externalDocs:
      url: ''
  - name: Entities service
    description: Query information about registered entities in the notification center
    externalDocs:
      description: Lean more about the notification center in our documentation
      url: https://coralogix.com/docs/user-guides/notification-center/introduction/
  - name: Events Service
    description: A service for querying events.
    externalDocs:
      description: Learn more about alerts in our documentation
      url: https://coralogix.com/docs/user-guides/alerting/introduction-to-alerts/
  - name: Events2Metrics Service
    description: Manage your events2metrics.
    externalDocs:
      url: ''
  - name: Extension deployment service
    description: A service that enables querying for extension deployment information.
    externalDocs:
      description: Find out more about extensions in our documentation.
      url: https://coralogix.com/docs/integrations/extensions/
  - name: Extension service
    description: A service that enables querying for extension information.
    externalDocs:
      description: Learn more about extensions in our documentation.
      url: https://coralogix.com/docs/integrations/extensions/
  - name: Folders for views service
    description: Create and manage view folders.
    externalDocs:
      url: ''
  - name: Global routers service
    description: >-
      View and manage your global routers - entities that direct notifications
      to configured destinations based on conditions
    externalDocs:
      description: Lean more about global routers in our documentation
      url: >-
        https://coralogix.com/docs/user-guides/notification-center/routing/introduction/
  - name: IP access service
    description: >-
      IP access service provides the API for managing company IP access
      settings.
    externalDocs:
      url: ''
  - name: Incidents service
    description: >-
      Handle all operations related to incident management within Coralogix.
      Identify, manage, and resolve incidents efficiently through automated
      workflows and team collaboration.
    externalDocs:
      description: Find out more about incident management in our documentation
      url: https://coralogix.com/docs/user-guides/alerting/incidents/
  - name: Integration service
    description: A service that enables querying for integration information.
    externalDocs:
      description: Find out more about integrations in our documentation.
      url: https://coralogix.com/docs/integrations/getting-started/
  - name: Metrics Data Archive Service
    description: View and manage your storage targets for metrics.
    externalDocs:
      description: Find out more about archives
      url: >-
        https://coralogix.com/docs/user-guides/data-flow/s3-archive/connect-s3-archive/
  - name: Notifications testing service
    description: >-
      Test your notification center configurations including connectors,
      presets, and templates
    externalDocs:
      description: Lean more about the notification center in our documentation
      url: https://coralogix.com/docs/user-guides/notification-center/introduction/
  - name: Outgoing webhooks service
    externalDocs:
      description: Find out more about outbound webhooks in our documentation.
      url: >-
        https://coralogix.com/docs/user-guides/alerting/outbound-webhooks/generic-outbound-webhooks-alert-webhooks/
  - name: Policies Service
    description: View and manage your TCO policies
    externalDocs:
      url: ''
  - name: Presets service
    description: >-
      View and manage your presets - pre-configured templates for notification
      content rendering
    externalDocs:
      description: Lean more about presets in our documentation
      url: >-
        https://coralogix.com/docs/user-guides/notification-center/presets/introduction/
  - name: Quota Allocation Rule Set service
    description: Manage quota allocation rules for different entity types.
    externalDocs:
      url: ''
  - name: Recording Rules Service
    description: A service to manage recording rules.
    externalDocs:
      url: ''
  - name: Retentions Service
    description: View and manage retentions
    externalDocs:
      url: ''
  - name: Role Management Service
    description: Service for managing system and custom roles.
    externalDocs:
      url: ''
  - name: Rule Groups Service
    description: A service to manage rule groups.
    externalDocs:
      url: ''
  - name: SAML Configuration Service
    description: Manage your SAML configuration
    externalDocs:
      url: ''
  - name: Scopes Service
    description: A service to manage scopes
    externalDocs:
      url: ''
  - name: Slos Service
    description: A service for managing Service Level Objectives (SLOs).
    externalDocs:
      url: ''
  - name: Target Service
    description: View and manage your storage targets for logs.
    externalDocs:
      description: Find out more about archives
      url: >-
        https://coralogix.com/docs/user-guides/data-flow/s3-archive/connect-s3-archive/
  - name: Team Groups Management Service
    description: Manage Team Groups.
    externalDocs:
      url: ''
  - name: Users Management Service
    description: >-
      Manage team members (users) including creation, updates, search, and
      status management.
    externalDocs:
      url: ''
  - name: Views service
    description: Create and manage views.
    externalDocs:
      url: ''
paths:
  /alerts/alerts/v3/all/counts:
    get:
      tags:
        - Alert definitions service
      summary: Get counts for filter options
      description: >-
        Returns counts for different filter options based on the provided
        filters


        Requires the following permissions:

        - `alerts:ReadConfig`
      operationId: AlertDefsService_FilterOptionCounts
      parameters:
        - description: The filter to apply when counting options
          in: query
          name: query_filter
          required: false
          schema:
            title: Filter option counts filter
            type: object
            properties:
              enabledFilter:
                $ref: '#/components/schemas/FilterOptionCountsEnabledFilter'
              entityLabelsFilter:
                $ref: '#/components/schemas/FilterOptionCountsEntityLabelsFilter'
              nameFilter:
                $ref: '#/components/schemas/FilterOptionCountsNameFilter'
              priorityFilter:
                $ref: '#/components/schemas/FilterOptionCountsPriorityFilter'
              statusFilter:
                $ref: '#/components/schemas/FilterOptionCountsStatusFilter'
              typeFilter:
                $ref: '#/components/schemas/FilterOptionCountsTypeFilter'
            description: Filter configuration for counting filter options
            externalDocs:
              url: ''
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilterOptionCountsResponse'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unauthorized request
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error
      externalDocs:
        url: ''
components:
  schemas:
    FilterOptionCountsEnabledFilter:
      title: Filter option counts enabled filter
      type: object
      properties:
        enabled:
          type: boolean
          description: Whether to filter for enabled (true) or disabled (false) alerts
          example: true
      description: Filter by alert definition enabled status for counting options
      externalDocs:
        url: ''
    FilterOptionCountsEntityLabelsFilter:
      title: Filter option counts entity labels filter
      type: object
      properties:
        entityLabels:
          type: object
          additionalProperties:
            minLength: 0
            type: string
          description: The entity label key-value pairs to filter by
        valuesOperator:
          $ref: '#/components/schemas/FilterValuesOperator'
      description: Filter by alert definition entity labels with And/Or options
      externalDocs:
        url: ''
    FilterOptionCountsNameFilter:
      title: Filter option counts name filter
      type: object
      properties:
        matcher:
          $ref: '#/components/schemas/alerts.v3.FilterMatcher'
        name:
          maxItems: 100
          minItems: 0
          type: array
          items:
            maxLength: 1024
            minLength: 1
            pattern: ^[\s\S]*$
            type: string
            description: >-
              The name(s) of the alert definition - multiple values are OR'd
              together
          description: >-
            The name(s) of the alert definition - multiple values are OR'd
            together
          example:
            - My Alert
            - Another Alert
      description: Filter by alert definition names for counting options
      externalDocs:
        url: ''
    FilterOptionCountsPriorityFilter:
      title: Filter option counts priority filter
      type: object
      properties:
        priority:
          maxItems: 100
          minItems: 0
          type: array
          items:
            $ref: '#/components/schemas/AlertDefPriority'
          description: The alert priorities to include in the count
          example:
            - ALERT_DEF_PRIORITY_P1
            - ALERT_DEF_PRIORITY_P2
            - ALERT_DEF_PRIORITY_P3
      description: Filter by alert definition priorities
      externalDocs:
        url: ''
    FilterOptionCountsStatusFilter:
      title: Filter option counts status filter
      type: object
      properties:
        matcher:
          $ref: '#/components/schemas/alerts.v3.FilterMatcher'
        status:
          maxItems: 100
          minItems: 0
          type: array
          items:
            $ref: '#/components/schemas/AlertDefStatus'
          description: The alert statuses to include in the count
          example:
            - ALERT_DEF_STATUS_ALERTING
            - ALERT_DEF_STATUS_OK
            - ALERT_DEF_STATUS_NO_DATA
      description: Filter by alert definition status for counting options
      externalDocs:
        url: ''
    FilterOptionCountsTypeFilter:
      title: Filter option counts type filter
      type: object
      properties:
        type:
          maxItems: 100
          minItems: 0
          type: array
          items:
            $ref: '#/components/schemas/AlertDefType'
          description: The alert types
          example:
            - ALERT_DEF_TYPE_LOGS_THRESHOLD
            - ALERT_DEF_TYPE_LOGS_NEW_VALUE
            - ALERT_DEF_TYPE_LOGS_UNIQUE_COUNT
            - ALERT_DEF_TYPE_TRACING_THRESHOLD
      description: Filter by alert definition types for counting options
      externalDocs:
        url: ''
    FilterOptionCountsResponse:
      title: Filter option counts response
      type: object
      properties:
        counts:
          $ref: '#/components/schemas/FilterOptionCounts'
      description: Response containing counts for different filter options
      externalDocs:
        url: ''
    Error:
      type: object
      properties:
        code:
          maximum: 599
          minimum: 100
          type: integer
          description: HTTP status code of the error (for example 400, 404, 500).
          format: int32
        message:
          maxLength: 4096
          minLength: 0
          pattern: ^[\s\S]*$
          type: string
          description: Human-readable description of the error.
      description: Standard error response body returned for a failed request.
    FilterValuesOperator:
      enum:
        - FILTER_VALUES_OPERATOR_UNSPECIFIED
        - FILTER_VALUES_OPERATOR_OR
        - FILTER_VALUES_OPERATOR_AND
      type: string
    alerts.v3.FilterMatcher:
      enum:
        - FILTER_MATCHER_UNSPECIFIED
        - FILTER_MATCHER_EQUALS
        - FILTER_MATCHER_NOT_EQUALS
        - FILTER_MATCHER_CONTAINS
      type: string
    AlertDefPriority:
      enum:
        - ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED
        - ALERT_DEF_PRIORITY_P4
        - ALERT_DEF_PRIORITY_P3
        - ALERT_DEF_PRIORITY_P2
        - ALERT_DEF_PRIORITY_P1
      type: string
      description: Alert def priority.
    AlertDefStatus:
      enum:
        - ALERT_DEF_STATUS_UNSPECIFIED
        - ALERT_DEF_STATUS_ALERTING
        - ALERT_DEF_STATUS_OK
        - ALERT_DEF_STATUS_NO_DATA
      type: string
      description: Alert def status.
    AlertDefType:
      enum:
        - ALERT_DEF_TYPE_LOGS_IMMEDIATE_OR_UNSPECIFIED
        - ALERT_DEF_TYPE_LOGS_THRESHOLD
        - ALERT_DEF_TYPE_LOGS_ANOMALY
        - ALERT_DEF_TYPE_LOGS_RATIO_THRESHOLD
        - ALERT_DEF_TYPE_LOGS_NEW_VALUE
        - ALERT_DEF_TYPE_LOGS_UNIQUE_COUNT
        - ALERT_DEF_TYPE_LOGS_TIME_RELATIVE_THRESHOLD
        - ALERT_DEF_TYPE_METRIC_THRESHOLD
        - ALERT_DEF_TYPE_METRIC_ANOMALY
        - ALERT_DEF_TYPE_TRACING_IMMEDIATE
        - ALERT_DEF_TYPE_TRACING_THRESHOLD
        - ALERT_DEF_TYPE_FLOW
        - ALERT_DEF_TYPE_SLO_THRESHOLD
        - ALERT_DEF_TYPE_ANALYTICS_IMMEDIATE
        - ALERT_DEF_TYPE_ANALYTICS_THRESHOLD
      type: string
      description: Alert def type.
    FilterOptionCounts:
      title: Filter option counts
      type: object
      properties:
        enabledCounts:
          maxItems: 100
          minItems: 0
          type: array
          items:
            $ref: '#/components/schemas/EnabledCount'
          description: Counts for different alert enabled statuses
        entityLabelCounts:
          maxItems: 1000
          minItems: 0
          type: array
          items:
            $ref: '#/components/schemas/EntityLabelCount'
          description: Counts for different entity label values
        priorityCounts:
          maxItems: 100
          minItems: 0
          type: array
          items:
            $ref: '#/components/schemas/PriorityCount'
          description: Counts for different alert priorities
        statusCounts:
          maxItems: 100
          minItems: 0
          type: array
          items:
            $ref: '#/components/schemas/StatusCount'
          description: Counts for different alert statuses
        typeCounts:
          maxItems: 100
          minItems: 0
          type: array
          items:
            $ref: '#/components/schemas/TypeCount'
          description: Counts for different alert types
      description: Counts for different filter options
      externalDocs:
        url: ''
    EnabledCount:
      title: Enabled count
      type: object
      properties:
        count:
          maximum: 4294967295
          minimum: 0
          type: integer
          description: The count for this enabled status
          format: int64
          example: 25
        enabled:
          type: boolean
          description: Whether the alert is enabled (true) or disabled (false)
          example: true
      description: Count for a specific alert enabled status
      externalDocs:
        url: ''
    EntityLabelCount:
      title: Entity label count
      type: object
      properties:
        count:
          maximum: 4294967295
          minimum: 0
          type: integer
          description: The count for this entity label value
          format: int64
          example: 28
        labelKey:
          maxLength: 1024
          minLength: 1
          pattern: ^[\s\S]*$
          type: string
          description: The entity label key
          example: environment
        labelValue:
          maxLength: 1024
          minLength: 1
          pattern: ^[\s\S]*$
          type: string
          description: The entity label value
          example: production
      description: Count for a specific entity label value
      externalDocs:
        url: ''
    PriorityCount:
      title: Priority count
      type: object
      properties:
        count:
          maximum: 4294967295
          minimum: 0
          type: integer
          description: The count for this alert priority
          format: int64
          example: 15
        priority:
          $ref: '#/components/schemas/AlertDefPriority'
      description: Count for a specific alert priority
      externalDocs:
        url: ''
    StatusCount:
      title: Status count
      type: object
      properties:
        count:
          maximum: 4294967295
          minimum: 0
          type: integer
          description: The count for this alert status
          format: int64
          example: 15
        status:
          $ref: '#/components/schemas/AlertDefStatus'
      description: Count for a specific alert status
      externalDocs:
        url: ''
    TypeCount:
      title: Type count
      type: object
      properties:
        count:
          maximum: 4294967295
          minimum: 0
          type: integer
          description: The count for this alert type
          format: int64
          example: 42
        type:
          $ref: '#/components/schemas/AlertDefType'
      description: Count for a specific alert type
      externalDocs:
        url: ''
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API key authentication

````