{
  "schema_version": 2,
  "id": "operate/rs/references/rest-api/requests/cluster/auditing-db-conns",
  "title": "Auditing database connections requests",
  "url": "https://redis.io/docs/latest/operate/rs/references/rest-api/requests/cluster/auditing-db-conns/",
  "summary": "Auditing database connections requests",
  "tags": [
    "docs",
    "operate",
    "rs"
  ],
  "last_updated": "2025-03-10T13:08:54-04:00",
  "page_type": "content",
  "content_hash": "b0b8855167cb1f2be4b5baf9398aeb9c5e1f3f3093f0d76e800fb29ff1a25df8",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "| Method | Path | Description |\n|--------|------|-------------|\n| [GET](#get-cluster-audit-db-conns) | `/v1/cluster/auditing/db_conns` | Get database connection auditing settings |\n| [PUT](#put-cluster-audit-db-conns) | `/v1/cluster/auditing/db_conns` | Update database connection auditing settings |\n| [DELETE](#delete-cluster-audit-db-conns) | `/v1/cluster/auditing/db_conns` | Delete database connection auditing settings |"
    },
    {
      "id": "get-cluster-audit-db-conns",
      "title": "Get database auditing settings",
      "role": "content",
      "text": "GET /v1/cluster/auditing/db_conns\n\nGets the configuration settings for [auditing database connections](https://redis.io/docs/latest/operate/rs/security/audit-events).\n\n#### Required permissions\n\n| Permission name |\n|-----------------|\n| [view_cluster_info](https://redis.io/docs/latest/operate/rs/references/rest-api/permissions#view_cluster_info) |"
    },
    {
      "id": "get-request",
      "title": "Request",
      "role": "content",
      "text": "#### Example HTTP request\n\n\tGET /v1/cluster/auditing/db_conns \n\n\n#### Request headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |"
    },
    {
      "id": "get-response",
      "title": "Response",
      "role": "returns",
      "text": "Returns a [database connection auditing configuration object](https://redis.io/docs/latest/operate/rs/references/rest-api/objects/db-conns-auditing-config).\n\n#### Example JSON body\n\n[code example]"
    },
    {
      "id": "get-error-codes",
      "title": "Error codes",
      "role": "errors",
      "text": "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:\n\n| Code | Description |\n|------|-------------|\n| db_conns_auditing_unsupported_by_capability | Not all nodes support DB Connections Auditing capability  |"
    },
    {
      "id": "get-status-codes",
      "title": "Status codes",
      "role": "content",
      "text": "| Code | Description |\n|------|-------------|\n| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success |\n| [406 Not Acceptable](https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable) | Feature not supported for all nodes |"
    },
    {
      "id": "put-cluster-audit-db-conns",
      "title": "Update database auditing",
      "role": "content",
      "text": "PUT /v1/cluster/auditing/db_conns\n\nUpdates the configuration settings for [auditing database connections](https://redis.io/docs/latest/operate/rs/security/audit-events).\n\n#### Required permissions\n\n| Permission name |\n|-----------------|\n| [update_cluster](https://redis.io/docs/latest/operate/rs/references/rest-api/permissions#update_cluster) |"
    },
    {
      "id": "put-request",
      "title": "Request",
      "role": "content",
      "text": "#### Example HTTP request\n\n\tPUT /v1/cluster/auditing/db_conns\n\n#### Example JSON body\n\n[code example]\n\n#### Request headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |\n\n#### Request body\n\nInclude a [database connection auditing configuration object](https://redis.io/docs/latest/operate/rs/references/rest-api/objects/db-conns-auditing-config) with updated fields in the request body."
    },
    {
      "id": "put-response",
      "title": "Response",
      "role": "returns",
      "text": "Returns the updated [database connection auditing configuration object](https://redis.io/docs/latest/operate/rs/references/rest-api/objects/db-conns-auditing-config).\n\n#### Example JSON body\n\n[code example]"
    },
    {
      "id": "put-error-codes",
      "title": "Error codes",
      "role": "errors",
      "text": "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:\n\n| Code | Description |\n|------|-------------|\n| db_conns_auditing_unsupported_by_capability | Not all nodes support DB Connections Auditing capability  |"
    },
    {
      "id": "put-status-codes",
      "title": "Status codes",
      "role": "content",
      "text": "| Code | Description |\n|------|-------------|\n| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success |\n| [406 Not Acceptable](https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable) | Feature not supported for all nodes |"
    },
    {
      "id": "delete-cluster-audit-db-conns",
      "title": "Delete database auditing settings",
      "role": "content",
      "text": "DELETE /v1/cluster/auditing/db_conns\n\nResets the configuration settings for [auditing database connections](https://redis.io/docs/latest/operate/rs/security/audit-events).\n\n#### Required permissions\n\n| Permission name |\n|-----------------|\n| [update_cluster](https://redis.io/docs/latest/operate/rs/references/rest-api/permissions#update_cluster) |"
    },
    {
      "id": "delete-request",
      "title": "Request",
      "role": "content",
      "text": "#### Example HTTP request\n\n\tDELETE /v1/cluster/auditing/db_conns \n\n\n#### Request headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |"
    },
    {
      "id": "delete-response",
      "title": "Response",
      "role": "returns",
      "text": "Returns a status code that indicates whether the database connection auditing settings reset successfully or failed to reset."
    },
    {
      "id": "delete-error-codes",
      "title": "Error codes",
      "role": "errors",
      "text": "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:\n\n| Code | Description |\n|------|-------------|\n| db_conns_audit_config_not_found | Unable to find the auditing configuration |\n| cannot_delete_audit_config_when_policy_enabled | Auditing cluster policy is 'enabled' when trying to delete the auditing configuration |\n| cannot_delete_audit_config_when_bdb_enabled | One of the databases has auditing configuration 'enabled' when trying to delete the auditing configuration |"
    },
    {
      "id": "delete-status-codes",
      "title": "Status codes",
      "role": "content",
      "text": "| Code | Description |\n|------|-------------|\n| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success |\n| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Configuration not found |\n| [406 Not Acceptable](https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable) | Feature not supported for all nodes |"
    }
  ],
  "examples": [
    {
      "id": "get-response-ex0",
      "language": "json",
      "code": "{\n    \"audit_address\": \"127.0.0.1\",\n    \"audit_port\": 12345,\n    \"audit_protocol\": \"TCP\",\n    \"audit_reconnect_interval\": 1,\n    \"audit_reconnect_max_attempts\": 0\n}",
      "section_id": "get-response"
    },
    {
      "id": "put-request-ex0",
      "language": "json",
      "code": "{\n    \"audit_protocol\": \"TCP\",\n    \"audit_address\": \"127.0.0.1\",\n    \"audit_port\": 12345,\n    \"audit_reconnect_interval\": 1,\n    \"audit_reconnect_max_attempts\": 0\n}",
      "section_id": "put-request"
    },
    {
      "id": "put-response-ex0",
      "language": "json",
      "code": "{\n    \"audit_address\": \"127.0.0.1\",\n    \"audit_port\": 12345,\n    \"audit_protocol\": \"TCP\",\n    \"audit_reconnect_interval\": 1,\n    \"audit_reconnect_max_attempts\": 0\n}",
      "section_id": "put-response"
    }
  ]
}
