Querying All Database Users or Roles
Function
This API is used to query all database users or roles.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/clusters/{cluster_id}/db-manager/users
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition Project ID. To obtain the value, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
cluster_id |
Yes |
String |
Definition Cluster ID. For details about how to obtain the value, see Obtaining the Cluster ID. Constraints The value must be a valid DWS cluster ID. Range It is a 36-digit UUID. Default Value N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Integer |
Definition Page offset, which starts from 0 (page number minus 1). Constraints N/A Range Greater than or equal to 0 Default Value 0 |
limit |
No |
Integer |
Definition Size of a single page. Constraints N/A Range N/A Default Value 1000 |
type |
No |
String |
Definition Whether to query all roles or users. Constraints N/A Range ROLE USER Default Value N/A |
user_type |
No |
String |
Definition User type, which can be COMMON, IAM, or OneAccess. Constraints N/A Range COMMON: common database user. IAM: database user synchronized from IAM. OneAccess: OneAccess user. Default Value N/A |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
users |
Array of DatabaseUser objects |
Definition User or role list. Range N/A |
Example Requests
Query all users.
GET https://{Endpoint}/v1/0536cdee2200d5912f7cc00b877980f1/clusters/a89aea88-7ea2-40bd-8ac8-8b93e169e5d6/db-manager/users
Example Responses
Status code: 200
Query succeeded.
{ "users" : [ { "name" : "user1", "login" : true, "user_type" : "COMMON" }, { "name" : "user2", "login" : false, "user_type" : "IAM" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Query succeeded. |
400 |
Request error. |
401 |
Authentication failed. |
403 |
You do not have required permissions. |
404 |
No resources found. |
500 |
Internal server error. |
503 |
Service unavailable. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot