Create Resource Type


Create a resource type.

Request Format


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

Request Parameters (Query)


Name Mandatory/Optional Data Type Description
orgId Mandatory String OU ID.

Request Parameters (Body)


Name Mandatory/Optional Data Type Description
name Mandatory Object The name of the resource type in its respective locale’s language. For more details on the structure and locales supported, see Internationalized name struct.
code Mandatory String The code of the resource type. Resource type codes cannot be duplicated in an OU.

Response Parameters


Name Data Type Description
data Data Struct The result of creating a resource type.

Data Struct


Name Data Type Description
success Boolean The result of creating a resource type. true for success, and false for failure.

Error Codes


Error Code Description
31400 Required parameters are missing, or the resource type name is invalid.
31404 The OU does not acquire the application.
31408 The resource type code already exists.

Samples

Request Sample


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

method: POST

{
  "name": {
    "i18nValue": {
      "en_US": "your_resource_type_name_en",
      "zh_CN": "your_resource_type_name_cn"
    },
    "defaultValue": "your_resource_type_name"
  },
  "code": "your_resource_type_code"
}

Return Sample


{
  "code": 0,
  "message": "",
  "data": {
    "success": true
  }
}