### GET /api/auth/passkey/authentication/options Source: https://remna.st/api/index Retrieves the necessary options for initiating Passkey authentication. ```APIDOC ## GET /api/auth/passkey/authentication/options ### Description Retrieves the necessary options for initiating Passkey authentication. ### Method GET ### Endpoint /api/auth/passkey/authentication/options ### Response #### Success Response (default) - **options** (object) - Passkey authentication options #### Response Example ```json { "options": { "challenge": "some_challenge", "user": { "id": "user_id", "name": "User Name" } } } ``` #### Error Responses - **400**: Validation error - **500**: Server error ``` -------------------------------- ### GET /api/remnawave-settings Source: https://remna.st/api/index Retrieves the Remnawave settings from the server. ```APIDOC ## GET /api/remnawave-settings ### Description Retrieves the Remnawave settings from the server. ### Method GET ### Endpoint https://cdn.remna.st/api/remnawave-settings ### Parameters #### Query Parameters (No query parameters specified) ### Request Example (No request body or parameters to exemplify) ### Response #### Success Response (200) (Response structure not detailed in the provided text) #### Response Example (No example response provided in the input text) ``` -------------------------------- ### Get Remnawave Settings using cURL Source: https://remna.st/api/index This snippet demonstrates how to fetch Remnawave settings by making a GET request to the specified API endpoint using cURL. It requires no specific authentication or parameters for a basic retrieval. ```bash curl -X GET "https://cdn.remna.st/api/remnawave-settings" ``` -------------------------------- ### Get authentication status using JavaScript Axios Source: https://remna.st/api/index This snippet demonstrates how to retrieve the current authentication status of the system using the 'GET /api/auth/status' endpoint. It does not require any parameters and returns the system's status. Error handling for validation and server errors is provided. ```javascript import axios from 'axios'; const options = {method: 'GET', url: 'https://cdn.remna.st/api/auth/status'}; try { const { data } = await axios.request(options); console.log(data); } catch (error) { console.error(error); } ``` -------------------------------- ### Get Passkey Authentication Options API Request Source: https://remna.st/api/index Retrieves the necessary options for initiating Passkey authentication. This endpoint is used on the client-side to prepare for a WebAuthn-based login flow. It does not require any request body parameters and returns authentication options for the client to use. ```javascript import axios from 'axios'; const options = { method: 'GET', url: 'https://cdn.remna.st/api/auth/passkey/authentication/options' }; try { const { data } = await axios.request(options); console.log(data); } catch (error) { console.error(error); } ``` -------------------------------- ### Users Bulk Actions Controller Source: https://remna.st/api/index Bulk actions with users. ```APIDOC ## Users Bulk Actions Controller ### Description Bulk actions with users. ### Operations - POST /api/users/bulk/delete-by-status - POST /api/users/bulk/delete - POST /api/users/bulk/revoke-subscription - POST /api/users/bulk/reset-traffic - POST /api/users/bulk/update - POST /api/users/bulk/update-squads - POST /api/users/bulk/extend-expiration-date - POST /api/users/bulk/all/update - POST /api/users/bulk/all/reset-traffic - POST /api/users/bulk/all/extend-expiration-date ``` -------------------------------- ### Login as superadmin using JavaScript Axios Source: https://remna.st/api/index This snippet demonstrates how to authenticate as a superadmin using the 'POST /api/auth/login' endpoint. It requires username and password, and returns an access token upon successful authentication. Error handling for validation, unauthorized access, and server errors is included. ```javascript import axios from 'axios'; const options = { method: 'POST', url: 'https://cdn.remna.st/api/auth/login', headers: {'Content-Type': 'application/json'}, data: {username: '', password: ''} }; try { const { data } = await axios.request(options); console.log(data); } catch (error) { console.error(error); } ``` -------------------------------- ### Subscription Page Configs Controller API Source: https://remna.st/api/index Manages subscription page configurations, including retrieval, updates, creation, deletion, reordering, and cloning of configurations. ```APIDOC ## Subscription Page Configs Controller ### Description Manages subscription page configurations, including retrieval, updates, creation, deletion, reordering, and cloning of configurations. ### Method - GET - PATCH - POST - DELETE ### Endpoint - /api/subscription-page-configs - /api/subscription-page-configs/{uuid} - /api/subscription-page-configs/actions/reorder - /api/subscription-page-configs/actions/clone ``` -------------------------------- ### POST /api/auth/oauth2/callback Source: https://remna.st/api/index Handles the callback from a generic OAuth2 provider after user authorization, returning an access token. ```APIDOC ## POST /api/auth/oauth2/callback ### Description Handles the callback from a generic OAuth2 provider after user authorization, returning an access token. ### Method POST ### Endpoint /api/auth/oauth2/callback ### Parameters #### Request Body - **provider** (string) - Required - Enum: GITHUB, POCKETID, YANDEX - **code** (string) - Required - The authorization code received from the provider - **state** (string) - Required - The state parameter for CSRF protection ### Request Example ```json { "provider": "github", "code": "authorization_code", "state": "csrf_state" } ``` ### Response #### Success Response (default) - **accessToken** (string) - Access token for further requests #### Response Example ```json { "accessToken": "your_access_token" } ``` #### Error Responses - **400**: Validation error - **500**: Server error ``` -------------------------------- ### Register as superadmin using JavaScript Axios Source: https://remna.st/api/index This snippet shows how to register a new superadmin user via the 'POST /api/auth/register' endpoint. It requires a username and a strong password meeting specific length and complexity requirements. The endpoint returns an access token on successful registration or an error if registration is forbidden or fails validation. ```javascript import axios from 'axios'; const options = { method: 'POST', url: 'https://cdn.remna.st/api/auth/register', headers: {'Content-Type': 'application/json'}, data: {username: '', password: ''} }; try { const { data } = await axios.request(options); console.log(data); } catch (error) { console.error(error); } ``` -------------------------------- ### Hosts Bulk Actions Controller API Source: https://remna.st/api/index Performs bulk actions on hosts, such as deletion, enabling, disabling, and setting inbound configurations or ports. ```APIDOC ## Hosts Bulk Actions Controller ### Description Performs bulk actions on hosts, such as deletion, enabling, disabling, and setting inbound configurations or ports. ### Method POST ### Endpoint - /api/hosts/bulk/delete - /api/hosts/bulk/disable - /api/hosts/bulk/enable - /api/hosts/bulk/set-inbound - /api/hosts/bulk/set-port ``` -------------------------------- ### Passkeys Controller Source: https://remna.st/api/index Management of Passkeys. Provides endpoints for passkey registration and verification. ```APIDOC ## Passkeys Controller ### Description Management of Passkeys. Provides endpoints for passkey registration and verification. ### Operations - GET /api/passkeys/registration/options - POST /api/passkeys/registration/verify - GET /api/passkeys - DELETE /api/passkeys - PATCH /api/passkeys ``` -------------------------------- ### Config Profiles Controller API Source: https://remna.st/api/index Manages configuration profiles, allowing for creation, retrieval, updating, and deletion of profiles and their associated inbound configurations. ```APIDOC ## Config Profiles Controller ### Description Manages configuration profiles, allowing for creation, retrieval, updating, and deletion of profiles and their associated inbound configurations. ### Method - GET - POST - PATCH - DELETE ### Endpoint - /api/config-profiles - /api/config-profiles/inbounds - /api/config-profiles/{uuid}/inbounds - /api/config-profiles/{uuid} - /api/config-profiles/{uuid}/computed-config - /api/config-profiles/actions/reorder ``` -------------------------------- ### Hosts Controller API Source: https://remna.st/api/index Handles management of hosts, including retrieving tags, creating, updating, deleting hosts, and reordering them. ```APIDOC ## Hosts Controller ### Description Handles management of hosts, including retrieving tags, creating, updating, deleting hosts, and reordering them. ### Method - GET - POST - PATCH - DELETE ### Endpoint - /api/hosts/tags - /api/hosts - /api/hosts/{uuid} - /api/hosts/actions/reorder ``` -------------------------------- ### Nodes Controller Source: https://remna.st/api/index Controller for managing nodes. ```APIDOC ## Nodes Controller ### Description Controller for managing nodes. ### Operations - GET /api/nodes/tags - POST /api/nodes - GET /api/nodes - PATCH /api/nodes - GET /api/nodes/{uuid} - DELETE /api/nodes/{uuid} - POST /api/nodes/{uuid}/actions/enable - POST /api/nodes/{uuid}/actions/disable - POST /api/nodes/{uuid}/actions/restart - POST /api/nodes/{uuid}/actions/reset-traffic - POST /api/nodes/actions/restart-all - POST /api/nodes/actions/reorder - POST /api/nodes/bulk-actions/profile-modification ``` -------------------------------- ### Subscription Template Controller API Source: https://remna.st/api/index Manages subscription templates, allowing for retrieval, updating, creation, deletion, and reordering of templates. ```APIDOC ## Subscription Template Controller ### Description Manages subscription templates, allowing for retrieval, updating, creation, deletion, and reordering of templates. ### Method - GET - PATCH - POST - DELETE ### Endpoint - /api/subscription-templates - /api/subscription-templates/{uuid} - /api/subscription-templates/actions/reorder ``` -------------------------------- ### Keygen Controller API Source: https://remna.st/api/index Handles the generation of SSL certificates for Remnawave Nodes. ```APIDOC ## Keygen Controller ### Description Generation of SSL_CERT for Remnawave Node. ### Method GET ### Endpoint /api/keygen ``` -------------------------------- ### HWID User Devices Controller Source: https://remna.st/api/index Controller for managing HWID user devices. ```APIDOC ## HWID User Devices Controller ### Description Controller for managing HWID user devices. ### Operations - GET /api/hwid/devices - POST /api/hwid/devices - POST /api/hwid/devices/delete - POST /api/hwid/devices/delete-all - GET /api/hwid/devices/stats - GET /api/hwid/devices/top-users - GET /api/hwid/devices/{userUuid} ``` -------------------------------- ### Users Controller Source: https://remna.st/api/index Manage users, change their status, reset traffic, etc. ```APIDOC ## Users Controller ### Description Manage users, change their status, reset traffic, etc. ### Operations - POST /api/users - PATCH /api/users - GET /api/users - DELETE /api/users/{uuid} - GET /api/users/{uuid} - GET /api/users/tags - GET /api/users/{uuid}/accessible-nodes - GET /api/users/{uuid}/subscription-request-history - GET /api/users/by-short-uuid/{shortUuid} - GET /api/users/by-username/{username} - GET /api/users/by-id/{id} - GET /api/users/by-telegram-id/{telegramId} - GET /api/users/by-email/{email} - GET /api/users/by-tag/{tag} - POST /api/users/{uuid}/actions/revoke - POST /api/users/{uuid}/actions/disable - POST /api/users/{uuid}/actions/enable - POST /api/users/{uuid}/actions/reset-traffic ``` -------------------------------- ### Auth Controller API Source: https://remna.st/api/index Handles authentication for admin users, including login, registration, and status checks. ```APIDOC ## POST /api/auth/login ### Description Logs in an admin user. ### Method POST ### Endpoint /api/auth/login ### Parameters #### Request Body - **username** (string) - Required - The username for login. - **password** (string) - Required - The password for login. ### Request Example ```javascript import axios from 'axios'; const options = { method: 'POST', url: 'https://cdn.remna.st/api/auth/login', headers: {'Content-Type': 'application/json'}, data: {username: '', password: ''} }; try { const { data } = await axios.request(options); console.log(data); } catch (error) { console.error(error); } ``` ### Response #### Success Response (default) - **message** (string) - Description of the access token. #### Response Example ```json { "message": "Access token for further requests" } ``` #### Error Responses - **400** - Validation error. - **401** - Unauthorized - Invalid credentials. - **500** - Server error. ``` ```APIDOC ## POST /api/auth/register ### Description Registers a new admin user. ### Method POST ### Endpoint /api/auth/register ### Parameters #### Request Body - **username** (string) - Required - The username for registration. - **password** (string) - Required - The password for registration. Must be at least 24 characters long and contain uppercase, lowercase, and numeric characters. ### Request Example ```javascript import axios from 'axios'; const options = { method: 'POST', url: 'https://cdn.remna.st/api/auth/register', headers: {'Content-Type': 'application/json'}, data: {username: '', password: ''} }; try { const { data } = await axios.request(options); console.log(data); } catch (error) { console.error(error); } ``` ### Response #### Success Response (default) - **message** (string) - Description of the access token. #### Response Example ```json { "message": "Access token for further requests" } ``` #### Error Responses - **400** - Validation error. - **403** - Forbidden - Registration is not allowed. - **500** - Server error. ``` ```APIDOC ## GET /api/auth/status ### Description Retrieves the current authentication status of the system. ### Method GET ### Endpoint /api/auth/status ### Response #### Success Response (default) - **message** (string) - Status of the system. #### Response Example ```json { "message": "System is operational" } ``` #### Error Responses - **400** - Validation error. - **500** - Server error. ``` -------------------------------- ### [Public] Subscription Controller Source: https://remna.st/api/index Public Subscription Controller. Methods of this controller are not protected with auth. Use it only for public requests. ```APIDOC ## [Public] Subscription Controller ### Description Public Subscription Controller. Methods of this controller are not protected with auth. Use it only for public requests. ### Operations - GET /api/sub/{shortUuid}/info - GET /api/sub/{shortUuid} - GET /api/sub/{shortUuid}/{clientType} - GET /api/sub/outline/{shortUuid}/{type}/{encodedTag} ``` -------------------------------- ### Subscription Settings Controller API Source: https://remna.st/api/index Manages subscription settings, providing endpoints for retrieval and updating of these settings. ```APIDOC ## Subscription Settings Controller ### Description Manages subscription settings, providing endpoints for retrieval and updating of these settings. ### Method - GET - PATCH ### Endpoint - /api/subscription-settings ``` -------------------------------- ### System Controller API Source: https://remna.st/api/index Provides system-level operations, including retrieving system statistics (overall, bandwidth, nodes), health status, node metrics, and tools for key generation and encryption. ```APIDOC ## System Controller ### Description Provides system-level operations, including retrieving system statistics (overall, bandwidth, nodes), health status, node metrics, and tools for key generation and encryption. ### Method - GET - POST ### Endpoint - /api/system/stats - /api/system/stats/bandwidth - /api/system/stats/nodes - /api/system/health - /api/system/nodes/metrics - /api/system/tools/x25519/generate - /api/system/tools/happ/encrypt - /api/system/testers/srr-matcher ``` -------------------------------- ### Bandwidth Stats Controller API Source: https://remna.st/api/index Provides endpoints for retrieving bandwidth statistics for nodes and users, including legacy and real-time data. ```APIDOC ## Bandwidth Stats Controller ### Description Provides endpoints for retrieving bandwidth statistics for nodes and users, including legacy and real-time data. ### Method GET ### Endpoint - /api/bandwidth-stats/nodes/{uuid}/users/legacy - /api/bandwidth-stats/nodes/realtime - /api/bandwidth-stats/nodes/{uuid}/users - /api/bandwidth-stats/users/{uuid}/legacy - /api/bandwidth-stats/users/{uuid} - /api/bandwidth-stats/nodes ``` -------------------------------- ### POST /api/auth/oauth2/authorize Source: https://remna.st/api/index Initiates the OAuth2 authorization flow by requesting an authorization URL from the specified provider. ```APIDOC ## POST /api/auth/oauth2/authorize ### Description Initiates the OAuth2 authorization flow by requesting an authorization URL from the specified provider. ### Method POST ### Endpoint /api/auth/oauth2/authorize ### Parameters #### Request Body - **provider** (string) - Required - Enum: GITHUB, POCKETID, YANDEX ### Request Example ```json { "provider": "github" } ``` ### Response #### Success Response (default) - **authorizationUrl** (string) - The OAuth2 authorization URL #### Response Example ```json { "authorizationUrl": "https://example.com/oauth2/authorize?client_id=..." } ``` #### Error Responses - **400**: Validation error - **500**: Server error ``` -------------------------------- ### Initiate OAuth2 Authorization API Request Source: https://remna.st/api/index Initiates the OAuth2 authorization process by specifying a provider (e.g., GitHub, PocketID, Yandex). This endpoint returns an authorization URL that the user will be redirected to for granting access. It requires a JSON payload containing the desired provider. ```javascript import axios from 'axios'; const options = { method: 'POST', url: 'https://cdn.remna.st/api/auth/oauth2/authorize', headers: {'Content-Type': 'application/json'}, data: {provider: 'github'} }; try { const { data } = await axios.request(options); console.log(data); } catch (error) { console.error(error); } ``` -------------------------------- ### [Protected] Subscriptions Controller Source: https://remna.st/api/index Methods of this controller are protected with auth, most of them are returning the same informations as public Subscription Controller. ```APIDOC ## [Protected] Subscriptions Controller ### Description Methods of this controller are protected with auth, most of them are returning the same informations as public Subscription Controller. ### Operations - GET /api/subscriptions - GET /api/subscriptions/by-username/{username} - GET /api/subscriptions/by-short-uuid/{shortUuid} - GET /api/subscriptions/by-uuid/{uuid} - GET /api/subscriptions/by-short-uuid/{shortUuid}/raw - GET /api/subscriptions/subpage-config/{shortUuid} ``` -------------------------------- ### Subscription Request History Controller API Source: https://remna.st/api/index Provides access to subscription request history and associated statistics. ```APIDOC ## Subscription Request History Controller ### Description Provides access to subscription request history and associated statistics. ### Method GET ### Endpoint - /api/subscription-request-history - /api/subscription-request-history/stats ``` -------------------------------- ### Verify Passkey Authentication using JavaScript Axios Source: https://remna.st/api/index This snippet demonstrates how to verify passkey authentication using the Axios library in JavaScript. It sends a POST request to the authentication endpoint with a JSON payload. The response contains a JWT access token upon successful authentication or error details for invalid requests. ```javascript import axios from 'axios'; const options = { method: 'POST', url: 'https://cdn.remna.st/api/auth/passkey/authentication/verify', headers: {'Content-Type': 'application/json'}, data: {response: null} }; try { const { data } = await axios.request(options); console.log(data); } catch (error) { console.error(error); } ``` -------------------------------- ### Snippets Controller API Source: https://remna.st/api/index Manages snippets, supporting retrieval, deletion, creation, and partial updates. ```APIDOC ## Snippets Controller ### Description Manages snippets, supporting retrieval, deletion, creation, and partial updates. ### Method - GET - DELETE - POST - PATCH ### Endpoint /api/snippets ``` -------------------------------- ### API Tokens Controller Source: https://remna.st/api/index Manage API tokens to use in your code. This controller can't be used with API token, only with Admin JWT token. ```APIDOC ## API Tokens Controller ### Description Manage API tokens to use in your code. This controller can't be used with API token, only with Admin JWT token. ### Operations - POST /api/tokens - GET /api/tokens - DELETE /api/tokens/{uuid} ``` -------------------------------- ### POST /api/auth/passkey/authentication/verify Source: https://remna.st/api/index Verifies the authentication for a passkey. This endpoint is used to confirm the validity of a passkey during the authentication process. ```APIDOC ## POST /api/auth/passkey/authentication/verify ### Description Verifies the authentication for a passkey. This endpoint is used to confirm the validity of a passkey during the authentication process. ### Method POST ### Endpoint /api/auth/passkey/authentication/verify ### Parameters #### Request Body - **response** (object) - Required - The response object from the passkey authentication challenge. ### Request Example ```json { "response": null } ``` ### Response #### Success Response (200) - **accessToken** (string) - JWT access token after successful passkey authentication. #### Error Response (400) - **message** (string) - A message describing the validation error. - **statusCode** (integer) - The HTTP status code, 400. - **errors** (array) - An array of error objects detailing the validation issues. - **validation** (string) - The type of validation that failed (e.g., "uuid"). - **code** (string) - The error code (e.g., "invalid_string"). - **message** (string) - A human-readable error message. - **path** (array) - The path to the field that caused the error. #### Error Response (500) - **message** (string) - A message indicating a server error. - **statusCode** (integer) - The HTTP status code, 500. #### Response Example (Success) ```json { "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." } ``` #### Response Example (Validation Error) ```json { "message": "Validation error", "statusCode": 400, "errors": [ { "validation": "uuid", "code": "invalid_string", "message": "Invalid uuid", "path": [ "uuid" ] } ] } ``` ``` -------------------------------- ### POST /api/auth/oauth2/tg/callback Source: https://remna.st/api/index Handles the callback from Telegram OAuth2, processing user authentication details to provide an access token. ```APIDOC ## POST /api/auth/oauth2/tg/callback ### Description Handles the callback from Telegram OAuth2, processing user authentication details to provide an access token. ### Method POST ### Endpoint /api/auth/oauth2/tg/callback ### Parameters #### Request Body - **id** (number) - Required - **first_name** (string) - Required - **auth_date** (number) - Required - **hash** (string) - Required - **last_name** (string) - Optional - **username** (string) - Optional - **photo_url** (string) - Optional ### Request Example ```json { "id": 1, "first_name": "", "auth_date": 1, "hash": "", "last_name": "", "username": "", "photo_url": "" } ``` ### Response #### Success Response (default) - **accessToken** (string) - Access token for further requests #### Response Example ```json { "accessToken": "your_access_token" } ``` #### Error Responses - **400**: Validation error - **500**: Server error ``` -------------------------------- ### Remnawave Settings Controller API Source: https://remna.st/api/index Manages Remnawave settings, allowing for retrieval and partial updates. ```APIDOC ## Remnawave Settings Controller ### Description Manages Remnawave settings, allowing for retrieval and partial updates. ### Method - GET - PATCH ### Endpoint /api/remnawave-settings ``` -------------------------------- ### Infra Billing Controller API Source: https://remna.st/api/index Handles infrastructure billing operations, including managing billing providers, history, and node-related billing information. ```APIDOC ## Infra Billing Controller ### Description Handles infrastructure billing operations, including managing billing providers, history, and node-related billing information. ### Method - GET - POST - PATCH - DELETE ### Endpoint - /api/infra-billing/providers - /api/infra-billing/providers/{uuid} - /api/infra-billing/history - /api/infra-billing/history/{uuid} - /api/infra-billing/nodes ``` -------------------------------- ### Internal Squads Controller API Source: https://remna.st/api/index Manages internal squads, including their creation, retrieval, updating, deletion, and the management of user associations and reordering. ```APIDOC ## Internal Squads Controller ### Description Manages internal squads, including their creation, retrieval, updating, deletion, and the management of user associations and reordering. ### Method - GET - POST - PATCH - DELETE ### Endpoint - /api/internal-squads - /api/internal-squads/{uuid} - /api/internal-squads/{uuid}/accessible-nodes - /api/internal-squads/{uuid}/bulk-actions/add-users - /api/internal-squads/{uuid}/bulk-actions/remove-users - /api/internal-squads/actions/reorder ``` -------------------------------- ### OAuth2 Callback API Request Source: https://remna.st/api/index Handles the callback from a general OAuth2 provider after user authorization. It requires the provider, authorization code, and state parameter. This endpoint exchanges the authorization code for an access token, enabling subsequent authenticated requests. ```javascript import axios from 'axios'; const options = { method: 'POST', url: 'https://cdn.remna.st/api/auth/oauth2/callback', headers: {'Content-Type': 'application/json'}, data: {provider: 'github', code: '', state: ''} }; try { const { data } = await axios.request(options); console.log(data); } catch (error) { console.error(error); } ``` -------------------------------- ### External Squads Controller API Source: https://remna.st/api/index Manages external squads, enabling operations such as creation, retrieval, updating, deletion, bulk user actions, and reordering. ```APIDOC ## External Squads Controller ### Description Manages external squads, enabling operations such as creation, retrieval, updating, deletion, bulk user actions, and reordering. ### Method - GET - POST - PATCH - DELETE ### Endpoint - /api/external-squads - /api/external-squads/{uuid} - /api/external-squads/{uuid}/bulk-actions/add-users - /api/external-squads/{uuid}/bulk-actions/remove-users - /api/external-squads/actions/reorder ``` -------------------------------- ### Telegram OAuth2 Callback API Request Source: https://remna.st/api/index Handles the callback from Telegram OAuth2, receiving user details such as ID, name, and authentication hash. This endpoint is crucial for user authentication and session management after a successful Telegram login. It expects a JSON payload with specific user information. ```javascript import axios from 'axios'; const options = { method: 'POST', url: 'https://cdn.remna.st/api/auth/oauth2/tg/callback', headers: {'Content-Type': 'application/json'}, data: { id: 1, first_name: '', last_name: '', username: '', photo_url: '', auth_date: 1, hash: '' } }; try { const { data } = await axios.request(options); console.log(data); } catch (error) { console.error(error); } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.