- 
                Notifications
    You must be signed in to change notification settings 
- Fork 87
RESTful API For Role
        Echo edited this page Mar 29, 2018 
        ·
        7 revisions
      
    Request
GET /saltshaker/api/v1.0/role/r-4f24769c28c611e8a7e3000c298454d8
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
    "role": {
        "id": "r-4f24769c28c611e8a7e3000c298454d8",
        "name": "超级管理员",
        "description": "所有权限",
        "tag": 0
    }
}
Request
GET /saltshaker/api/v1.0/role
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
    "roles": {
        "role": [
            {
                "id": "r-4f24769c28c611e8a7e3000c298454d8",
                "name": "超级管理员",
                "description": "所有权限",
                "tag": 0
            },
            {
                "id": "r-3d13ab3028cb11e8a7e3000c298454d8",
                "name": "产品线管理员",
                "description": "管理产品线",
                "tag": 1
            }
        ]
    }
}
Request
POST /saltshaker/api/v1.0/role
POST Body
{
     "name":"产品线管理员",
     "description": "管理产品线"
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
    "status": true,
    "message": ""
}
Request
DELETE /saltshaker/api/v1.0/role/r-555682bc2b1911e886cb000c298454d8
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
    "status": true,
    "message": ""
}
Request
PUT /saltshaker/api/v1.0/role/r-3814995e28db11e8a7e3000c298454d8
PUT Body
{
     "name":"产品线管理员",
     "description": "管理产品线"
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
    "status": true,
    "message": ""
}