Create Role


Create a role.

Request Format


POST https://{apigw-address}/app-portal-service/v2.3/role/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

String

Role name.

description

Mandatory

String

Role description.

Response Parameters


Name

Data Type

Description

data

String

Role ID.

Error Codes


Error Code

Description

31400

OU ID, role name, and role description are required.

31403

The service account has no permission to create roles.

31404

OU ID does not exist, or the OU has no permission to access the application.

31408

The role name already exists.

Samples

Request Sample


url: https://{apigw-address}/app-portal-service/v2.3/role/create?orgId=o16256470964341135
method: POST
{
  "name": "test",
  "description": "test"
}

Return Sample


{
  "code": 0,
  "message": "OK",
  "data": "your_role_id"
}