Queries roles.

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 uses only the common request header. For more information, see Common parameters for API calls.

Request syntax

POST /pop/v5/account/role_list HTTP/1.1

Request parameters

No request parameters.

Response parameters

Parameter Type Example Description
Code Integer 200

The HTTP status code.

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

The ID of the request.

Message String success

The returned message that indicates whether the request is successful.

RoleList Array of RoleItem

The information about the role.

RoleItem
ActionList Array of Action

The set of operation permissions granted to the role.

Action
Code String 1

The serial number of the permission granted to the role.

Description String Operations on operation records

The description of the permission granted to the role.

GroupId String 31

The ID of the permission group to which the permission granted to the role belongs.

Name String Operation records

The name of the permission granted to the role.

Role Struct

The information about the role.

AdminUserId String test**@aliyun.com

The ID of the Alibaba Cloud account.

CreateTime Long 1542717260156

The timestamp that represents the time when the role was created.

Id Integer 1

The ID of the role.

IsDefault Boolean false

Indicates whether the role is a default role.

Name String Super Admin(All privileges)

The name of the role.

UpdateTime Long 1542717260156

The timestamp that represents the time when the role was updated.

Examples

Sample requests

POST /pop/v5/account/role_list HTTP/1.1
Common request header

Sample success responses

XML format

<Message>success</Message>
<Code>200</Code>
<RoleList>
    <RoleItem>
        <Role>
            <Name>Super Admin(All privileges)</Name>
            <CreateTime>1542717260156</CreateTime>
            <UpdateTime>1542717260156</UpdateTime>
            <Id>15691</Id>
        </Role>
        <ActionList>
            <Action>
                <Name>Operation records</Name>
                <Description>Operations on operation records</Description>
                <Code>1</Code>
                <GroupId>31</GroupId>
            </Action>
        </ActionList>
    </RoleItem>
</RoleList>

JSON format

{
    "Message": "success",
    "Code": 200,
    "RoleList": {
        "RoleItem": {
            "Role": {
                "Name": "Super Admin(All privileges)",
                "CreateTime": 1542717260156,
                "UpdateTime": 1542717260156,
                "Id": 15691
            },
            "ActionList": {
                "Action": {
                    "Name": "Operation records",
                    "Description": "Operation records",
                    "Code": 1,
                    "GroupId": 31
                }
            }
        }
    }
}

Error codes

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