示例

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
}

參數

參數名字 描述
location_id
選填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
選填

Set the current organization context for the request

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]
選填 , 允許空值

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