GET /api/roles
모든 역할 나열

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

search
optional

필터 결과

Validations:

  • Must be a String

order
optional

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
optional

1 부터 페이지 번호

Validations:

  • Must be a number.

per_page
optional

반환할 페이지 당 결과 수

Validations:

  • Must be a number.

Search fields

Field name 유형 Possible values
builtin true, false
description
name
permission string

GET /api/roles/:id
역할 표시

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
required

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
optional

Validations:

  • Must be a String


POST /api/roles
역할 생성

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

role
required

Validations:

  • Must be a Hash

role[name]
required

Validations:

  • Must be a String

role[description]
optional , nil allowed

Role description

Validations:

  • Must be a String

role[location_ids]
optional , nil allowed

지정된 ID로 위치를 변경합니다

Validations:

  • Must be an array of any type

role[organization_ids]
optional , nil allowed

지정된 ID로 조직을 변경합니다

Validations:

  • Must be an array of any type


PUT /api/roles/:id
역할 업데이트

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a String

role
required

Validations:

  • Must be a Hash

role[name]
optional

Validations:

  • Must be a String

role[description]
optional , nil allowed

Role description

Validations:

  • Must be a String

role[location_ids]
optional , nil allowed

지정된 ID로 위치를 변경합니다

Validations:

  • Must be an array of any type

role[organization_ids]
optional , nil allowed

지정된 ID로 조직을 변경합니다

Validations:

  • Must be an array of any type


DELETE /api/roles/:id
역할 삭제

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a String


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

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a String

role
required

Validations:

  • Must be a Hash

role[name]
optional

Validations:

  • Must be a String

role[description]
optional , nil allowed

Role description

Validations:

  • Must be a String

role[location_ids]
optional , nil allowed

지정된 ID로 위치를 변경합니다

Validations:

  • Must be an array of any type

role[organization_ids]
optional , nil allowed

지정된 ID로 조직을 변경합니다

Validations:

  • Must be an array of any type