> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/roboflow/roboflow-hi/deploy/vision-events/send-events.md).

# Events भेजें

## इवेंट्स भेजें

आप Workflow block, REST API, या edge device backup का उपयोग करके Vision Events भेज सकते हैं।

* [Workflow Block](#workflow-block) - Workflows उपयोगकर्ताओं को संभवतः आधिकारिक Roboflow block का उपयोग करना सबसे आसान लगेगा
* [REST API](#rest-api) - जो उपयोगकर्ता models को Workflows के बाहर deploy करना चुनते हैं, वे हमारी REST API का उपयोग कर सकते हैं
* [Edge Device Backup](#edge-device-backup) - जो उपयोगकर्ता Roboflow Edge devices deploy कर रहे हैं, उनके लिए device पर local event store से automated backup configure करना सबसे सुविधाजनक होगा

### Workflow Block

अधिकांश उपयोगकर्ताओं के लिए अनुशंसित तरीका। जोड़ें **Vision Event** block को किसी भी Roboflow Workflow में, बिना code की आवश्यकता के, inference results से automatically events create करने के लिए।

{% hint style="info" %}
The [Roboflow Agent](/roboflow/roboflow-hi/agents/roboflow-agent.md) इसे आपके लिए set up कर सकता है। जब आप Agent से एक Workflow बनाने के लिए कहते हैं जो एक model चलाता है, तो यह अपने-आप एक Vision Events block जोड़ता है और उसे सही [Use Case](/roboflow/roboflow-hi/deploy/vision-events/use-cases.md).
{% endhint %}

#### सेटअप

{% stepper %}
{% step %}
**Workflow Editor खोलें**

पर जाएँ **Workflows** अपने workspace में और वह workflow खोलें जिसमें आप events जोड़ना चाहते हैं।
{% endstep %}

{% step %}
**Vision Event Block जोड़ें**

block catalog में "Vision Event" खोजें और इसे अपने workflow में जोड़ें।
{% endstep %}

{% step %}
**Inputs कनेक्ट करें**

image input और model prediction outputs को Vision Event block से कनेक्ट करें।
{% endstep %}

{% step %}
**Use Case कॉन्फ़िगर करें**

Use Case का नाम सेट करें (`useCaseId`). आप upstream blocks से custom metadata भी map कर सकते हैं।
{% endstep %}

{% step %}
**Workflow Deploy करें**

अपने workflow को deploy या update करें। workflow के हर रन पर events अपने-आप बनते हैं।
{% endstep %}
{% endstepper %}

{% hint style="info" %}
Workflow block image upload और event creation को एक ही चरण में संभालता है।
{% endhint %}

### REST API

Workflows का उपयोग न करने वाले custom integrations या pipelines के लिए, आप REST API के माध्यम से सीधे events भेज सकते हैं। पूर्ण request और response schemas के लिए, देखें [Vision Events API Reference](https://docs.roboflow.com/developer/rest-api/vision-events).

#### Authentication

सभी write endpoints के लिए एक API key चाहिए जिसमें `visionEvents.write` या `device.update` scope हो। API key को Bearer token के रूप में pass करें:

```
Authorization: Bearer YOUR_API_KEY
```

#### एंड-टू-एंड उदाहरण: Image अपलोड करें + Event बनाएं

{% hint style="warning" %}
Events भेजने से पहले आपको एक Use Case बनाना होगा। Events किसी ऐसे `useCaseId` जो मौजूद नहीं है, अस्वीकार कर दिए जाएँगे।
{% endhint %}

API के माध्यम से events भेजते समय, पहले आप image अपलोड करते हैं, फिर अपलोड की गई image का संदर्भ देते हुए event बनाते हैं।

**चरण 1: image अपलोड करें**

```bash
curl -X POST "https://api.roboflow.com/vision-events/upload" \\
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@inspection_photo.jpg"
```

**प्रतिक्रिया:**

```json
{
  "success": true,
  "sourceId": "abc123def456",
  "url": "https://storage.googleapis.com/your-workspace/abc123def456/original.jpg"
}
```

**चरण 2: अपलोड की गई image का संदर्भ देते हुए event बनाएं**

```bash
curl -X POST "https://api.roboflow.com/vision-events" \\
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "eventType": "quality_check",
    "useCaseId": "assembly-line-qa",
    "timestamp": "2026-03-30T14:30:00.000Z",
    "deviceId": "factory-cam-01",
    "streamId": "line-3",
    "images": [
      {
        "sourceId": "abc123def456",
        "objectDetections": [
          {
            "class": "defect",
            "x": 320,
            "y": 240,
            "width": 50,
            "height": 40,
            "confidence": 0.95
          }
        ]
      }
    ],
    "eventData": {
      "result": "fail"
    },
    "customMetadata": {
      "line_id": "line-3",
      "shift": "morning",
      "part_number": "PN-4421"
    }
  }'
```

**प्रतिक्रिया:**

```json
{
  "eventId": "evt-789ghi",
  "created": true
}
```

#### बैच में Events बनाएं

batch endpoint का उपयोग करके एक ही request में अधिकतम 100 events भेजें:

```bash
curl -X POST "https://api.roboflow.com/vision-events/batch" \\
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "events": [
      {
        "eventType": "quality_check",
        "useCaseId": "alksjdflaalsf32",
        "eventData": { "result": "pass" },
        "customMetadata": { "line_id": "line-1" }
      },
      {
        "eventType": "quality_check",
        "useCaseId": "alksjdflaalsf32",
        "eventData": { "result": "fail" },
        "customMetadata": { "line_id": "line-2" }
      }
    ]
  }'
```

{% hint style="info" %}
प्रति batch request अधिकतम 100 events।
{% endhint %}

### Edge Device Backup

उन enterprise deployments के लिए जहाँ connectivity बीच-बीच में बाधित हो सकती है, edge device events को local रूप से संग्रहीत करता है और connectivity बहाल होने पर उन्हें Roboflow के साथ sync करता है।

{% hint style="info" %}
Edge Device Backup के लिए Deployment Manager की आवश्यकता होती है। देखें [Deployment Manager documentation](/roboflow/roboflow-hi/deploy/device-manager.md) सेटअप निर्देशों के लिए।
{% endhint %}

Vision Events backup सक्षम करने के लिए:

1. Open **Deployment Manager** अपने workspace में
2. कॉन्फ़िगर करने के लिए device चुनें
3. सक्षम करें **Vision Events Backup** device की Event Store configuration में
4. Events device पर local event store में लिखे जाते हैं
5. जब device फिर से जुड़ता है, events अपने-आप Roboflow के साथ sync हो जाते हैं

sync पूरा होने के बाद events Vision Events dashboard में दिखाई देते हैं।

<figure><img src="/files/60a59deb174e50eec0122fccf8f048cc4e4c62b7" alt="" width="375"><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.roboflow.com/roboflow/roboflow-hi/deploy/vision-events/send-events.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
