Querying the Account List
Function
This API is used to query the account list.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/system/multi-account/accounts
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition Project ID, which is used to specify the project that an asset belongs to. You can query the assets of a project by project ID. You can obtain the project ID from the API or console. For details, see Obtaining a Project ID. Constraints N/A Range 32-bit UUID. Default Value N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
fw_instance_id |
Yes |
String |
Definition Firewall ID. It is a unique ID generated after a firewall instance is created. You can obtain the firewall ID by referring to Obtaining a Firewall ID. Constraints N/A Range 32-bit UUID. Default Value N/A |
limit |
Yes |
Integer |
Definition Maximum number of records that can be returned. Constraints N/A Range 1-1024 Default Value N/A |
offset |
Yes |
Integer |
Definition Offset. The records after this offset will be queried. Constraints N/A Range 0 - 1024 Default Value N/A |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
data |
PageDataAccountVO object |
Parameter |
Type |
Description |
---|---|---|
limit |
Integer |
Definition Quantity limit. Range N/A |
offset |
Integer |
Definition Offset. Range N/A |
records |
Array of AccountVO objects |
Definition Account list. Range N/A |
total |
Long |
Definition Total number. Range N/A |
Parameter |
Type |
Description |
---|---|---|
account_id |
String |
Definition Account ID. Range N/A |
account_name |
String |
Definition Account name. Range N/A |
eip_count_protected |
Integer |
Definition Number of protected EIPs. Range N/A |
eip_count_total |
Integer |
Definition Total EIPs. Range N/A |
eip_count_unprotected |
Integer |
Definition Number of unprotected EIPs. Range N/A |
organization_id |
String |
Definition Organization ID. Range N/A |
project_id |
String |
Definition Project ID. Range N/A |
project_name |
String |
Definition Project name. Range N/A |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Definition Error code. Range N/A |
error_msg |
String |
Definition Error message. Range N/A |
Example Requests
Query the account list. The project ID is 176d761dc156471c9c9b227376594160, the firewall ID is ea0e700f-7ae6-47c1-a8d0-ed4b1acd8e8e, the maximum number of accounts is 50, and the offset is 0.
https://{Endpoint}/v1/176d761dc156471c9c9b227376594160/system/multi-account/accounts?limit=50&offset=0&fw_instance_id=ea0e700f-7ae6-47c1-a8d0-ed4b1acd8e8e
Example Responses
Status code: 200
OK
{ "data" : { "limit" : 50, "offset" : 0, "records" : [ { "account_id" : "09bb24e6f280d23d0f9fc0104b901480", "account_name" : "SCC_CNFW_c00617156", "eip_count_protected" : 0, "eip_count_total" : 36, "eip_count_unprotected" : 36, "organization_id" : "o-r0b4bh2jcr1ke7yn70uhwlp5d0ktwisb", "project_id" : "09bb24e6fe80d23d2fa2c010b53b418c", "project_name" : "cn-north-7" } ], "total" : 1 } }
Status code: 400
Bad Request
{ "error_code" : "CFW.00200003", "error_msg" : "Parameter error." }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot