Method Path Description
GET /v1/cluster/auditing/db_conns Get database connection auditing settings
PUT /v1/cluster/auditing/db_conns Update database connection auditing settings
DELETE /v1/cluster/auditing/db_conns Delete database connection auditing settings

Get database auditing settings

GET /v1/cluster/auditing/db_conns

Gets the configuration settings for auditing database connections.

Required permissions

Permission name
view_cluster_info

Request

Example HTTP request

GET /cluster/auditing/db_conns 

Request headers

Key Value Description
Host cnm.cluster.fqdn Domain name
Accept application/json Accepted media type

Response

Returns a database connection auditing configuration object.

Example JSON body

{
    "audit_address": "127.0.0.1",
    "audit_port": 12345,
    "audit_protocol": "TCP",
    "audit_reconnect_interval": 1,
    "audit_reconnect_max_attempts": 0
}

Error codes

When errors are reported, the server may return a JSON object with error_code and message fields that provide additional information. The following are possible error_code values:

Code Description
db_conns_auditing_unsupported_by_capability Not all nodes support DB Connections Auditing capability

Status codes

Code Description
200 OK Success
406 Not Acceptable Feature not supported for all nodes

Update database auditing

PUT /v1/cluster/auditing/db_conns

Updates the configuration settings for auditing database connections.

Required permissions

Permission name
update_cluster

Request

Example HTTP request

PUT /cluster/auditing/db_conns

Example JSON body

{
    "audit_protocol": "TCP",
    "audit_address": "127.0.0.1",
    "audit_port": 12345,
    "audit_reconnect_interval": 1,
    "audit_reconnect_max_attempts": 0
}

Request headers

Key Value Description
Host cnm.cluster.fqdn Domain name
Accept application/json Accepted media type

Request body

Include a database connection auditing configuration object with updated fields in the request body.

Response

Returns the updated database connection auditing configuration object.

Example JSON body

{
    "audit_address": "127.0.0.1",
    "audit_port": 12345,
    "audit_protocol": "TCP",
    "audit_reconnect_interval": 1,
    "audit_reconnect_max_attempts": 0
}

Error codes

When errors are reported, the server may return a JSON object with error_code and message fields that provide additional information. The following are possible error_code values:

Code Description
db_conns_auditing_unsupported_by_capability Not all nodes support DB Connections Auditing capability

Status codes

Code Description
200 OK Success
406 Not Acceptable Feature not supported for all nodes

Delete database auditing settings

DELETE /v1/cluster/auditing/db_conns

Resets the configuration settings for auditing database connections.

Required permissions

Permission name
update_cluster

Request

Example HTTP request

DELETE /cluster/auditing/db_conns 

Request headers

Key Value Description
Host cnm.cluster.fqdn Domain name
Accept application/json Accepted media type

Response

Returns a status code that indicates whether the database connection auditing settings reset successfully or failed to reset.

Error codes

When errors are reported, the server may return a JSON object with error_code and message fields that provide additional information. The following are possible error_code values:

Code Description
db_conns_audit_config_not_found Unable to find the auditing configuration
cannot_delete_audit_config_when_policy_enabled Auditing cluster policy is ‘enabled’ when trying to delete the auditing configuration
cannot_delete_audit_config_when_bdb_enabled One of the databases has auditing configuration ‘enabled’ when trying to delete the auditing configuration

Status codes

Code Description
200 OK Success
404 Not Found Configuration not found
406 Not Acceptable Feature not supported for all nodes