Querying the Organization Structure
Function
Query the organization structure.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/system/multi-account/organization-tree
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 |
parent_id |
No |
String |
Definition Unique ID of the parent node (root or OU). Constraints N/A Range N/A Default Value N/A |
limit |
No |
Integer |
Definition Maximum number of records that can be returned. Constraints N/A Range 1-2000 Default Value 2000 |
marker |
No |
String |
Definition Pagination marker. Constraints N/A Range N/A Default Value N/A |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
data |
Array of OrganizationAccountInfo objects |
Definition Response to the request for querying an organization account. Range N/A |
marker |
String |
Definition Pagination marker. Range N/A |
total |
Integer |
Definition Total number. Range N/A |
Parameter |
Type |
Description |
---|---|---|
delegated |
Boolean |
Definition Added or not. Range N/A |
id |
String |
Definition Unique ID of an account. Range N/A |
name |
String |
Definition Account name. Range N/A |
org_type |
String |
Definition Organization node type. Range account |
parent_id |
String |
Definition Unique ID of the parent node (root or OU). Range N/A |
urn |
String |
Definition Uniform resource name (URN) of an account. 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 organization structure. The project ID is 176d761dc156471c9c9b227376594160, the firewall ID is ea0e700f-7ae6-47c1-a8d0-ed4b1acd8e8e, and the OU ID is ou-xuyegm9ace9gqucy2sdlw821r22s2xo0.
https://{Endpoint}/v1/176d761dc156471c9c9b227376594160/system/multi-account/organization-tree?fw_instance_id=ea0e700f-7ae6-47c1-a8d0-ed4b1acd8e8e&parent_id=ou-xuyegm9ace9gqucy2sdlw821r22s2xo0
Example Responses
Status code: 200
OK
{ "data" : [ { "delegated" : false, "id" : "ou-5685cxqjfngoh898df28jm736x4ugvb2", "name" : "test1", "org_type" : "unit", "parent_id" : "ou-xuyegm9ace9gqucy2sdlw821r22s2xo0", "urn" : "organizations::52d4c977dc834434920af54060d74af4:ou:o-r0b4bh2jcr1ke7yn70uhwlp5d0ktwisb/ou-5685cxqjfngoh898df28jm736x4ugvb2" } ], "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