Examples

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

Params

Param Name Description
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

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

Role description

Validations:

  • Must be a String

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

REPLACE locations with given ids

Validations:

  • Must be an array of any type

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

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type