Querying Information About a Specified User
Function
This API is used to query information about a specified user.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/clusters/{cluster_id}/db-manager/users/{name}
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 N/A Range N/A Default Value N/A |
name |
Yes |
String |
Definition Username or role name. Constraints N/A Range N/A Default Value N/A |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
name |
String |
Definition Username. Range N/A |
login |
Boolean |
Definition Whether the login is allowed. Range N/A |
createrole |
Boolean |
Definition Permission to create roles. Range N/A |
createdb |
Boolean |
Definition Permission to create databases. Range N/A |
systemadmin |
Boolean |
Definition System administrator. Range N/A |
auditadmin |
Boolean |
Definition Audit administrator. Range N/A |
inherit |
Boolean |
Definition Whether a user can inherit the permissions of the group to which it belongs. Range N/A |
useft |
Boolean |
Definition Permission to access foreign tables. Range N/A |
conn_limit |
Integer |
Definition Maximum number of connections. Range N/A |
replication |
Boolean |
Definition Whether streaming replication is allowed. Range N/A |
valid_begin |
Long |
Definition Time when a role takes effect. Range N/A |
valid_until |
Long |
Definition Time when a role expires. Range N/A |
lock |
Boolean |
Definition Whether the user is locked. Range N/A |
desc |
String |
Definition Description. Range N/A |
user_type |
String |
Definition User type. Range N/A |
logical_cluster |
String |
Definition Logical cluster to which the user belongs. Range N/A |
Example Requests
GET https://{Endpoint}/v1/0536cdee2200d5912f7cc00b877980f1/clusters/a89aea88-7ea2-40bd-8ac8-8b93e169e5d6/db-manager/users/user1
Example Responses
Status code: 200
User details queried.
{ "login" : true, "createrole" : true, "createdb" : true, "systemadmin" : false, "auditadmin" : false, "inherit" : false, "useft" : true, "conn_limit" : -1, "replication" : false, "valid_begin" : 1681971166000, "valid_until" : 1681971166000, "lock" : false }
Status Codes
Status Code |
Description |
---|---|
200 |
User details queried. |
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