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 Code | Description |
|---|---|
| app_org_all | Read/Write permission for application organization management APIs |
| all | Read/Write permission for all APIs |
Request Description
Request Headers
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| Authorization | Authorization | Yes | String | Format: Bearer {access_token} |
| Content-Type | Content Type | Yes | String | Fixed value: application/json; charset=utf-8 |
Request Example
json
{
"org_code": "xnjg",
"name": "Virtual Organization 1",
"parent_id": ""
}Request Parameters
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| app_id | Application ID | Yes | String | Target application ID |
| org_code | Application organization CODE | Yes | String | |
| name | Application organization name | Yes | String | |
| parent_id | Parent node ID | No | String |
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 Name | Chinese Name | Type | Description |
|---|---|---|---|
| org_id | Application organization ID | String |
Error Codes
| Status Code | Error Code | Chinese Error Message | English Error Message | Resolution |
|---|---|---|---|---|
| 400 | APP.ORG.0040 | 父机构不存在 | The parent application organization does not exist | Please check whether the parent organization has been deleted |
| 400 | APP.0001 | 应用不存在 | App does not exist | Please check whether the application has been deleted |
| 400 | APP.OBJECTMODEL.0005 | 未开启应用机构模型 | The application organization model is not opened | Please check whether the application has enabled application organization |
| 400 | APP.0009 | 应用编码已存在 | App code already exists | Please check whether the application code is duplicated |