{
  "schema_version": 2,
  "id": "operate/rs/references/rest-api/requests/bdbs/passwords",
  "title": "Database passwords requests",
  "url": "https://redis.io/docs/latest/operate/rs/references/rest-api/requests/bdbs/passwords/",
  "summary": "Database password requests",
  "tags": [
    "docs",
    "operate",
    "rs"
  ],
  "last_updated": "2025-03-10T13:08:54-04:00",
  "page_type": "content",
  "content_hash": "d60c0d78cc61c0e03d10f72d52e40bf9b9ea4db80ea1621463c58a82d87da5e1",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "| Method | Path | Description |\n|--------|------|-------------|\n| [PUT](#put-bdbs-password) | `/v1/bdbs/{uid}/passwords` | Update database password |\n| [POST](#post-bdbs-password) | `/v1/bdbs/{uid}/passwords` | Add database password |\n| [DELETE](#delete-bdbs-password) | `/v1/bdbs/{uid}/passwords` | Delete database password |"
    },
    {
      "id": "put-bdbs-password",
      "title": "Update database password",
      "role": "content",
      "text": "PUT /v1/bdbs/{int: uid}/passwords\n\nSet a single password for the bdb's default user (i.e., for `AUTH`&nbsp;`<password>` authentications).\n\n#### Required permissions\n\n| Permission name |\n|-----------------|\n| [update_bdb](https://redis.io/docs/latest/operate/rs/references/rest-api/permissions#update_bdb) |"
    },
    {
      "id": "put-request",
      "title": "Request",
      "role": "content",
      "text": "#### Example HTTP request\n\n\tPUT /v1/bdbs/1/passwords \n\n#### Example JSON body\n\n[code example]\n\nThe above request resets the password of the bdb to ‘new password’.\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\n#### URL parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| uid | integer | The unique ID of the database to update the password. |\n\n\n#### Request body\n\n| Field | Type | Description |\n|-------|------|-------------|\n| password | string | New password |"
    },
    {
      "id": "put-response",
      "title": "Response",
      "role": "returns",
      "text": "Returns a status code that indicates password update success or failure."
    },
    {
      "id": "put-status-codes",
      "title": "Status codes",
      "role": "content",
      "text": "| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The password was changed. |\n| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | A nonexistent database. |\n| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Invalid configuration parameters provided. |"
    },
    {
      "id": "post-bdbs-password",
      "title": "Add database password",
      "role": "content",
      "text": "POST /v1/bdbs/{int: uid}/passwords\n\nAdd a password to the bdb's default user (i.e., for `AUTH`&nbsp;`<password>` authentications).\n\n#### Required permissions\n\n| Permission name |\n|-----------------|\n| [update_bdb](https://redis.io/docs/latest/operate/rs/references/rest-api/permissions#update_bdb) |"
    },
    {
      "id": "post-request",
      "title": "Request",
      "role": "content",
      "text": "#### Example HTTP request\n\n\tPOST /v1/bdbs/1/passwords \n\n#### Example JSON body\n\n[code example]\n\nThe above request adds a password to the bdb.\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#### URL parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| uid | integer | The unique ID of the database to add password. |\n\n#### Request body\n\n| Field | Type | Description |\n|-------|------|-------------|\n| password | string | Password to add |"
    },
    {
      "id": "post-response",
      "title": "Response",
      "role": "returns",
      "text": "Returns a status code that indicates password creation success or failure."
    },
    {
      "id": "post-status-codes",
      "title": "Status codes",
      "role": "content",
      "text": "| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The password was added. |\n| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | A nonexistent database. |\n| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Invalid configuration parameters provided. |"
    },
    {
      "id": "delete-bdbs-password",
      "title": "Delete database password",
      "role": "content",
      "text": "DELETE /v1/bdbs/{int: uid}/passwords\n\nDelete a password from the bdb's default user (i.e., for `AUTH`&nbsp;`<password>` authentications).\n\n#### Required permissions\n\n| Permission name |\n|-----------------|\n| [update_bdb](https://redis.io/docs/latest/operate/rs/references/rest-api/permissions#update_bdb) |"
    },
    {
      "id": "delete-request",
      "title": "Request",
      "role": "content",
      "text": "#### Example HTTP request\n\n\tDELETE /v1/bdbs/1/passwords \n\n#### Example JSON body\n\n[code example]\n\nThe above request deletes a password from the bdb.\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#### URL parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| uid | integer | The unique ID of the database to delete password. |\n\n#### Request body\n\n| Field | Type | Description |\n|-------|------|-------------|\n| password | string | Password to delete |"
    },
    {
      "id": "delete-response",
      "title": "Response",
      "role": "returns",
      "text": "Returns a status code that indicates password deletion success or failure."
    },
    {
      "id": "delete-status-codes",
      "title": "Status codes",
      "role": "content",
      "text": "| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The password was deleted. |\n| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | A nonexistent database. |\n| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Invalid configuration parameters provided. |"
    }
  ],
  "examples": [
    {
      "id": "put-request-ex0",
      "language": "json",
      "code": "{\n    \"password\": \"new password\"\n}",
      "section_id": "put-request"
    },
    {
      "id": "post-request-ex0",
      "language": "json",
      "code": "{\n    \"password\": \"password to add\"\n}",
      "section_id": "post-request"
    },
    {
      "id": "delete-request-ex0",
      "language": "json",
      "code": "{\n    \"password\": \"password to delete\"\n}",
      "section_id": "delete-request"
    }
  ]
}
