Examples

POST /api/roles/1/clone
{
  "name": "New Manager",
  "role": {
    "name": "New Manager"
  }
}
201
{
  "id": 19,
  "name": "New Manager",
  "builtin": 0,
  "description": null,
  "origin": null,
  "cloned_from_id": 1
}

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

REPLACE locations with given ids

Validations:

  • Must be an array of any type

role[organization_ids]
optional , nil allowed

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type