Create Menu


Create a menu for an application.

Operation Permissions


Applications assigned with the Application Registration Administrator policy in the OU.

Request Format


POST https://{apigw-address}/enos-app-service/v2.5/menus

Request Parameters(URI)


Name

Location(Path/Query)

Required/Optional

Data Type

Description

orgId

Query

Required

String

The OU ID which the application belongs to. How to get orgId >>

Request Parameters(Header)


Name

Required/Optional

Data Type

Description

accept-language

Optional

String

The required language, such as “zh-CN” or “en-US”. If not specified, the default return message will include all available internationalized content. EnOS Supported Languages >>

Request Parameters(Body)


Name

Required/Optional

Data Type

Description

name

Required

StringI18n

The menu name. Internationalized field representation >>

description

Optional

StringI18n

The menu description. Internationalized field representation >>

appId

Required

String

The application ID that the menu belongs to.

keyword

Required

String

The custom unique identifier for the menu.

parentId

Optional

String

The parent menu ID.

sortId

Required

Integer

The sorting ID that determines the order of the current menu at its level. Beginning with 1, the menu with a smaller sort ID will rank higher in the order.

url

Optional

String

The URL address of the menu.

Response Parameters


Name

Data Type

Description

id

String

The menu identifier generated by the system.

appId

String

The application ID that the menu belongs to.

name

StringI18n

The menu name.

description

StringI18n

The menu description.

keyword

String

The custom unique identifier for the menu.

parentId

String

The parent menu ID.

sortId

Integer

The sorting ID that determines the order of the current menu at its level. Beginning with 1, the menu with a smaller sort ID will rank higher in the order.

url

String

The URL address of the menu.

status

String

The menu authorization status, empty by default.

Samples

Request Sample


url: https://{apigw-address}/enos-app-service/v2.5/menus?orgId=yourOrgId
method: POST
request Body:
{
  "sortId": 1,
  "appId": "applicationID",
  "name": {
    "default": "menu1"
  },
  "description": {},
  "keyword": "menu1",
  "url": ""
}

Return Sample


{
  "code": 0,
  "msg": "OK",
  "subMsg": null,
  "data": {
    "id": "SystemApplicationID",
    "appId": "applicationID",
    "name": {
      "default": "menu1"
    },
    "description": {},
    "keyword": "menu1",
    "parentId": null,
    "sortId": 1,
    "url": "",
    "status": null
  }
}