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

# Riprendi Monitor

> Riprende un monitor in pausa riattivando le esecuzioni programmate.



## OpenAPI

````yaml it/openapi/monitors.json POST /v1/monitors/{monitor_id}/resume
openapi: 3.0.3
info:
  title: API dei Monitor
  version: 1.0.0
servers:
  - url: https://api.olostep.com
security: []
paths:
  /v1/monitors/{monitor_id}/resume:
    post:
      summary: Riprendi Monitor
      description: >-
        Riabilita il programma del monitor e imposta `status` su `active`. Solo
        i monitor `paused` possono essere ripresi.
      parameters:
        - name: monitor_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^monitor_
      responses:
        '200':
          description: Monitor ripreso.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Monitor'
        '400':
          description: Richiesta non valida.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Chiave API non valida.
        '404':
          description: Monitor non trovato.
        '409':
          description: Programma mancante o monitor non più in pausa.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Errore interno del server.
      security:
        - Authorization: []
components:
  schemas:
    Monitor:
      type: object
      properties:
        id:
          type: string
          description: Identificatore unico del monitor (`monitor_…`).
        object:
          type: string
          example: monitor
        query:
          type: string
          description: Intento di monitoraggio in linguaggio naturale.
        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: Schema JSON opzionale per l'output di estrazione strutturata.
        status:
          type: string
          enum:
            - provisioning
            - active
            - paused
            - failed
            - deleted
          description: Monitora lo stato del ciclo di vita.
        error_message:
          type: string
          nullable: true
          description: Presente quando `status` è `failed`.
        last_run:
          allOf:
            - $ref: '#/components/schemas/MonitorLastRun'
          nullable: true
          description: >-
            Riepilogo dell'istantanea più recente. Incluso su `GET
            /v1/monitors/{monitor_id}`.
        agent:
          $ref: '#/components/schemas/MonitorAgent'
        metadata:
          type: object
          additionalProperties: true
        created:
          type: integer
          description: Timestamp Unix (secondi).
        updated:
          type: integer
          description: Timestamp Unix (secondi).
        total_count:
          type: integer
          description: >-
            Conteggio totale delle istantanee. Incluso su `GET
            /v1/monitors/{monitor_id}` a meno che `include_total_count=false`.
        mermaid_diagram:
          type: string
          description: >-
            Diagramma di flusso Mermaid del DAG del monitor. Incluso quando
            `include-diagram=true` su get.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        monitor_id:
          type: string
          description: Presente su alcune risposte di errore di creazione/aggiornamento.
    MonitorTracked:
      type: object
      description: >-
        Target risolti che il monitor traccia dopo che la pianificazione è
        completata.
      properties:
        type:
          type: string
          nullable: true
          description: Tipo di superficie tracciata (ad esempio `url` o `web_query`).
        urls:
          type: array
          items:
            type: string
            format: uri
          description: URL concreti monitorati.
        web_query:
          type: string
          nullable: true
          description: >-
            Query di ricerca web utilizzata quando il monitor traccia un set di
            risultati dinamico.
    MonitorSourcePolicy:
      type: object
      description: >-
        Liste di permessi e negazioni opzionali di URL/domini applicate durante
        la pianificazione e l'esecuzione.
      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: >-
            Testo di pianificazione in linguaggio naturale (ad esempio `ogni
            ora`).
        cron:
          type: string
          nullable: true
          description: Espressione Cron derivata da `frequency`.
        timezone:
          type: string
          example: UTC
          description: >-
            Fuso orario della pianificazione. Attualmente `UTC` per le
            pianificazioni dei monitor.
        next_run_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            Prossima esecuzione pianificata (ISO 8601). `null` quando il monitor
            non è `active`.
    MonitorNotification:
      type: object
      properties:
        events:
          type: array
          items:
            type: string
            enum:
              - changed
              - first_snapshot
          description: >-
            Quando notificare. `changed` — consegna quando viene rilevato un
            cambiamento rispetto allo snapshot precedente. `first_snapshot` —
            consegna quando viene preso il primo snapshot di riferimento.
            Predefinito a entrambi quando `channels` non è vuoto e `events` è
            vuoto.
        channels:
          type: array
          items:
            $ref: '#/components/schemas/NotificationChannel'
          description: >-
            Destinatari di consegna via Email, Slack, o SMS. Risolti a runtime
            dalla pipeline del monitor.
    MonitorWebhook:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          format: uri
          description: >-
            URL HTTP/HTTPS che riceve i payload del monitor (separato da
            `notification.channels`).
    MonitorLastRun:
      type: object
      properties:
        id:
          type: string
          nullable: true
          description: ID di esecuzione dell'ultimo 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: ID agente ombra interno utilizzato per eseguire il DAG del monitor.
    NotificationChannel:
      type: object
      required:
        - type
        - target
      properties:
        type:
          type: string
          enum:
            - email
            - slack
            - sms
          description: Tipo di canale di consegna.
        target:
          type: string
          description: >-
            Indirizzo email, URL webhook di Slack, o numero di telefono E.164
            (per SMS).
        events:
          type: array
          items:
            type: string
            enum:
              - changed
              - first_snapshot
          description: >-
            Filtro eventi opzionale per canale. Quando omesso, la consegna del
            canale segue `notification.events` a livello superiore (o i valori
            predefiniti quando i canali sono impostati).
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: >-
        Intestazione di autenticazione Bearer del tipo Bearer <token>, dove
        <token> è il tuo token di autenticazione.

````