GET /api/roles
List all roles.

参数

参数名字 描述
page
选填

页数


Value:

Must be String

per_page
选填

每个请求中的条目数


Value:

Must be String


GET /api/roles/:id
Show an role.

参数

参数名字 描述
id
必填

Value:

Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/roles
Create an role.

参数

参数名字 描述
role
必填

Value:

Must be a Hash

role[name]
必填

Value:

Must be String


PUT /api/roles/:id
Update an role.

参数

参数名字 描述
id
必填

Value:

Must be String

role
必填

Value:

Must be a Hash

role[name]
选填

Value:

Must be String


DELETE /api/roles/:id
Delete an role.

参数

参数名字 描述
id
必填

Value:

Must be String