GET /api/roles
Listar todos los roles

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcional

Set the current organization context for the request

Validations:

  • Must be a Integer

search
opcional

filtrar resultados

Validations:

  • Must be a String

order
opcional

Orden y campo de clasificación, p. ej., 'id DESC'

Validations:

  • Must be a String

page
opcional

Número de página, comenzando por 1

Validations:

  • Must be a number.

per_page
opcional

Número de resultados por página para devolver

Validations:

  • Must be a number.

Campos de búsqueda

Nombre del campo Tipo Valores posibles
builtin true, false
description
name
permission string

GET /api/roles/:id
Mostrar un rol

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
requerido

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
opcional

Validations:

  • Must be a String


POST /api/roles
Crear un rol

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcional

Set the current organization context for the request

Validations:

  • Must be a Integer

role
requerido

Validations:

  • Must be a Hash

role[name]
requerido

Validations:

  • Must be a String

role[description]
opcional , nil permitido

Descripción del rol

Validations:

  • Must be a String

role[location_ids]
opcional , nil permitido

REMPLAZAR ubicaciones con ID dadas

Validations:

  • Must be an array of any type

role[organization_ids]
opcional , nil permitido

REMPLAZAR organizaciones con ID dadas.

Validations:

  • Must be an array of any type


PUT /api/roles/:id
Actualizar un rol

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
requerido

Validations:

  • Must be a String

role
requerido

Validations:

  • Must be a Hash

role[name]
opcional

Validations:

  • Must be a String

role[description]
opcional , nil permitido

Descripción del rol

Validations:

  • Must be a String

role[location_ids]
opcional , nil permitido

REMPLAZAR ubicaciones con ID dadas

Validations:

  • Must be an array of any type

role[organization_ids]
opcional , nil permitido

REMPLAZAR organizaciones con ID dadas.

Validations:

  • Must be an array of any type


DELETE /api/roles/:id
Borrar un rol

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
requerido

Validations:

  • Must be a String


POST /api/roles/:id/clone
Clonar un rol

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
requerido

Validations:

  • Must be a String

role
requerido

Validations:

  • Must be a Hash

role[name]
opcional

Validations:

  • Must be a String

role[description]
opcional , nil permitido

Descripción del rol

Validations:

  • Must be a String

role[location_ids]
opcional , nil permitido

REMPLAZAR ubicaciones con ID dadas

Validations:

  • Must be an array of any type

role[organization_ids]
opcional , nil permitido

REMPLAZAR organizaciones con ID dadas.

Validations:

  • Must be an array of any type