> ## 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 Ophalen

> Haalt een monitor op via ID, inclusief last_run en total_count. Gebruik include-diagram=true voor een Mermaid DAG-diagram en include_total_count=false om het snapshot-aantal weg te laten.



## OpenAPI

````yaml nl/openapi/monitors.json GET /v1/monitors/{monitor_id}
openapi: 3.0.3
info:
  title: Monitors API
  version: 1.0.0
servers:
  - url: https://api.olostep.com
security: []
paths:
  /v1/monitors/{monitor_id}:
    get:
      summary: Haal Monitor op
      description: >-
        Haalt een monitor op, inclusief `last_run` en standaard snapshot
        `total_count`.
      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: Stel in op `false` of `0` om `total_count` weg te laten.
        - name: include-diagram
          in: query
          required: false
          schema:
            type: string
            enum:
              - 'true'
              - '1'
          description: Wanneer waar, bevat `mermaid_diagram` voor de monitor DAG.
      responses:
        '200':
          description: Monitor opgehaald.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Monitor'
        '400':
          description: Ongeldige monitor_id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Ongeldige API-sleutel.
        '404':
          description: Monitor niet gevonden.
        '500':
          description: Interne serverfout.
      security:
        - Authorization: []
components:
  schemas:
    Monitor:
      type: object
      properties:
        id:
          type: string
          description: Unieke monitoridentificatie (`monitor_…`).
        object:
          type: string
          example: monitor
        query:
          type: string
          description: Monitoring intentie in natuurlijke taal.
        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: Optioneel JSON Schema voor gestructureerde extractie-output.
        status:
          type: string
          enum:
            - provisioning
            - active
            - paused
            - failed
            - deleted
          description: Monitor levenscyclusstatus.
        error_message:
          type: string
          nullable: true
          description: Aanwezig wanneer `status` `failed` is.
        last_run:
          allOf:
            - $ref: '#/components/schemas/MonitorLastRun'
          nullable: true
          description: >-
            Laatste snapshot samenvatting. Inbegrepen bij `GET
            /v1/monitors/{monitor_id}`.
        agent:
          $ref: '#/components/schemas/MonitorAgent'
        metadata:
          type: object
          additionalProperties: true
        created:
          type: integer
          description: Unix-timestamp (seconden).
        updated:
          type: integer
          description: Unix-timestamp (seconden).
        total_count:
          type: integer
          description: >-
            Totaal aantal snapshots. Inbegrepen bij `GET
            /v1/monitors/{monitor_id}` tenzij `include_total_count=false`.
        mermaid_diagram:
          type: string
          description: >-
            Mermaid-stroomdiagram van de monitor DAG. Inbegrepen wanneer
            `include-diagram=true` bij ophalen.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        monitor_id:
          type: string
          description: Aanwezig bij sommige foutreacties bij aanmaken/bijwerken.
    MonitorTracked:
      type: object
      description: Opgeloste doelen die de monitor volgt nadat de planning is voltooid.
      properties:
        type:
          type: string
          nullable: true
          description: Getraceerd oppervlaktype (bijvoorbeeld `url` of `web_query`).
        urls:
          type: array
          items:
            type: string
            format: uri
          description: Concrete URLs die worden gemonitord.
        web_query:
          type: string
          nullable: true
          description: >-
            Webzoekopdracht gebruikt wanneer de monitor een dynamische
            resultaatset volgt.
    MonitorSourcePolicy:
      type: object
      description: >-
        Optionele URL/domein toestaan- en weigerenlijsten toegepast tijdens
        planning en uitvoering.
      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: Natuurlijk-taal schema tekst (bijvoorbeeld `elke uur`).
        cron:
          type: string
          nullable: true
          description: Cron-expressie afgeleid van `frequency`.
        timezone:
          type: string
          example: UTC
          description: Schema tijdzone. Momenteel `UTC` voor monitorschema's.
        next_run_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            Volgende geplande uitvoering (ISO 8601). `null` wanneer de monitor
            niet `active` is.
    MonitorNotification:
      type: object
      properties:
        events:
          type: array
          items:
            type: string
            enum:
              - changed
              - first_snapshot
          description: >-
            Wanneer te informeren. `changed` — lever wanneer een verandering
            wordt gedetecteerd ten opzichte van de vorige snapshot.
            `first_snapshot` — lever wanneer de eerste basislijnsnapshot wordt
            genomen. Standaard beide wanneer `channels` niet leeg is en `events`
            leeg is.
        channels:
          type: array
          items:
            $ref: '#/components/schemas/NotificationChannel'
          description: >-
            E-mail, Slack, of SMS leveringsdoelen. Opgelost tijdens runtime door
            de monitorpipeline.
    MonitorWebhook:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          format: uri
          description: >-
            HTTP/HTTPS URL die monitorpayloads ontvangt (afzonderlijk van
            `notification.channels`).
    MonitorLastRun:
      type: object
      properties:
        id:
          type: string
          nullable: true
          description: Run ID van de laatste snapshot (`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 shadow agent ID gebruikt om de monitor DAG uit te voeren.
    NotificationChannel:
      type: object
      required:
        - type
        - target
      properties:
        type:
          type: string
          enum:
            - email
            - slack
            - sms
          description: Type leveringskanaal.
        target:
          type: string
          description: E-mailadres, Slack webhook URL, of E.164 telefoonnummer (voor SMS).
        events:
          type: array
          items:
            type: string
            enum:
              - changed
              - first_snapshot
          description: >-
            Optionele per-kanaal gebeurtenisfilter. Wanneer weggelaten, volgt
            kanaallevering de bovenliggende `notification.events` (of
            standaardinstellingen wanneer kanalen zijn ingesteld).
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: >-
        Bearer authenticatie header in de vorm Bearer <token>, waar <token> jouw
        auth token is.

````