数据库密码请求

数据库密码请求

Redis 企业软件
方法 路径 描述
/v1/bdbs/{uid}/passwords 更新数据库密码
发布 /v1/bdbs/{uid}/passwords 添加数据库密码
删除 /v1/bdbs/{uid}/passwords 删除数据库密码

更新数据库密码

PUT /v1/bdbs/{int: uid}/passwords

为 bdb 的默认用户设置一个密码(即AUTH <password>authentications) 的 Authentications)。

所需权限

权限名称
update_bdb

请求

HTTP 请求示例

PUT /v1/bdbs/1/passwords 

示例 JSON 正文

{
    "password": "new password"
}

The above request resets the password of the bdb to ‘new password’.

Request headers

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

URL parameters

Field Type Description
uid integer The unique ID of the database to update the password.

Request body

Field Type Description
password string New password

Response

Returns a status code that indicates password update success or failure.

Status codes

Code Description
200 OK The password was changed.
404 Not Found A nonexistent database.
406 Not Acceptable Invalid configuration parameters provided.

Add database password

POST /v1/bdbs/{int: uid}/passwords

Add a password to the bdb's default user (i.e., for AUTH <password> authentications).

Required permissions

Permission name
update_bdb

Request

Example HTTP request

POST /v1/bdbs/1/passwords 

Example JSON body

{
    "password": "password to add"
}

The above request adds a password to the bdb.

Request headers

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

URL parameters

Field Type Description
uid integer The unique ID of the database to add password.

Request body

Field Type Description
password string Password to add

Response

Returns a status code that indicates password creation success or failure.

Status codes

Code Description
200 OK The password was added.
404 Not Found A nonexistent database.
406 Not Acceptable Invalid configuration parameters provided.

Delete database password

DELETE /v1/bdbs/{int: uid}/passwords

Delete a password from the bdb's default user (i.e., for AUTH <password> authentications).

Required permissions

Permission name
update_bdb

Request

Example HTTP request

DELETE /v1/bdbs/1/passwords 

Example JSON body

{
    "password": "password to delete"
}

The above request deletes a password from the bdb.

Request headers

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

URL parameters

Field Type Description
uid integer The unique ID of the database to delete password.

Request body

Field Type Description
password string Password to delete

Response

Returns a status code that indicates password deletion success or failure.

Status codes

Code Description
200 OK The password was deleted.
404 Not Found A nonexistent database.
406 Not Acceptable Invalid configuration parameters provided.
RATE THIS PAGE
Back to top ↑