Creates a role with given parameters

Params

Param name Description
pretty
optional

Return a pretty formatted response if true, Default is false


Value: Must be a Boolean
is_oem
optional

Create role in child account by oem user if is_oem flag is true.


Value: Must be a Boolean
child_organisation_key
optional

Organisation key of child account where oem user wants to create role. Required field if is_oem is present.


Value: Must be a String

Examples

Request
  curl -X POST -H "Content-Type:application/json" -H "X-Auth-Token:WtUFnj8pvSxVnH9e_xkq7A" -d '{"role":{"name":"Write Only", "abilities":[3]}}' https://api.datonis.io/api/v3/roles

Response (returns details of the role created)
{
  "role": {
    "abilities": [
      3
    ],
    "account_admin": false,
    "role_key": "517d8e4695",
    "name": "Write Only",
    "permissions": [
      {
        "class": "role",
        "operation": "read",
        "seqno": 1
      },
      {
        "class": "role",
        "operation": "update",
        "seqno": 3
      }
    ]
  }
}