Get Custom Metadata Schema
Retrieve the custom metadata fields and types used across Vision Events in a Use Case.
About
This endpoint returns the custom metadata fields that have been used across the Vision Events in a given Use Case. Because custom metadata is defined per event rather than by a fixed schema, use this to discover which fields exist and their types before building event queries or dashboard filters.
HTTP API
Retrieve the schema of custom metadata fields that have been used in events for a given use case. This is useful for discovering what metadata fields are available for filtering in query requests.
Required scope: vision-events:read or device:read
Retrieve the custom metadata keys that events in a use case used within the workspace's retention window, with the value types seen for each. Requires the vision-events:read or device:read scope.
Roboflow API key passed as a Bearer token.
The use case ID.
Metadata schema.
Insufficient permissions for this resource.
GET /vision-events/custom-metadata-schema/{useCaseId} HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"useCaseId": "a1b3c8e1",
"fields": {
"production_line": {
"types": [
"string"
]
},
"temperature": {
"types": [
"number"
]
},
"is_overtime": {
"types": [
"boolean"
]
}
}
}Python SDK
Discover the custom metadata fields that have been used in events for a given use case. This is useful for building queries with customMetadataFilters.
The response contains a fields dict mapping each discovered field name to its observed types (e.g., ["string"], ["number"]). You can use this information to construct typed filters when querying events:
For more details, see the REST API reference.
MCP Server
Connect your AI agent to the MCP Server and it can read the custom metadata schema with these tools:
vision_events_custom_metadata_schema_get
Get the custom metadata schema discovered for a use case.
Last updated
Was this helpful?