# Manage & Operate › Logs Data Platform › Data streams 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

> 6 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/

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

## Operations

- `GET /dbaas/logs/{serviceName}/output/graylog/stream` — List data streams
- `GET /dbaas/logs/{serviceName}/output/graylog/stream/{streamId}` — Get a data stream
- `GET /dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/url` — List data stream URLs
- `POST /dbaas/logs/{serviceName}/output/graylog/stream` — Create a data stream
- `DELETE /dbaas/logs/{serviceName}/output/graylog/stream/{streamId}` — Delete a data stream
- `PUT /dbaas/logs/{serviceName}/output/graylog/stream/{streamId}` — Update a data stream

## List data streams

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

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

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

Returns the data streams of the Logs Data Platform service.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `iamTags` | query | object |  | Filter resources on IAM tags |
| `serviceName` | path | string | yes | Service name |

### 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" \
  -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")

# 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");

print_r($result);
?>
```

## Get a data stream

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

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

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

Returns the data stream.

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canAlert` | boolean | read-only | Indicates if the current user can create alert on the stream |
| `clusterId` | string (uuid) | read-only | Cluster ID |
| `coldStorageCompression` | dbaas.logs.StreamColdStorageCompressionEnum | read-only | Cold storage compression method — one of `DEFLATED`, `GZIP`, `LZMA`, `ZSTD` |
| `coldStorageContent` | dbaas.logs.StreamColdStorageContentEnum | read-only | ColdStorage content — one of `ALL`, `GELF`, `PLAIN` |
| `coldStorageEnabled` | boolean | read-only | Is Cold storage enabled? |
| `coldStorageNotifyEnabled` | boolean | read-only | Notify on new Cold storage archive |
| `coldStorageRetention` | integer | read-only | Cold storage retention in year |
| `createdAt` | string (date-time) | read-only | Stream creation |
| `description` | string | read-only | Stream description |
| `encryptionKeysIds` | string (uuid)[] | read-only | Encryption keys used to encrypt stream archives |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `indexingCurrentSize` | integer | read-only | Indexing current size (in bytes) |
| `indexingEnabled` | boolean | read-only | Enable ES indexing |
| `indexingMaxSize` | integer | read-only | Maximum indexing size (in GB) |
| `indexingNotifyEnabled` | boolean | read-only | If set, notify when size is near 80, 90 or 100 % of the maximum configured setting |
| `isEditable` | boolean | read-only | Indicates if you are allowed to edit entry |
| `nbAlertCondition` | integer | read-only | Number of alert condition |
| `nbArchive` | integer | read-only | Number of coldstored archives |
| `nbSubscription` | integer | read-only | Number of subscriptions targeting this stream |
| `parentStreamId` | string (uuid) | read-only | Parent stream ID |
| `pauseIndexingOnMaxSize` | boolean | read-only | If set, pause indexing when maximum size is reach |
| `retentionId` | string (uuid) | read-only | Retention ID |
| `streamId` | string (uuid) | read-only | Stream ID |
| `title` | string | read-only | Stream name |
| `updatedAt` | string (date-time) | read-only | Stream last update |
| `webSocketEnabled` | boolean | read-only | Enable Websocket |

```json
{
  "canAlert": true,
  "clusterId": "00000000-0000-0000-0000-000000000000",
  "coldStorageCompression": "DEFLATED",
  "coldStorageContent": "ALL",
  "coldStorageEnabled": true,
  "coldStorageNotifyEnabled": true,
  "coldStorageRetention": 0,
  "createdAt": "2024-01-01T12:00:00Z",
  "description": "string",
  "encryptionKeysIds": [
    "00000000-0000-0000-0000-000000000000"
  ],
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "indexingCurrentSize": 0,
  "indexingEnabled": true,
  "indexingMaxSize": 0,
  "indexingNotifyEnabled": true,
  "isEditable": true,
  "nbAlertCondition": 0,
  "nbArchive": 0,
  "nbSubscription": 0,
  "parentStreamId": "00000000-0000-0000-0000-000000000000",
  "pauseIndexingOnMaxSize": true,
  "retentionId": "00000000-0000-0000-0000-000000000000",
  "streamId": "00000000-0000-0000-0000-000000000000",
  "title": "string",
  "updatedAt": "2024-01-01T12:00:00Z",
  "webSocketEnabled": true
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}" \
  -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}")

# 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}");

print_r($result);
?>
```

## List data stream URLs

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

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

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

Returns the data stream URLs 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 | dbaas.logs.Url[] | successful operation |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | string | read-only | Web URI |
| `type` | dbaas.logs.UrlTypeEnum | read-only | Service type — one of `CONSOLE`, `ELASTICSEARCH_API`, `GRAYLOG_API`, `GRAYLOG_WEBUI`, `HTTP_GELF`, `HTTP_TLS_GELF`, `KIBANA_WEBUI`, `OPENSEARCH_API`, `OSD_WEBUI`, `PROMETHEUS_API`, `SERVICE_DOMAIN`, `TCP_BEATS`, … |

```json
[
  {
    "address": "string",
    "type": "CONSOLE"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/url" \
  -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}/url")

# 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}/url");

print_r($result);
?>
```

## Create a data stream

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

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

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

Creates a data stream on the Logs Data Platform service.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Request body (required)

Type: `dbaas.logs.OutputGraylogStreamCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `coldStorageCompression` | dbaas.logs.StreamColdStorageCompressionEnum |  | Cold storage compression — one of `DEFLATED`, `GZIP`, `LZMA`, `ZSTD` |
| `coldStorageContent` | dbaas.logs.StreamColdStorageContentEnum |  | Cold storage archive content — one of `ALL`, `GELF`, `PLAIN` |
| `coldStorageEnabled` | boolean |  | Cold storage enabled |
| `coldStorageNotifyEnabled` | boolean |  | Cold storage notify enabled |
| `coldStorageRetention` | integer |  | Cold storage retention time |
| `description` | string | yes | Description |
| `encryptionKeysIds` | string (uuid)[] |  | Encryption keys used to encrypt stream archives |
| `indexingEnabled` | boolean |  | ES indexing enabled |
| `indexingMaxSize` | integer |  | Maximum indexing size (in GB) |
| `indexingNotifyEnabled` | boolean |  | If set, notify when size is near 80, 90 or 100 % of the maximum configured setting |
| `parentStreamId` | string (uuid) |  | Parent stream ID |
| `pauseIndexingOnMaxSize` | boolean |  | If set, pause indexing when maximum size is reach |
| `retentionId` | string (uuid) |  | Retention ID |
| `title` | string | yes | Title |
| `webSocketEnabled` | boolean |  | Web Socket enabled |

```json
{
  "coldStorageCompression": "DEFLATED",
  "coldStorageContent": "ALL",
  "coldStorageEnabled": true,
  "coldStorageNotifyEnabled": true,
  "coldStorageRetention": 0,
  "description": "string",
  "encryptionKeysIds": [
    "00000000-0000-0000-0000-000000000000"
  ],
  "indexingEnabled": true,
  "indexingMaxSize": 0,
  "indexingNotifyEnabled": true,
  "parentStreamId": "00000000-0000-0000-0000-000000000000",
  "pauseIndexingOnMaxSize": true,
  "retentionId": "00000000-0000-0000-0000-000000000000",
  "title": "string",
  "webSocketEnabled": true
}
```

### 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 |
| 501 | object | Error 501 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" \
  -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.OutputGraylogStreamCreation
result = client.post("/dbaas/logs/{serviceName}/output/graylog/stream",
	coldStorageCompression = None, # Cold storage compression (type: dbaas.logs.StreamColdStorageCompressionEnum, nullable)
	coldStorageContent = None, # Cold storage archive content (type: dbaas.logs.StreamColdStorageContentEnum, nullable)
	coldStorageEnabled = None, # Cold storage enabled (type: boolean, nullable)
	coldStorageNotifyEnabled = None, # Cold storage notify enabled (type: boolean, nullable)
	coldStorageRetention = None, # Cold storage retention time (type: integer, nullable)
	description = None, # Description (type: string)
	encryptionKeysIds = None, # Encryption keys used to encrypt stream archives (type: array, nullable)
	indexingEnabled = None, # ES indexing enabled (type: boolean, nullable)
	indexingMaxSize = None, # Maximum indexing size (in GB) (type: integer, nullable)
	indexingNotifyEnabled = None, # If set, notify when size is near 80, 90 or 100 % of the maximum configured setting (type: boolean, nullable)
	parentStreamId = None, # Parent stream ID (type: string, nullable)
	pauseIndexingOnMaxSize = None, # If set, pause indexing when maximum size is reach (type: boolean, nullable)
	retentionId = None, # Retention ID (type: string, nullable)
	title = None, # Title (type: string)
	webSocketEnabled = None, # Web Socket enabled (type: boolean, 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.OutputGraylogStreamCreation
$result = $ovh->post("/dbaas/logs/{serviceName}/output/graylog/stream", array(
	coldStorageCompression => null, // Cold storage compression (type: dbaas.logs.StreamColdStorageCompressionEnum, nullable)
	coldStorageContent => null, // Cold storage archive content (type: dbaas.logs.StreamColdStorageContentEnum, nullable)
	coldStorageEnabled => null, // Cold storage enabled (type: boolean, nullable)
	coldStorageNotifyEnabled => null, // Cold storage notify enabled (type: boolean, nullable)
	coldStorageRetention => null, // Cold storage retention time (type: integer, nullable)
	description => null, // Description (type: string)
	encryptionKeysIds => null, // Encryption keys used to encrypt stream archives (type: array, nullable)
	indexingEnabled => null, // ES indexing enabled (type: boolean, nullable)
	indexingMaxSize => null, // Maximum indexing size (in GB) (type: integer, nullable)
	indexingNotifyEnabled => null, // If set, notify when size is near 80, 90 or 100 % of the maximum configured setting (type: boolean, nullable)
	parentStreamId => null, // Parent stream ID (type: string, nullable)
	pauseIndexingOnMaxSize => null, // If set, pause indexing when maximum size is reach (type: boolean, nullable)
	retentionId => null, // Retention ID (type: string, nullable)
	title => null, // Title (type: string)
	webSocketEnabled => null, // Web Socket enabled (type: boolean, nullable)
));

print_r($result);
?>
```

## Delete a data stream

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

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

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

Deletes the data stream.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `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}" \
  -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}")

# 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}");

print_r($result);
?>
```

## Update a data stream

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

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

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

Updates the data stream.

### 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.OutputGraylogStreamUpdate`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `coldStorageCompression` | dbaas.logs.StreamColdStorageCompressionEnum |  | Cold storage compression — one of `DEFLATED`, `GZIP`, `LZMA`, `ZSTD` |
| `coldStorageContent` | dbaas.logs.StreamColdStorageContentEnum |  | Cold storage content — one of `ALL`, `GELF`, `PLAIN` |
| `coldStorageEnabled` | boolean |  | Cold storage enabled |
| `coldStorageNotifyEnabled` | boolean |  | Cold storage notify enabled |
| `coldStorageRetention` | integer |  | Cold storage retention time |
| `description` | string | yes | Description |
| `encryptionKeysIds` | string (uuid)[] |  | Encryption keys used to encrypt stream archives |
| `indexingEnabled` | boolean |  | ES indexing enabled |
| `indexingMaxSize` | integer |  | Maximum indexing size (in GB) |
| `indexingNotifyEnabled` | boolean |  | If set, notify when size is near 80, 90 or 100 % of the maximum configured setting |
| `pauseIndexingOnMaxSize` | boolean |  | If set, pause indexing when maximum size is reach |
| `title` | string | yes | Title |
| `webSocketEnabled` | boolean |  | Web socket enabled |

```json
{
  "coldStorageCompression": "DEFLATED",
  "coldStorageContent": "ALL",
  "coldStorageEnabled": true,
  "coldStorageNotifyEnabled": true,
  "coldStorageRetention": 0,
  "description": "string",
  "encryptionKeysIds": [
    "00000000-0000-0000-0000-000000000000"
  ],
  "indexingEnabled": true,
  "indexingMaxSize": 0,
  "indexingNotifyEnabled": true,
  "pauseIndexingOnMaxSize": true,
  "title": "string",
  "webSocketEnabled": true
}
```

### 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}" \
  -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.OutputGraylogStreamUpdate
result = client.put("/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}",
	coldStorageCompression = None, # Cold storage compression (type: dbaas.logs.StreamColdStorageCompressionEnum, nullable)
	coldStorageContent = None, # Cold storage content (type: dbaas.logs.StreamColdStorageContentEnum, nullable)
	coldStorageEnabled = None, # Cold storage enabled (type: boolean, nullable)
	coldStorageNotifyEnabled = None, # Cold storage notify enabled (type: boolean, nullable)
	coldStorageRetention = None, # Cold storage retention time (type: integer, nullable)
	description = None, # Description (type: string)
	encryptionKeysIds = None, # Encryption keys used to encrypt stream archives (type: array, nullable)
	indexingEnabled = None, # ES indexing enabled (type: boolean, nullable)
	indexingMaxSize = None, # Maximum indexing size (in GB) (type: integer, nullable)
	indexingNotifyEnabled = None, # If set, notify when size is near 80, 90 or 100 % of the maximum configured setting (type: boolean, nullable)
	pauseIndexingOnMaxSize = None, # If set, pause indexing when maximum size is reach (type: boolean, nullable)
	title = None, # Title (type: string)
	webSocketEnabled = None, # Web socket enabled (type: boolean, 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.OutputGraylogStreamUpdate
$result = $ovh->put("/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}", array(
	coldStorageCompression => null, // Cold storage compression (type: dbaas.logs.StreamColdStorageCompressionEnum, nullable)
	coldStorageContent => null, // Cold storage content (type: dbaas.logs.StreamColdStorageContentEnum, nullable)
	coldStorageEnabled => null, // Cold storage enabled (type: boolean, nullable)
	coldStorageNotifyEnabled => null, // Cold storage notify enabled (type: boolean, nullable)
	coldStorageRetention => null, // Cold storage retention time (type: integer, nullable)
	description => null, // Description (type: string)
	encryptionKeysIds => null, // Encryption keys used to encrypt stream archives (type: array, nullable)
	indexingEnabled => null, // ES indexing enabled (type: boolean, nullable)
	indexingMaxSize => null, // Maximum indexing size (in GB) (type: integer, nullable)
	indexingNotifyEnabled => null, // If set, notify when size is near 80, 90 or 100 % of the maximum configured setting (type: boolean, nullable)
	pauseIndexingOnMaxSize => null, // If set, pause indexing when maximum size is reach (type: boolean, nullable)
	title => null, // Title (type: string)
	webSocketEnabled => null, // Web socket enabled (type: boolean, nullable)
));

print_r($result);
?>
```
