Query Organization Tree

Last Updated on : 2023-07-06 08:24:26download

Display the permissions of the organizations.

API address

GET: /v1.0/iot-03/idaas/spaces/{space_id}/organizations

Request parameter

Parameter nameTypeINRequiredDescription
codeStringuritrueThe identifier of a specified organization.
nameStringuritrueThe name of a specified organization.
space_idStringuritrueThe ID of a specified space.

Return parameter

Parameter nameTypeDescription
resultIdaasOrganizationTreeVOThe returned result.

Description of result

Parameter nameTypeDescription
codeStringThe identifier of a specified organization.
nameStringThe name of a specified organization.
parent_codeStringThe identifier of a specified parent organization.
remarkStringThe remarks of a specified organization.
full_pathStringThe full URL of a specified organization.
statusIntegerIndicates whether the organization is enabled. Valid values:
  • 0: enabled.
  • 1: not enabled.
gmt_createLongThe time when it is created.
gmt_modifiedLongThe time when it is modified.
child_organizationsListThe permissions of a sub-node.
space_idStringThe ID of a specified space.

Request example

GET: /v1.0/iot-03/idaas/spaces/1400335346549391440/organizations?code=Acode&name=Aname

Return example

{
    "result": {
        "gmtModified": 1627440885439,
        "code": "A",
        "childOrganizations": [
            {
                "fullPath": "A/B",
                "gmtModified": 1627440885439,
                "code": "B",
                "childOrganizations": [
                    {
                        "fullPath": "A/B/C",
                        "gmtModified": 1627440885439,
                        "code": "C",
                        "remark": "Remarks",
                        "gmtCreate": 1627440885439,
                        "spaceId": "1400335346549391442",
                        "parentCode": "B",
                        "name": "Organization C",
                        "status": 0
                    }
                ],
                "remark": "Remarks",
                "gmtCreate": 1627440885439,
                "spaceId": "1400335346549391442",
                "parentCode": "A",
                "name": "Organization B",
                "status": 0
            },
            {
                "fullPath": "A/B'",
                "gmtModified": 1627440885439,
                "code": "B",
                "remark": "Remarks",
                "gmtCreate": 1627440885439,
                "spaceId": "1400335346549391442",
                "parentCode": "A",
                "name": "Organization B",
                "status": 0
            }
        ],
        "remark": "Remarks",
        "gmtCreate": 1627440885439,
        "spaceId": "1400335346549391442",
        "name": "Organization A",
        "status": 0
    },
    "t": 1629272469492,
    "success": true
}

Error code

For more information, see error code.