Create or Update Menu Group


Create or update a menu group.

Request Format


POST https://{apigw-address}/app-portal-service/v2.3/app/menuGroup/createOrUpdate

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

menuGroupId

Optional

String

Menu group ID. If you want to modify a menu group, you need to fill in the menu group ID. If you want to create a new menu group, leave it blank.

appId

Required

String

The access key of the application. How to get Access Key >>

name

Optional

String

Menu group name. If you want to create a new menu group or modify the name of an existing menu group, you need to fill in the menu group name. If you want to modify other contents of the menu group, leave it blank.

menuIds

Optional

List <string>

Menu list. When you create a menu group, leave it blank to create an empty menu group. When you update a menu group, leave it blank to remove all menus in the menu group. If a menu ID is specified, the existing menus in the menu group will be cleared.

Response Parameters


Name

Data Type

Description

id

String

The ID of the menu group you create or update.

name

String

The name of the menu group you create or update.

Error Codes


Error Code

Description

31400

OU ID and menu group name and required.

31403

The application has no permission to update menu group.

31404

Possible reasons are: - OU ID or menu group name does not exist. - OU has no permission to access the application or menu group.

31408

The menu group name already exists.

Samples

Request Sample


url: https://{apigw-address}/app-portal-service/v2.3/app/menuGroup/createOrUpdate?orgId=yourOrgId
method: POST
{
  "menuGroupId": "your_menu_group_id",
  "appId": "your_access_key",
  "name": "your_app_name",
  "menuIds": [
    "your_menu_id_1",
    "your_menu_id_2",
    "your_menu_id_3",
    "your_menu_id_4",
  ]
}

Return Sample


{
  "code": 0,
  "message": "OK",
  "data": {
    "id": "your_menu_group_id",
    "name": "your_menu_group_name"
  }
}