Go to main content

Oracle® ZFS Storage Appliance RESTful API Guide, Release OS8.8.0

Exit Print View

Updated: November 2018
 
 

Create Role

This command creates a new role.

Table 46  Create New Role Properties
Property
Type
Description
name
string
New roles's name (required)
clone
string
Name of role to clone original properties (optional)
description
string
Role description (required)

Example Request:

POST /api/role/v1/roles HTTP/1.1
Authorization: Basic abcefgMWE=
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"
    }
}