Skip to content
POST /observability-destination

Request Body

configobject

Non-secret destination settings. The shape is chosen by the destination's type; an unknown key is a 400. Every type takes a log_types filter. Secrets go in secrets and are never returned.

One of
Datadog · 3 properties
log_typesstring[]

The kinds of logs to forward. Leave it out to forward all of them; an empty list forwards none.

Possible values:
apidurable_objectqueuealarm
sitestring
Possible values:
us1us3us5euap1
tagsstring[]
Example: ["env:prod"]
Splunk Hec · 5 properties
hec_urlstring

A public https URL.

Example: https://splunk.example.com:8088
indexstring
log_typesstring[]

The kinds of logs to forward. Leave it out to forward all of them; an empty list forwards none.

Possible values:
apidurable_objectqueuealarm
sourcestring
sourcetypestring
Sentinel · 7 properties
client_idstring
cloudstring
Possible values:
publicusgovchina
dce_endpointstring

The data collection endpoint, a public https URL.

dcr_immutable_idstring
log_typesstring[]

The kinds of logs to forward. Leave it out to forward all of them; an empty list forwards none.

Possible values:
apidurable_objectqueuealarm
stream_namestring
Example: Custom-TrutoLogs_CL
tenant_idstring
Otlp · 3 properties
endpointstring

A public https URL.

Example: https://otlp.example.com/v1/logs
log_typesstring[]

The kinds of logs to forward. Leave it out to forward all of them; an empty list forwards none.

Possible values:
apidurable_objectqueuealarm
resource_attributesRecord<string, any>
Elasticsearch · 4 properties
indexstring

An index or data stream name.

log_typesstring[]

The kinds of logs to forward. Leave it out to forward all of them; an empty list forwards none.

Possible values:
apidurable_objectqueuealarm
pipelinestring
urlstring

A public https base URL.

Example: https://es.example.com
S3 · 5 properties
bucketstring
Example: truto-logs
endpointstring

The base URL of S3-compatible storage such as Google Cloud Storage (https://storage.googleapis.com), R2 or MinIO.

log_typesstring[]

The kinds of logs to forward. Leave it out to forward all of them; an empty list forwards none.

Possible values:
apidurable_objectqueuealarm
prefixstring

A key prefix for the log objects.

regionstring

An AWS region such as us-east-1. Defaults to auto when endpoint is set.

environment_idstring · uuid

Required for a dashboard session; ignored for API tokens, which create in their own environment.

is_activeboolean
namestring
secretsRecord<string, any>

Secret bag stored as a single encrypted JSON blob. Use api_key for Datadog, token for Splunk HEC, client_secret for Microsoft Sentinel, token or username + password for OTLP, api_key or username + password for Elasticsearch, and access_key_id + secret_access_key for S3. Never returned by the API.

typestring
Possible values:
datadogsplunk_hecsentinelotlpelasticsearchs3

Response Body

configobject

Non-secret destination configuration, shaped by type. A destination saved before its type's fields were required may come back with only some of them.

One of
Datadog · 3 properties
log_typesstring[]

The kinds of logs to forward. Leave it out to forward all of them; an empty list forwards none.

Possible values:
apidurable_objectqueuealarm
sitestring
Possible values:
us1us3us5euap1
tagsstring[]
Example: ["env:prod"]
Splunk Hec · 5 properties
hec_urlstring

A public https URL.

Example: https://splunk.example.com:8088
indexstring
log_typesstring[]

The kinds of logs to forward. Leave it out to forward all of them; an empty list forwards none.

Possible values:
apidurable_objectqueuealarm
sourcestring
sourcetypestring
Sentinel · 7 properties
client_idstring
cloudstring
Possible values:
publicusgovchina
dce_endpointstring

The data collection endpoint, a public https URL.

dcr_immutable_idstring
log_typesstring[]

The kinds of logs to forward. Leave it out to forward all of them; an empty list forwards none.

Possible values:
apidurable_objectqueuealarm
stream_namestring
Example: Custom-TrutoLogs_CL
tenant_idstring
Otlp · 3 properties
endpointstring

A public https URL.

Example: https://otlp.example.com/v1/logs
log_typesstring[]

The kinds of logs to forward. Leave it out to forward all of them; an empty list forwards none.

Possible values:
apidurable_objectqueuealarm
resource_attributesRecord<string, any>
Elasticsearch · 4 properties
indexstring

An index or data stream name.

log_typesstring[]

The kinds of logs to forward. Leave it out to forward all of them; an empty list forwards none.

Possible values:
apidurable_objectqueuealarm
pipelinestring
urlstring

A public https base URL.

Example: https://es.example.com
S3 · 5 properties
bucketstring
Example: truto-logs
endpointstring

The base URL of S3-compatible storage such as Google Cloud Storage (https://storage.googleapis.com), R2 or MinIO.

log_typesstring[]

The kinds of logs to forward. Leave it out to forward all of them; an empty list forwards none.

Possible values:
apidurable_objectqueuealarm
prefixstring

A key prefix for the log objects.

regionstring

An AWS region such as us-east-1. Defaults to auto when endpoint is set.

created_atstring · date-time

When the destination was created.

environment_idstring · uuid

The environment whose logs are forwarded.

idstring · uuid

The ID of the observability destination.

is_activeboolean

Whether forwarding is enabled.

namestring

Human-readable destination name.

typestring

Destination type.

Possible values:
datadogsplunk_hecsentinelotlpelasticsearchs3
updated_atstring · date-time

When the destination was last updated.

curl -X POST 'https://api.truto.one/observability-destination' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "environment_id": "your_environment_id",
  "type": "datadog",
  "name": "your_name",
  "is_active": true,
  "secrets": {}
}'
const body = {
  "environment_id": "your_environment_id",
  "type": "datadog",
  "name": "your_name",
  "is_active": true,
  "secrets": {}
};

const response = await fetch('https://api.truto.one/observability-destination', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import requests

url = "https://api.truto.one/observability-destination"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}
payload = {
    "environment_id": "your_environment_id",
    "type": "datadog",
    "name": "your_name",
    "is_active": True,
    "secrets": {}
}

response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())