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

> List data diff monitors via the Datafold API.

# List monitors



## OpenAPI

````yaml openapi-butterfly.json get /api/v1/monitors
openapi: 3.1.0
info:
  contact:
    email: support@datafold.com
    name: API Support
  description: >-
    The Datafold API reference is a guide to our available endpoints and
    authentication methods.

    If you're just getting started with Datafold, we recommend first checking
    out our [documentation](https://docs.datafold.com).


    :::info
      To use the Datafold API, you should first create a Datafold API Key,
      which should be stored as a local environment variable named DATAFOLD_API_KEY.
      This can be set in your Datafold Cloud's Settings under the Account page.
    :::
  title: Datafold API
  version: latest
servers:
  - url: https://us.datafold.com
    description: US
  - url: https://eub.datafold.com
    description: EU
security:
  - ApiKeyAuth: []
paths:
  /api/v1/monitors:
    get:
      tags:
        - Monitors
      summary: List monitors
      operationId: list_monitors_api_v1_monitors_get
      parameters:
        - description: The page number to retrieve.
          in: query
          name: page
          required: false
          schema:
            default: 1
            description: The page number to retrieve.
            minimum: 1
            title: Page
            type: integer
        - description: The number of monitors per page.
          in: query
          name: page_size
          required: false
          schema:
            default: 20
            description: The number of monitors per page.
            maximum: 200
            minimum: 1
            title: Page Size
            type: integer
        - description: Field to order the monitors by.
          in: query
          name: order_by
          required: false
          schema:
            default: id
            description: Field to order the monitors by.
            enum:
              - id
              - name
              - created_at
              - updated_at
              - last_run_at
            title: Order By
            type: string
        - description: Order direction.
          in: query
          name: sort_order
          required: false
          schema:
            default: desc
            description: Order direction.
            enum:
              - asc
              - desc
            title: Sort Order
            type: string
        - description: Comma-separated tags; a monitor must carry all of them to match.
          in: query
          name: tags
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Comma-separated tags; a monitor must carry all of them to match.
            title: Tags
        - description: Filter by whether the schedule fires.
          in: query
          name: enabled
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: Filter by whether the schedule fires.
            title: Enabled
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiPublicListMonitorsOut'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    ApiPublicListMonitorsOut:
      properties:
        count:
          description: Total number of monitors visible to the caller.
          title: Count
          type: integer
        monitors:
          description: This page of monitors.
          items:
            $ref: '#/components/schemas/ApiPublicGetMonitorOut'
          title: Monitors
          type: array
        page:
          description: Current page number.
          title: Page
          type: integer
        page_size:
          description: Monitors per page.
          title: Page Size
          type: integer
        total_pages:
          description: Total number of pages.
          title: Total Pages
          type: integer
      required:
        - count
        - monitors
        - page
        - page_size
        - total_pages
      title: ApiPublicListMonitorsOut
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ApiPublicGetMonitorOut:
      properties:
        created_at:
          description: When the monitor was created.
          format: date-time
          title: Created At
          type: string
        enabled:
          description: Whether the schedule fires.
          title: Enabled
          type: boolean
        id:
          description: Unique identifier for the monitor.
          title: Id
          type: integer
        last_run:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: When the monitor last started a run.
          title: Last Run
        managed_in_code:
          description: >-
            True when the monitor's definition lives in a repo. Update and
            delete are refused for such a monitor — change its YAML instead.
          title: Managed In Code
          type: boolean
        modified_at:
          description: When the monitor was last modified.
          format: date-time
          title: Modified At
          type: string
        monitor_type:
          const: diff
          description: Type of the monitor.
          title: Monitor Type
          type: string
        name:
          anyOf:
            - type: string
            - type: 'null'
          description: Name of the monitor.
          title: Name
        next_run:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: When the schedule fires next.
          title: Next Run
        owner:
          anyOf:
            - type: string
            - type: 'null'
          description: Email of the monitor owner.
          title: Owner
        slug:
          anyOf:
            - type: string
            - type: 'null'
          description: Stable identifier.
          title: Slug
        state:
          anyOf:
            - $ref: '#/components/schemas/MonitorRunState'
            - type: 'null'
          description: Outcome of the latest run, once it has one.
        tags:
          description: Tags on the monitor.
          items:
            type: string
          title: Tags
          type: array
      required:
        - id
        - name
        - monitor_type
        - created_at
        - modified_at
        - enabled
        - managed_in_code
      title: ApiPublicGetMonitorOut
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    MonitorRunState:
      description: >-
        A finished run's verdict. NULL means the run is still in flight.


        Plain text in the database rather than a PG enum: `ALTER TYPE ... ADD
        VALUE` has to

        run in an autocommit block and cannot be reverted, which is a bad
        property for a

        value set that grows when other monitor kinds arrive.
      enum:
        - ok
        - alert
        - error
        - cancelled
      title: MonitorRunState
      type: string
  securitySchemes:
    ApiKeyAuth:
      description: Use the 'Authorization' header with the format 'Key <api-key>'
      in: header
      name: Authorization
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.