🧩API
The agent's setup is adjustable using direct API invocations, facilitating interactive information retrieval and interaction.
Agent API can be reached at https://<<host_name>>:<<port_number>> host_name: Refers to the host where the agent is installed (or localhost if used locally). port_number: By default, the agent listens on port 8282, which can be updated as needed
Examples are demonstrated using localhost as the host name and the default port number 8282.
Certain operations necessitate a header token for transmission to the agent. This token aligns with the agent's license key and the platform it operates on.
Management
Status
GET
https://localhost:8282/api/agent/status
Show agent's status, version, and properties.
Stop
PUT
https://localhost:8282/api/agent/stop
Stop the agent.
Headers
api-token*
String
Datasentinel license key
Port Number
PATCH
https://localhost:8282/api/agent/port/{port}
Modify the port number that the agent listens on. The agent is stopped after the modification. Start it again to apply the new port configuration.
Path Parameters
port*
Number
New port
Headers
api-token*
String
Datasentinel license key
Table Monitoring Limit
PATCH
https://localhost:8282/api/agent/tables-monitoring-limit/{limit}
The agent monitors table and index activities when the connection's table count remains below the specified limit (default: 1000).
Refer to the Collection Level section for more details.
Path Parameters
limit*
Number
Limit number
Headers
api-token*
String
Datasentinel license key
Query Monitoring Limit
PATCH
https://localhost:8282/api/agent/query-monitoring-limit/{limit}
The agent monitors query activity by storing unique IDs in a daily cache. If the limit is exceeded, this automatically deactivates query monitoring (default: 30000).
Refer to the Collection Level section for more details.
Path Parameters
limit*
Number
Limit number
Headers
api-token*
String
Datasentinel license key
Upload Server
The Upload Server refers to the server name of the platform where metrics are transmitted.
Set attributes
PUT
https://localhost:8282/api/server
This is the server where metrics are sent
Headers
api-token*
String
Datasentinel license key
Request Body
host*
String
Server Name of the hosting platform
port*
Number
Platform Listening Port. By default, the platform operates on port 443.
Show attributes
GET
https://localhost:8282/api/server
Show server name and port details for the platform where metrics are sent.
Test Upload
POST
https://localhost:8282/api/server/test-upload
The agent conducts a test to confirm whether the upload server, configured with the specified port, is accessible.
Proxy
Under certain circumstances, an intermediary proxy server is required to establish a connection between the agent and the platform server.
Set attributes
POST
https://localhost:8282/api/proxy
The following details pertain to the proxy server. Username and password are optional and can be excluded if not required.
Headers
api-token*
String
Datasentinel license key
Request Body
host*
String
Server Name of the hosting platform
port*
Number
Platform Listening Port. By default, the platform operates on port 443.
user
String
User name
password
String
Password
Show attributes
GET
https://localhost:8282/api/proxy
Proxy attributes
Headers
api-token*
String
Datasentinel license key
DELETE
https://localhost:8282/api/proxy
Delete proxy
Headers
api-token*
String
Datasentinel License Key
Connections
Show Connections
GET
https://localhost:8282/api/connections
Display declared connections and their attributes
Headers
api-token*
String
Datasentinel license key
Enable All
PATCH
https://localhost:8282/api/connections/enable
Enable all connections and initiate connection attempts for each of them only if they are not already established.
Headers
api-token*
String
Datasentinel license key
Disable All
PATCH
https://localhost:8282/api/connections/disable
Deactivate all connections and disconnect them.
Headers
api-token*
String
Datasentinel license key
Connection
Add Connection
POST
https://localhost:8282/api/connections/{connection_name}
Create a new connection, establishing it, and Initiate monitoring
Path Parameters
connection_name*
String
Connection Identifier
Headers
api-token*
String
Datasentinel license key
Request Body
host*
String
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
Show Connection
GET
https://localhost:8282/api/connections/{connection_name}
Display Connection Attributes
Path Parameters
connection_name*
String
Connection name
Headers
api-token*
String
Datasentinel license key
Update Connection
PUT
https://localhost:8282/api/connections/{connection_name}
Update connection attributes
Path Parameters
connection_name*
String
Connection Identifier
Headers
api-token*
String
Datasentinel license key
Request Body
host
String
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
DELETE
https://localhost:8282/api/connections/{connection_name}
Delete Connection
Path Parameters
connection_name*
String
Connection name
Headers
api-token*
String
Datasentinel license key
Enable
PATCH
https://localhost:8282/api/connections/{connection_name}/enable
Activate the connection and initiate connection attempts in order to start monitoring
Path Parameters
connection_name*
String
Connection name
Headers
api-token*
String
Datasentinel license key
Disable
PATCH
https://localhost:8282/api/connections/{connection_name}/disable
Disable the connection and perform a disconnection
Path Parameters
connection_name*
String
Connection name
Headers
api-token*
String
Datasentinel license key
Collection Level
The Agent version 3.2, which was released in February 2023, introduces the Collection Level feature allowing you to choose the metrics to monitor.
Collection Level settings are displayed within the connection properties.
Query samples
Enable
PATCH
https://localhost:8282/api/connections/{connection_name}/enable-samples
Activate query sample collection. Refer to the Collection Level section specifically dedicated to query samples for detailed instructions.
Path Parameters
connection_name*
String
Connection name
Headers
api-token*
String
Datasentinel license key
Disable
PATCH
https://localhost:8282/api/connections/{connection_name}/disable-samples
Deactivate query sample collection. Refer to the Collection Level section specifically dedicated to query samples for detailed instructions.
Path Parameters
connection_name*
String
Connection name
Headers
api-token*
String
Datasentinel license key
Lock Monitoring
Enable
PATCH
https://localhost:8282/api/connections/{connection_name}/enable-lock-monitoring
Enable Lock Monitoring. Refer to the Collection Level section specifically dedicated to lock monitoring for detailed instructions.
Path Parameters
connection_name*
String
Connection name
Headers
api-token*
String
Datasentinel license key
Disable
PATCH
https://localhost:8282/api/connections/{connection_name}/disable-lock-monitoring
Disable Lock Monitoring Refer to the Collection Level section specifically dedicated to lock monitoring for detailed instructions.
Path Parameters
connection_name*
String
Connection name
Headers
api-token*
String
Datasentinel license key
Delay
PATCH
https://localhost:8282/api/connections/{connection_name}/lock-monitoring-delay/{seconds}
Change Lock Monitoring Delay. Refer to the Collection Level section specifically dedicated to lock monitoring for detailed instructions.
Path Parameters
connection_name*
String
Connection name
seconds*
Number
Number of seconds
Headers
api-token*
String
Datasentinel license key
Table Monitoring
Enable
PATCH
https://localhost:8282/api/connections/{connection_name}/enable-table-monitoring
Activate Table Monitoring. Refer to the Collection Level section specifically dedicated to table monitoring for detailed instructions.
Path Parameters
connection_name*
String
Connection name
Headers
api-token*
String
Datasentinel license key
Disable
PATCH
https://localhost:8282/api/connections/{connection_name}/disable-table-monitoring
Deactivate Table Monitoring. Refer to the Collection Level section specifically dedicated to table monitoring for detailed instructions.
Path Parameters
connection_name*
String
Connection name
Headers
api-token*
String
Datasentinel license key
Query Monitoring
Enable
PATCH
https://localhost:8282/api/connections/{connection_name}/enable-query-monitoring
Activate Query Monitoring. Refer to the Collection Level section specifically dedicated to query monitoring for detailed instructions.
Path Parameters
connection_name*
String
Connection name
Headers
api-token*
String
Datasentinel license key
Disable
PATCH
https://localhost:8282/api/connections/{connection_name}/disable-query-monitoring
Deactivate Query Monitoring. Refer to the Collection Level section specifically dedicated to query monitoring for detailed instructions.
Path Parameters
connection_name*
String
Connection name
Headers
api-token*
String
Datasentinel license key
Query Filters
Min Calls
PATCH
https://localhost:8282/api/connections/{connection_name}/query-monitoring-min-calls/{min-calls}
Change the value of Min Calls Refer to the Collection Level section specifically dedicated to query monitoring filters for detailed instructions.
Path Parameters
connection_name*
String
Connection name
min-calls
Number
Min calls
Headers
api-token*
String
Datasentinel license key
Min Time
PATCH
https://localhost:8282/api/connections/{connection_name}/query-monitoring-min-time/{seconds}
Change the value of Min Time. Refer to the Collection Level section specifically dedicated to query monitoring filters for detailed instructions.
Path Parameters
connection_name*
String
Connection name
seconds
Number
Min time
Headers
api-token*
String
Datasentinel license key
Query Optimize
Enable
PATCH
https://localhost:8282/api/connections/{connection_name}/enable-query-monitoring-optimize
Activate Query Monitoring Optimization. Refer to the Collection Level section specifically dedicated to query monitoring optimization for detailed instructions.
Path Parameters
connection_name*
String
Connection name
Headers
api-token*
String
Datasentinel license key
Disable
PATCH
https://localhost:8282/api/connections/{connection_name}/disable-query-monitoring-optimize
Deactivate Query Monitoring Optimization. Refer to the Collection Level section specifically dedicated to query monitoring optimization for detailed instructions.
Path Parameters
connection_name*
String
Connection name
Headers
api-token*
String
Datasentinel license key
Last updated