Create Role
This command creates a new role.
Table 17-3 Create New Role Properties
Property | Type | Description |
---|---|---|
|
string |
Name of the new role (required) |
|
string |
Name of the role to clone original properties (optional) |
|
string |
Role description (required) |
Example Request:
POST /api/role/v1/roles HTTP/1.1 Authorization: Basic Tm8gcGVla2luZyE= Host: zfs-storage.example.com:215 Accept: application/json Content-Type: application/json Content-Length: 71 {"name":"role_workflow", "description":"Role to run workflows"}
Example Result:
HTTP/1.1 201 Created X-Zfssa-Appliance-Api: 1.0 Content-Type: application/json Content-Length: 143 Location: /api/role/v1/roles/role_workflow { "role": { "authorizations": [], "description": "Role to run workflows", "href": "/api/role/v1/roles/role_workflow", "name": "role_workflow" } }