Skip to main content

How This Helps

Saved views capture filter states as named, reusable queries attached to a dataset. Every view automatically tracks how result counts change over time as new media arrives, and alerting notifies all dataset collaborators when new matches are detected.

Prerequisites

  • A Visual Layer Cloud account with API access.
  • A valid JWT token. See Authentication.
  • A dataset ID. Find it in the browser URL when viewing a dataset (https://app.visual-layer.com/dataset/<dataset_id>/data) or via the Datasets API.

Create a View

Save the current filter state of a dataset as a named view. Monitoring is enabled automatically on all new views, and alerting defaults to enabled.
Pass filter parameters as query parameters on the URL. The view name is sent as a form field.

Parameters

Example

Response (200)

Save the id from the response for use with trend, alerting, and delete operations.
The stats fields show -1 at creation time because the view has not yet been evaluated against any data batch. Values populate after the first monitoring evaluation.

List Views

Retrieve all saved views for a dataset, including their current monitoring state and result counts.

Parameters

Example

Response (200)


Delete a View

Remove a saved view and its associated trend data from a dataset.

Parameters

Example

A successful request returns HTTP 200 with a null body. Deleting a view also removes its trend history and stops all associated alerting.

Get View Trend Data

Retrieve the monitoring trend history for a view. Each data point represents one batch evaluation, showing how many new items matched the view filters when that batch was processed.

Parameters

Example

Response (200)

Trend Point Fields

Returns HTTP 400 if monitoring is not enabled for the view. Returns HTTP 404 if the view does not exist or does not belong to the specified dataset.

Enable or Disable Alerting

Control whether a monitored view sends alert notifications when new matches are detected. Monitoring (trend data collection) continues regardless of this setting.

Parameters

Request Body

The enabled field is nested inside a request object in the JSON body.

Example

Response (200)


Python Example


Response Codes

See Error Handling for the error response format and Python handling patterns.

Views Endpoints


Best Practices

  • Create views before adding media. Monitoring evaluates only batches that arrive after the view was created. Views created after a media addition do not retroactively evaluate older batches.
  • Use descriptive view names. View names appear in alert notifications and trend charts. Clear names like “Damaged windshields” or “Mislabeled training data” make alerts immediately actionable.
  • Disable alerting for informational views. If a view tracks long-term trends but does not require immediate attention, disable alerting to reduce notification noise while keeping trend data collection active.
  • Poll trend data for dashboards. The trend endpoint returns cumulative counts suitable for building monitoring dashboards. Poll periodically after batch additions to track data quality over time.
  • Delete unused views. Each view is evaluated on every batch addition. Removing views that are no longer needed reduces processing overhead.

Notifications API

List, read, and manage alert notifications delivered by monitored views.

Saved Views

Create and manage saved views through the Visual Layer UI.

Monitoring and Alerts

Understand how monitoring and alerting works across your datasets.

Add Media

Add media to datasets, triggering monitoring evaluation on all views.