Examples

PUT /api/roles/8-Destroy%20hosts
{
  "role": {
    "name": "staff"
  }
}
200
{
  "builtin": 0,
  "cloned_from_id": null,
  "name": "staff",
  "id": 8,
  "description": null,
  "origin": "",
  "filters": [
    {
      "id": 10997177
    }
  ],
  "locations": [],
  "organizations": []
}

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 , 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