示例

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

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be a String

role
必填

Validations:

  • Must be a Hash

role[name]
选填

Validations:

  • Must be a String

role[description]
选填 , 允许空值

角色描述

Validations:

  • Must be a String

role[location_ids]
选填 , 允许空值

使用给定 id 替换位置

Validations:

  • Must be an array of any type

role[organization_ids]
选填 , 允许空值

使用给定 id 替换机构

Validations:

  • Must be an array of any type