🧩Connection API

The Connection API is available solely through an on-premises installation and is reliant on the decision to use the Agentless feature.

If you prefer installing each agent locally, then adding a connection is done at the agent level

To use the Connection API, it's necessary to generate an access token.

🔗Access Token

Connection

Add

POST https://<<platform-server>>/ds-api/pool/pg-instances/{connection_name}

Create a New Remote Monitored Connection (Agentless Feature)

Path Parameters

NameTypeDescription

connection_name*

String

Connection Identifier

Headers

NameTypeDescription

user-token*

String

Generated Access Token

Request Body

NameTypeDescription

host*

String

PostgreSQL Hostname for connection

port*

Number

Indicate the port used for communication with the PostgreSQL cluster.

user*

String

PostgreSQL user used by Datasentinel for monitoring

password*

String

User password

tags*

String

Tags linked with the instance. Tags should follow the format [key=value],.... Can be empty

Refer to Tags section for more details

Response

{
    "status": "Connection created and connected!"
}
Example
cat > body.json << EOF
{
    "host": "pg-sales-1734",
    "port": 9342,
    "user": "datasentinel",
    "password": "sentinel",
    "tags": "application=sales,environment=production,provider=amazon,datacenter=lyon",
}
EOF
export TOKEN=<<user_token>>
curl -k --header "user-token: $TOKEN" --header 'Content-Type: application/json' --request POST 'https://<<platform-server>>/ds-api/pool/pg-instances/sales-production' -d @body.json

Display

GET https://<<platform-server>>/ds-api/pool/pg-instances/{connection_name}

Display Remote Monitored Connection (Agentless Feature)

Path Parameters

NameTypeDescription

connection_name*

String

Connection Identifier

Headers

NameTypeDescription

user-token*

String

Generated Access Token

Response

{
    "name": "sales-production",
    "host": "pg-sales-1734",
    "port": 9342,
    "user": "datasentinel",
    "password": "sentinel",
    "tags": "",
    "enabled": true,
    "connected": true,
    "collection-rate": "low",
    "samples": false,
    "lock-monitoring": true,
    "lock-monitoring-delay": 30,
    "table-monitoring": true,
    "query-monitoring": true,
    "query-monitoring-optimize": false,
    "query-monitoring-min-calls": 2,
    "query-monitoring-min-time": 1
}

Update

PUT https://<<platform-server>>/ds-api/pool/pg-instances/{connection_name}

Update Remote Monitored Connection (Agentless Feature)

Path Parameters

NameTypeDescription

connection_name*

String

Connection Identifier

Headers

NameTypeDescription

user-token*

String

Generated Access Token

Request Body

NameTypeDescription

host

String

PostgreSQL Hostname for connection

port

Number

Indicate the port used for communication with the PostgreSQL cluster.

user

String

PostgreSQL user used by Datasentinel for monitoring

password

String

User password

tags

String

Tags linked with the instance. Tags should follow the format [key=value],.... Can be empty

Refer to Tags section for more details

Response

{
    "status": "Connection updated!"
}

Disable

PATCH https://<<platform-server>>/ds-api/pool/pg-instances/{connection_name}/disable

Disable Remote Monitored Connection (Agentless Feature)

Path Parameters

NameTypeDescription

connection_name*

String

Connection Identifier

Headers

NameTypeDescription

user-token*

String

Generated Access Token

Response

{
    "status": "Connection disabled!"
}

Enable

PATCH https://<<platform-server>>/ds-api/pool/pg-instances/{connection_name}/enable

Enable Remote Monitored Connection (Agentless Feature)

Path Parameters

NameTypeDescription

connection_name*

String

Connection Identifier

Headers

NameTypeDescription

user-token*

String

Generated Access Token

DELETE https://<<platform-server>>/ds-api/pool/pg-instances/{connection_name}

Delete Remote Monitored Connection (Agentless Feature)

Path Parameters

NameTypeDescription

connection_name*

String

Connection Identifier

Headers

NameTypeDescription

user-token*

String

Generated Access Token

Response

{
    "status": "Connection deleted!"
}

Last updated