Use Cases
Group Vision Events by purpose using Use Cases.
About
A Use Case groups Vision Events that share a common purpose and custom metadata structure, and every event belongs to exactly one Use Case. Organizing events this way makes it easy to filter and compare data across cameras, devices, and locations that report the same fields. This page explains when to use one Use Case versus several, and how to create and manage them.
Web App
Use Cases
A Use Case groups Vision Events that share a common purpose and custom metadata structure. Every event belongs to exactly one Use Case. Events in the same Use Case typically share the same metadata fields, making it easy to filter and compare data across different sources.
When to Use One vs. Multiple Use Cases
Put events in the same Use Case when they share similar custom metadata fields even if they come from different locations, cameras, or devices. For example, a "Defect Detection" Use Case might receive events from multiple factories, but all events include line_id, shift, and part_number.
Create separate Use Cases when the metadata structure is fundamentally different. For example:
Assembly Line QA - tracks
line_id,shift,part_numberWarehouse Inventory - tracks
aisle,shelf,item_typeConstruction Site Safety - tracks
zone,alert_type,contractor
Create a Use Case
Via the Agent
The Roboflow Agent creates Use Cases automatically when it builds a Workflow with Vision Events. It picks an existing Use Case if one fits, or creates a new one based on your described use case. You can also ask the Agent directly to set up a new Use Case.
In the Dashboard
Navigate to Vision Events in the left sidebar of your workspace
Click + Create Use Case
Enter a name for the Use Case

You can also create Use Cases via the REST API, see Manage Use Cases Programmatically.
View Use Cases
In the Dashboard
The Vision Events page displays a table of all your Use Cases, showing:
Use Case name
Total event count
Last event timestamp
Event types in use
Via the API
Retrieve all Use Cases in your workspace:
See the Vision Events API Reference for the full response format.
Manage Use Cases Programmatically
In addition to the dashboard, you can create, rename, archive, and unarchive Use Cases via the REST API. These endpoints require an API key with the vision-events:manage scope (unrestricted workspace API keys have access by default).
Create a Use Case
Rename a Use Case
Archive or Unarchive a Use Case
Archive a Use Case
Use Cases can be archived from the dashboard when they are no longer needed. Archived Use Cases and their events remain accessible but are hidden from the default view. Click View archived use cases at the bottom of the Use Cases table to see them.

Custom Metadata Schema
After events are sent to a Use Case, the system infers a metadata schema based on the fields and value types observed. You can retrieve the inferred schema for a Use Case to understand what keys and value types are in use:
Example response:
See the Vision Events API Reference for full details.
HTTP API
Create a Use Case
Create a new use case in your workspace. Use cases help you organize vision events by deployment context (e.g., "Manufacturing Line 1", "Warehouse Inventory").
Required scope: vision-events:manage
Create a new use case in your workspace.
Roboflow API key passed as a Bearer token.
A name for the use case. Must be unique within the workspace.
Use case created successfully.
Validation error or duplicate name.
Insufficient permissions for this resource.
POST /vision-events/use-cases HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"name": "text"
}{
"id": "text",
"name": "text"
}Request Body Parameters
name(string, required): A name for the use case. Must be between 1 and 256 characters. The name is trimmed of leading/trailing whitespace and must be unique within the workspace.
Example Request
Example Response
Notes
New use cases are created with an
activestatus by default.Use case names must be unique within a workspace. Attempting to create a use case with the same name as an existing one will return a
400error.After creating a use case, you can reference its
idas theuseCaseIdwhen creating vision events.
Update a Use Case
Update the name or status of an existing use case.
Required scope: vision-events:manage
Update the name or status of an existing use case.
Roboflow API key passed as a Bearer token.
The ID of the use case to update.
A new name for the use case. Must be unique within the workspace.
The new status for the use case.
Use case updated successfully.
Validation error or duplicate name.
Insufficient permissions for this resource.
Use case not found.
PUT /vision-events/use-cases/{useCaseId} HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 33
{
"name": "text",
"status": "active"
}{
"id": "text",
"name": "text"
}Path Parameters
useCaseId(string, required): The ID of the use case to update.
Request Body Parameters
At least one of the following fields must be provided:
name(string, optional): A new name for the use case. Must be between 1 and 256 characters. Must be unique within the workspace.status(string, optional): The new status. One ofactiveorinactive.
Example Request
Example Response
List Use Cases
List all use cases that have recorded vision events in your workspace. To learn how to create and manage use cases, see the Use Cases documentation.
Required scope: vision-events:read or device:read
List all use cases that have recorded vision events in your workspace.
Roboflow API key passed as a Bearer token.
Filter by use case status. Defaults to active.
activePossible values: List of use cases.
Insufficient permissions for this resource.
GET /vision-events/use-cases HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"useCases": [
{
"id": "text",
"name": "text",
"status": "active",
"workspaceId": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
],
"lookbackDays": 1
}Query Parameters
status(string, optional): Filter by use case status. One ofactiveorinactive. Defaults toactive.
Example Request
Example Response
Archive a Use Case
Archive a use case by setting its status to inactive. Archived use cases are hidden from listings by default and will reject new event ingestion.
Required scope: vision-events:manage
Archive a use case by setting its status to inactive.
Roboflow API key passed as a Bearer token.
The ID of the use case to archive.
Use case archived successfully.
Insufficient permissions for this resource.
Use case not found.
POST /vision-events/use-cases/{useCaseId}/archive HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"success": true
}Path Parameters
useCaseId(string, required): The ID of the use case to archive.
Example Request
Example Response
Notes
Archiving is a soft delete. The use case and its events are preserved but hidden from active listings.
To view archived use cases, use the List Use Cases endpoint with
status=inactive.You can restore an archived use case using the Unarchive a Use Case endpoint.
Unarchive a Use Case
Restore a previously archived use case by setting its status back to active.
Required scope: vision-events:manage
Restore a previously archived use case by setting its status back to active.
Roboflow API key passed as a Bearer token.
The ID of the use case to unarchive.
Use case unarchived successfully.
Use case is not archived.
Insufficient permissions for this resource.
Use case not found.
POST /vision-events/use-cases/{useCaseId}/unarchive HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"success": true
}Path Parameters
useCaseId(string, required): The ID of the use case to unarchive.
Example Request
Example Response
Notes
Only use cases with an
inactivestatus can be unarchived. Attempting to unarchive an already active use case will return a400error.Once unarchived, the use case will appear in active listings and accept new event ingestion again.
Python SDK
Each vision event is associated with a use case. The Python SDK provides methods to create, list, rename, archive, and unarchive use cases.
List Use Cases
You can filter by status:
Create a Use Case
Rename a Use Case
Archive a Use Case
Unarchive a Use Case
For more details on use case management, see the REST API reference.
MCP Server
Connect your AI agent to the MCP Server and it can manage use cases with these tools:
vision_events_use_cases_list
List the vision event use cases in the workspace.
vision_events_use_case_create
Create a new vision event use case.
vision_events_use_case_rename
Rename an existing use case.
vision_events_use_case_archive
Archive a use case.
vision_events_use_case_unarchive
Restore a previously archived use case.
Last updated
Was this helpful?