Create Organization Structure


Create a node under a certain organization structure. Multiple nodes can be created at one time.

Request Format


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

Request Parameters (URI)


Name

Location (Path/Query)

Required/Optional

Data Type

Description

orgId

Query

Required

String

OU ID. How to get orgId >>

Request Parameters (Body)


Name

Required/Optional

Data Type

Description

structures

Required

StructureUpdateDTO Struct

Organization structure list. StructureUpdateDTO Struct >>

StructureUpdateDTO Struct


Name

Required/Optional

Data Type

Description

parentId

Required

String

The parent node ID in the target organization structure.

name

Optional

I18nString

The node name. The names of child nodes under the same parent node cannot be duplicated. Supports multiple languages. For naming rules, see Internationalized Name Struct.

Response Parameters


Name

Data Type

Description

structureIds

List

The IDs 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?orgId=yourOrgId
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"
}