Batch Create Vision Events
import roboflow
roboflow.login()
rf = roboflow.Roboflow()
ws = rf.workspace()
result = ws.write_vision_events_batch([
{
"eventId": "e5f6a7b8-c3d4-4e5f-a0b1-c2d3e4f5a6b7",
"eventType": "quality_check",
"useCaseId": "a1b3c8e1",
"timestamp": "2024-01-15T10:00:00Z",
"eventData": {"result": "pass"},
},
{
"eventId": "f6a7b8c9-d4e5-4f6a-b1c2-d3e4f5a6b7c8",
"eventType": "quality_check",
"useCaseId": "a1b3c8e1",
"timestamp": "2024-01-15T10:01:00Z",
"eventData": {"result": "fail"},
"customMetadata": {"line": "A1"},
},
])
print(result["created"]) # Number of events created
print(result["eventIds"]) # List of created event IDsLast updated
Was this helpful?