Skip to content

Add Application Organization

Permissions

The Identity Management API is authorized at the application level. Before calling the API, you need to set API permissions for different applications. For details, see API Permissions.

Permission CodeDescription
app_org_allRead/Write permission for application organization management APIs
allRead/Write permission for all APIs

Request Description

Request Headers

Parameter NameChinese NameRequiredTypeDescription
AuthorizationAuthorizationYesStringFormat: Bearer {access_token}
Content-TypeContent TypeYesStringFixed value: application/json; charset=utf-8

Request Example

json
{
    "org_code": "xnjg",
    "name": "Virtual Organization 1",
    "parent_id": ""
}

Request Parameters

Parameter NameChinese NameRequiredTypeDescription
app_idApplication IDYesStringTarget application ID
org_codeApplication organization CODEYesString
nameApplication organization nameYesString
parent_idParent node IDNoString

Response Example

Success Example

HTTP/1.1 201 Created

json
{
    "org_id": "20220414151855146-A153-62C1A994C"
}

Error Example

HTTP/1.1 400 Bad Request

json
{
    "error_code": " APP.ORG.0040",
    "error_msg": "The parent application organization does not exist"
}

Response Parameters

Parameter NameChinese NameTypeDescription
org_idApplication organization IDString

Error Codes

Status CodeError CodeChinese Error MessageEnglish Error MessageResolution
400APP.ORG.0040父机构不存在The parent application organization does not existPlease check whether the parent organization has been deleted
400APP.0001应用不存在App does not existPlease check whether the application has been deleted
400APP.OBJECTMODEL.0005未开启应用机构模型The application organization model is not openedPlease check whether the application has enabled application organization
400APP.0009应用编码已存在App code already existsPlease check whether the application code is duplicated

BambooCloud IDaaS Open Platform