To understand more about users and user types, see Understanding Users and Roles in Oracle ZFS Storage Appliance Administration Guide, Release OS8.7.0.
This command uses three forms:
Create a new user - Creates a new user
Clone an existing user - Clones a new user from an existing user
Add an administrator - Allows a user defined in an enterprise directory to administer the appliance.
In all three cases, a POST request to users with JSON-formatted properties in the body is sent.
Create New User Properties
|
Clone User Properties
|
Add Administrator Properties
|
Example Request:
POST /api/user/v1/users HTTP/1.1
Host: zfssa.example.com:215
Authorization: Basic abcdefghijklmnop
Content-type: application/json
{
"type": "local",
"logname": "john",
"initial_password": "DummyPassword",
"fullname": "John Doe"
}
Example Result:
{
"user":
{
"href": "/api/user/v1/users/john",
"logname": "john",
"type": "local",
"uid": 2000000002,
"fullname": "John Doe",
"initial_password": "DummyPassword",
"require_annotation": false,
"roles": [
"basic"
],
"kiosk_mode": false,
"kiosk_screen": "status/dashboard",
"exceptions": [
],
"preferences": {
"href": "/api/user/v1/users/john/preferences",
"locale": "C",
"login_screen": "status/dashboard",
"session_timeout": 15,
"advanced_analytics": false,
"keys": [
]
}
}
}
Example 2 Creating a Directory User
Example Request:
POST /api/user/v1/users
{
"type": "directory",
"logname": "john"
}
Example Result:
{
"user":
{
"href": "/api/user/v1/users/john",
"logname": "john",
"type": "directory",
"uid": 26718,
"fullname": "John Doe",
"require_annotation": false,
"roles": [
"basic"
],
"kiosk_mode": false,
"kiosk_screen": "status/dashboard",
"exceptions": [
],
"preferences": {
"href": "/api/user/v1/users/john/preferences",
"locale": "C",
"login_screen": "status/dashboard",
"session_timeout": 15,
"advanced_analytics": false,
"keys": [
]
}
}
}
Example 3 Creating a Data-only User
Example Request:
POST /api/user/v1/users
{
"type": "data",
"logname": "john",
"initial_password": "password",
"fullname": "John Doe",
"uid": 5000000
}
Example Result:
{
"user":
{
"href": "/api/user/v1/users/data",
"logname": "john",
"type": "data",
"uid": 5000000,
"fullname": "John Doe",
"initial_password": "DummyPassword"
}
}
Example 4 Creating a No-login User
Example Request:
POST /api/user/v1/users
{
"type": "nologin",
"logname": "john",
"fullname": "John Doe",
"uid": 5000001
}
Example Result:
{
"user":
{
"href": "/api/user/v1/users/john",
"logname": "john",
"type": "nologin",
"uid": 5000001,
"fullname": "John Doe"
}
}