To understand more about users and user types, see Understanding Users and Roles in Oracle ZFS Storage Appliance Administration Guide, Release OS8.8.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.
|
|
|
Example Request:
POST /api/user/v1/users HTTP/1.1
Host: zfs-storage.example.com:215
Authorization: Basic abcdefghijklmnop
Content-type: application/json
{
"type": "local",
"logname": "admin3",
"initial_password": "password",
"fullname": "Administrator"
}
Example Result:
{
"user":
{
"href": "/api/user/v1/users/admin3",
"logname": "admin3",
"type": "local",
"uid": 2000000002,
"fullname": "Administrator",
"initial_password": "password",
"require_annotation": false,
"roles": [
"basic"
],
"kiosk_mode": false,
"kiosk_screen": "status/dashboard",
"exceptions": [
],
"preferences": {
"href": "/api/user/v1/users/admin3/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": "admin3"
}
Example Result:
{
"user":
{
"href": "/api/user/v1/users/admin3",
"logname": "admin3",
"type": "directory",
"uid": 26718,
"fullname": "Administrator",
"require_annotation": false,
"roles": [
"basic"
],
"kiosk_mode": false,
"kiosk_screen": "status/dashboard",
"exceptions": [
],
"preferences": {
"href": "/api/user/v1/users/admin3/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": "admin3",
"initial_password": "password",
"fullname": "Administrator",
"uid": 5000000
}
Example Result:
{
"user":
{
"href": "/api/user/v1/users/data",
"logname": "admin3",
"type": "data",
"uid": 5000000,
"fullname": "Administrator",
"initial_password": "password"
}
}
Example 4 Creating a No-login User
Example Request:
POST /api/user/v1/users
{
"type": "nologin",
"logname": "admin3",
"fullname": "Administrator",
"uid": 5000001
}
Example Result:
{
"user":
{
"href": "/api/user/v1/users/admin3",
"logname": "admin3",
"type": "nologin",
"uid": 5000001,
"fullname": "Administrator"
}
}