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

# Monitor abrufen

> Ruft einen Monitor anhand der ID ab, einschließlich last_run und total_count. Verwende include-diagram=true für ein Mermaid DAG-Diagramm und include_total_count=false, um die Snapshot-Anzahl auszuschließen.



## OpenAPI

````yaml de/openapi/monitors.json GET /v1/monitors/{monitor_id}
openapi: 3.0.3
info:
  title: Monitore API
  version: 1.0.0
servers:
  - url: https://api.olostep.com
security: []
paths:
  /v1/monitors/{monitor_id}:
    get:
      summary: Monitor abrufen
      description: >-
        Ruft einen Monitor ab, einschließlich `last_run` und Snapshot
        `total_count` standardmäßig.
      parameters:
        - name: monitor_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^monitor_
        - name: include_total_count
          in: query
          required: false
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
              - '0'
              - '1'
          description: Auf `false` oder `0` setzen, um `total_count` auszulassen.
        - name: include-diagram
          in: query
          required: false
          schema:
            type: string
            enum:
              - 'true'
              - '1'
          description: >-
            Wenn wahr, wird `mermaid_diagram` für den Monitor-DAG
            eingeschlossen.
      responses:
        '200':
          description: Monitor abgerufen.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Monitor'
        '400':
          description: Ungültige monitor_id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Ungültiger API-Schlüssel.
        '404':
          description: Monitor nicht gefunden.
        '500':
          description: Interner Serverfehler.
      security:
        - Authorization: []
components:
  schemas:
    Monitor:
      type: object
      properties:
        id:
          type: string
          description: Eindeutiger Monitor-Identifikator (`monitor_…`).
        object:
          type: string
          example: monitor
        query:
          type: string
          description: Überwachungsabsicht in natürlicher Sprache.
        tracked:
          $ref: '#/components/schemas/MonitorTracked'
        source_policy:
          $ref: '#/components/schemas/MonitorSourcePolicy'
        schedule:
          $ref: '#/components/schemas/MonitorSchedule'
        notification:
          $ref: '#/components/schemas/MonitorNotification'
        webhook:
          allOf:
            - $ref: '#/components/schemas/MonitorWebhook'
          nullable: true
        output_schema:
          type: object
          additionalProperties: true
          nullable: true
          description: Optionales JSON-Schema für strukturierten Extraktions-Output.
        status:
          type: string
          enum:
            - provisioning
            - active
            - paused
            - failed
            - deleted
          description: Überwache den Lebenszyklusstatus.
        error_message:
          type: string
          nullable: true
          description: Vorhanden, wenn `status` `failed` ist.
        last_run:
          allOf:
            - $ref: '#/components/schemas/MonitorLastRun'
          nullable: true
          description: >-
            Zusammenfassung des neuesten Snapshots. Enthalten bei `GET
            /v1/monitors/{monitor_id}`.
        agent:
          $ref: '#/components/schemas/MonitorAgent'
        metadata:
          type: object
          additionalProperties: true
        created:
          type: integer
          description: Unix-Zeitstempel (Sekunden).
        updated:
          type: integer
          description: Unix-Zeitstempel (Sekunden).
        total_count:
          type: integer
          description: >-
            Gesamtanzahl der Snapshots. Enthalten bei `GET
            /v1/monitors/{monitor_id}`, es sei denn `include_total_count=false`.
        mermaid_diagram:
          type: string
          description: >-
            Mermaid-Flussdiagramm des Monitor-DAG. Enthalten, wenn
            `include-diagram=true` bei Abruf gesetzt ist.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        monitor_id:
          type: string
          description: Vorhanden bei einigen Erstellungs-/Aktualisierungsfehlerantworten.
    MonitorTracked:
      type: object
      description: Aufgelöste Ziele, die der Monitor nach Abschluss der Planung verfolgt.
      properties:
        type:
          type: string
          nullable: true
          description: Verfolgter Oberflächentyp (zum Beispiel `url` oder `web_query`).
        urls:
          type: array
          items:
            type: string
            format: uri
          description: Konkrete URLs, die überwacht werden.
        web_query:
          type: string
          nullable: true
          description: >-
            Websuchanfrage, die verwendet wird, wenn der Monitor eine dynamische
            Ergebnismenge verfolgt.
    MonitorSourcePolicy:
      type: object
      description: >-
        Optionale URL-/Domain-Zulassungs- und Sperrlisten, die während der
        Planung und Ausführung angewendet werden.
      properties:
        include_urls:
          type: array
          items:
            type: string
            format: uri
        exclude_urls:
          type: array
          items:
            type: string
            format: uri
        include_domains:
          type: array
          items:
            type: string
        exclude_domains:
          type: array
          items:
            type: string
    MonitorSchedule:
      type: object
      properties:
        frequency:
          type: string
          nullable: true
          description: Zeitplantext in natürlicher Sprache (zum Beispiel `every hour`).
        cron:
          type: string
          nullable: true
          description: Cron-Ausdruck, abgeleitet von `frequency`.
        timezone:
          type: string
          example: UTC
          description: Zeitzone des Zeitplans. Derzeit `UTC` für Monitor-Zeitpläne.
        next_run_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            Nächster geplanter Lauf (ISO 8601). `null`, wenn der Monitor nicht
            `active` ist.
    MonitorNotification:
      type: object
      properties:
        events:
          type: array
          items:
            type: string
            enum:
              - changed
              - first_snapshot
          description: >-
            Wann benachrichtigt werden soll. `changed` — Benachrichtigung, wenn
            eine Änderung im Vergleich zum vorherigen Snapshot erkannt wird.
            `first_snapshot` — Benachrichtigung, wenn der erste
            Baseline-Snapshot erstellt wird. Standardmäßig beides, wenn
            `channels` nicht leer ist und `events` leer ist.
        channels:
          type: array
          items:
            $ref: '#/components/schemas/NotificationChannel'
          description: >-
            E-Mail-, Slack- oder SMS-Zustellziele. Zur Laufzeit durch die
            Monitor-Pipeline aufgelöst.
    MonitorWebhook:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          format: uri
          description: >-
            HTTP/HTTPS-URL, die Monitor-Payloads empfängt (getrennt von
            `notification.channels`).
    MonitorLastRun:
      type: object
      properties:
        id:
          type: string
          nullable: true
          description: Run-ID des neuesten Snapshots (`run_…`).
        status:
          type: string
          example: completed
        change_detected:
          type: boolean
          nullable: true
        ran_at:
          type: string
          format: date-time
          nullable: true
    MonitorAgent:
      type: object
      properties:
        id:
          type: string
          nullable: true
          description: >-
            Interne Schattenagenten-ID, die zur Ausführung des Monitor-DAG
            verwendet wird.
    NotificationChannel:
      type: object
      required:
        - type
        - target
      properties:
        type:
          type: string
          enum:
            - email
            - slack
            - sms
          description: Typ des Übertragungskanals.
        target:
          type: string
          description: >-
            E-Mail-Adresse, Slack-Webhook-URL oder E.164-Telefonnummer (für
            SMS).
        events:
          type: array
          items:
            type: string
            enum:
              - changed
              - first_snapshot
          description: >-
            Optionaler ereignisspezifischer Filter pro Kanal. Wenn weggelassen,
            folgt die Kanalzustellung den obersten `notification.events` (oder
            den Standardeinstellungen, wenn Kanäle festgelegt sind).
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: >-
        Bearer-Authentifizierungsheader in der Form Bearer <token>, wobei
        <token> dein Authentifizierungstoken ist.

````