You can call this operation to create a role.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation only uses common request headers. For more information, see the Common request parameters topic.

Request syntax

POST /pop/v5/account/create_role HTTPS|HTTP

Request parameters

Parameter Type Required Example Description
ActionData String Yes 15:1;14:2

A set of operation permissions granted to the role that you want to create. The value is in the format of Permission group ID 1:Permission code 1;...;Permission group ID n:Permission code n. For example, the value can be 1:1;1:2;2:1;2:2. For the definitions of the permission groups and permission codes, see the response parameters of the ListAuthority.

RoleName String Yes testrole

The name of the role that you want to create.

Response parameters

Parameter Type Example Description
Code Integer 200

The returned code.

Message String success

The returned message.

RoleId Integer 33

The ID of the role that was created.

RequestId String 57609587-DFA2-41EC-****-********* Request ID

Examples

Sample requests

POST /pop/v5/account/create_role HTTP/1.1
Common request headers
{
  "ActionData": ""
  "RoleName": ""
}

Sample success responses

JSON format

{
    "RequestId": "57609587-DFA2-41EC-****-*********",
    "Code": "200",
    "Message": "success"
}

XML format

<RequestId>57609587-DFA2-41EC-****-*********</RequestId>
<Code>200</Code>
<Message>success</Message>

Error codes

For a list of error codes, visit the API Error Center.