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

# Get preview details

> One preview, with its progress, the event distribution, and the events found so far. Poll it about once a second after creating a preview.

`window` is null while the preview is `QUEUED`. While `PENDING`, `events` holds the events so far, and each event id stays the same from the first time it appears. `events_truncated` means the in-progress copy hit its size cap; the rest appear when the preview completes. Previews do not judge novelty, so ignore `novel` on their events.



## OpenAPI

````yaml /api-rest/openapi/openapi_search_monitoring.json get /v1/monitors/{monitor_id}/preview/{preview_id}
openapi: 3.1.0
info:
  title: Monitors API
  description: >-
    Run a saved Bigdata search on a schedule and get structured events when new
    content matches. Test a monitor on recent history before you turn it on.
  version: 1.0.0
servers:
  - url: https://api.bigdata.com
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Monitors
    description: Create a monitor, test it on past content, then turn it on.
paths:
  /v1/monitors/{monitor_id}/preview/{preview_id}:
    get:
      tags:
        - Monitors
      summary: Get preview details
      description: >-
        One preview, with its progress, the event distribution, and the events
        found so far. Poll it about once a second after creating a preview.


        `window` is null while the preview is `QUEUED`. While `PENDING`,
        `events` holds the events so far, and each event id stays the same from
        the first time it appears. `events_truncated` means the in-progress copy
        hit its size cap; the rest appear when the preview completes. Previews
        do not judge novelty, so ignore `novel` on their events.
      operationId: getPreview
      parameters:
        - $ref: '#/components/parameters/MonitorId'
        - $ref: '#/components/parameters/PreviewId'
      responses:
        '200':
          description: Preview returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreviewResponse'
              example:
                data:
                  preview_id: 1d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f60
                  monitor_id: 6af74cb7-0a6e-4ea0-8421-acde4c85e56a
                  status: COMPLETED
                  requested_at: '2026-10-23T09:00:00Z'
                  window:
                    start: '2026-10-22T09:00:00Z'
                    end: '2026-10-23T09:00:00Z'
                    picked_by: volume
                    volume: 120
                  event_count: 1
                  error: null
                  progress:
                    chunks_read: 80
                    batches_done: 4
                    batches_total: 4
                    search_capped: false
                  event_distribution:
                    bucket_seconds: 3600
                    unit: hour
                    buckets:
                      - start: '2026-10-23T08:00:00Z'
                        search_results: 12
                        events: 1
                        novel_events: null
                  events:
                    - id: 6af74cb7-0a6e-4ea0-8421-acde4c85e56a:0
                      summary: BlackRock CFO resigned.
                      novel: false
                      company:
                        name: BlackRock
                        rp_entity_id: HJ95FV
                      departure_type: resignation
                      grounding:
                        - id: A97B4203751F
                          headline: BlackRock CFO steps down
                          source:
                            id: 5E6268
                            name: Reuters
                          url: https://example.com/blackrock-cfo-steps-down
                          cnum: 0
                          timestamp: '2026-10-23T08:12:00Z'
                  events_truncated: false
                metadata:
                  request_id: 9f2c6b18-4e7a-4d05-8c31-0a6e5d2b91f4
                  timestamp: '2026-10-23T09:00:00Z'
        '401':
          description: An API key is required.
        '404':
          description: No preview was found for this id on this monitor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                errors:
                  - message: Preview not found
                metadata:
                  request_id: 9f2c6b18-4e7a-4d05-8c31-0a6e5d2b91f4
                  timestamp: '2026-10-23T09:00:00Z'
        '413':
          description: The response is too large.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                errors:
                  - message: Response too large
                metadata:
                  request_id: 9f2c6b18-4e7a-4d05-8c31-0a6e5d2b91f4
                  timestamp: '2026-10-23T09:00:00Z'
        '422':
          description: >-
            Something in the request is invalid. Each error names the field and
            what to change.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                errors:
                  - message: 'schedule.frequency: value is not a valid frequency'
                metadata:
                  request_id: 9f2c6b18-4e7a-4d05-8c31-0a6e5d2b91f4
                  timestamp: '2026-10-23T09:00:00Z'
        '500':
          description: The preview could not be read.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                errors:
                  - message: Internal server error
                metadata:
                  request_id: 9f2c6b18-4e7a-4d05-8c31-0a6e5d2b91f4
                  timestamp: '2026-10-23T09:00:00Z'
components:
  parameters:
    MonitorId:
      name: monitor_id
      in: path
      required: true
      description: Id returned when you created the monitor.
      schema:
        type: string
        format: uuid
      example: 6af74cb7-0a6e-4ea0-8421-acde4c85e56a
    PreviewId:
      name: preview_id
      in: path
      required: true
      description: Preview id, from Preview a monitor.
      schema:
        type: string
        format: uuid
      example: 1d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f60
  schemas:
    PreviewResponse:
      type: object
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/Preview'
        metadata:
          $ref: '#/components/schemas/Metadata'
      required:
        - data
        - metadata
    ErrorResponse:
      type: object
      additionalProperties: false
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorEntry'
        metadata:
          $ref: '#/components/schemas/Metadata'
      required:
        - errors
        - metadata
    Preview:
      type: object
      additionalProperties: false
      description: Preview summary plus progress, distribution, and events.
      properties:
        preview_id:
          type: string
          format: uuid
        status:
          $ref: '#/components/schemas/PreviewStatus'
        requested_at:
          type: string
          format: date-time
        window:
          description: Null while the preview is queued.
          anyOf:
            - $ref: '#/components/schemas/PreviewWindow'
            - type: 'null'
        event_count:
          type: integer
          minimum: 0
        error:
          type:
            - string
            - 'null'
        monitor_id:
          type: string
          format: uuid
        progress:
          $ref: '#/components/schemas/PreviewProgress'
        event_distribution:
          $ref: '#/components/schemas/PreviewDistribution'
        events:
          type: array
          description: >-
            Events, oldest first. While `PENDING`, the events so far, and each
            event id stays the same from the first time it appears. Previews do
            not judge novelty, so ignore `novel`.
          items:
            $ref: '#/components/schemas/MonitorEvent'
        events_truncated:
          type: boolean
          description: >-
            True when the in-progress copy hit its size cap. The rest appear
            when the preview completes.
      required:
        - preview_id
        - status
        - requested_at
        - window
        - event_count
        - error
        - monitor_id
        - progress
        - event_distribution
        - events
        - events_truncated
    Metadata:
      type: object
      additionalProperties: false
      properties:
        request_id:
          type: string
          description: Id for this request. Include it if you contact support.
        timestamp:
          type: string
          format: date-time
      required:
        - request_id
        - timestamp
    ErrorEntry:
      type: object
      additionalProperties: false
      properties:
        message:
          type: string
          description: What went wrong. Validation errors name the field, then the problem.
      required:
        - message
    PreviewStatus:
      type: string
      enum:
        - QUEUED
        - PENDING
        - COMPLETED
        - FAILED
      description: >-
        `QUEUED` is accepted and has no window yet. `PENDING` is reading
        content. `COMPLETED` is ready. `FAILED` could not be completed.
    PreviewWindow:
      type: object
      additionalProperties: false
      properties:
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        picked_by:
          type: string
          enum:
            - volume
            - pinned
            - fallback_workday
          description: >-
            `volume` is the longest recent period that fits the chunk budget.
            `pinned` was chosen explicitly. `fallback_workday` is used when the
            volume check failed.
        volume:
          type:
            - integer
            - 'null'
          description: Measured search volume. Null when it was not measured.
      required:
        - start
        - end
        - picked_by
        - volume
    PreviewProgress:
      type: object
      additionalProperties: false
      properties:
        chunks_read:
          type: integer
          minimum: 0
        batches_done:
          type: integer
          minimum: 0
        batches_total:
          type: integer
          minimum: 0
        search_capped:
          type: boolean
          description: True when the window had more results than the preview reads.
      required:
        - chunks_read
        - batches_done
        - batches_total
        - search_capped
    PreviewDistribution:
      type: object
      additionalProperties: false
      properties:
        bucket_seconds:
          type: integer
          minimum: 1
        unit:
          type: string
          enum:
            - minute
            - hour
            - day
        buckets:
          type: array
          items:
            $ref: '#/components/schemas/PreviewBucket'
      required:
        - bucket_seconds
        - unit
        - buckets
    MonitorEvent:
      type: object
      description: >-
        An event found during a run. You get an id, a summary, whether it is
        new, the fields from your structured output, and links to the source
        chunks.


        An `entity_reference` is an object with `name` and `rp_entity_id`, or
        null. `number`, `enum`, `ordered_enum`, and `reference_period` come back
        as the wording from the source. `boolean` is true or false.


        Live runs include only new events. A test also includes events that were
        not new.
      properties:
        id:
          type: string
          description: >-
            Stable id for this event, formatted as the run id, a colon, and the
            event index.
          examples:
            - 6af74cb7-0a6e-4ea0-8421-acde4c85e56a:0
        summary:
          type: string
        novel:
          type: boolean
          description: True when this event is new for the monitor.
        grounding:
          type: array
          description: Source chunks that support the event.
          items:
            $ref: '#/components/schemas/Grounding'
      required:
        - id
        - summary
        - novel
        - grounding
      additionalProperties:
        description: >-
          A value for one `structured_output` field. Shape depends on that
          field's `field_type`.
        anyOf:
          - $ref: '#/components/schemas/EntityReferenceValue'
          - type: string
          - type: boolean
          - type: 'null'
      example:
        id: 6af74cb7-0a6e-4ea0-8421-acde4c85e56a:0
        summary: BlackRock CFO resigned.
        novel: true
        company:
          name: BlackRock
          rp_entity_id: HJ95FV
        departure_type: resignation
        grounding:
          - id: A97B4203751F
            headline: BlackRock CFO steps down
            source:
              id: 5E6268
              name: Reuters
            url: https://example.com/blackrock-cfo-steps-down
            cnum: 0
            timestamp: '2026-10-23T08:12:00Z'
    PreviewBucket:
      type: object
      additionalProperties: false
      properties:
        start:
          type: string
          format: date-time
        search_results:
          type: integer
          minimum: 0
        events:
          type: integer
          minimum: 0
        novel_events:
          type: 'null'
          description: Always null. Previews do not judge novelty.
      required:
        - start
        - search_results
        - events
        - novel_events
    Grounding:
      type: object
      additionalProperties: false
      description: A source chunk cited by the event.
      properties:
        id:
          type: string
          description: Document id.
        headline:
          type: string
        source:
          $ref: '#/components/schemas/GroundingSource'
        url:
          type: string
          format: uri
        cnum:
          type: integer
          description: Chunk number.
        timestamp:
          type: string
          format: date-time
      required:
        - id
        - headline
        - source
        - url
        - cnum
        - timestamp
    EntityReferenceValue:
      type: object
      additionalProperties: false
      description: >-
        A company or other entity. `rp_entity_id` is null when the entity could
        not be matched to the Knowledge Graph.
      properties:
        name:
          type: string
        rp_entity_id:
          type:
            - string
            - 'null'
      required:
        - name
        - rp_entity_id
    GroundingSource:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: Source id.
        name:
          type: string
          description: Source name.
      required:
        - id
        - name
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: API key from the Bigdata Developer Platform.

````

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