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

# Inspect Scout alert rules

> Inspect Scout alert rules through the Towbar REST API.

Required permissions: alert.read. Personal keys are capped by their owner’s current team role.

See [request conventions](/docs/api/overview) and [automation workflows](/docs/api/workflows). MCP clients use the task-oriented [tool catalogue](/docs/api/mcp-tools).


## OpenAPI

````yaml api-reference/openapi.json GET /servers/{serverId}/scout-alerts
openapi: 3.1.0
info:
  title: Towbar API
  version: 2.0.0
  description: >-
    Manage your Towbar control plane with a bearer API key. Keys inherit current
    workspace permissions.
servers:
  - url: https://api.example.com/v1/api
security: []
paths:
  /servers/{serverId}/scout-alerts:
    get:
      tags:
        - Servers / Scout Alerts
      summary: Inspect Scout alert rules
      description: >-
        Required permissions: alert.read. Personal keys are capped by the
        current member role; team keys use explicit grants.
      operationId: get_servers_by_id_scout_alerts
      parameters:
        - name: serverId
          in: path
          required: true
          schema:
            $schema: https://json-schema.org/draft/2020-12/schema
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        - name: deployableId
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              - type: string
                const: server
      responses:
        '200':
          description: Rules, evaluation status, and available destinations.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Response_79'
                  - type: object
                    properties:
                      localization:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        type: object
                        properties:
                          dateFormat:
                            type: string
                            enum:
                              - day-short-month-year
                              - short-month-day-year
                              - year-month-day
                              - day-month-year
                              - month-day-year
                          timeFormat:
                            type: string
                            enum:
                              - 24-hour
                              - 12-hour
                              - 24-hour-seconds
                              - 12-hour-seconds
                          timeZone:
                            type: string
                          timestamps:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties:
                              type: object
                              properties:
                                date:
                                  type: string
                                time:
                                  type:
                                    - string
                                    - 'null'
                                dateTime:
                                  type:
                                    - string
                                    - 'null'
                                timeZone:
                                  type: string
                                zoneLabel:
                                  type: string
                                epochMilliseconds:
                                  type: number
                                inputDateTime:
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - date
                                - time
                                - dateTime
                                - timeZone
                                - zoneLabel
                                - epochMilliseconds
                                - inputDateTime
                              additionalProperties: false
                        required:
                          - dateFormat
                          - timeFormat
                          - timeZone
                          - timestamps
                        additionalProperties: false
                    required:
                      - localization
        '400':
          $ref: '#/components/responses/ApiError'
        '401':
          $ref: '#/components/responses/ApiError'
        '403':
          $ref: '#/components/responses/ApiError'
        '404':
          $ref: '#/components/responses/ApiError'
        '409':
          $ref: '#/components/responses/ApiError'
        '413':
          $ref: '#/components/responses/ApiError'
        '422':
          $ref: '#/components/responses/ApiError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ApiError'
      security:
        - bearerAuth: []
components:
  schemas:
    Response_79:
      type: object
      properties:
        rules:
          type: array
          items:
            $ref: '#/components/schemas/Response_80'
        workloads:
          type: array
          items:
            $ref: '#/components/schemas/Response_84'
        destinations:
          type: array
          items:
            $ref: '#/components/schemas/Response_85'
        providers:
          $ref: '#/components/schemas/Response_86'
        canManage:
          type: boolean
      required:
        - rules
        - workloads
        - destinations
        - providers
        - canManage
    Response_80:
      type: object
      properties:
        httpCheck:
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/Response_81'
        id:
          type: string
        workspaceId:
          type: string
        serverId:
          type: string
        deployableId:
          anyOf:
            - type: 'null'
            - type: string
        name:
          type: string
        enabled:
          type: boolean
        severity:
          type: string
        environment:
          type: string
        condition:
          $ref: '#/components/schemas/Response_82'
        evaluationState:
          type: string
        evaluatedAt:
          anyOf:
            - type: 'null'
            - type: string
              format: date-time
        observedValue:
          anyOf:
            - type: 'null'
            - type: number
        deletedAt:
          anyOf:
            - type: 'null'
            - type: string
              format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - httpCheck
        - id
        - workspaceId
        - serverId
        - deployableId
        - name
        - enabled
        - severity
        - environment
        - condition
        - evaluationState
        - evaluatedAt
        - observedValue
        - deletedAt
        - createdAt
        - updatedAt
    Response_84:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        sourceId:
          type: string
        kind:
          anyOf:
            - type: string
              const: app
            - type: string
              const: compose
            - type: string
              const: image
            - type: string
              const: postgres
            - type: string
              const: mysql
            - type: string
              const: mariadb
            - type: string
              const: mongodb
            - type: string
              const: redis
            - type: string
              const: dragonfly
            - type: string
              const: keydb
            - type: string
              const: clickhouse
      required:
        - id
        - name
        - sourceId
        - kind
    Response_85:
      type: object
      properties:
        categories:
          type: array
          items:
            anyOf:
              - type: string
                const: health
              - type: string
                const: scout
              - type: string
                const: previews
              - type: string
                const: deployments
              - type: string
                const: backups
              - type: string
                const: restores
        enabled:
          type: boolean
        id:
          type: string
        provider:
          anyOf:
            - type: string
              const: discord
            - type: string
              const: slack
            - type: string
              const: smtp
            - type: string
              const: telegram
            - type: string
              const: webhook
        source:
          type: string
          const: environment
      required:
        - categories
        - enabled
        - id
        - provider
        - source
    Response_86:
      type: object
      properties:
        discord:
          type: boolean
        slack:
          type: boolean
        smtp:
          type: boolean
        telegram:
          type: boolean
        webhook:
          type: boolean
      required:
        - discord
        - slack
        - smtp
        - telegram
        - webhook
    Response_81:
      type: object
      properties:
        rule_id:
          type: string
        checked_at:
          anyOf:
            - type: 'null'
            - type: string
        state:
          type: string
        status_code:
          anyOf:
            - type: 'null'
            - type: number
        latency_ms:
          anyOf:
            - type: 'null'
            - type: number
        reason:
          anyOf:
            - type: 'null'
            - type: string
      required:
        - rule_id
        - checked_at
        - state
        - status_code
        - latency_ms
        - reason
    Response_82:
      type: object
      properties:
        metric:
          anyOf:
            - type: string
              const: cpuPercent
            - type: string
              const: cpuCores
            - type: string
              const: cpuLimitCores
            - type: string
              const: memoryUsedBytes
            - type: string
              const: memoryTotalBytes
            - type: string
              const: memoryLimitBytes
            - type: string
              const: memoryPercent
            - type: string
              const: swapUsedBytes
            - type: string
              const: swapTotalBytes
            - type: string
              const: diskTotalBytes
            - type: string
              const: diskUsedBytes
            - type: string
              const: diskPercent
            - type: string
              const: dockerDiskTotalBytes
            - type: string
              const: dockerDiskUsedBytes
            - type: string
              const: dockerDiskPercent
            - type: string
              const: diskReadBytesPerSecond
            - type: string
              const: diskWriteBytesPerSecond
            - type: string
              const: networkRxBytesPerSecond
            - type: string
              const: networkTxBytesPerSecond
            - type: string
              const: uptimeSeconds
            - type: string
              const: load1
            - type: string
              const: load5
            - type: string
              const: load15
            - type: string
              const: restarts
            - type: string
              const: missingReports
            - type: string
              const: httpAvailability
        operator:
          anyOf:
            - type: string
              const: above
            - type: string
              const: below
        threshold:
          type: number
        windowSeconds:
          type: number
        aggregation:
          anyOf:
            - type: string
              const: average
            - type: string
              const: peak
        http:
          $ref: '#/components/schemas/Response_83'
      required:
        - metric
        - operator
        - threshold
        - windowSeconds
        - aggregation
    Response_83:
      type: object
      properties:
        url:
          type: string
        method:
          anyOf:
            - type: string
              const: GET
            - type: string
              const: HEAD
        intervalSeconds:
          type: number
        timeoutSeconds:
          type: number
        expectedStatusMin:
          type: number
        expectedStatusMax:
          type: number
        maxRedirects:
          type: number
      required:
        - url
        - method
        - intervalSeconds
        - timeoutSeconds
        - expectedStatusMin
        - expectedStatusMax
        - maxRedirects
  responses:
    ApiError:
      description: Request failed. The error object contains code, message, and requestId.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                required:
                  - code
                  - message
                  - requestId
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
    RateLimited:
      description: Request failed. The error object contains code, message, and requestId.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                required:
                  - code
                  - message
                  - requestId
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
      headers:
        Retry-After:
          description: Seconds before retrying
          schema:
            type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Towbar API key

````