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

# List monitors

> Get a paginated list of monitors



## OpenAPI

````yaml get /uptime/monitors
openapi: 3.0.0
info:
  title: Phare
  description: >-
    Learn how to use the phare.io API. Most of the things that can be done on
    the web platform can also be achieved with the API documented on this page.
  termsOfService: https://phare.io/legal/terms-of-service
  contact:
    name: Phare
    email: support@phare.io
  version: '1.0'
servers:
  - url: https://api.phare.io
security:
  - BearerAuth: []
tags:
  - name: Users
    description: Users
  - name: Projects
    description: Projects
  - name: Alert Rules
    description: Alert Rules
  - name: Monitors
    description: Monitors
  - name: Incidents
    description: Incidents
  - name: Status Pages
    description: Status Pages
  - name: Reports
    description: Reports
  - name: Platform
    description: Platform
  - name: Integrations
    description: Integrations
paths:
  /uptime/monitors:
    get:
      tags:
        - Monitors
      summary: List monitors
      description: Get a paginated list of monitors
      operationId: getUptimeMonitors
      parameters:
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/per_page'
        - $ref: '#/components/parameters/header_project_id'
        - $ref: '#/components/parameters/header_project_slug'
      responses:
        '200':
          description: Success, monitors retrieved
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          description: Monitor ID
                          type: integer
                          example: 1
                        project_id:
                          description: Parent project ID
                          type: integer
                          example: 1
                        status:
                          $ref: '#/components/schemas/Uptime.Monitor.StatusEnum'
                        paused:
                          description: Whether the monitor is currently paused
                          type: boolean
                          example: true
                        response_time:
                          description: >-
                            Rolling average response time of the last 10
                            requests, in milliseconds
                          type: integer
                          example: 123
                          nullable: true
                        name:
                          description: Monitor name
                          type: string
                          example: Website
                          maximum: 40
                          minimum: 2
                        protocol:
                          $ref: '#/components/schemas/Uptime.Monitor.ProtocolEnum'
                        request:
                          description: Monitoring request, depends of the chosen protocol
                          type: object
                          oneOf:
                            - title: HTTP protocol
                              required:
                                - method
                                - url
                              properties:
                                method:
                                  description: HTTP request method
                                  type: string
                                  enum:
                                    - HEAD
                                    - GET
                                    - POST
                                    - PUT
                                    - PATCH
                                    - OPTIONS
                                url:
                                  description: HTTP request url
                                  type: string
                                  example: https://docs.phare.io/introduction
                                  maximum: 255
                                tls_skip_verify:
                                  description: Skip SSL verification
                                  type: boolean
                                  example: false
                                  nullable: true
                                  default: false
                                body:
                                  description: >-
                                    HTTP request body for POST, PUT and PATCH
                                    requests
                                  type: string
                                  example: Hello, World!
                                  nullable: true
                                  maximum: 500
                                follow_redirects:
                                  description: Follow redirects
                                  type: boolean
                                  example: true
                                  nullable: true
                                  default: true
                                user_agent_secret:
                                  description: >-
                                    A secret value to be used in the User-Agent
                                    header for authenticating the request
                                  type: string
                                  example: definitely-not-a-bot
                                  nullable: true
                                headers:
                                  description: >-
                                    Additional HTTP headers to add to the
                                    request
                                  type: array
                                  items:
                                    required:
                                      - name
                                      - value
                                    properties:
                                      name:
                                        description: Header name
                                        type: string
                                        example: X-Phare-Says
                                        maximum: 50
                                      value:
                                        description: Header value
                                        type: string
                                        example: Hello world!
                                        maximum: 1024
                                    type: object
                                  nullable: true
                                  maxItems: 10
                              type: object
                            - title: TCP protocol
                              required:
                                - host
                                - port
                                - connection
                              properties:
                                host:
                                  description: TCP request hostname or IP address
                                  type: string
                                  example: 8.8.8.8
                                port:
                                  description: TCP request port
                                  type: string
                                  example: '80'
                                connection:
                                  $ref: >-
                                    #/components/schemas/Uptime.Monitor.ConnectionEnum
                                tls_skip_verify:
                                  description: Skip TLS verification
                                  type: boolean
                                  example: false
                                  nullable: true
                                  default: false
                              type: object
                        interval:
                          description: Monitoring interval in seconds
                          type: integer
                          example: 60
                          default: 60
                          enum:
                            - 30
                            - 60
                            - 120
                            - 180
                            - 300
                            - 600
                            - 900
                            - 1800
                            - 3600
                        timeout:
                          description: Monitoring timeout in milliseconds
                          type: integer
                          example: 20000
                          default: 20000
                          enum:
                            - 1000
                            - 2000
                            - 3000
                            - 4000
                            - 5000
                            - 6000
                            - 7000
                            - 8000
                            - 9000
                            - 10000
                            - 15000
                            - 20000
                            - 25000
                            - 30000
                        success_assertions:
                          description: >-
                            List of assertions that must be true for the check
                            to be considered successful
                          type: array
                          items:
                            oneOf:
                              - title: Status code assertion
                                required:
                                  - type
                                  - operator
                                  - value
                                properties:
                                  type:
                                    description: Type of assertion
                                    type: string
                                    enum:
                                      - status_code
                                  operator:
                                    description: Operator to use for the assertion
                                    type: string
                                    example: in
                                    enum:
                                      - in
                                      - not_in
                                  value:
                                    description: >-
                                      A comma-separated list of status code
                                      values, you can use x as a wildcard for
                                      any digit.
                                    type: string
                                    example: 2xx,30x,418
                                type: object
                              - title: Response header assertion
                                required:
                                  - type
                                  - selector
                                  - operator
                                  - value
                                properties:
                                  type:
                                    description: Type of assertion
                                    type: string
                                    enum:
                                      - response_header
                                  selector:
                                    description: The name of the header to assert
                                    type: string
                                    example: Content-Type
                                  operator:
                                    description: Operator to use for the assertion
                                    type: string
                                    example: equals
                                    enum:
                                      - equals
                                      - not_equals
                                  value:
                                    description: The value of the header to assert
                                    type: string
                                    example: application/json
                                type: object
                              - title: Response body assertion
                                required:
                                  - type
                                  - operator
                                  - value
                                properties:
                                  type:
                                    description: Type of assertion
                                    type: string
                                    enum:
                                      - response_body
                                  operator:
                                    description: Operator to use for the assertion
                                    type: string
                                    example: contains
                                    enum:
                                      - contains
                                      - not_contains
                                  value:
                                    description: >-
                                      A word or sentence to check in the
                                      response body
                                    type: string
                                    example: Hello, World!
                                type: object
                        incident_confirmations:
                          description: >-
                            Number of uninterrupted failed checks required to
                            create an incident
                          type: integer
                          example: 1
                          default: 3
                          enum:
                            - 1
                            - 2
                            - 3
                            - 4
                            - 5
                        recovery_confirmations:
                          description: >-
                            Number of uninterrupted successful checks required
                            to resolve an incident
                          type: integer
                          example: 1
                          default: 3
                          enum:
                            - 1
                            - 2
                            - 3
                            - 4
                            - 5
                        region_threshold:
                          description: >-
                            Number of regions that must fail before an incident
                            is confirmed
                          type: integer
                          example: 1
                          default: 1
                          maximum: 10
                          minimum: 1
                        regions:
                          description: >-
                            List of regions where monitoring checks are
                            performed
                          type: array
                          items:
                            $ref: '#/components/schemas/Uptime.Monitor.RegionEnum'
                          maxItems: 6
                          minItems: 1
                        created_at:
                          description: Date of creation for the entity
                          type: string
                          format: date-time
                        updated_at:
                          description: Date of last update for the entity
                          type: string
                          format: date-time
                      required:
                        - name
                        - protocol
                        - request
                        - regions
                  meta:
                    $ref: '#/components/schemas/meta'
                  links:
                    $ref: '#/components/schemas/links'
                type: object
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
components:
  parameters:
    page:
      name: page
      in: query
      description: Page number to show
      required: false
      schema:
        type: integer
        example: 1
        default: 1
    per_page:
      name: per_page
      in: query
      description: Number of resources to return per page
      required: false
      schema:
        type: integer
        example: 20
        default: 20
        maximum: 100
        minimum: 1
    header_project_id:
      name: X-Phare-Project-Id
      in: header
      description: A project header is required when using an organization-scoped API key.
      required: false
      schema:
        type: integer
        example: 1
    header_project_slug:
      name: X-Phare-Project-Slug
      in: header
      description: A project header is required when using an organization-scoped API key.
      required: false
      schema:
        type: string
        example: luminous-guiding-tower
  schemas:
    Uptime.Monitor.StatusEnum:
      type: string
      enum:
        - fetching
        - online
        - offline
        - partial
        - paused
    Uptime.Monitor.ProtocolEnum:
      type: string
      enum:
        - http
        - tcp
    Uptime.Monitor.ConnectionEnum:
      type: string
      enum:
        - plain
        - tls
    Uptime.Monitor.RegionEnum:
      type: string
      enum:
        - as-jpn-hnd
        - as-sgp-sin
        - as-tha-bkk
        - eu-deu-fra
        - eu-fra-cdg
        - eu-gbr-lhr
        - eu-swe-arn
        - ng-nld-ams
        - na-mex-mex
        - na-usa-iad
        - na-usa-sea
        - oc-aus-syd
        - sa-bra-gru
    meta:
      description: Meta data for pagination
      properties:
        current_page:
          type: integer
          example: 2
        from:
          type: integer
          example: 11
        to:
          type: integer
          example: 20
        per_page:
          type: integer
          example: 100
        path:
          type: string
          example: https://api.phare.io/{resource}?page=2
      type: object
    links:
      description: Links for pagination
      properties:
        first:
          type: string
          format: url
          example: https://api.phare.io/{resource}?page=2
        last:
          type: string
          format: url
          example: https://api.phare.io/{resource}?page=10
          nullable: true
        prev:
          type: string
          format: url
          example: https://api.phare.io/{resource}?page=1
          nullable: true
        next:
          type: string
          format: url
          example: https://api.phare.io/{resource}?page=1
          nullable: true
      type: object
  responses:
    '401':
      description: Error, access unauthorized
      content:
        application/json:
          schema:
            description: Access unauthorized error schema
            properties:
              message:
                type: string
                example: Unauthorized
            type: object
    '403':
      description: Error, access forbidden
      content:
        application/json:
          schema:
            description: Access forbidden error schema
            properties:
              message:
                type: string
                example: >-
                  The platform:write permission is required to perform this
                  action.
            type: object
  securitySchemes:
    BearerAuth:
      type: http
      description: >-
        Use a user token to access authenticated routes. The token must be
        specified in the Authorization HTTP header with the following format
        'Authorization: Bearer <token>'.
      scheme: bearer

````