Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Batch Create Vision Events

Record up to 100 Vision Events in a single request to ingest many observations at once.

About

This endpoint records multiple Vision Events in a single request, up to 100 at a time. Use it when a deployment needs to ingest many observations at once, which is more efficient than creating events individually. To record a single event, see Create a Vision Event.

HTTP API

Create up to 100 vision events in a single request. This is more efficient than creating events individually when you need to ingest multiple events at once.

Required scope: vision-events:write or device:update

Batch Create Vision Events

post

Create up to 100 vision events in a single request. Each event is checked the same way as in Create a Vision Event. If any event fails the required field check, no event is stored and the error names the event's index. An empty events array stores nothing and returns created 0. Requires the vision-events:write or device:update scope.

Authorizations
AuthorizationstringRequired

Roboflow API key passed as a Bearer token.

Body
Responses
201

Events created successfully.

application/json
createdintegerOptional

Number of events created.

eventIdsstring[]Optional
deprecationsstring[]Optional

Deprecated field names used in the request.

post/vision-events/batch
POST /vision-events/batch HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 346

{
  "events": [
    {
      "eventId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "eventType": "quality_check",
      "useCaseId": "a1b3c8e1",
      "timestamp": "2024-01-15T10:30:00Z",
      "eventData": {
        "result": "pass"
      }
    },
    {
      "eventId": "9c4d6a2e-81f3-4b7a-bc9e-3f1a2d4e5c6b",
      "eventType": "quality_check",
      "useCaseId": "a1b3c8e1",
      "timestamp": "2024-01-15T10:31:00Z",
      "eventData": {
        "result": "fail"
      }
    }
  ]
}
{
  "created": 2,
  "eventIds": [
    "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "9c4d6a2e-81f3-4b7a-bc9e-3f1a2d4e5c6b"
  ]
}

To include images in your events, first upload each image using the Upload a Vision Event Image endpoint, then reference the returned sourceId in the image object. Videos work the same way: upload each one with Upload a Vision Event Video. Create a Vision Event lists the fields of image and video objects.

Each event is validated the same way as a single event. See Validation and Warnings.

Python SDK

Create multiple vision events in a single request. The server allows up to 100 events per batch.

Each event in the list follows the same schema as a single event. For full details on event schemas and validation behavior, see the REST API reference.

Last updated

Was this helpful?