Querying Enterprise Member Accounts
Function
This API can be used by an enterprise master account to query member accounts on the self-built platform.
Constraints
This API can be invoked only by the enterprise master account AK/SK or token.
Debugging
You can debug this API in API Explorer.
URI
GET /v2/enterprises/multi-accounts/sub-customers
The following table describes the parameters.
Parameter |
Mandatory |
Type |
Maximum Length/Value Range |
Description |
---|---|---|---|---|
sub_customer_account_name |
No |
String |
A maximum of 64 characters |
Account name of the enterprise member account. The value of fuzzy_query determines whether to perform a fuzzy search. Only prefix, suffix, or middle part can be used for fuzzy search. The content you enter for fuzzy search cannot contain spaces. If this parameter is not included in the request parameters or is left empty, it cannot be used as a filter criterion. If the value is "", it can be used as a filter criterion. |
sub_customer_display_name |
No |
String |
A maximum of 64 characters |
Display name of the enterprise member account.
If this parameter is not included in the request parameters or is left empty, it cannot be used as a filter criterion. If the value is "", it can be used as a filter criterion. |
fuzzy_query |
No |
Integer |
- |
Whether to perform a fuzzy search for the display name and account name of the enterprise member account. The default value is 0 (indicating not to perform a fuzzy search).
|
offset |
No |
Integer |
[0, Maximum integer] |
Offset, starting from 0. The default value is 0. This parameter is used for pagination. Retain its default value 0 if pagination is not required. offset indicates the offset relative to the first data record among all that meets the conditions configured. If you set offset to 1, the second and subsequent data records are returned. For example, if there are 10 records that meet query conditions, when you set limit to 10 and offset to 1, the second to the tenth records are returned. If there are 20 records that meet query conditions, when you set offset to 0 and limit to 10 for the first page and set offset to 10 and limit to 10 for the second page, then each page will respectively have 10 records. |
limit |
No |
Integer |
[1-100] |
Number of records queried each time. The default value is 10. |
org_id |
No |
String |
A maximum of 20 characters |
ID of the organization to which the member account belongs. If this parameter is not included or is left empty, it will not be used as a filter criterion. |
Request Message
Request Parameters
None
Example Request
GET https://bss-intl.myhuaweicloud.com/v2/enterprises/multi-accounts/sub-customers?offset=0&limit=10&sub_customer_account_name=d_2035&sub_customer_display_name=m&fuzzy_query=1&org_id=65419 HTTP/1.1 Content-Type: application/json X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ
Response Message
Response Parameters
Parameter |
Type |
Maximum Length/Value Range |
Description |
---|---|---|---|
error_code |
String |
A maximum of 16 characters |
Error code. For details, see Status Codes. This parameter is returned only when a failure occurs. |
error_msg |
String |
A maximum of 1,024 characters |
Error description. This parameter is returned only when a failure occurs. |
sub_customer_infos |
List<SubCustomerInfoV2> |
- |
List of customers, which is available only when the API calling is successful. For details, see Table 2. |
total_count |
Integer |
- |
Number of customers returned in the response, which is available only when the API calling is successful. |
Parameter |
Type |
Maximum Length/Value Range |
Description |
---|---|---|---|
id |
String |
A maximum of 64 characters |
Customer ID of the enterprise member account. |
name |
String |
A maximum of 64 characters |
Account name of the enterprise member account. |
display_name |
String |
A maximum of 64 characters |
Display name of the enterprise member account. Special characters are allowed. |
status |
Integer |
- |
Member account statuses. The values are as follows:
|
org_id |
String |
A maximum of 20 characters |
ID of the organization to which the member account belongs. |
org_name |
String |
A maximum of 64 characters |
Name of the organization to which the member account belongs. If the organization to which the member account belongs is the root organization of an enterprise, this parameter may be left empty. |
Example Response
HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 Content-Length: length Date: response time { "total_count": 1, "sub_customer_infos": [ { "id": "4C2DC9********2F8F890E654589C2F7", "name": "A8****F112", "display_name": "A8****F112", "status": 1, "org_id": "65419", "org_name": "Level-1 organization" } ] }
Status Codes
- 4xx: This class of HTTP status code is intended for situations in which the error seems to have been caused by the client, for example, the request contains bad syntax or incorrect parameters. You must ensure the request is correct.
- 5xx: This class of HTTP status code is intended for cases in which the Huawei Cloud server is aware that it has encountered an error or is otherwise incapable of performing the request. In this case, contact Huawei Cloud customer service.
HTTP Status Code |
Error Code |
Error Description |
---|---|---|
400 |
CBC.0100 |
Incorrect parameter. |
403 |
CBC.0151 |
Access denied. |
500 |
CBC.0999 |
Other errors. |
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