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

# Currently active alerts (live mode)

> Live alerts, for example from api.weather.gov/alerts/active via a Zetaris Lightning REST table. Returns an empty list offline.



## OpenAPI

````yaml /contract/openapi.yaml get /alerts/active
openapi: 3.1.0
info:
  title: Porch Light API
  version: 0.1.0
  summary: >-
    The shared contract every Porch Light agent builds against. Country
    agnostic: everything US specific sits behind the country adapter interface
    in contract/adapter.md.
  description: >-
    Porch Light takes a weather alert in, builds the warning area, ranks the
    facilities inside it with a fixed transparent formula, and returns a call
    sheet where every row carries its evidence trail. Zetaris is the only data
    path. Meterless is the only model path. Nemotron explains, the formula
    ranks.
  license:
    name: AGPL-3.0
servers: []
security:
  - bearerAuth: []
tags:
  - name: alerts
  - name: runs
  - name: health
paths:
  /alerts/active:
    get:
      tags:
        - alerts
      summary: Currently active alerts (live mode)
      description: >-
        Live alerts, for example from api.weather.gov/alerts/active via a
        Zetaris Lightning REST table. Returns an empty list offline.
      operationId: listActiveAlerts
      parameters:
        - name: country
          in: query
          schema:
            type: string
            example: us
      responses:
        '200':
          description: Active alerts, possibly empty
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertList'
        '503':
          description: Source unreachable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    AlertList:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Alert'
        empty_state:
          $ref: '#/components/schemas/EmptyState'
    ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              $ref: '#/components/schemas/ErrorCode'
            message:
              type: string
            detail: {}
            retry_after_ms:
              type: integer
    Alert:
      type: object
      required:
        - id
        - country
        - source
        - event
        - headline
        - sent
        - zone_based
        - affected_zones
      properties:
        id:
          type: string
          example: iem-2024-milton-flz-12081-mock
        country:
          $ref: '#/components/schemas/CountryCode'
        source:
          type: string
          enum:
            - nws
            - iem
            - gdacs
            - cap
            - mock
          description: Which adapter source produced the alert.
        event:
          type: string
          example: Hurricane Warning
        headline:
          type: string
        severity:
          type: string
          enum:
            - extreme
            - severe
            - moderate
            - minor
            - unknown
        urgency:
          type: string
          enum:
            - immediate
            - expected
            - future
            - past
            - unknown
        certainty:
          type: string
          enum:
            - observed
            - likely
            - possible
            - unlikely
            - unknown
        sent:
          type: string
          format: date-time
        effective:
          type: string
          format: date-time
        expires:
          type: string
          format: date-time
        geocode:
          type: object
          properties:
            ugc:
              type: array
              items:
                type: string
              example:
                - FLZ152
            same:
              type: array
              items:
                type: string
              example:
                - '012081'
        affected_zones:
          type: array
          items:
            $ref: '#/components/schemas/ZoneRef'
        geometry:
          description: >-
            GeoJSON Polygon or MultiPolygon. Storm based warnings carry one;
            zone based alerts (hurricane, coastal flood) are null.
          oneOf:
            - type: object
            - type: 'null'
        zone_based:
          type: boolean
        vtec:
          type: object
          description: VTEC fields when the source carries them (NWS, IEM).
          properties:
            office:
              type: string
              example: TBW
            phenomena:
              type: string
              example: HU
            significance:
              type: string
              example: W
            event_id:
              type: integer
              example: 42
        raw_ref:
          type: string
          description: >-
            Repo relative path of the captured raw JSON and its provenance
            sidecar.
        fetched_at:
          type: string
          format: date-time
        mock:
          type: boolean
          description: True when the alert is fixture data, never a real measurement.
    EmptyState:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - no_facilities
            - no_alerts
            - no_joins
            - no_dependents_data
        message:
          type: string
          example: No facilities sit inside the warning area.
    ErrorCode:
      type: string
      enum:
        - not_found
        - bad_request
        - no_facilities
        - source_stale
        - zetaris_down
        - meterless_unauthorized
        - meterless_offline
        - timeout
        - export_refused
    CountryCode:
      type: string
      description: >-
        Lowercase adapter country key (us, jm, ph, ...), not an enum so new
        adapters do not change the contract.
      example: us
    ZoneRef:
      type: object
      required:
        - id
        - kind
      properties:
        id:
          type: string
          example: FLZ152
        kind:
          type: string
          enum:
            - county
            - zone
            - tract
            - admin
            - grid
            - cap_area
        name:
          type: string
        country:
          $ref: '#/components/schemas/CountryCode'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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