dots.v2.monitoring.sinks.destinations.post()

Generated on 13 Nov 2026 from DoTs version v1.24.0

Usage

client.v2.monitoring.sinks.destinations.post(body: Destination_request, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | DestinationsPostResponse>

Description

To create a new destination, send a POST request to /v2/monitoring/sinks/destinations.

Parameters

name string optional

Example: managed_opensearch_cluster

destination name

type string required

The destination type. opensearch_dbaas for a DigitalOcean managed OpenSearch
cluster or opensearch_ext for an externally managed one.

One of: opensearch_dbaas, opensearch_ext

config object required
Show child properties
credentials object optional

Credentials for an OpenSearch cluster user. Optional if cluster_uuid is passed.

Show child properties
username string optional

Example: username

password string optional

Example: password

endpoint string required

Example: example.com

host of the OpenSearch cluster

clusterUuid string optional

Example: 85148069-7e35-4999-80bd-6fa1637ca385

A unique identifier for a managed OpenSearch cluster.

clusterName string optional

Example: managed_dbaas_cluster

Name of a managed OpenSearch cluster.

indexName string optional

Example: logs

OpenSearch index to send logs to.

retentionDays integer optional

Example: 14

Number of days to retain logs in an OpenSearch cluster.

Default: 14

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.monitoring.sinks.destinations.post({
    name: "managed_opensearch_cluster",
    type: "opensearch_dbaas",
    config: {
        endpoint: "db-opensearch-nyc3-123456-do-user-123456-0.g.db.ondigitalocean.com",
        clusterUuid: "85148069-7e35-4999-80bd-6fa1637ca385",
        clusterName: "managed_dbaas_cluster",
        indexName: "logs",
        retentionDays: 14,
    },
});

Response Example

Show Response Example
{
  "destination": {
    "id": "01f30bfa-319a-4769-ba95-9d43971fb514",
    "name": "managed_opensearch_cluster",
    "type": "opensearch_dbaas",
    "config": {
      "id": "41078d41-165c-4cff-9f0a-19536e3e3d49",
      "endpoint": "example.com",
      "cluster_uuid": "85148069-7e35-4999-80bd-6fa1637ca385",
      "cluster_name": "managed_dbaas_cluster",
      "index_name": "logs",
      "retention_days": 14
    }
  }
}

More Information

See /v2/monitoring/sinks/destinations in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.