# Admin and User Operations

### User Management & Role-Based Access

The Floating Server has two types of users:

{% stepper %}
{% step %}

### Administrators

* Manage the server.
* Activate or deactivate licenses by adding or removing them from the Floating Server.
* Manage users who can register (check out) licenses.
  {% endstep %}

{% step %}

### Management Users

* Managed by administrators.
* Can register/unregister to licenses added to the Floating Server.
* Can send license and feature consumption data back to the server, usually via a client application.
  {% endstep %}
  {% endstepper %}

{% hint style="success" %}
Authentication:

* By default (`DisableUserAuth: false`), both admin and user actions require authentication.
* If `DisableUserAuth` is set to `true`, user-level actions can be performed without logging in. Admin actions will still require authentication. This is not recommended for production environments.
  {% endhint %}

#### User Setup

* Admin adds each user to the server.
* Admin sets an initial password and shares it with the user.
* On first login, the user must change their password via:

> POST /api/v5/auth/change-password

{% hint style="info" %}
For a complete list of API calls for admins and users, refer to the Swagger documentation.
{% endhint %}

### Administrator Actions

> Authentication required: Yes

{% stepper %}
{% step %}

### User Management

* Login: POST /api/v5/auth/login
* Add user: POST /api/v5/auth/add-user
* Remove user: POST /api/v5/auth/remove-user
  {% endstep %}

{% step %}

### Administrators — License Operations

#### Online Licenses

* Add license: POST /api/v5/license
* Remove license: DELETE /api/v5/license/{id}

#### Offline Licenses

* Generate offline activation request: POST /api/v5/license/offline/activation/generate
* Upload and activate license file: POST /api/v5/license/offline/activation/upload
* Generate offline deactivation request: POST /api/v5/license/offline/deactivation/generate

#### Air-Gapped Licenses

* Generate activation code: POST /api/v5/license/airgap/generate
* Upload license file & confirmation code: POST /api/v5/license/airgap/activate
* Generate deactivation code: POST /api/v5/license/airgap/deactivate
* Deactivate using confirmation code: POST /api/v5/license/airgap/activate
  {% endstep %}
  {% endstepper %}

### Bundle Management

* Add bundle: POST /api/v5/bundle
* Remove bundle: DELETE /api/v5/bundle/{code}

{% hint style="info" %}
Admins can also perform all actions that users are allowed to do.
{% endhint %}

### User Actions

Authentication required:

* Register/unregister to licenses:

> POST /api/v5/license/{id}/user/register\
> POST /api/v5/license/{id}/user/unregister

* Register/release features:

> POST /api/v5/license/{id}/feature/register\
> POST /api/v5/license/{id}/feature/release

* Add license or feature consumption:

> POST /api/v5/license/{id}/consumption/add\
> POST /api/v5/license/{id}/consumption/feature/add

### JWT Authentication

* Obtain a JWT token:

> POST /api/v5/auth/login

* Include the JWT in the Authorization header for all authenticated requests:

Authorization: Bearer

### Example Floating License Flow

{% stepper %}
{% step %}

### Create user

Admin creates a user.
{% endstep %}

{% step %}

### Initial password change

User logs in and changes their password.
{% endstep %}

{% step %}

### Obtain JWT

User logs in again to obtain a JWT.
{% endstep %}

{% step %}

### Add license

Admin adds the license: POST /api/v5/license
{% endstep %}

{% step %}

### Register license

User registers to the license: POST /api/v5/license/{id}/register
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.licensespring.com/floating-server/floating-server-v2/admin-and-user-operations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
