Querying the Account List
Function
This API is used to query the account list. The number of servers can be queried based on the account name parameter.
Calling Method
For details, see Calling APIs.
URI
GET /v5/{project_id}/asset/user/statistics
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID Minimum: 1 Maximum: 256 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
user_name |
No |
String |
Account name. It must comply with the Windows file naming rules. The value can contain letters, digits, underscores (_), and the following special characters: !@.-. Chinese punctuations are not allowed. Minimum: 1 Maximum: 128 |
enterprise_project_id |
No |
String |
Enterprise project Minimum: 0 Maximum: 128 |
limit |
No |
Integer |
Default value: 10 Minimum: 10 Maximum: 200 Default: 10 |
offset |
No |
Integer |
Default value: 0 Minimum: 0 Maximum: 2000000 Default: 0 |
category |
No |
String |
Type. The default value is host. The options are as follows:
Minimum: 0 Maximum: 64 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
x-auth-token |
Yes |
String |
iam token Minimum: 32 Maximum: 4096 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total_num |
Integer |
Container ID Minimum: 0 Maximum: 10000 |
data_list |
Array of UserStatisticInfoResponseInfo objects |
Instance name of enterprise edition image Array Length: 0 - 10000 |
Example Requests
The first 10 accounts are queried by default.
GET https://{endpoint}/v5/{project_id}/asset/user/statistics
Example Responses
Status code: 200
Number of servers having the account
{ "total_num" : 1, "data_list" : [ { "user_name" : "bin", "num" : 5 } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Number of servers having the account |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.