Overview
User API is a REST API for managing Fess user accounts. You can create, get, update, and delete users, and assign roles and groups.
This is an admin API, and access requires authentication with an admin access token. See Admin API Overview for the authentication method and common specifications.
Every response is wrapped in a response object and includes the following common fields:
version: The Fess product version string.status: The result status code (0=success,1=bad request,2=system error,3=unauthorized,9=failed).
Base URL
Endpoint List
| Method | Path | Description |
|---|---|---|
| GET | /settings | List users |
| GET | /setting/{id} | Get user |
| POST | /setting | Create user |
| PUT | /setting | Update user |
| DELETE | /setting/{id} | Delete user |
List Users
Request
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
size | Integer | No | Number of items per page. The default is the configured value paging.page.size (default: 25). |
page | Integer | No | Page number (starts from 1). The default is 1. |
Note
In the current implementation, the user list endpoint does not apply the size and page parameters. It always returns the first page, with the number of items defined by the server setting paging.page.size (default: 25), sorted by username (name) in ascending order. The total number of matching users is available in response.total.
Response
settings: The array of users on the current page.total: The total number of matching users.
Get User
Request
Specify the document ID of the target user in {id}.
Response
Note
attributes includes all attributes stored for the user, except name, password, roles, and groups. password is not included in the response.
Create User
Request
Request Body
Field Description
| Field | Required | Description |
|---|---|---|
name | Yes | Username (login ID) |
password | No | Password |
confirmPassword | No | Confirmation password |
attributes | No | Map of attributes (see below) |
roles | No | Array of role IDs |
groups | No | Array of group IDs |
Note
The REST API does not perform a password-required check, a match check between password and confirmPassword, or password policy validation (these are applied only in the admin UI). In practice, it is recommended to specify a valid password whose value matches confirmPassword.
The keys of attributes are the user entity attribute names (the schema item names derived from LDAP). The most common keys are:
surname,givenName,displayName,mailtelephoneNumber,mobile,homePhoneemployeeNumber,title,description,homeDirectoryuidNumber,gidNumber
uidNumber and gidNumber must be numeric (their type is validated on update). Many other LDAP attribute keys can also be specified.
Note
On creation, the user ID (document ID) is automatically generated as the Base64 URL-encoded value of the username (for example, the username admin becomes YWRtaW4=).
Response
id: The document ID of the created user.created:truewhen created.
Update User
Request
Request Body
Field Description
| Field | Required | Description |
|---|---|---|
id | Yes | The document ID of the user to update. |
name | Yes | Username (login ID) |
versionNo | Yes | Version number (for optimistic locking) |
password | No | New password (updated only when specified) |
confirmPassword | No | Confirmation password |
attributes | No | Map of attributes (see “Create User”) |
roles | No | Array of role IDs |
groups | No | Array of group IDs |
Note
On update, id, name, and versionNo are required. versionNo is the value returned when getting the target user (GET), and it corresponds to the OpenSearch document version. If it does not match the current version, the request is treated as a conflict and the update is rejected.
Response
created:falsefor an update.
Delete User
Request
Specify the document ID of the user to delete in {id}.
Note
You cannot delete the currently logged-in user.
Response
id: The document ID of the deleted user.
Usage Examples
Create New User
Change User Roles
Reference
Admin API Overview - Admin API Overview
Role API - Role Management API
Group API - Group Management API
User - User Management Guide