# Manage & Operate › Logs Data Platform › Data streams › Alerts API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Manage & Operate product's sections: https://developers.eu.ovhcloud.com/reference/manage-operate/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 5 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/manage-operate/logs-data-platform/data-streams/alerts/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/manage-operate/logs-data-platform/data-streams/alerts.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/manage-operate/logs-data-platform/data-streams/alerts.json?format=openapi3

## Operations

- `GET /dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert` — List stream alerts
- `GET /dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}` — Get a stream alert
- `POST /dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert` — Create a stream alert
- `DELETE /dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}` — Delete a stream alert
- `PUT /dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}` — Update a stream alert

## List stream alerts

`GET /1.0/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/logs-data-platform/data-streams/alerts/#get-dbaas-logs-servicename-output-graylog-stream-streamid-alert

**Status:** Stable production version  
**IAM actions:** `ldp:apiovh:output/graylog/stream/alert/get`

Returns the stream alerts of the Logs Data Platform service.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |
| `streamId` | path | string (uuid) | yes | Stream ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string (uuid)[] | successful operation |
| 404 | object | Error 404 response |

```json
[
  "00000000-0000-0000-0000-000000000000"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert");

print_r($result);
?>
```

## Get a stream alert

`GET /1.0/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/logs-data-platform/data-streams/alerts/#get-dbaas-logs-servicename-output-graylog-stream-streamid-alert-alertid

**Status:** Stable production version  
**IAM actions:** `ldp:apiovh:output/graylog/stream/alert/get`

Returns the stream alert.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `alertId` | path | string (uuid) | yes | Alert ID |
| `serviceName` | path | string | yes | Service name |
| `streamId` | path | string (uuid) | yes | Stream ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dbaas.logs.StreamAlertCondition | successful operation |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `alertId` | string (uuid) | read-only | Stream alert condition ID |
| `backlog` | integer | read-only | Backlog size |
| `conditionType` | dbaas.logs.StreamAlertConditionConditionTypeEnum | read-only | Alert condition type — one of `FIELD_CONTENT_VALUE`, `FIELD_VALUE`, `MESSAGE_COUNT` |
| `constraintType` | dbaas.logs.StreamAlertConditionConstraintTypeEnum | read-only | Constraint type — one of `MAX`, `MEAN`, `MIN`, `STDLABEU`, `SUM` |
| `field` | string | read-only | Field name |
| `grace` | integer | read-only | Grace period in minutes |
| `queryFilter` | string | read-only | Query filter |
| `repeatNotificationsEnabled` | boolean | read-only | Repeat notifications |
| `threshold` | integer | read-only | Threshold |
| `thresholdType` | dbaas.logs.StreamAlertConditionThresholdTypeEnum | read-only | Threshold condition — one of `EQ`, `GT`, `GTE`, `LT`, `LTE` |
| `time` | integer | read-only | Time lapse in minutes |
| `title` | string | read-only | Condition label |
| `value` | string | read-only | Field value |

```json
{
  "alertId": "00000000-0000-0000-0000-000000000000",
  "backlog": 0,
  "conditionType": "FIELD_CONTENT_VALUE",
  "constraintType": "MAX",
  "field": "string",
  "grace": 0,
  "queryFilter": "string",
  "repeatNotificationsEnabled": true,
  "threshold": 0,
  "thresholdType": "EQ",
  "time": 0,
  "title": "string",
  "value": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}");

print_r($result);
?>
```

## Create a stream alert

`POST /1.0/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/logs-data-platform/data-streams/alerts/#post-dbaas-logs-servicename-output-graylog-stream-streamid-alert

**Status:** Stable production version  
**IAM actions:** `ldp:apiovh:output/graylog/stream/alert/create`

Creates a stream alert on the Logs Data Platform service.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |
| `streamId` | path | string (uuid) | yes | Stream ID |

### Request body (required)

Type: `dbaas.logs.OutputGraylogStreamAlertCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `backlog` | integer | yes | Backlog |
| `conditionType` | dbaas.logs.StreamAlertConditionConditionTypeEnum |  | Condition type — one of `FIELD_CONTENT_VALUE`, `FIELD_VALUE`, `MESSAGE_COUNT` |
| `constraintType` | dbaas.logs.StreamAlertConditionConstraintTypeEnum |  | Constraint type — one of `MAX`, `MEAN`, `MIN`, `STDLABEU`, `SUM` |
| `field` | string |  | Field |
| `grace` | integer | yes | Grace period |
| `queryFilter` | string |  | Query filter |
| `repeatNotificationsEnabled` | boolean |  | Repeat notifications enabled |
| `threshold` | integer |  | Threshold |
| `thresholdType` | dbaas.logs.StreamAlertConditionThresholdTypeEnum |  | Threshold type — one of `EQ`, `GT`, `GTE`, `LT`, `LTE` |
| `time` | integer |  | Time |
| `title` | string | yes | Title |
| `value` | string |  | Value |

```json
{
  "backlog": 0,
  "conditionType": "FIELD_CONTENT_VALUE",
  "constraintType": "MAX",
  "field": "string",
  "grace": 0,
  "queryFilter": "string",
  "repeatNotificationsEnabled": true,
  "threshold": 0,
  "thresholdType": "EQ",
  "time": 0,
  "title": "string",
  "value": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dbaas.logs.Operation | successful operation |
| 403 | object | Error 403 response |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `aliasId` | string (uuid) | read-only | Alias used |
| `createdAt` | string (date-time) | read-only | Operation creation |
| `dashboardId` | string (uuid) | read-only | Dashboard used |
| `encryptionKeyId` | string (uuid) | read-only | Encryption key used |
| `indexId` | string (uuid) | read-only | Index used |
| `inputId` | string (uuid) | read-only | Input used |
| `operationId` | string (uuid) | read-only | Operation ID |
| `osdId` | string (uuid) | read-only | OpenSearch Dashboards used |
| `roleId` | string (uuid) | read-only | Role used |
| `serviceName` | string | read-only | Service name |
| `state` | dbaas.logs.OperationStateEnum | read-only | Operation status — one of `FAILURE`, `PENDING`, `RECEIVED`, `RETRY`, `REVOKED`, `RUNNING`, `STARTED`, `SUCCESS` |
| `streamId` | string (uuid) | read-only | Stream used |
| `subscriptionId` | string (uuid) | read-only | Subscription used |
| `tenantId` | string (uuid) | read-only | Metrics tenant used |
| `tokenId` | string (uuid) | read-only | Token used |
| `updatedAt` | string (date-time) | read-only | Operation last update |

```json
{
  "aliasId": "00000000-0000-0000-0000-000000000000",
  "createdAt": "2024-01-01T12:00:00Z",
  "dashboardId": "00000000-0000-0000-0000-000000000000",
  "encryptionKeyId": "00000000-0000-0000-0000-000000000000",
  "indexId": "00000000-0000-0000-0000-000000000000",
  "inputId": "00000000-0000-0000-0000-000000000000",
  "operationId": "00000000-0000-0000-0000-000000000000",
  "osdId": "00000000-0000-0000-0000-000000000000",
  "roleId": "00000000-0000-0000-0000-000000000000",
  "serviceName": "string",
  "state": "FAILURE",
  "streamId": "00000000-0000-0000-0000-000000000000",
  "subscriptionId": "00000000-0000-0000-0000-000000000000",
  "tenantId": "00000000-0000-0000-0000-000000000000",
  "tokenId": "00000000-0000-0000-0000-000000000000",
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: dbaas.logs.OutputGraylogStreamAlertCreation
result = client.post("/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert",
	backlog = None, # Backlog (type: integer)
	conditionType = None, # Condition type (type: dbaas.logs.StreamAlertConditionConditionTypeEnum, nullable)
	constraintType = None, # Constraint type (type: dbaas.logs.StreamAlertConditionConstraintTypeEnum, nullable)
	field = None, # Field (type: string, nullable)
	grace = None, # Grace period (type: integer)
	queryFilter = None, # Query filter (type: string, nullable)
	repeatNotificationsEnabled = None, # Repeat notifications enabled (type: boolean, nullable)
	threshold = None, # Threshold (type: integer, nullable)
	thresholdType = None, # Threshold type (type: dbaas.logs.StreamAlertConditionThresholdTypeEnum, nullable)
	time = None, # Time (type: integer, nullable)
	title = None, # Title (type: string)
	value = None, # Value (type: string, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: dbaas.logs.OutputGraylogStreamAlertCreation
$result = $ovh->post("/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert", array(
	backlog => null, // Backlog (type: integer)
	conditionType => null, // Condition type (type: dbaas.logs.StreamAlertConditionConditionTypeEnum, nullable)
	constraintType => null, // Constraint type (type: dbaas.logs.StreamAlertConditionConstraintTypeEnum, nullable)
	field => null, // Field (type: string, nullable)
	grace => null, // Grace period (type: integer)
	queryFilter => null, // Query filter (type: string, nullable)
	repeatNotificationsEnabled => null, // Repeat notifications enabled (type: boolean, nullable)
	threshold => null, // Threshold (type: integer, nullable)
	thresholdType => null, // Threshold type (type: dbaas.logs.StreamAlertConditionThresholdTypeEnum, nullable)
	time => null, // Time (type: integer, nullable)
	title => null, // Title (type: string)
	value => null, // Value (type: string, nullable)
));

print_r($result);
?>
```

## Delete a stream alert

`DELETE /1.0/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/logs-data-platform/data-streams/alerts/#delete-dbaas-logs-servicename-output-graylog-stream-streamid-alert-alertid

**Status:** Stable production version  
**IAM actions:** `ldp:apiovh:output/graylog/stream/alert/delete`

Deletes the stream alert.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `alertId` | path | string (uuid) | yes | Alert ID |
| `serviceName` | path | string | yes | Service name |
| `streamId` | path | string (uuid) | yes | Stream ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dbaas.logs.Operation | successful operation |
| 403 | object | Error 403 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `aliasId` | string (uuid) | read-only | Alias used |
| `createdAt` | string (date-time) | read-only | Operation creation |
| `dashboardId` | string (uuid) | read-only | Dashboard used |
| `encryptionKeyId` | string (uuid) | read-only | Encryption key used |
| `indexId` | string (uuid) | read-only | Index used |
| `inputId` | string (uuid) | read-only | Input used |
| `operationId` | string (uuid) | read-only | Operation ID |
| `osdId` | string (uuid) | read-only | OpenSearch Dashboards used |
| `roleId` | string (uuid) | read-only | Role used |
| `serviceName` | string | read-only | Service name |
| `state` | dbaas.logs.OperationStateEnum | read-only | Operation status — one of `FAILURE`, `PENDING`, `RECEIVED`, `RETRY`, `REVOKED`, `RUNNING`, `STARTED`, `SUCCESS` |
| `streamId` | string (uuid) | read-only | Stream used |
| `subscriptionId` | string (uuid) | read-only | Subscription used |
| `tenantId` | string (uuid) | read-only | Metrics tenant used |
| `tokenId` | string (uuid) | read-only | Token used |
| `updatedAt` | string (date-time) | read-only | Operation last update |

```json
{
  "aliasId": "00000000-0000-0000-0000-000000000000",
  "createdAt": "2024-01-01T12:00:00Z",
  "dashboardId": "00000000-0000-0000-0000-000000000000",
  "encryptionKeyId": "00000000-0000-0000-0000-000000000000",
  "indexId": "00000000-0000-0000-0000-000000000000",
  "inputId": "00000000-0000-0000-0000-000000000000",
  "operationId": "00000000-0000-0000-0000-000000000000",
  "osdId": "00000000-0000-0000-0000-000000000000",
  "roleId": "00000000-0000-0000-0000-000000000000",
  "serviceName": "string",
  "state": "FAILURE",
  "streamId": "00000000-0000-0000-0000-000000000000",
  "subscriptionId": "00000000-0000-0000-0000-000000000000",
  "tenantId": "00000000-0000-0000-0000-000000000000",
  "tokenId": "00000000-0000-0000-0000-000000000000",
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}");

print_r($result);
?>
```

## Update a stream alert

`PUT /1.0/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/logs-data-platform/data-streams/alerts/#put-dbaas-logs-servicename-output-graylog-stream-streamid-alert-alertid

**Status:** Stable production version  
**IAM actions:** `ldp:apiovh:output/graylog/stream/alert/edit`

Updates the stream alert.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `alertId` | path | string (uuid) | yes | Alert ID |
| `serviceName` | path | string | yes | Service name |
| `streamId` | path | string (uuid) | yes | Stream ID |

### Request body (required)

Type: `dbaas.logs.OutputGraylogStreamAlertUpdate`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `backlog` | integer | yes | Backlog |
| `conditionType` | dbaas.logs.StreamAlertConditionConditionTypeEnum |  | Condition type — one of `FIELD_CONTENT_VALUE`, `FIELD_VALUE`, `MESSAGE_COUNT` |
| `constraintType` | dbaas.logs.StreamAlertConditionConstraintTypeEnum |  | Constraint type — one of `MAX`, `MEAN`, `MIN`, `STDLABEU`, `SUM` |
| `field` | string |  | Field |
| `grace` | integer | yes | Grace period |
| `queryFilter` | string |  | Query filter |
| `repeatNotificationsEnabled` | boolean |  | Repeat notifications enabled |
| `threshold` | integer |  | Threshold |
| `thresholdType` | dbaas.logs.StreamAlertConditionThresholdTypeEnum |  | Threshold type — one of `EQ`, `GT`, `GTE`, `LT`, `LTE` |
| `time` | integer |  | Time |
| `title` | string | yes | Title |
| `value` | string |  | Value |

```json
{
  "backlog": 0,
  "conditionType": "FIELD_CONTENT_VALUE",
  "constraintType": "MAX",
  "field": "string",
  "grace": 0,
  "queryFilter": "string",
  "repeatNotificationsEnabled": true,
  "threshold": 0,
  "thresholdType": "EQ",
  "time": 0,
  "title": "string",
  "value": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dbaas.logs.Operation | successful operation |
| 403 | object | Error 403 response |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `aliasId` | string (uuid) | read-only | Alias used |
| `createdAt` | string (date-time) | read-only | Operation creation |
| `dashboardId` | string (uuid) | read-only | Dashboard used |
| `encryptionKeyId` | string (uuid) | read-only | Encryption key used |
| `indexId` | string (uuid) | read-only | Index used |
| `inputId` | string (uuid) | read-only | Input used |
| `operationId` | string (uuid) | read-only | Operation ID |
| `osdId` | string (uuid) | read-only | OpenSearch Dashboards used |
| `roleId` | string (uuid) | read-only | Role used |
| `serviceName` | string | read-only | Service name |
| `state` | dbaas.logs.OperationStateEnum | read-only | Operation status — one of `FAILURE`, `PENDING`, `RECEIVED`, `RETRY`, `REVOKED`, `RUNNING`, `STARTED`, `SUCCESS` |
| `streamId` | string (uuid) | read-only | Stream used |
| `subscriptionId` | string (uuid) | read-only | Subscription used |
| `tenantId` | string (uuid) | read-only | Metrics tenant used |
| `tokenId` | string (uuid) | read-only | Token used |
| `updatedAt` | string (date-time) | read-only | Operation last update |

```json
{
  "aliasId": "00000000-0000-0000-0000-000000000000",
  "createdAt": "2024-01-01T12:00:00Z",
  "dashboardId": "00000000-0000-0000-0000-000000000000",
  "encryptionKeyId": "00000000-0000-0000-0000-000000000000",
  "indexId": "00000000-0000-0000-0000-000000000000",
  "inputId": "00000000-0000-0000-0000-000000000000",
  "operationId": "00000000-0000-0000-0000-000000000000",
  "osdId": "00000000-0000-0000-0000-000000000000",
  "roleId": "00000000-0000-0000-0000-000000000000",
  "serviceName": "string",
  "state": "FAILURE",
  "streamId": "00000000-0000-0000-0000-000000000000",
  "subscriptionId": "00000000-0000-0000-0000-000000000000",
  "tenantId": "00000000-0000-0000-0000-000000000000",
  "tokenId": "00000000-0000-0000-0000-000000000000",
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: dbaas.logs.OutputGraylogStreamAlertUpdate
result = client.put("/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}",
	backlog = None, # Backlog (type: integer)
	conditionType = None, # Condition type (type: dbaas.logs.StreamAlertConditionConditionTypeEnum, nullable)
	constraintType = None, # Constraint type (type: dbaas.logs.StreamAlertConditionConstraintTypeEnum, nullable)
	field = None, # Field (type: string, nullable)
	grace = None, # Grace period (type: integer)
	queryFilter = None, # Query filter (type: string, nullable)
	repeatNotificationsEnabled = None, # Repeat notifications enabled (type: boolean, nullable)
	threshold = None, # Threshold (type: integer, nullable)
	thresholdType = None, # Threshold type (type: dbaas.logs.StreamAlertConditionThresholdTypeEnum, nullable)
	time = None, # Time (type: integer, nullable)
	title = None, # Title (type: string)
	value = None, # Value (type: string, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: dbaas.logs.OutputGraylogStreamAlertUpdate
$result = $ovh->put("/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}", array(
	backlog => null, // Backlog (type: integer)
	conditionType => null, // Condition type (type: dbaas.logs.StreamAlertConditionConditionTypeEnum, nullable)
	constraintType => null, // Constraint type (type: dbaas.logs.StreamAlertConditionConstraintTypeEnum, nullable)
	field => null, // Field (type: string, nullable)
	grace => null, // Grace period (type: integer)
	queryFilter => null, // Query filter (type: string, nullable)
	repeatNotificationsEnabled => null, // Repeat notifications enabled (type: boolean, nullable)
	threshold => null, // Threshold (type: integer, nullable)
	thresholdType => null, // Threshold type (type: dbaas.logs.StreamAlertConditionThresholdTypeEnum, nullable)
	time => null, // Time (type: integer, nullable)
	title => null, // Title (type: string)
	value => null, // Value (type: string, nullable)
));

print_r($result);
?>
```
