Examples

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": []
}

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 , <span class="translation_missing" title="translation missing: ca.apipie.nil_allowed">Nil Allowed</span>

DescripciĆ³ del rol

Validations:

  • Must be a String

role[location_ids]
Optional , <span class="translation_missing" title="translation missing: ca.apipie.nil_allowed">Nil Allowed</span>

SUBSTITUEIX les ubicacions amb els ID donats

Validations:

  • Must be an array of any type

role[organization_ids]
Optional , <span class="translation_missing" title="translation missing: ca.apipie.nil_allowed">Nil Allowed</span>

SUBSTITUEIX les organitzacions amb els ID donats.

Validations:

  • Must be an array of any type