Querying Accounts
Function
This API is used to query DDM accounts.
Constraints
None
URI
GET /v1/{project_id}/instances/{instance_id}/users
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID |
instance_id |
Yes |
String |
DDM instance ID |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
Yes |
Number |
Number of records displayed on each page. The start value cannot be less than 0. Minimum value: 0 |
limit |
Yes |
Number |
Number of records on each page. The value is greater than 0 and less than or equal to 128. Minimum value: 1 Maximum value: 128 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token It can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Response Parameters
Status code: 202
Parameter |
Type |
Description |
---|---|---|
users |
Array of GetDDMUsersListDetailResponses objects |
DDM account information |
page_no |
Integer |
Current page number |
page_size |
Integer |
Number of data records on the current page |
total_record |
Integer |
Total number of records |
total_page |
Integer |
Total number of pages |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Name of the DDM account |
status |
String |
Status of the DDM account |
base_authority |
Array of strings |
Basic permissions of the DDM account. The value can be CREATE, DROP, ALTER, INDEX, INSERT, DELETE, UPDATE, or SELECT. |
extend_authority |
Array of strings |
Extended permissions of the DDM account. The value can be fulltableDelete, fulltableSelect, or fulltableUpdate. |
description |
String |
Description of the DDM account |
created |
String |
Time when the DDM account is created |
databases |
Array of GetDDMUsersListdatabase objects |
Associated schemas |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Name of the schema associated with the DDM account |
description |
String |
Description of the associated schema |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
errCode |
String |
Service error code |
error_msg |
String |
Error message |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
errCode |
String |
Service error code |
error_msg |
String |
Error message |
Example Request
null GET https://{endpoint}/v1/{project_id}/instances/{instance_id}/users?offset={offset}&limit={limit}
Example Response
Status code: 202
OK
{ "users" : [ { "name" : "ddmtest", "status" : "RUNNING", "base_authority" : [ "SELECT" ], "extend_authority" : [ "fulltableSelect" ], "description" : "Account", "created" : "2019-10-30T11:01:24+0800", "databases" : [ { "name" : "zhxtest", "description" : "Schema" } ] } ], "page_no" : 1, "page_size" : 10, "total_record" : 1, "total_page" : 1 }
Status code: 400
bad request
{ "externalMessage" : "Parameter error.", "errCode" : "DBS.280001" }
Status code: 500
Server failure
{ "error_code": "DDM.2061", "error_msg": "Server failure" }
Status Codes
For details, see Status Codes.
Error Codes
For details, see Error Codes.
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