GET /api/roles
列出所有角色

參數

參數名字 描述
search
選填

篩選結果

Validations:

  • Must be a String

order
選填

排序結果

Validations:

  • Must be a String

page
選填

編頁結果

Validations:

  • Must be a String

per_page
選填

每個請求的項目數量

Validations:

  • Must be a String


GET /api/roles/:id
顯示角色

參數

參數名字 描述
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.

description
選填

Validations:

  • Must be a String


POST /api/roles
建立角色

參數

參數名字 描述
role
必填

Validations:

  • Must be a Hash

role[name]
必填

Validations:

  • Must be a String

role[description]
選填 , 允許空值

Role description

Validations:

  • Must be a String

role[location_ids]
選填 , 允許空值

將位置取代為特定 ID

Validations:

  • Must be an array of any type

role[organization_ids]
選填 , 允許空值

將組織取代為特定 ID。

Validations:

  • Must be an array of any type


PUT /api/roles/:id
更新角色

參數

參數名字 描述
id
必填

Validations:

  • Must be a String

role
必填

Validations:

  • Must be a Hash

role[name]
選填

Validations:

  • Must be a String

role[description]
選填 , 允許空值

Role description

Validations:

  • Must be a String

role[location_ids]
選填 , 允許空值

將位置取代為特定 ID

Validations:

  • Must be an array of any type

role[organization_ids]
選填 , 允許空值

將組織取代為特定 ID。

Validations:

  • Must be an array of any type


DELETE /api/roles/:id
刪除角色

參數

參數名字 描述
id
必填

Validations:

  • Must be a String


POST /api/roles/:id/clone
Clone a role

參數

參數名字 描述
id
必填

Validations:

  • Must be a String

role
必填

Validations:

  • Must be a Hash

role[name]
選填

Validations:

  • Must be a String

role[description]
選填 , 允許空值

Role description

Validations:

  • Must be a String

role[location_ids]
選填 , 允許空值

將位置取代為特定 ID

Validations:

  • Must be an array of any type

role[organization_ids]
選填 , 允許空值

將組織取代為特定 ID。

Validations:

  • Must be an array of any type