Examples

POST /api/roles/16/clone
{
  "name": "New Role",
  "role": {
    "description": "updated description",
    "organization_ids": [
      61304186
    ],
    "name": "New Role"
  }
}
201
{
  "id": 17,
  "name": "New Role",
  "builtin": 0,
  "description": "updated description",
  "origin": null,
  "cloned_from_id": 16
}

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

Role description

Validations:

  • Must be a String

role[location_ids]
Optional , <span class="translation_missing" title="translation missing: sv-SE.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: sv-SE.apipie.nil_allowed">Nil Allowed</span>

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type