Create a role
Creates a new user role. The role key is built from the name if not given and stored in upper case with underscores. Assign its features separately with Update features assigned to a role.
How to use it
- Send a unique name and, optionally, a roleKey and status.
- The role is created with no features; grant them with Update features assigned to a role.
- Give users the role with Create a user or Update a user.
BearerAuthAuthorizationBearer <JWT>application/json- body
id?|Role ID. Set by the server.
int64name*stringRole name, unique across the merchant. Required.
roleKey*stringStable key for the role, e.g. CASHIER. Upper-cased with spaces turned to underscores; built from the name when left blank.
status*stringRole status text. Defaults to active.
modifiedTime*stringWhen the role was last changed. Set by the server.
date-timeOK
*/*- response
id?|Role ID. Set by the server.
int64name*stringRole name, unique across the merchant. Required.
roleKey*stringStable key for the role, e.g. CASHIER. Upper-cased with spaces turned to underscores; built from the name when left blank.
status*stringRole status text. Defaults to active.
modifiedTime*stringWhen the role was last changed. Set by the server.
date-timecurl -X POST 'https://beta.iotoms.com/api/v1/management/roles' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "roleKey": "string", "status": "string", "modifiedTime": "2019-08-24T14:15:22Z"}'{ "id": 0, "name": "string", "roleKey": "string", "status": "string", "modifiedTime": "2019-08-24T14:15:22Z"}