Create Organization Structure


Create organization structure nodes.

Request Format


POST https://{apigw-address}/app-portal-service/v2.3/structure/create

Request Parameters (Query)


Name

Mandatory/Optional

Data Type

Description

orgId

Mandatory

String

OU ID

Request Parameters (Body)


Name

Mandatory/Optional

Data Type

Description

structures

Mandatory

StructureUpdateDTO Struct

Organization structure list

StructureUpdateDTO Struct


Name

Mandatory/Optional

Data Type

Description

parentId

Mandatory

String

The root node of the targe organization structure

name

Optional

I18nString

The name of organization structure node. For naming rules, see ` Internationalized Name Struct<https://support.enos-iot.com/docs/api/en/dev/api_faqs.html#id3>`__

Response Parameters


Name

Data Type

Description

structureIds

List

The ID of organization structure nodes

Error Codes


Error Code

Description

31400

Invalid organization structure node name or mismatched root node

31403

No access to the application structure

31408

The organization structure node name already exists

31415

The number of organization structures, nodes or layers exceeds the limit

31430

invalid name of organization structure node

Samples

Request Sample


url: https://{apigw-address}/app-portal-service/v2.3/structure/create
method: POST

requestBody:
{
    "structures": [
        {
            "parentId": "your_parent_node_id",
            "name": {
                "defaultValue": "Turbine",
                "i18nValue": {"zh_CN": "风机", "en_US": "Turbine"}
            }
        },
        {
            "parentId": "your_parent_node_id",
            "name": {
                "defaultValue": "RootTest"
            }
        }
    ]
}

Return Sample


{
    "code": 0,
    "data": {
        "structureIds": ["structure_ID_1", "structure_ID_2"]
    },
    "message": "OK"
}