> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rapydo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# User management

# Users

Create and manage Rapydo users directly from the Users settings page.

## Overview

The **Users** settings page provides a full interface for managing user accounts. Administrators can add users, reset passwords, change roles, and delete users without needing API access.

## Users Table

The Users table lists all existing users with the following columns:

| Column  | Description                                 |
| ------- | ------------------------------------------- |
| Name    | The user's username                         |
| Role    | The user's role: **Admin** or **Read Only** |
| Actions | Per-row action menu                         |

### Row Actions

Use the action menu on each row to:

* **Reset Password** — Set a new password for the user
* **Change Role** — Switch the user's role between Admin and Read Only (disabled for your own account)
* **Delete** — Remove the user (disabled for your own account)

## Adding a User

Click **Add User** to open the user creation panel.

### Fields

<ParamField body="Username" type="string" required>
  The login username for the new user.
</ParamField>

<ParamField body="Password" type="string" required>
  The initial password for the new user.
</ParamField>

<ParamField body="Role" type="string" required>
  Select the user's access level:

  * **Admin** — Full access to all features and settings
  * **Read Only** — View-only access to dashboards and monitoring
</ParamField>

<ParamField body="Force user to change password on next login" type="boolean">
  When enabled, the user will be prompted to set a new password on their first login.
</ParamField>

### Actions

* **Save** — Create the user
* **Cancel** — Discard and close the panel

## User Roles

| Role          | Description                                                                                                                       |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| **Admin**     | Full access to all features and settings including Query Analysis, Execute Query, Scout Rules, Alerts, and Settings configuration |
| **Read Only** | View-only access to dashboards and monitoring. Cannot modify settings or configurations                                           |

## API Reference

Users can also be created via API. This is useful for scripted provisioning or environments without UI access.

### Prerequisites

* SSH access to the Rapydo machine
* Admin credentials
* `curl` and `jq` installed on the machine

### Step 1: SSH into the Machine

```bash theme={null}
ssh user@your-rapydo-instance
```

### Step 2: Obtain an Authentication Token

```bash theme={null}
TOKEN=$(curl -sS --location 'http://127.0.0.1:8000/v1/users/login' \
--form 'username="admin"' \
--form 'password="admin"' | jq -r .access_token)
```

Adjust the username and password to match your environment.

### Step 3: Create the User

```bash theme={null}
curl --location 'http://127.0.0.1:8000/v1/users/' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $TOKEN" \
--data '{
    "username": "user",
    "password": "user",
    "role": "read_only"
}'
```

Change `username`, `password`, and `role` as needed. Valid `role` values: `admin`, `read_only`.

### Login Endpoint

```
POST http://127.0.0.1:8000/v1/users/login
Content-Type: multipart/form-data

Parameters:
- username (string): User's username
- password (string): User's password

Response:
{
  "access_token": "eyJ...",
  "token_type": "bearer"
}
```

### Create User Endpoint

```
POST http://127.0.0.1:8000/v1/users/
Content-Type: application/json
Authorization: Bearer <token>

Body:
{
  "username": "string",
  "password": "string",
  "role": "admin" | "read_only"
}
```
