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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://axiom.co/docs/feedback

```json
{
  "path": "/restapi/endpoints/getMonitors",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# List all monitors

> Lists all configured monitors. Returns an array of monitor configurations including their IDs and current status.

<Note>
  The API endpoint `/v2/monitors` only returns monitors for datasets that your API token has query access to. If the API returns an empty list, ensure your token has query permissions for the datasets used by your monitors.
</Note>


## OpenAPI

````yaml v2 get /monitors
openapi: 3.0.0
info:
  description: A public and stable API for interacting with axiom services
  title: Axiom
  termsOfService: http://axiom.co/terms
  contact:
    name: Axiom support team
    url: https://axiom.co
    email: hello@axiom.co
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 2.0.0
servers:
  - url: https://api.axiom.co/v2/
security:
  - bearerAuth: []
paths:
  /monitors:
    get:
      tags:
        - Monitors
      description: >-
        Lists all configured monitors. Returns an array of monitor
        configurations including their IDs and current status.
      operationId: getMonitors
      responses:
        '200':
          description: Monitor
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MonitorWithId'
      security:
        - Auth:
            - monitors|read
components:
  schemas:
    MonitorWithId:
      description: Monitor configuration with its unique identifier
      allOf:
        - $ref: '#/components/schemas/Monitor'
        - type: object
          required:
            - id
          properties:
            id:
              description: Unique identifier for the monitor
              type: string
              example: mon_xyz789
    Monitor:
      description: >
        Configuration for a monitoring rule. Monitors can be configured to:

        - Check threshold values (e.g., CPU usage > 90%)

        - Match specific events in logs

        - Detect anomalies based on historical patterns

        Each monitor runs on a specified interval and can trigger notifications
        through configured notifiers.
      type: object
      required:
        - name
        - type
      properties:
        alertOnNoData:
          description: Whether to alert when no data is received
          type: boolean
          example: true
        aplQuery:
          description: |
            APL (Axiom Processing Language) query string used for monitoring.
            This query defines what data to analyze and how to process it.
            At least one of aplQuery or mplQuery must be provided.
          type: string
          example: '| where severity = ''error'' | count() > 100'
        columnName:
          description: Name of the column to monitor
          type: string
          example: cpu_usage
        compareDays:
          description: Number of days to compare for anomaly detection
          type: number
          format: int64
          maximum: 7
          example: 7
        createdAt:
          description: Timestamp when the monitor was created
          type: string
          format: date-time
          example: '2024-03-20T10:00:00Z'
        createdBy:
          description: ID of the user who created the monitor
          type: string
          example: usr_789xyz
        description:
          description: Detailed description of the monitor's purpose
          type: string
          example: Monitors CPU usage and alerts when it exceeds 90%
        disabled:
          description: Whether the monitor is currently disabled
          type: boolean
          example: false
        disabledUntil:
          description: Timestamp until when the monitor should remain disabled
          type: string
          format: date-time
          example: '2024-04-01T00:00:00Z'
          nullable: true
        intervalMinutes:
          description: |
            How frequently the monitor should run, in minutes.
            Minimum value is 1 minute.
          type: integer
          format: int64
          minimum: 1
          example: 5
        mplQuery:
          description: >
            MPL (Metrics Processing Language) query string for metrics-based
            monitoring.

            Use this as an alternative to aplQuery for metrics datasets.

            At least one of aplQuery or mplQuery must be provided.
          type: string
          example: test-metrics:http_request_duration_seconds
        name:
          description: Name of the monitor
          type: string
          example: Production CPU Monitor
        notifierIds:
          description: |
            List of notifier IDs that will receive alerts.
            Notifiers can be email, Slack, webhook endpoints, etc.
          type: array
          items:
            type: string
          example:
            - notify_slack_prod
            - notify_email_oncall
        notifyByGroup:
          description: Whether to group notifications
          type: boolean
          example: false
        notifyEveryRun:
          description: Whether to send notifications on every check
          type: boolean
          example: false
        operator:
          description: |
            Comparison operator for threshold checks:
            - Below: Trigger when value < threshold
            - BelowOrEqual: Trigger when value <= threshold
            - Above: Trigger when value > threshold
            - AboveOrEqual: Trigger when value >= threshold
            - AboveOrBelow: Trigger when value is outside a range
          type: string
          enum:
            - Below
            - BelowOrEqual
            - Above
            - AboveOrEqual
            - AboveOrBelow
          example: Above
        rangeMinutes:
          description: |
            Time window to evaluate in each check, in minutes.
            For example, "last 5 minutes of data"
          type: integer
          format: int64
          minimum: 1
          example: 5
        resolvable:
          description: Whether the alert can be manually resolved
          type: boolean
          example: true
        secondDelay:
          description: Delay in seconds before triggering the alert
          type: number
          format: int64
          maximum: 86400
          example: 300
        skipResolved:
          description: Whether to skip resolved alerts
          type: boolean
          example: false
        threshold:
          description: Threshold value for triggering the alert
          type: number
          format: double
          x-omitempty: false
          example: 90
        tolerance:
          description: Tolerance percentage for anomaly detection
          type: number
          maximum: 100
          example: 10
        triggerAfterNPositiveResults:
          description: Number of positive results needed before triggering
          type: number
          format: int64
          example: 2
        triggerFromNRuns:
          description: >
            Number of consecutive check runs that must fail before triggering an
            alert.

            Use this to avoid alerting on temporary spikes.
          type: number
          format: int64
          example: 3
        type:
          description: >
            Type of monitoring check to perform:

            - Threshold: Compares a numeric value against a threshold

            - MatchEvent: Looks for specific events or patterns

            - AnomalyDetection: Identifies unusual patterns based on historical
            data
          type: string
          enum:
            - Threshold
            - MatchEvent
            - AnomalyDetection
          example: Threshold
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authenticate using an API token or personal access token (PAT). Include
        the token as a Bearer token: `Authorization: Bearer <token>`. For more
        information, see [Tokens](/reference/tokens).
    Auth:
      description: >-
        Authenticate using an API token or personal access token (PAT). Include
        the token as a Bearer token: `Authorization: Bearer <token>`. For more
        information, see [Tokens](/reference/tokens).
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth
          tokenUrl: https://www.googleapis.com/oauth2/v4/token
          scopes: {}

````