数据库用户列表

展示指定集群的用户列表

接口URL

/api/v1/dms/sqleditor/clusters/{clusterID}/users

请求方式

GET

路径变量

参数名 示例值 参数描述
clusterID tidb-1f8c2087ac3ad753 集群 ID

请求Body参数

{
    "Name": "user_apipost",
    "Password": "password_apipost",
    "GlobalPrivileges": [
        "Select",
        "Replication Client",
        "Create View",
        "Reload"
    ],
    "DatabasePrivileges": [
        "test.select",
        "test.insert",
        "test2.insert"
    ]
}
参数名 示例值 参数类型 是否必填 参数描述
Name user_apipost String 数据库用户名
Password password_apipost String 数据库用户密码
GlobalPrivileges Select Array 全局权限列表
DatabasePrivileges test.select Array 数据库权限列表:库名.权限

认证方式

Bearer auth

成功响应示例

{
    "Data": {
        "Users": [
            {
                "UserID": "dbuser-5202356202667301",
                "Name": "user_apipost",
                "clusterID": "tidb-1f8c2087ac3ad753",
                "Password": "password_apipost",
                "GlobalPrivileges": [
                    "Select",
                    "Replication Client",
                    "Create View",
                    "Reload"
                ],
                "DatabasePrivileges": [
                    "test.select",
                    "test.insert",
                    "test2.insert"
                ]
            }
        ]
    },
    "Success": true
}
参数名 示例值 参数类型 参数描述
Data - Object -
Data.Users - Array 用户列表
Data.Users.UserID dbuser-5202356202667301 String 用户 ID
Data.Users.Name user_apipost String 用户名称
Data.Users.clusterID tidb-1f8c2087ac3ad753 String 集群ID
Data.Users.Password password_apipost String 密码
Data.Users.GlobalPrivileges Select Array 全局权限列表
Data.Users.DatabasePrivileges test.select Array 数据库权限列表:数据库名.权限名
Success true Boolean 调用是否成功
© 2024 平凯星辰(北京)科技有限公司 all right reserved,powered by GitbookFile Modify: 2024-04-02 15:37:04

results matching ""

    No results matching ""