Create a role
POST {{baseUrl}}/api/v2/roles?createMode=errorIfExists
Create a role according to the parameters given
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
createMode | string | Query parameter allowing support for different modes of resource creation. Possible values include: |
errorIfExists
: Throws an error if you try to create a resource that already exists.orReplace
: Automatically replaces the existing resource with the current one.ifNotExists
: Creates a new resource when an alter is requested for a non-existent resource. |
Request Body
{"name"=>"<string>", "comment"=>"<string>", "created_on"=>"<dateTime>", "is_default"=>"<boolean>", "is_current"=>"<boolean>", "is_inherited"=>"<boolean>", "assigned_to_users"=>"<long>", "granted_to_roles"=>"<long>", "granted_roles"=>"<long>", "owner"=>"<string>"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"status":"\u003cstring\u003e"}