Skip to main content
POST
/
project
/
{project_id}
/
location
/
{location}
/
postgres
/
{postgres_database_reference}
/
log-destination
Create a new PostgreSQL log destination
curl --request POST \
  --url https://api.ubicloud.com/project/{project_id}/location/{location}/postgres/{postgres_database_reference}/log-destination \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "type": "otlp",
  "url": "<string>",
  "options": {}
}
'
{
  "id": "1d000000000000000000000000",
  "name": "<string>",
  "type": "otlp",
  "url": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://ubicloud.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

location
string
required

The Ubicloud location/region

Example:

"eu-central-h1"

postgres_database_reference
string
required

Postgres database ID or name Resource ID or name

Pattern: ^[a-z0-9](?:[a-z0-9\-]{0,61}[a-z0-9])?$
project_id
string
required

ID of the project

Pattern: ^pj[0-9a-hj-km-np-tv-z]{24}$
Example:

"pjkkmx0f2vke4h36nk9cm8v8q0"

Body

application/json
name
string
required

Name for the Log Destination

type
enum<string>
required

Destination type. "otlp" sends via OTLP HTTP (https://...); "syslog" sends via RFC 5424 over TLS (tcp://host:port)

Available options:
otlp,
syslog
url
string
required

Endpoint URL. For otlp: https://... For syslog: tcp://host:port

options
object

Authentication options. For otlp: {"headers": {"Header-Name": "value"}}. For syslog: {"structured_data": {"sd-id": {"key": "value"}}}

Response

A Postgres Log Destination

id
string
required

ID of the log destination

Pattern: ^1d[0-9a-hj-km-np-tv-z]{24}$
Example:

"1d000000000000000000000000"

name
string
required

Name of the log destination

type
enum<string>
required

Destination type: "otlp" or "syslog"

Available options:
otlp,
syslog
url
string
required

Destination URL