GET /api/roles
List all roles.

參數

參數名字 描述
page
選填

編頁結果

Validations:

  • Must be String

per_page
選填

每個請求的項目數量

Validations:

  • Must be String


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

參數

參數名字 描述
id
必填

Validations:

  • 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
必填

Validations:

  • Must be a Hash

role[name]
必填

Validations:

  • Must be String


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

參數

參數名字 描述
id
必填

Validations:

  • Must be String

role
必填

Validations:

  • Must be a Hash

role[name]
選填

Validations:

  • Must be String


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

參數

參數名字 描述
id
必填

Validations:

  • Must be String