Skip to content
1 change: 1 addition & 0 deletions content/embeds/rs-prometheus-metrics-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
| <span class="break-all">generation{cluster_wd=<node_uid>}</span> | gauge| Generation number of the specific cluster_wd|
| <span class="break-all">has_qourum{cluster_wd=<node_uid>, has_witness_disk=BOOL}</span> | gauge| Has_qourum = 1<br />No quorum = 0 |
| <span class="break-all">is_primary{cluster_wd=<node_uid>}</span> | gauge| primary = 1<br />secondary = 0 |
| <span class="break-all">license_expiration_days</span> | gauge | Number of days until the license expires |
| <span class="break-all">license_shards_limit</span> | gauge | Total shard limit by the license by shard type (ram / flash) |
| <span class="break-all">total_live_nodes_count{cluster_wd=<node_uid>}</span> | gauge| Number of live nodes|
| <span class="break-all">total_node_count{cluster_wd=<node_uid>}</span> | gauge| Number of nodes |
Expand Down
34 changes: 26 additions & 8 deletions content/operate/rs/references/rest-api/requests/users/password.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ weight: $weight

| Method | Path | Description |
|----------------------------|----------------------|-----------------------------|
| [PUT](#update-password) | `/v1/users/password` | Replace the password of the authenticated user |
| [POST](#add-password) | `/v1/users/password` | Add a new password for the authenticated user |
| [DELETE](#delete-password) | `/v1/users/password` | Delete a password for the authenticated user |
| [PUT](#update-password) | `/v1/users/password` | Replace passwords |
| [POST](#add-password) | `/v1/users/password` | Add a new password |
| [DELETE](#delete-password) | `/v1/users/password` | Delete a password |

## Update password {#update-password}

PUT /v1/users/password

Replaces the password list of the user making this request with a single new password. The request authentication header must include the relevant username and password.
Replaces the password list of the specified user with a single new password. If a `username` is not provided in the JSON request body, it replaces the password list of the authenticated user making this request instead.

### Request {#put-request}

Expand All @@ -33,6 +33,7 @@ Replaces the password list of the user making this request with a single new pas

```json
{
"username": "The username of the affected user. If missing, default to the authenticated user.",
"new_password": "the new (single) password"
}
```
Expand All @@ -49,6 +50,7 @@ The request must contain a JSON object with the following fields:

| Field | Type | Description |
|-------|------|-------------|
| username | string | (Optional) The username of the affected user. If missing, defaults to the authenticated user. |
| new_password | string | The new password (required) |

### Response {#put-response}
Expand All @@ -65,6 +67,8 @@ The following are possible `error_code` values:
|------|-------------|
| password_not_complex | The given password is not complex enough (Only work when the password_complexity feature is enabled). |
| new_password_same_as_current | The given new password is identical to one of the already existing passwords. |
| user_not_exist | User does not exist. |
| unauthorized_action | Updating another user's password is acceptable by an admin user only. |

### Status codes {#put-status-codes}

Expand All @@ -73,12 +77,14 @@ The following are possible `error_code` values:
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success, password changed. |
| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Bad or missing parameters. |
| [401 Unauthorized](https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized) | The user is unauthorized. |
| [403 Forbidden](https://www.rfc-editor.org/rfc/rfc9110.html#name-403-forbidden) | Insufficient privileges. |
| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | User not found. |

## Add password {#add-password}

POST /v1/users/password

Adds a new password to the password list of the user making this request. The request authentication header must include the relevant username and password.
Adds a new password to the specified user's password list. If a `username` is not provided in the JSON request body, it adds the password to the password list of the authenticated user making this request instead.

### Request {#post-request}

Expand All @@ -90,6 +96,7 @@ Adds a new password to the password list of the user making this request. The re

```json
{
"username": "The username of the affected user. If missing, default to the authenticated user.",
"new_password": "a password to add"
}
```
Expand All @@ -106,6 +113,7 @@ The request must contain a JSON object with the following fields:

| Field | Type | Description |
|-------|------|-------------|
| username | string | (Optional) The username of the affected user. If missing, defaults to the authenticated user. |
| new_password | string | New password to add (required) |

### Response {#post-response}
Expand All @@ -122,6 +130,8 @@ The following are possible `error_code` values:
|------|-------------|
| password_not_complex | The given password is not complex enough (Only work when the password_complexity feature is enabled). |
| new_password_same_as_current | The given new password is identical to one of the already existing passwords. |
| user_not_exist | User does not exist. |
| unauthorized_action | Updating another user's password is acceptable by an admin user only. |

### Status codes {#post-status-codes}

Expand All @@ -130,12 +140,14 @@ The following are possible `error_code` values:
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success, new password was added to the list of valid passwords. |
| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Bad or missing parameters. |
| [401 Unauthorized](https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized) | The user is unauthorized. |
| [403 Forbidden](https://www.rfc-editor.org/rfc/rfc9110.html#name-403-forbidden) | Insufficient privileges. |
| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | User not found. |

## Delete password {#delete-password}

DELETE /v1/users/password

Deletes a password from the password list of the user making this request. The request authentication header must include the relevant username and password.
Deletes a password from the specified user's password list. If a `username` is not provided in the JSON request body, it deletes the password from the password list of the authenticated user making this request instead.

### Request {#delete-request}

Expand All @@ -147,7 +159,8 @@ Deletes a password from the password list of the user making this request. The r

```json
{
"old_password": "an existing password"
"username": "The username of the affected user. If missing, default to the authenticated user.",
"old_password": "an existing password to delete"
}
```

Expand All @@ -163,6 +176,7 @@ The request must contain a JSON object with the following fields:

| Field | Type | Description |
|-------|------|-------------|
| username | string | (Optional) The username of the affected user. If missing, defaults to the authenticated user. |
| old_password | string | Existing password to be deleted (required) |

### Response {#delete-response}
Expand All @@ -175,7 +189,9 @@ The following are possible `error_code` values:

| Code | Description |
|------|-------------|
| cannot_delete_last_password | Cannot delete the last password of a user |
| cannot_delete_last_password | Cannot delete the last password of a user. |
| user_not_exist | User does not exist. |
| unauthorized_action | Updating another user's password is acceptable by an admin user only. |

### Status codes {#delete-status-codes}

Expand All @@ -184,3 +200,5 @@ The following are possible `error_code` values:
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success, new password was deleted from the list of valid passwords. |
| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Bad or missing parameters. |
| [401 Unauthorized](https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized) | The user is unauthorized. |
| [403 Forbidden](https://www.rfc-editor.org/rfc/rfc9110.html#name-403-forbidden) | Insufficient privileges. |
| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | User not found. |
Loading