Get App Menu and Permission


Get the list of application menus and permissions.

Operation Permissions


  • User login to Application Portal is required.

  • Selecting an OU is required.

Prerequisites


  • The associated application has been purchased by the organization.

  • The user must have access permission for the application’s menus and permissions (otherwise the response result is empty).

Request Format


GET https://{apigw-address}/app-portal-service/v2.2/user/app/resource/info

Request Parameters (URI)


Name

Location (Path/Query)

Mandatory/Optional

Data Type

Description

accessKey

Query

Mandatory

String

The service account of the application. The format of the parameter’s string is Bearer {your token}. The application authenticates with accessKey to obtain the data that it is authorized to access. How to get accessKey>>

Request Parameters (Header)


Name

Mandatory/Optional

Data Type

Description

Authorization

Mandatory

String

The access token (or bearer token). The format of the parameter’s string is Bearer {your token}. Refer to Log In or Refresh Access Token to learn how to get the access token.

Response Parameters


Name

Data Type

Description

data

Data Struct

The list of application menus and permissions

Data Struct


Name

Data Type

Description

permissions

Array of Permission Structs

The list of permissions

menus

Array of Menu Structs

The list of menus

Permission Struct


Name

Data Type

Description

id

String

The permission ID

identifier

String

The permission identifier

name

String

The permission name

nameJson

I18nString

The permission name in multiple languages (json format)

Error Codes


Code

Description

31400

AccessKey is required

31401

Access Token is invalid

31403

No access to the application

31404

The application does not exist, or is not purchased

31512

Selecting an OU is required

Samples

Request Sample


url: https://{apigw-address}/app-portal-service/v2.2/user/app/resource/info?accessKey=app_1
method: GET
requestHeader:
{
  "Authorization":"yourBearerToken"
}

Return Sample


{
  "code": 0,
  "message": "",
  "data": {
    "permissions": [
{
  "id": "permissionKey",
  "identifier": "permission",
  "name": "permission",
  "nameJson":{"default":"permission","en_Us":"permission", "zh_CN":"permission"},
}
],
    "menus": [
      {
        "id": "accessKey",
        "identifier": "menu",
        "name": "menu",
        "nameJson":{"default":"defName","en_Us":"enName", "zh_CN":"zhName"},
        "url": "/a",
        "displayOrder": 1,
        "parentId": "",
        "children": []
      },
      {
        "id": "accessKey",
        "identifier": "menu2",
        "name": "menu2",
        "nameJson":{"default":"defName","en_Us":"enName", "zh_CN":"zhName"},
        "url": "/eos-wind-map/assetOverview.html",
        "displayOrder": 2,
        "parentId": "",
        "children": []
      }
    ]
  }
}