Get Resource List


Get the list of resources.

Request Format


POST https://{apigw-address}/app-portal-service/v2.3/resource/list

Request Parameters (Query)


Name

Mandatory/Optional

Data Type

Description

orgId

Mandatory

String

OU ID.

Request Parameters (Body)


Name

Mandatory/Optional

Data Type

Description

codes

Optional

Array

To get resources by code.

ids

Optional

Array

To get resources by ID.

types

Optional

Array

To get resources by the type codes that resources belong to.

pagination

Mandatory

Pagination Request Struct

Lists the paging requirements in a request. If not specified, the default pagination size is 1000 pages, starting from 0. For more details, see Pagination Request Struct

Response Parameters


Name

Data Type

Description

data

Data Struct

Resource information.

Data Struct


Name

Data Type

Description

resources

Resources List

The list of resources

pagination

Pagination Struct

Pagination information

Resources List


Name

Data Type

Description

code

String

Resource codes.

name

Object

Resource names.

id

String

Resource IDs.

type

String

The type codes that resources belong to.

Error Codes


Error Code

Description

31400

Required parameters are missing.

31404

The OU does not acquire the application.

Samples

Request Sample


url: /app-portal-service/v2.3/resource/list?orgId=your_org_ID

method: POST

{
  "orgId": "your_ou_id",
  "codes": [
    "your_resource_code_1",
    "your_resource_code_2"
  ],
  "ids": [
    "your_resource_id_1",
    "your_resource_id_2"
  ],
  "types": [
    "your_resource_type_code_1",
    "your_resource_type_code_2"
  ],
  "pagination": {
    "pageNo": 0,
    "pageSize": 1000,
    "sorters": []
  }
}

Return Sample


{
  "code": 0,
  "message": "OK",
  "data": {
    "resources": [
      {
        "id": "your_resource_id_1",
        "code": "your_resource_code_1",
        "type": "your_resource_type_code_1",
        "name": {
          "defaultValue": "your_resource_name_1",
          "i18nValue": {
            "zh_CN": "your_resource_name_zh_1",
            "en_US": "your_resource_name_en_1"
          }
        }
      },
      {
        "id": "your_resource_id_2",
        "code": "your_resource_code_2",
        "type": "your_resource_type_code_2",
        "name": {
          "defaultValue": "your_resource_name_2",
          "i18nValue": {
            "zh_CN": "your_resource_name_zh_2",
            "en_US": "your_resource_name_en_2"
          }
        }
      }
    ],
    "pagination": {
      "totalElements": 2,
      "pageNo": 0,
      "pageSize": 1000
    }
  }
}