> For the complete documentation index, see [llms.txt](https://windhoney.gitbook.io/yii2-rest-rbac/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://windhoney.gitbook.io/yii2-rest-rbac/assign/assign-assign-list.md).

# 分配列表

## **分配列表**

* 接口名称：分配列表
* 请求方式：get
* 请求示例：[/rbac/assignments/assign-list?id=4](https://github.com/windhoney/yii2-rest-rbac/tree/5607a3fc72fd54f761435b601794fd2091885740/%7B%7Bbook.api_url%7D%7D/rbac/assignments/assign-list?id=4/README.md)

## **返回信息：**

* 数据格式：JSON&#x20;
* data参数说明：

| 元素名称        | 数据类型   | 是否非空 | 元素说明 | 备注       |
| ----------- | ------ | ---- | ---- | -------- |
| name        | string | 是    | 名称   | ---      |
| description | string | 是    | 描述   | ---      |
| check       | string | 是    | 是否选中 | 1选中 0不选中 |

* 成功示例：&#x20;

```php
{
    "code": 200,
    "message": "OK",
    "data": {
        "角色": [
            {
                "name": "管理员",
                "check": 0,
                "description": "这是管理员"
            },
            {
                "name": "角色123",
                "check": 0,
                "description": "角色测试"
            },
            {
                "name": "超级超级管理员",
                "check": 0,
                "description": "角色1234"
            }
        ],
        "权限": [
            {
                "name": "权限1",
                "check": 0,
                "description": "路由122"
            },
            {
                "name": "客服权限",
                "check": 1,
                "description": "试一下"
            }
        ]
    }
}
```

* 失败示例：

```php
{
    "code": 400,
    "message": "操作失败",
}
```
