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

# Get Monitor by Name

> Get a single monitor by project, environment, and name. Optional version (e.g. latest) can migrate the monitor schema.



## OpenAPI

````yaml https://hub.griff.services/documentation/json get /monitor/by-name
openapi: 3.1.0
info:
  title: Griffin Hub API
  description: API for managing and running test monitors
  version: 1.0.0
servers:
  - url: https://hub.griff.services
    description: Local development server
  - url: http://localhost:3000
    description: Local development server
security:
  - bearerAuth: []
tags:
  - name: monitors
    description: Test monitor management endpoints
  - name: runs
    description: Test run management endpoints
  - name: metrics
    description: Metrics and health summary endpoints
paths:
  /monitor/by-name:
    get:
      tags:
        - monitor
      summary: Get Monitor by Name
      description: >-
        Get a single monitor by project, environment, and name. Optional version
        (e.g. latest) can migrate the monitor schema.
      parameters:
        - schema:
            type: string
          in: query
          name: projectId
          required: true
        - schema:
            type: string
          in: query
          name: environment
          required: true
        - schema:
            type: string
          in: query
          name: name
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - latest
              - type: string
          in: query
          name: version
          required: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/MonitorV1'
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '502':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '503':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '504':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
components:
  schemas:
    MonitorV1:
      type: object
      required:
        - project
        - id
        - name
        - version
        - frequency
        - environment
        - nodes
        - edges
      properties:
        project:
          type: string
        locations:
          type: array
          items:
            type: string
        id:
          type: string
        name:
          type: string
        version:
          type: string
          enum:
            - '1.0'
        frequency:
          type: object
          required:
            - every
            - unit
          properties:
            every:
              type: number
            unit:
              type: string
              enum:
                - MINUTE
                - HOUR
                - DAY
              title: FrequencyUnit
          title: Frequency
        notifications:
          type: array
          items:
            type: object
            required:
              - trigger
              - routing
            properties:
              trigger:
                anyOf:
                  - type: object
                    required:
                      - type
                    properties:
                      type:
                        type: string
                        enum:
                          - run_failed
                  - type: object
                    required:
                      - type
                    properties:
                      type:
                        type: string
                        enum:
                          - run_recovered
                  - type: object
                    required:
                      - type
                      - threshold
                    properties:
                      type:
                        type: string
                        enum:
                          - consecutive_failures
                      threshold:
                        type: number
                        minimum: 1
                  - type: object
                    required:
                      - type
                      - threshold
                      - window_minutes
                    properties:
                      type:
                        type: string
                        enum:
                          - success_rate_below
                      threshold:
                        type: number
                        minimum: 0
                        maximum: 100
                      window_minutes:
                        type: number
                        minimum: 1
                  - type: object
                    required:
                      - type
                      - threshold_ms
                      - percentile
                      - window_minutes
                    properties:
                      type:
                        type: string
                        enum:
                          - latency_above
                      threshold_ms:
                        type: number
                        minimum: 0
                      percentile:
                        anyOf:
                          - type: string
                            enum:
                              - p50
                          - type: string
                            enum:
                              - p95
                          - type: string
                            enum:
                              - p99
                      window_minutes:
                        type: number
                        minimum: 1
                title: NotificationTrigger
              integration:
                type: string
              routing:
                anyOf:
                  - type: object
                    required:
                      - channelType
                      - channel
                    properties:
                      channelType:
                        type: string
                        enum:
                          - slack
                      channel:
                        type: string
                  - type: object
                    required:
                      - channelType
                      - toAddresses
                    properties:
                      channelType:
                        type: string
                        enum:
                          - email
                      toAddresses:
                        type: array
                        items:
                          type: string
                  - type: object
                    required:
                      - channelType
                    properties:
                      channelType:
                        type: string
                        enum:
                          - webhook
                title: NotificationRouting
            title: MonitorNotification
        environment:
          type: string
          default: default
        nodes:
          type: array
          items:
            anyOf:
              - type: object
                required:
                  - id
                  - type
                  - method
                  - path
                  - base
                  - response_format
                properties:
                  id:
                    type: string
                  type:
                    type: string
                    enum:
                      - HTTP_REQUEST
                  method:
                    type: string
                    enum:
                      - GET
                      - POST
                      - PUT
                      - DELETE
                      - PATCH
                      - HEAD
                      - OPTIONS
                      - CONNECT
                      - TRACE
                    title: HttpMethod
                  path:
                    $ref: '#/components/schemas/SecretOrString'
                  base:
                    $ref: '#/components/schemas/SecretOrString'
                  headers:
                    type: object
                    additionalProperties:
                      $ref: '#/components/schemas/SecretOrString'
                  body: {}
                  response_format:
                    type: string
                    enum:
                      - JSON
                      - XML
                      - NO_CONTENT
                    title: ResponseFormat
                title: HttpRequest
              - type: object
                required:
                  - id
                  - type
                  - duration_ms
                properties:
                  id:
                    type: string
                  type:
                    type: string
                    enum:
                      - WAIT
                  duration_ms:
                    type: number
                title: Wait
              - type: object
                required:
                  - id
                  - type
                  - assertions
                properties:
                  id:
                    type: string
                  type:
                    type: string
                    enum:
                      - ASSERTION
                  assertions:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          required:
                            - nodeId
                            - subject
                            - predicate
                          properties:
                            nodeId:
                              type: string
                            subject:
                              type: string
                              enum:
                                - status
                            predicate:
                              type: object
                              required:
                                - expected
                                - operator
                                - type
                              properties:
                                expected: {}
                                operator:
                                  type: string
                                  enum:
                                    - EQUAL
                                    - NOT_EQUAL
                                    - GREATER_THAN
                                    - LESS_THAN
                                    - GREATER_THAN_OR_EQUAL
                                    - LESS_THAN_OR_EQUAL
                                    - CONTAINS
                                    - NOT_CONTAINS
                                    - STARTS_WITH
                                    - ENDS_WITH
                                    - NOT_STARTS_WITH
                                    - NOT_ENDS_WITH
                                type:
                                  type: string
                                  enum:
                                    - binary
                        - type: object
                          required:
                            - nodeId
                            - subject
                            - headerName
                            - predicate
                          properties:
                            nodeId:
                              type: string
                            subject:
                              type: string
                              enum:
                                - headers
                            headerName:
                              type: string
                            predicate:
                              anyOf:
                                - type: object
                                  required:
                                    - operator
                                    - type
                                  properties:
                                    operator:
                                      type: string
                                      enum:
                                        - IS_NULL
                                        - IS_NOT_NULL
                                        - IS_TRUE
                                        - IS_FALSE
                                        - IS_EMPTY
                                        - IS_NOT_EMPTY
                                    type:
                                      type: string
                                      enum:
                                        - unary
                                - type: object
                                  required:
                                    - expected
                                    - operator
                                    - type
                                  properties:
                                    expected: {}
                                    operator:
                                      type: string
                                      enum:
                                        - EQUAL
                                        - NOT_EQUAL
                                        - GREATER_THAN
                                        - LESS_THAN
                                        - GREATER_THAN_OR_EQUAL
                                        - LESS_THAN_OR_EQUAL
                                        - CONTAINS
                                        - NOT_CONTAINS
                                        - STARTS_WITH
                                        - ENDS_WITH
                                        - NOT_STARTS_WITH
                                        - NOT_ENDS_WITH
                                    type:
                                      type: string
                                      enum:
                                        - binary
                        - type: object
                          required:
                            - nodeId
                            - subject
                            - predicate
                          properties:
                            nodeId:
                              type: string
                            subject:
                              type: string
                              enum:
                                - latency
                            predicate:
                              type: object
                              required:
                                - expected
                                - operator
                                - type
                              properties:
                                expected: {}
                                operator:
                                  type: string
                                  enum:
                                    - EQUAL
                                    - NOT_EQUAL
                                    - GREATER_THAN
                                    - LESS_THAN
                                    - GREATER_THAN_OR_EQUAL
                                    - LESS_THAN_OR_EQUAL
                                    - CONTAINS
                                    - NOT_CONTAINS
                                    - STARTS_WITH
                                    - ENDS_WITH
                                    - NOT_STARTS_WITH
                                    - NOT_ENDS_WITH
                                type:
                                  type: string
                                  enum:
                                    - binary
                        - type: object
                          required:
                            - nodeId
                            - subject
                            - responseType
                            - path
                            - predicate
                          properties:
                            nodeId:
                              type: string
                            subject:
                              type: string
                              enum:
                                - body
                            responseType:
                              type: string
                              enum:
                                - JSON
                            path:
                              type: array
                              items:
                                type: string
                            predicate:
                              anyOf:
                                - type: object
                                  required:
                                    - operator
                                    - type
                                  properties:
                                    operator:
                                      type: string
                                      enum:
                                        - IS_NULL
                                        - IS_NOT_NULL
                                        - IS_TRUE
                                        - IS_FALSE
                                        - IS_EMPTY
                                        - IS_NOT_EMPTY
                                    type:
                                      type: string
                                      enum:
                                        - unary
                                - type: object
                                  required:
                                    - expected
                                    - operator
                                    - type
                                  properties:
                                    expected: {}
                                    operator:
                                      type: string
                                      enum:
                                        - EQUAL
                                        - NOT_EQUAL
                                        - GREATER_THAN
                                        - LESS_THAN
                                        - GREATER_THAN_OR_EQUAL
                                        - LESS_THAN_OR_EQUAL
                                        - CONTAINS
                                        - NOT_CONTAINS
                                        - STARTS_WITH
                                        - ENDS_WITH
                                        - NOT_STARTS_WITH
                                        - NOT_ENDS_WITH
                                    type:
                                      type: string
                                      enum:
                                        - binary
                        - type: object
                          required:
                            - nodeId
                            - subject
                            - responseType
                          properties:
                            nodeId:
                              type: string
                            subject:
                              type: string
                              enum:
                                - body
                            responseType:
                              type: string
                              enum:
                                - NO_CONTENT
                        - type: object
                          required:
                            - nodeId
                            - subject
                            - responseType
                            - path
                            - predicate
                          properties:
                            nodeId:
                              type: string
                            subject:
                              type: string
                              enum:
                                - body
                            responseType:
                              type: string
                              enum:
                                - XML
                            path:
                              type: array
                              items:
                                type: string
                            predicate:
                              anyOf:
                                - type: object
                                  required:
                                    - operator
                                    - type
                                  properties:
                                    operator:
                                      type: string
                                      enum:
                                        - IS_NULL
                                        - IS_NOT_NULL
                                        - IS_TRUE
                                        - IS_FALSE
                                        - IS_EMPTY
                                        - IS_NOT_EMPTY
                                    type:
                                      type: string
                                      enum:
                                        - unary
                                - type: object
                                  required:
                                    - expected
                                    - operator
                                    - type
                                  properties:
                                    expected: {}
                                    operator:
                                      type: string
                                      enum:
                                        - EQUAL
                                        - NOT_EQUAL
                                        - GREATER_THAN
                                        - LESS_THAN
                                        - GREATER_THAN_OR_EQUAL
                                        - LESS_THAN_OR_EQUAL
                                        - CONTAINS
                                        - NOT_CONTAINS
                                        - STARTS_WITH
                                        - ENDS_WITH
                                        - NOT_STARTS_WITH
                                        - NOT_ENDS_WITH
                                    type:
                                      type: string
                                      enum:
                                        - binary
                        - type: object
                          required:
                            - nodeId
                            - subject
                            - predicate
                          properties:
                            nodeId:
                              type: string
                            subject:
                              type: string
                              enum:
                                - page_url
                            predicate:
                              anyOf:
                                - type: object
                                  required:
                                    - operator
                                    - type
                                  properties:
                                    operator:
                                      type: string
                                      enum:
                                        - IS_NULL
                                        - IS_NOT_NULL
                                        - IS_TRUE
                                        - IS_FALSE
                                        - IS_EMPTY
                                        - IS_NOT_EMPTY
                                    type:
                                      type: string
                                      enum:
                                        - unary
                                - type: object
                                  required:
                                    - expected
                                    - operator
                                    - type
                                  properties:
                                    expected: {}
                                    operator:
                                      type: string
                                      enum:
                                        - EQUAL
                                        - NOT_EQUAL
                                        - GREATER_THAN
                                        - LESS_THAN
                                        - GREATER_THAN_OR_EQUAL
                                        - LESS_THAN_OR_EQUAL
                                        - CONTAINS
                                        - NOT_CONTAINS
                                        - STARTS_WITH
                                        - ENDS_WITH
                                        - NOT_STARTS_WITH
                                        - NOT_ENDS_WITH
                                    type:
                                      type: string
                                      enum:
                                        - binary
                        - type: object
                          required:
                            - nodeId
                            - subject
                            - predicate
                          properties:
                            nodeId:
                              type: string
                            subject:
                              type: string
                              enum:
                                - page_title
                            predicate:
                              anyOf:
                                - type: object
                                  required:
                                    - operator
                                    - type
                                  properties:
                                    operator:
                                      type: string
                                      enum:
                                        - IS_NULL
                                        - IS_NOT_NULL
                                        - IS_TRUE
                                        - IS_FALSE
                                        - IS_EMPTY
                                        - IS_NOT_EMPTY
                                    type:
                                      type: string
                                      enum:
                                        - unary
                                - type: object
                                  required:
                                    - expected
                                    - operator
                                    - type
                                  properties:
                                    expected: {}
                                    operator:
                                      type: string
                                      enum:
                                        - EQUAL
                                        - NOT_EQUAL
                                        - GREATER_THAN
                                        - LESS_THAN
                                        - GREATER_THAN_OR_EQUAL
                                        - LESS_THAN_OR_EQUAL
                                        - CONTAINS
                                        - NOT_CONTAINS
                                        - STARTS_WITH
                                        - ENDS_WITH
                                        - NOT_STARTS_WITH
                                        - NOT_ENDS_WITH
                                    type:
                                      type: string
                                      enum:
                                        - binary
                        - type: object
                          required:
                            - nodeId
                            - subject
                            - predicate
                          properties:
                            nodeId:
                              type: string
                            subject:
                              type: string
                              enum:
                                - duration
                            predicate:
                              type: object
                              required:
                                - expected
                                - operator
                                - type
                              properties:
                                expected: {}
                                operator:
                                  type: string
                                  enum:
                                    - EQUAL
                                    - NOT_EQUAL
                                    - GREATER_THAN
                                    - LESS_THAN
                                    - GREATER_THAN_OR_EQUAL
                                    - LESS_THAN_OR_EQUAL
                                    - CONTAINS
                                    - NOT_CONTAINS
                                    - STARTS_WITH
                                    - ENDS_WITH
                                    - NOT_STARTS_WITH
                                    - NOT_ENDS_WITH
                                type:
                                  type: string
                                  enum:
                                    - binary
                        - type: object
                          required:
                            - nodeId
                            - subject
                            - predicate
                          properties:
                            nodeId:
                              type: string
                            subject:
                              type: string
                              enum:
                                - console_errors
                            predicate:
                              anyOf:
                                - type: object
                                  required:
                                    - operator
                                    - type
                                  properties:
                                    operator:
                                      type: string
                                      enum:
                                        - IS_NULL
                                        - IS_NOT_NULL
                                        - IS_TRUE
                                        - IS_FALSE
                                        - IS_EMPTY
                                        - IS_NOT_EMPTY
                                    type:
                                      type: string
                                      enum:
                                        - unary
                                - type: object
                                  required:
                                    - expected
                                    - operator
                                    - type
                                  properties:
                                    expected: {}
                                    operator:
                                      type: string
                                      enum:
                                        - EQUAL
                                        - NOT_EQUAL
                                        - GREATER_THAN
                                        - LESS_THAN
                                        - GREATER_THAN_OR_EQUAL
                                        - LESS_THAN_OR_EQUAL
                                        - CONTAINS
                                        - NOT_CONTAINS
                                        - STARTS_WITH
                                        - ENDS_WITH
                                        - NOT_STARTS_WITH
                                        - NOT_ENDS_WITH
                                    type:
                                      type: string
                                      enum:
                                        - binary
                        - type: object
                          required:
                            - nodeId
                            - subject
                            - extractName
                            - predicate
                          properties:
                            nodeId:
                              type: string
                            subject:
                              type: string
                              enum:
                                - extract
                            extractName:
                              type: string
                            predicate:
                              anyOf:
                                - type: object
                                  required:
                                    - operator
                                    - type
                                  properties:
                                    operator:
                                      type: string
                                      enum:
                                        - IS_NULL
                                        - IS_NOT_NULL
                                        - IS_TRUE
                                        - IS_FALSE
                                        - IS_EMPTY
                                        - IS_NOT_EMPTY
                                    type:
                                      type: string
                                      enum:
                                        - unary
                                - type: object
                                  required:
                                    - expected
                                    - operator
                                    - type
                                  properties:
                                    expected: {}
                                    operator:
                                      type: string
                                      enum:
                                        - EQUAL
                                        - NOT_EQUAL
                                        - GREATER_THAN
                                        - LESS_THAN
                                        - GREATER_THAN_OR_EQUAL
                                        - LESS_THAN_OR_EQUAL
                                        - CONTAINS
                                        - NOT_CONTAINS
                                        - STARTS_WITH
                                        - ENDS_WITH
                                        - NOT_STARTS_WITH
                                        - NOT_ENDS_WITH
                                    type:
                                      type: string
                                      enum:
                                        - binary
                      title: Assertion
                title: Assertions
              - type: object
                required:
                  - id
                  - type
                  - browser
                  - steps
                properties:
                  id:
                    type: string
                  type:
                    type: string
                    enum:
                      - BROWSER
                  browser:
                    type: string
                    enum:
                      - chromium
                      - firefox
                      - webkit
                    title: BrowserType
                  viewport:
                    type: object
                    required:
                      - width
                      - height
                    properties:
                      width:
                        type: number
                      height:
                        type: number
                  steps:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          required:
                            - action
                            - url
                          properties:
                            action:
                              type: string
                              enum:
                                - navigate
                            url:
                              $ref: '#/components/schemas/SecretOrString'
                            wait_until:
                              anyOf:
                                - type: string
                                  enum:
                                    - load
                                - type: string
                                  enum:
                                    - domcontentloaded
                                - type: string
                                  enum:
                                    - networkidle
                                - type: string
                                  enum:
                                    - commit
                        - type: object
                          required:
                            - action
                            - selector
                          properties:
                            action:
                              type: string
                              enum:
                                - click
                            selector:
                              type: string
                            button:
                              type: string
                              enum:
                                - left
                                - right
                                - middle
                            click_count:
                              type: number
                        - type: object
                          required:
                            - action
                            - selector
                            - value
                          properties:
                            action:
                              type: string
                              enum:
                                - fill
                            selector:
                              type: string
                            value:
                              $ref: '#/components/schemas/SecretOrString'
                        - type: object
                          required:
                            - action
                            - selector
                            - value
                          properties:
                            action:
                              type: string
                              enum:
                                - select
                            selector:
                              type: string
                            value:
                              $ref: '#/components/schemas/SecretOrString'
                        - type: object
                          required:
                            - action
                            - selector
                          properties:
                            action:
                              type: string
                              enum:
                                - wait_for_selector
                            selector:
                              type: string
                            state:
                              type: string
                              enum:
                                - visible
                                - hidden
                                - attached
                                - detached
                            timeout_ms:
                              type: number
                        - type: object
                          required:
                            - action
                            - name
                            - selector
                          properties:
                            action:
                              type: string
                              enum:
                                - extract_text
                            name:
                              type: string
                            selector:
                              type: string
                        - type: object
                          required:
                            - action
                          properties:
                            action:
                              type: string
                              enum:
                                - screenshot
                title: BrowserNode
            title: Node
        edges:
          type: array
          items:
            type: object
            required:
              - from
              - to
            properties:
              from:
                type: string
              to:
                type: string
            title: Edge
      title: MonitorV1
    SecretOrString:
      anyOf:
        - type: object
          required:
            - $secret
          properties:
            $secret:
              type: object
              required:
                - ref
              properties:
                ref:
                  type: string
                version:
                  type: string
                field:
                  type: string
        - type: object
          required:
            - $literal
          properties:
            $literal:
              type: string
        - type: object
          required:
            - $nodeRef
          properties:
            $nodeRef:
              type: object
              required:
                - nodeId
                - subject
              properties:
                nodeId:
                  type: string
                subject:
                  anyOf:
                    - type: string
                      enum:
                        - body
                    - type: string
                      enum:
                        - headers
                path:
                  type: array
                  items:
                    type: string
        - type: object
          required:
            - $template
          properties:
            $template:
              type: object
              required:
                - strings
                - values
              properties:
                strings:
                  type: array
                  items:
                    type: string
                values:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        required:
                          - $secret
                        properties:
                          $secret:
                            type: object
                            required:
                              - ref
                            properties:
                              ref:
                                type: string
                              version:
                                type: string
                              field:
                                type: string
                      - type: object
                        required:
                          - $nodeRef
                        properties:
                          $nodeRef:
                            type: object
                            required:
                              - nodeId
                              - subject
                            properties:
                              nodeId:
                                type: string
                              subject:
                                anyOf:
                                  - type: string
                                    enum:
                                      - body
                                  - type: string
                                    enum:
                                      - headers
                              path:
                                type: array
                                items:
                                  type: string
      title: SecretOrString
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````