Get Resource List


Get the list of resources in the OU.

Request Format


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

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)


Note

You can specify codes, ids or types parameters as resource filtering conditions. If you specify multiple parameters at the same time, resources that meet all conditions will be returned. If you do not specify any parameters, all resources in the OU will be returned.


Name

Required/Optional

Data Type

Description

codes

Optional

Array

To specify resources by resource code.

ids

Optional

Array

To specify resources by resource ID.

types

Optional

Array

To specify resources by type code that resources belong to.

pagination

Optional

Pagination Request Struct

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

Response Parameters


Name

Data Type

Description

resources

Resources Struct

The list of resources. Resources Struct >>

pagination

Pagination Struct

Pagination information. Pagination Struct >>

Resources Struct


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.

Pagination Struct


Name

Data Type

Description

pageNo

Integer

The request pages.

pageSize

Integer

The number of records in each page.

totalElements

Long

The total number of records.

Error Codes


Error Code

Description

31400

Required parameters are missing.

31404

The OU does not obtain the application.

Samples

Request Sample


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

method: POST

{
  "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
    }
  }
}