# list roles - ListRoles

## Overview

list roles






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `ListRoles`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.zosoc.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Offset** | string | offset |No|
| **Limit** | string | limit |No|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **TotalCount** | int | total count |**Yes**|
| **Roles** | array[[*ListRoles*](#listroles)] | roles |No|

#### Data Model


#### ListRoles

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RoleName** | string | Role Name |No|
| **RoleURN** | string | Role URN |No|
| **IsEditable** | boolean | Editable or not (true: editable, false: not editable) |No|
| **Description** | string | Description Information |No|
| **CreatedAt** | int | Role Creation Time |No|

## Example

### Request Example
    
```
https://api.zosoc.com/?Action=ListRoles
&Offset=fUEEtYSu
&Limit=AzxhQTCE
```

### Response Example
    
```json
{
  "Action": "ListRolesResponse",
  "RetCode": 0,
  "Roles": [
    {
      "CreatedAt": 7,
      "Description": "ouanuUaU",
      "IsEditable": true,
      "RoleName": "CTCgSmsG",
      "RoleURN": "qacnVzYs"
    }
  ],
  "TotalCount": 9
}
```





