---
title: "Evenimente | Documentație | Integrations by R&D Copilot"
description: "Citește livrările, abonează-te la modificări și retrimite evenimentele parcate."
canonical: "https://integrations.rdcopilot.com/ro/docs/api-reference/events/"
language: ro
updated: 2026-11-22
---

# Evenimente

Citește livrările, abonează-te la modificări și retrimite evenimentele parcate.

## Listează evenimente

GET `/integrations/v1/events`

### Parametri

| Nume | În | Tip | Obligatoriu | Descriere |
| --- | --- | --- | --- | --- |
| `limit` | query | `integer` | Nuopțional | Mărimea paginii. Implicit `100` Interval `1` – `500` |
| `cursor` | query | `string` | Nuopțional | Cursor opac din pagina precedentă. |

### Răspunsuri

| Stare | Descriere | Corp |
| --- | --- | --- |
| `200` | Înregistrarea curentă. | `EventPage` |
| `400` | Cerere refuzată: invalid\_request. | `Error` |
| `401` | Cerere refuzată: unauthorized. | `Error` |
| `403` | Cerere refuzată: forbidden. | `Error` |
| `404` | Cerere refuzată: resource\_not\_found. | `Error` |
| `409` | Cerere refuzată: revision\_conflict. | `Error` |
| `422` | Cerere refuzată: invalid-settings. | `Error` |
| `429` | Cerere refuzată: rate\_limited. | `Error` |
| `503` | Cerere refuzată: unavailable. | `Error` |

### Cerere

curl

```bash
curl "$RDC_BASE_URL/integrations/v1/events?limit=100" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/integrations/v1/events?limit=100`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
  },
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'GET',
    f'{os.environ["RDC_BASE_URL"]}/integrations/v1/events?limit=100',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/integrations/v1/events?limit=100');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
    ],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/integrations/v1/events?limit=100");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Răspuns `200`

JSON

```json
{
  "items": [
    {
      "id": "621d8426-2567-4e3c-b237-39c58f04d170",
      "type": "com.rdcopilot.integrations.run.completed.v1",
      "state": "parked",
      "attempts": 6,
      "revision": 1
    }
  ],
  "nextCursor": null
}
```

## Citește evenimentul

GET `/integrations/v1/events/{id}`

### Parametri

| Nume | În | Tip | Obligatoriu | Descriere |
| --- | --- | --- | --- | --- |
| `id` | path | `string` | Daobligatoriu | Identificator: id. |

### Răspunsuri

| Stare | Descriere | Corp |
| --- | --- | --- |
| `200` | Înregistrarea curentă. | `Event` |
| `400` | Cerere refuzată: invalid\_request. | `Error` |
| `401` | Cerere refuzată: unauthorized. | `Error` |
| `403` | Cerere refuzată: forbidden. | `Error` |
| `404` | Cerere refuzată: resource\_not\_found. | `Error` |
| `409` | Cerere refuzată: revision\_conflict. | `Error` |
| `422` | Cerere refuzată: invalid-settings. | `Error` |
| `429` | Cerere refuzată: rate\_limited. | `Error` |
| `503` | Cerere refuzată: unavailable. | `Error` |

### Cerere

curl

```bash
curl "$RDC_BASE_URL/integrations/v1/events/621d8426-2567-4e3c-b237-39c58f04d170" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/integrations/v1/events/621d8426-2567-4e3c-b237-39c58f04d170`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
  },
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'GET',
    f'{os.environ["RDC_BASE_URL"]}/integrations/v1/events/621d8426-2567-4e3c-b237-39c58f04d170',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/integrations/v1/events/621d8426-2567-4e3c-b237-39c58f04d170');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
    ],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/integrations/v1/events/621d8426-2567-4e3c-b237-39c58f04d170");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Răspuns `200`

JSON

```json
{
  "id": "621d8426-2567-4e3c-b237-39c58f04d170",
  "type": "com.rdcopilot.integrations.run.completed.v1",
  "state": "parked",
  "attempts": 6,
  "revision": 1
}
```

## Înregistrează un abonament

POST `/integrations/v1/subscriptions`

Păstrează comanda și returnează confirmarea operației. Citește rezultatul operației înainte de a o considera încheiată. Refolosirea unui operationId cu alt conținut returnează operation\_reused.

### Corpul cererii

| Câmp | Tip | Obligatoriu | Descriere |
| --- | --- | --- | --- |
| `operationId` | `string (uuid)` | Daobligatoriu | UUID ales de client; refolosește-l numai cu aceeași cerere. |
| `expectedRevision` | `integer` | Daobligatoriu | Revizia citită înaintea modificării; zero pentru o resursă nouă. |
| `endpoint` | `string` | Daobligatoriu | Destinație HTTPS. |
| `eventTypes` | `string[]` | Daobligatoriu | Tipuri de evenimente de livrat. |

### Răspunsuri

| Stare | Descriere | Corp |
| --- | --- | --- |
| `202` | Abonament modificat; primul răspuns include secretul său. | `SubscriptionOperationResult` |
| `400` | Cerere refuzată: invalid\_request. | `Error` |
| `401` | Cerere refuzată: unauthorized. | `Error` |
| `403` | Cerere refuzată: forbidden. | `Error` |
| `404` | Cerere refuzată: resource\_not\_found. | `Error` |
| `409` | Cerere refuzată: revision\_conflict. | `Error` |
| `422` | Cerere refuzată: invalid-settings. | `Error` |
| `429` | Cerere refuzată: rate\_limited. | `Error` |
| `503` | Cerere refuzată: unavailable. | `Error` |

### Cerere

curl

```bash
curl -X POST "$RDC_BASE_URL/integrations/v1/subscriptions" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
  "expectedRevision": 0,
  "endpoint": "https://receiver.example/events",
  "eventTypes": [
    "com.rdcopilot.integrations.run.completed.v1"
  ]
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/integrations/v1/subscriptions`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
    "expectedRevision": 0,
    "endpoint": "https://receiver.example/events",
    "eventTypes": [
      "com.rdcopilot.integrations.run.completed.v1"
    ]
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/integrations/v1/subscriptions',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '33a22ec0-f0af-4498-a388-123456789abc',
        'expectedRevision': 0,
        'endpoint': 'https://receiver.example/events',
        'eventTypes': [
            'com.rdcopilot.integrations.run.completed.v1',
        ],
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
  "expectedRevision": 0,
  "endpoint": "https://receiver.example/events",
  "eventTypes": [
    "com.rdcopilot.integrations.run.completed.v1"
  ]
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/integrations/v1/subscriptions');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/integrations/v1/subscriptions");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
  "expectedRevision": 0,
  "endpoint": "https://receiver.example/events",
  "eventTypes": [
    "com.rdcopilot.integrations.run.completed.v1"
  ]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Răspuns `202`

JSON

```json
{
  "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
  "status": "completed",
  "aggregateRevision": 1,
  "aggregateId": "subscription-orders",
  "secret": "whsec_b3JkZXItZGVsaXZlcnktc2lnbmluZy1rZXk="
}
```

## Rotește secretul abonamentului

POST `/integrations/v1/subscriptions/{subscriptionId}/secret`

Păstrează comanda și returnează confirmarea operației. Citește rezultatul operației înainte de a o considera încheiată. Refolosirea unui operationId cu alt conținut returnează operation\_reused.

### Parametri

| Nume | În | Tip | Obligatoriu | Descriere |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | `string` | Daobligatoriu | Identificator: subscriptionId. |

### Corpul cererii

| Câmp | Tip | Obligatoriu | Descriere |
| --- | --- | --- | --- |
| `operationId` | `string (uuid)` | Daobligatoriu | UUID ales de client; refolosește-l numai cu aceeași cerere. |
| `expectedRevision` | `integer` | Daobligatoriu | Revizia citită înaintea modificării; zero pentru o resursă nouă. |

### Răspunsuri

| Stare | Descriere | Corp |
| --- | --- | --- |
| `202` | Abonament modificat; primul răspuns include secretul său. | `SubscriptionOperationResult` |
| `400` | Cerere refuzată: invalid\_request. | `Error` |
| `401` | Cerere refuzată: unauthorized. | `Error` |
| `403` | Cerere refuzată: forbidden. | `Error` |
| `404` | Cerere refuzată: resource\_not\_found. | `Error` |
| `409` | Cerere refuzată: revision\_conflict. | `Error` |
| `422` | Cerere refuzată: invalid-settings. | `Error` |
| `429` | Cerere refuzată: rate\_limited. | `Error` |
| `503` | Cerere refuzată: unavailable. | `Error` |

### Cerere

curl

```bash
curl -X POST "$RDC_BASE_URL/integrations/v1/subscriptions/subscription-orders/secret" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
  "expectedRevision": 1
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/integrations/v1/subscriptions/subscription-orders/secret`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
    "expectedRevision": 1
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/integrations/v1/subscriptions/subscription-orders/secret',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '33a22ec0-f0af-4498-a388-123456789abc',
        'expectedRevision': 1,
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
  "expectedRevision": 1
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/integrations/v1/subscriptions/subscription-orders/secret');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/integrations/v1/subscriptions/subscription-orders/secret");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
  "expectedRevision": 1
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Răspuns `202`

JSON

```json
{
  "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
  "status": "completed",
  "aggregateRevision": 1,
  "aggregateId": "subscription-orders",
  "secret": "whsec_b3JkZXItZGVsaXZlcnktc2lnbmluZy1rZXk="
}
```

## Retrimite un eveniment parcat

POST `/integrations/v1/events/{id}/replay`

Păstrează comanda și returnează confirmarea operației. Citește rezultatul operației înainte de a o considera încheiată. Refolosirea unui operationId cu alt conținut returnează operation\_reused.

### Parametri

| Nume | În | Tip | Obligatoriu | Descriere |
| --- | --- | --- | --- | --- |
| `id` | path | `string` | Daobligatoriu | Identificator: id. |

### Corpul cererii

| Câmp | Tip | Obligatoriu | Descriere |
| --- | --- | --- | --- |
| `operationId` | `string (uuid)` | Daobligatoriu | UUID ales de client; refolosește-l numai cu aceeași cerere. |
| `expectedRevision` | `integer` | Daobligatoriu | Revizia citită înaintea modificării; zero pentru o resursă nouă. |

### Răspunsuri

| Stare | Descriere | Corp |
| --- | --- | --- |
| `202` | Operație acceptată. | `OperationResult` |
| `400` | Cerere refuzată: invalid\_request. | `Error` |
| `401` | Cerere refuzată: unauthorized. | `Error` |
| `403` | Cerere refuzată: forbidden. | `Error` |
| `404` | Cerere refuzată: resource\_not\_found. | `Error` |
| `409` | Cerere refuzată: revision\_conflict. | `Error` |
| `422` | Cerere refuzată: invalid-settings. | `Error` |
| `429` | Cerere refuzată: rate\_limited. | `Error` |
| `503` | Cerere refuzată: unavailable. | `Error` |

### Cerere

curl

```bash
curl -X POST "$RDC_BASE_URL/integrations/v1/events/621d8426-2567-4e3c-b237-39c58f04d170/replay" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
  "expectedRevision": 1
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/integrations/v1/events/621d8426-2567-4e3c-b237-39c58f04d170/replay`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
    "expectedRevision": 1
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/integrations/v1/events/621d8426-2567-4e3c-b237-39c58f04d170/replay',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '33a22ec0-f0af-4498-a388-123456789abc',
        'expectedRevision': 1,
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
  "expectedRevision": 1
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/integrations/v1/events/621d8426-2567-4e3c-b237-39c58f04d170/replay');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/integrations/v1/events/621d8426-2567-4e3c-b237-39c58f04d170/replay");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
  "expectedRevision": 1
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Răspuns `202`

JSON

```json
{
  "operationId": "33a22ec0-f0af-4498-a388-123456789abc",
  "status": "accepted",
  "aggregateRevision": 1,
  "aggregateId": "621d8426-2567-4e3c-b237-39c58f04d170"
}
```
