Exemples

POST /api/roles
{
  "role": {
    "name": "staff",
    "organizations": [],
    "locations": []
  }
}
201
{
  "builtin": 0,
  "cloned_from_id": null,
  "name": "staff",
  "id": 18,
  "description": null,
  "origin": null,
  "filters": [],
  "locations": [],
  "organizations": []
}

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

role
requis

Validations:

  • Must be a Hash

role[name]
requis

Validations:

  • Must be a String

role[description]
optionel , nil autorisé

Description du rôle

Validations:

  • Must be a String

role[location_ids]
optionel , nil autorisé

REMPLACER les emplacements par les id donnés

Validations:

  • Must be an array of any type

role[organization_ids]
optionel , nil autorisé

REMPLACER les organisations qui ont les ID suivants

Validations:

  • Must be an array of any type