{"openapi": "3.1.0", "info": {"title": "Alexen API", "description": "Unified GUI Censorship Resistant Solution Powered by Xray", "version": "2.3.14"}, "paths": {"/api/admin/token": {"post": {"tags": ["Admin"], "summary": "Admin Token", "description": "Authenticate an admin and issue a token.", "operationId": "admin_token_api_admin_token_post", "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"$ref": "#/components/schemas/Body_admin_token_api_admin_token_post"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Token"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/admin": {"get": {"tags": ["Admin"], "summary": "Get Current Admin", "description": "Retrieve the current authenticated admin.", "operationId": "get_current_admin_api_admin_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Admin"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "post": {"tags": ["Admin"], "summary": "Create Admin", "description": "Create a new admin if the current admin has sudo privileges (a creator one: creator only).", "operationId": "create_admin_api_admin_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminCreate"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Admin"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Conflict"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/admin/{username}": {"put": {"tags": ["Admin"], "summary": "Modify Admin", "description": "Modify an existing admin's details. Sudo admins change every admin they can see (regular\nand sudo ones); the creator accounts and the creator role are the creator's.", "operationId": "modify_admin_api_admin__username__put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminModify"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Admin"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["Admin"], "summary": "Remove Admin", "description": "Remove an admin and ALL of its users from the database (a creator one: creator only).\n\nDeleting an admin deletes every user it owned; a safety backup is taken first so the\nwhole thing can be undone with `alexen restore`.", "operationId": "remove_admin_api_admin__username__delete", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/admins": {"get": {"tags": ["Admin"], "summary": "Get Admins", "description": "Fetch a list of admins with optional filters for pagination and username\n(the creator accounts only for a creator).", "operationId": "get_admins_api_admins_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "offset", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Offset"}}, {"name": "limit", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Limit"}}, {"name": "username", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Admin"}, "title": "Response Get Admins Api Admins Get"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/admin/{username}/users/disable": {"post": {"tags": ["Admin"], "summary": "Disable All Active Users", "description": "Disable all active users under a specific admin", "operationId": "disable_all_active_users_api_admin__username__users_disable_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/admin/{username}/users/activate": {"post": {"tags": ["Admin"], "summary": "Activate All Disabled Users", "description": "Activate all disabled users under a specific admin", "operationId": "activate_all_disabled_users_api_admin__username__users_activate_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/admin/usage/reset/{username}": {"post": {"tags": ["Admin"], "summary": "Reset Admin Usage", "description": "Resets usage of admin.", "operationId": "reset_admin_usage_api_admin_usage_reset__username__post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Admin"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/admin/usage/{username}": {"get": {"tags": ["Admin"], "summary": "Get Admin Usage", "description": "Retrieve the usage of given admin.", "operationId": "get_admin_usage_api_admin_usage__username__get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "integer", "title": "Response Get Admin Usage Api Admin Usage  Username  Get"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/core": {"get": {"tags": ["Core"], "summary": "Get Core Stats", "description": "Retrieve core statistics such as version and uptime.", "operationId": "get_core_stats_api_core_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CoreStats"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/core/x25519": {"get": {"tags": ["Core"], "summary": "Generate X25519", "description": "A fresh x25519 key pair for a REALITY inbound.", "operationId": "generate_x25519_api_core_x25519_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "object", "title": "Response Generate X25519 Api Core X25519 Get"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/core/outbound-from-link": {"post": {"tags": ["Core"], "summary": "Outbound From Link", "description": "Turn a vless/vmess/trojan/ss/hysteria2 share link into an Xray outbound.", "operationId": "outbound_from_link_api_core_outbound_from_link_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OutboundLink"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "object", "title": "Response Outbound From Link Api Core Outbound From Link Post"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/core/restart": {"post": {"tags": ["Core"], "summary": "Restart Core", "description": "Restart the core and all connected nodes.", "operationId": "restart_core_api_core_restart_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/core/config": {"get": {"tags": ["Core"], "summary": "Get Core Config", "description": "Get the current core configuration.", "operationId": "get_core_config_api_core_config_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "object", "title": "Response Get Core Config Api Core Config Get"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["Core"], "summary": "Modify Core Config", "description": "Modify the core configuration and restart the core.", "operationId": "modify_core_config_api_core_config_put", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "title": "Payload"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "object", "title": "Response Modify Core Config Api Core Config Put"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/cores": {"get": {"tags": ["Core"], "summary": "List Cores", "description": "List the main core and the extra cores nodes can run.", "operationId": "list_cores_api_cores_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/CoreInfo"}, "type": "array", "title": "Response List Cores Api Cores Get"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "post": {"tags": ["Core"], "summary": "Create Core", "description": "Add an extra core, from a given config or a copy of another core.", "operationId": "create_core_api_cores_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CoreCreate"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CoreInfo"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/cores/{core_id}": {"put": {"tags": ["Core"], "summary": "Rename Core", "operationId": "rename_core_api_cores__core_id__put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "core_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Core Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CoreModify"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CoreInfo"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["Core"], "summary": "Delete Core", "description": "Delete an extra core; its nodes go back to the main core.", "operationId": "delete_core_api_cores__core_id__delete", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "core_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Core Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/cores/{core_id}/config": {"get": {"tags": ["Core"], "summary": "Get Extra Core Config", "operationId": "get_extra_core_config_api_cores__core_id__config_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "core_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Core Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "object", "title": "Response Get Extra Core Config Api Cores  Core Id  Config Get"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "put": {"tags": ["Core"], "summary": "Modify Extra Core Config", "description": "Save a core's config and restart the nodes running it.", "operationId": "modify_extra_core_config_api_cores__core_id__config_put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "core_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Core Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "title": "Payload"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "object", "title": "Response Modify Extra Core Config Api Cores  Core Id  Config Put"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/groups": {"get": {"tags": ["Groups"], "summary": "List Groups", "description": "All host groups with their hosts and the admins limited to them", "operationId": "list_groups_api_groups_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupsResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "post": {"tags": ["Groups"], "summary": "Create Group", "operationId": "create_group_api_groups_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupCreate"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupsResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/groups/{name}": {"put": {"tags": ["Groups"], "summary": "Modify Group", "operationId": "modify_group_api_groups__name__put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string", "title": "Name"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupModify"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupsResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["Groups"], "summary": "Delete Group", "description": "Delete a group. Its hosts become ungrouped and admins lose the group.", "operationId": "delete_group_api_groups__name__delete", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string", "title": "Name"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupsResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/node/settings": {"get": {"tags": ["Node"], "summary": "Get Node Settings", "description": "Retrieve the current node settings, including TLS certificate.", "operationId": "get_node_settings_api_node_settings_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NodeSettings"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/node": {"post": {"tags": ["Node"], "summary": "Add Node", "description": "Add a new node to the database and optionally add it as a host.", "operationId": "add_node_api_node_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/NodeCreate"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NodeResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Conflict"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/node/{node_id}": {"get": {"tags": ["Node"], "summary": "Get Node", "description": "Retrieve details of a specific node by its ID.", "operationId": "get_node_api_node__node_id__get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "node_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Node Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NodeResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "put": {"tags": ["Node"], "summary": "Modify Node", "description": "Update a node's details. Only accessible to sudo admins.", "operationId": "modify_node_api_node__node_id__put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "node_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Node Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NodeModify"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NodeResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["Node"], "summary": "Remove Node", "description": "Delete a node and remove it from xray in the background.", "operationId": "remove_node_api_node__node_id__delete", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "node_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Node Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/nodes": {"get": {"tags": ["Node"], "summary": "Get Nodes", "description": "Retrieve a list of all nodes. Accessible only to sudo admins.", "operationId": "get_nodes_api_nodes_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/NodeResponse"}, "type": "array", "title": "Response Get Nodes Api Nodes Get"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/node/{node_id}/reconnect": {"post": {"tags": ["Node"], "summary": "Reconnect Node", "description": "Connect again now: a hanging attempt is dropped, not waited for", "operationId": "reconnect_node_api_node__node_id__reconnect_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "node_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Node Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/nodes/usage": {"get": {"tags": ["Node"], "summary": "Get Usage", "description": "Retrieve usage statistics for nodes within a specified date range.", "operationId": "get_usage_api_nodes_usage_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "start", "in": "query", "required": false, "schema": {"type": "string", "default": "", "title": "Start"}}, {"name": "end", "in": "query", "required": false, "schema": {"type": "string", "default": "", "title": "End"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NodesUsageResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/nodes/extras": {"get": {"tags": ["Node"], "summary": "Nodes Extras", "operationId": "nodes_extras_api_nodes_extras_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/ssh-keys": {"get": {"tags": ["Node"], "summary": "List Ssh Keys", "description": "saved SSH keys (names + public keys only; private keys are never returned)", "operationId": "list_ssh_keys_api_ssh_keys_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "post": {"tags": ["Node"], "summary": "Add Ssh Key", "operationId": "add_ssh_key_api_ssh_keys_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SSHKeyIn"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/ssh-keys/{key_id}": {"delete": {"tags": ["Node"], "summary": "Delete Ssh Key", "operationId": "delete_ssh_key_api_ssh_keys__key_id__delete", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "key_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Key Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/node/{node_id}/extra": {"put": {"tags": ["Node"], "summary": "Put Node Extra", "operationId": "put_node_extra_api_node__node_id__extra_put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "node_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Node Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NodeExtraIn"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/node/{node_id}/restart": {"post": {"tags": ["Node"], "summary": "Restart Node Core", "description": "restart the node's Xray (connects first if it isn't connected)", "operationId": "restart_node_core_api_node__node_id__restart_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "node_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Node Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/node/{node_id}/update-xray": {"post": {"tags": ["Node"], "summary": "Update Node Xray", "description": "give the node the panel's Xray (same version) over SSH and restart it", "operationId": "update_node_xray_api_node__node_id__update_xray_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "node_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Node Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/node/{node_id}/install-xray": {"post": {"tags": ["Node"], "summary": "Install Node Xray Version", "description": "Install a chosen Xray-core version on the node over SSH (the node downloads the XTLS\nrelease itself). The current binary is kept as xray.old and put back if the new one\ndoesn't run, so a node is never left without a working core.", "operationId": "install_node_xray_version_api_node__node_id__install_xray_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "node_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Node Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NodeXrayVersionIn"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/node/{node_id}/uninstall": {"post": {"tags": ["Node"], "summary": "Uninstall Node", "description": "remove everything Alexen put on the node's server (containers, firewall rules, tunnels, files)\nover SSH; other panels on it stay untouched", "operationId": "uninstall_node_api_node__node_id__uninstall_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "node_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Node Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/node/{node_id}/install": {"post": {"tags": ["Node"], "summary": "Install Node", "description": "install Marzban-node and/or the agent on the VPS over SSH (runs in the background)", "operationId": "install_node_api_node__node_id__install_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "node_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Node Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InstallIn"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/node-install/{job_id}": {"get": {"tags": ["Node"], "summary": "Install Status", "operationId": "install_status_api_node_install__job_id__get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "job_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Job Id"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "default": 0, "title": "Offset"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/nodes/system": {"get": {"tags": ["Node"], "summary": "Nodes System", "description": "CPU, memory, disk, uptime and network speed of the master and every node", "operationId": "nodes_system_api_nodes_system_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/online": {"get": {"tags": ["Online"], "summary": "Get Online Summary", "description": "Online users right now (main core, nodes and external panels).\nsort: 'ip' (default), 'devices' or 'external'.", "operationId": "get_online_summary_api_online_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "default": 50, "title": "Limit"}}, {"name": "sort", "in": "query", "required": false, "schema": {"type": "string", "default": "ip", "title": "Sort"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OnlineSummary"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/online/providers": {"get": {"tags": ["Online"], "summary": "Get Online Providers", "description": "ISP/provider of each online user's IPs, plus a per-provider breakdown", "operationId": "get_online_providers_api_online_providers_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OnlineProviders"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/user/{username}/online-ips/{ip}": {"delete": {"tags": ["Online"], "summary": "Disconnect User Ip", "description": "Kick one online IP of the user: block it, then drop the user's live sessions so it really disconnects", "operationId": "disconnect_user_ip_api_user__username__online_ips__ip__delete", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "ip", "in": "path", "required": true, "schema": {"type": "string", "title": "Ip"}}, {"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/user/{username}/online-ips/{ip}/unblock": {"post": {"tags": ["Online"], "summary": "Unblock User Ip", "description": "Lift a manual block on an IP so it can connect again right away", "operationId": "unblock_user_ip_api_user__username__online_ips__ip__unblock_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "ip", "in": "path", "required": true, "schema": {"type": "string", "title": "Ip"}}, {"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/user/{username}/online-ips": {"get": {"tags": ["Online"], "summary": "Get User Online Ips", "description": "IPs the user is connected from right now", "operationId": "get_user_online_ips_api_user__username__online_ips_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserOnlineIPs"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/stats/overview": {"get": {"tags": ["Stats"], "summary": "Stats Overview", "description": "System-wide statistics. Resellers see only their own users.", "operationId": "stats_overview_api_stats_overview_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StatsOverview"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/sub-settings": {"get": {"tags": ["Settings"], "summary": "Read Sub Settings", "description": "Subscription page settings: announcement, profile title and per-state metadata", "operationId": "read_sub_settings_api_sub_settings_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscriptionSettings"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["Settings"], "summary": "Update Sub Settings", "operationId": "update_sub_settings_api_sub_settings_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscriptionSettings"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscriptionSettings"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/ip-limit-settings": {"get": {"tags": ["Settings"], "summary": "Read Ip Limit Settings", "description": "Global IP-limit switch. Off = observe only (show connected IPs, block nothing).", "operationId": "read_ip_limit_settings_api_ip_limit_settings_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IPLimitSettings"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["Settings"], "summary": "Update Ip Limit Settings", "operationId": "update_ip_limit_settings_api_ip_limit_settings_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/IPLimitSettings"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IPLimitSettings"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/brand": {"get": {"tags": ["Settings"], "summary": "Read Brand", "description": "the panel's brand (name, vendor, support). Public: the login page shows it before sign-in.", "operationId": "read_brand_api_brand_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrandSettings"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}}, "put": {"tags": ["Settings"], "summary": "Update Brand", "description": "rebrand the whole panel — the creator only", "operationId": "update_brand_api_brand_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrandSettings"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrandSettings"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/user-cleanup": {"get": {"tags": ["Settings"], "summary": "Read User Cleanup", "description": "Auto-delete settings for expired users.", "operationId": "read_user_cleanup_api_user_cleanup_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserCleanupSettings"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["Settings"], "summary": "Update User Cleanup", "operationId": "update_user_cleanup_api_user_cleanup_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserCleanupSettings"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserCleanupSettings"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/external-configs": {"get": {"tags": ["Settings"], "summary": "Read External Configs", "description": "Extra config links added to every link-based subscription, and the order of links", "operationId": "read_external_configs_api_external_configs_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExternalSettings-Output"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["Settings"], "summary": "Update External Configs", "operationId": "update_external_configs_api_external_configs_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExternalSettings-Input"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExternalSettings-Output"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/external-configs/preview": {"post": {"tags": ["Settings"], "summary": "Preview External Configs", "description": "What a user's link subscription would look like with these (unsaved) settings", "operationId": "preview_external_configs_api_external_configs_preview_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Username"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExternalSettings-Input"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExternalPreview"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/external-configs/mine": {"get": {"tags": ["Settings"], "summary": "Read Own External", "description": "an admin's own external configs (when the sudo admin lets it edit them)", "operationId": "read_own_external_api_external_configs_mine_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OwnExternal"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["Settings"], "summary": "Update Own External", "operationId": "update_own_external_api_external_configs_mine_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OwnExternal"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OwnExternal"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/external-configs/sources": {"get": {"tags": ["Settings"], "summary": "External Sources Status", "description": "Last fetch/test result of every subscription source", "operationId": "external_sources_status_api_external_configs_sources_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/SourceStatus"}, "type": "array", "title": "Response External Sources Status Api External Configs Sources Get"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/external-configs/sources/{source_id}/refresh": {"post": {"tags": ["Settings"], "summary": "Refresh External Source", "description": "Fetch, test and rename one source now (runs in the background)", "operationId": "refresh_external_source_api_external_configs_sources__source_id__refresh_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "source_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Source Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/json-sub-settings": {"get": {"tags": ["Settings"], "summary": "Read Json Sub Settings", "description": "JSON subscription: clients, direct sites, external configs, the auto (balancer) config", "operationId": "read_json_sub_settings_api_json_sub_settings_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/JsonSubSettings"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["Settings"], "summary": "Update Json Sub Settings", "operationId": "update_json_sub_settings_api_json_sub_settings_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/JsonSubSettings"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/JsonSubSettings"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/sub-webpage": {"get": {"tags": ["Settings"], "summary": "Read Sub Webpage", "description": "What users see when they open their subscription link in a browser", "operationId": "read_sub_webpage_api_sub_webpage_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebPageSettings-Output"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["Settings"], "summary": "Update Sub Webpage", "operationId": "update_sub_webpage_api_sub_webpage_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebPageSettings-Input"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebPageSettings-Output"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/sub-webpage/default-apps": {"get": {"tags": ["Settings"], "summary": "Read Sub Webpage Default Apps", "description": "the built-in app catalog, per platform", "operationId": "read_sub_webpage_default_apps_api_sub_webpage_default_apps_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/sub-webpage/defaults": {"get": {"tags": ["Settings"], "summary": "Read Sub Webpage Defaults", "description": "the built-in app catalog and the page's own texts per language", "operationId": "read_sub_webpage_defaults_api_sub_webpage_defaults_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/sub-webpage/preview": {"post": {"tags": ["Settings"], "summary": "Preview Sub Webpage", "description": "the page as a user would see it, with settings that aren't saved yet", "operationId": "preview_sub_webpage_api_sub_webpage_preview_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebPagePreview"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/sub-domain": {"get": {"tags": ["Settings"], "summary": "Read Sub Domain", "description": "Which address, path and last part the subscription links use", "operationId": "read_sub_domain_api_sub_domain_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainState"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["Settings"], "summary": "Update Sub Domain", "operationId": "update_sub_domain_api_sub_domain_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainSettings"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainState"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/sub-domain/example": {"post": {"tags": ["Settings"], "summary": "Example Sub Domain", "description": "the link a user would get with these (unsaved) settings", "operationId": "example_sub_domain_api_sub_domain_example_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainSettings"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainState"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/admin/{name}/sub-profile": {"get": {"tags": ["Settings"], "summary": "Read Admin Sub Profile", "description": "an admin's own subscription domain, texts and external configs", "operationId": "read_admin_sub_profile_api_admin__name__sub_profile_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string", "title": "Name"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminSubProfile"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "put": {"tags": ["Settings"], "summary": "Update Admin Sub Profile", "operationId": "update_admin_sub_profile_api_admin__name__sub_profile_put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string", "title": "Name"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminSubProfile"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminSubProfile"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/admins/sub-profiles": {"get": {"tags": ["Settings"], "summary": "Admins Sub Profiles", "description": "which admins have their own domain, texts or external configs (for the admins list)", "operationId": "admins_sub_profiles_api_admins_sub_profiles_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/weather-location": {"get": {"tags": ["Settings"], "summary": "Get Weather Location", "description": "the current admin's own weather location (the widget calls Open-Meteo itself with these)", "operationId": "get_weather_location_api_weather_location_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WeatherLocation"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["Settings"], "summary": "Set Weather Location", "description": "set (or clear, by sending empty coordinates) the current admin's weather location", "operationId": "set_weather_location_api_weather_location_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WeatherLocation"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WeatherLocation"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/decorations": {"get": {"tags": ["Settings"], "summary": "Get Decorations", "description": "seasonal decoration flags, readable by any admin so the UI can render them", "operationId": "get_decorations_api_decorations_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Decorations"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["Settings"], "summary": "Set Decorations", "description": "turn seasonal decorations on/off (creator-only)", "operationId": "set_decorations_api_decorations_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Decorations"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Decorations"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/sub/{token}/": {"get": {"tags": ["Subscription"], "summary": "User Subscription", "description": "Provides a subscription link based on the user agent (Clash, V2Ray, etc.).", "operationId": "user_subscription_sub__token___get", "parameters": [{"name": "token", "in": "path", "required": true, "schema": {"type": "string", "title": "Token"}}, {"name": "user-agent", "in": "header", "required": false, "schema": {"type": "string", "default": "", "title": "User-Agent"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/sub/{token}/info": {"get": {"tags": ["Subscription"], "summary": "User Subscription Info", "description": "Retrieves detailed information about the user's subscription.", "operationId": "user_subscription_info_sub__token__info_get", "parameters": [{"name": "token", "in": "path", "required": true, "schema": {"type": "string", "title": "Token"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubscriptionUserResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/sub/{token}/usage": {"get": {"tags": ["Subscription"], "summary": "User Get Usage", "description": "Fetches the usage statistics for the user within a specified date range.", "operationId": "user_get_usage_sub__token__usage_get", "parameters": [{"name": "token", "in": "path", "required": true, "schema": {"type": "string", "title": "Token"}}, {"name": "start", "in": "query", "required": false, "schema": {"type": "string", "default": "", "title": "Start"}}, {"name": "end", "in": "query", "required": false, "schema": {"type": "string", "default": "", "title": "End"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/sub/{token}/vpn/{key}/{filename}": {"get": {"tags": ["Subscription"], "summary": "User Vpn Config", "description": "the user's AmneziaWG (.conf) or OpenVPN (.ovpn) file for one server (app/vpn)", "operationId": "user_vpn_config_sub__token__vpn__key___filename__get", "parameters": [{"name": "key", "in": "path", "required": true, "schema": {"type": "string", "title": "Key"}}, {"name": "filename", "in": "path", "required": true, "schema": {"type": "string", "title": "Filename"}}, {"name": "token", "in": "path", "required": true, "schema": {"type": "string", "title": "Token"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/sub/{token}/{extra}": {"get": {"tags": ["Subscription"], "summary": "User Subscription Extra", "description": "/<token>/<client type> picks the format; anything else after the token (a\nusername or any text, see Domain settings) is the normal subscription", "operationId": "user_subscription_extra_sub__token___extra__get", "parameters": [{"name": "extra", "in": "path", "required": true, "schema": {"type": "string", "title": "Extra"}}, {"name": "token", "in": "path", "required": true, "schema": {"type": "string", "title": "Token"}}, {"name": "user-agent", "in": "header", "required": false, "schema": {"type": "string", "default": "", "title": "User-Agent"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/sub/{token}/{extra}/{client_type}": {"get": {"tags": ["Subscription"], "summary": "User Subscription Extra Client Type", "description": "a link with a last part, plus a client type (e.g. Outline's /<token>/<name>/outline)", "operationId": "user_subscription_extra_client_type_sub__token___extra___client_type__get", "parameters": [{"name": "extra", "in": "path", "required": true, "schema": {"type": "string", "title": "Extra"}}, {"name": "client_type", "in": "path", "required": true, "schema": {"type": "string", "pattern": "^(sing-box|clash-meta|clash|outline|v2ray|v2ray-json)$", "title": "Client Type"}}, {"name": "token", "in": "path", "required": true, "schema": {"type": "string", "title": "Token"}}, {"name": "user-agent", "in": "header", "required": false, "schema": {"type": "string", "default": "", "title": "User-Agent"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/system": {"get": {"tags": ["System"], "summary": "Get System Stats", "description": "Fetch system stats including memory, CPU, and user metrics.", "operationId": "get_system_stats_api_system_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SystemStats"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/system/restart": {"post": {"tags": ["System"], "summary": "Restart Panel", "description": "Restart the panel. The process exits and the container (restart: always) brings it\nback up within a few seconds; subscriptions and nodes are unaffected by the brief blip.", "operationId": "restart_panel_api_system_restart_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/xray/versions": {"get": {"tags": ["System"], "summary": "Get Xray Versions", "description": "Installable Xray-core versions (XTLS releases), newest first, for the version picker.\nThe panel's current core version and each node's are reported separately (/system, /nodes).", "operationId": "get_xray_versions_api_xray_versions_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "default": 50, "title": "Limit"}}, {"name": "refresh", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Refresh"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/xray/install": {"post": {"tags": ["System"], "summary": "Install Xray Version", "description": "Install a chosen Xray-core version for the panel's own core. Guarded: a safety\nbackup is taken, the new binary must pass the live config, and the panel rolls back\nto the current core if the new one doesn't come up. Creator-only.", "operationId": "install_xray_version_api_xray_install_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/XrayVersionIn"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/xray/reset": {"post": {"tags": ["System"], "summary": "Reset Xray Version", "description": "Drop the pinned core and go back to the panel's own packaged Xray. Creator-only.", "operationId": "reset_xray_version_api_xray_reset_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/inbounds": {"get": {"tags": ["System"], "summary": "Get Inbounds", "description": "Retrieve inbound configurations grouped by protocol.", "operationId": "get_inbounds_api_inbounds_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"additionalProperties": {"items": {"$ref": "#/components/schemas/ProxyInbound"}, "type": "array"}, "propertyNames": {"$ref": "#/components/schemas/ProxyTypes"}, "type": "object", "title": "Response Get Inbounds Api Inbounds Get"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/hosts": {"get": {"tags": ["System"], "summary": "Get Hosts", "description": "Get a list of proxy hosts grouped by inbound tag.", "operationId": "get_hosts_api_hosts_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"additionalProperties": {"items": {"$ref": "#/components/schemas/ProxyHost"}, "type": "array"}, "type": "object", "title": "Response Get Hosts Api Hosts Get"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["System"], "summary": "Modify Hosts", "description": "Modify proxy hosts and update the configuration.", "operationId": "modify_hosts_api_hosts_put", "requestBody": {"content": {"application/json": {"schema": {"additionalProperties": {"items": {"$ref": "#/components/schemas/ProxyHost"}, "type": "array"}, "type": "object", "title": "Modified Hosts"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"additionalProperties": {"items": {"$ref": "#/components/schemas/ProxyHost"}, "type": "array"}, "type": "object", "title": "Response Modify Hosts Api Hosts Put"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/hosts/order": {"put": {"tags": ["System"], "summary": "Set Hosts Order", "description": "Set the order inbounds (with their hosts) take in subscriptions.", "operationId": "set_hosts_order_api_hosts_order_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HostOrder"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/traffic/live": {"get": {"tags": ["Traffic"], "summary": "Live Traffic", "description": "Current speed (bytes/s) per user, per inbound and per node", "operationId": "live_traffic_api_traffic_live_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/auto-change/status": {"get": {"tags": ["Traffic"], "summary": "Get Auto Change Status", "description": "cheap to poll: only the live part, plus where each rule's IP list stands", "operationId": "get_auto_change_status_api_auto_change_status_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/auto-change": {"get": {"tags": ["Traffic"], "summary": "Get Auto Change", "operationId": "get_auto_change_api_auto_change_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["Traffic"], "summary": "Put Auto Change", "operationId": "put_auto_change_api_auto_change_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RulesPayload"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/auto-change/{rule_id}/switch": {"post": {"tags": ["Traffic"], "summary": "Switch Now", "description": "Fire the rule's current stage right away", "operationId": "switch_now_api_auto_change__rule_id__switch_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "rule_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Rule Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/auto-change/{rule_id}/reset": {"post": {"tags": ["Traffic"], "summary": "Reset Rule", "description": "Back to stage 1, watching from now on; the hosts keep their address", "operationId": "reset_rule_api_auto_change__rule_id__reset_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "rule_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Rule Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/user_template": {"post": {"tags": ["User Template"], "summary": "Add User Template", "description": "Add a new user template\n\n- **name** can be up to 64 characters\n- **data_limit** must be in bytes and larger or equal to 0\n- **expire_duration** must be in seconds and larger or equat to 0\n- **inbounds** dictionary of protocol:inbound_tags, empty means all inbounds", "operationId": "add_user_template_api_user_template_post", "security": [{"OAuth2PasswordBearer": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserTemplateCreate"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserTemplateResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["User Template"], "summary": "Get User Templates", "description": "Get a list of User Templates with optional pagination", "operationId": "get_user_templates_api_user_template_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "title": "Offset"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "title": "Limit"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/UserTemplateResponse"}, "title": "Response Get User Templates Api User Template Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/user_template/{template_id}": {"get": {"tags": ["User Template"], "summary": "Get User Template Endpoint", "description": "Get User Template information with id", "operationId": "get_user_template_endpoint_api_user_template__template_id__get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "template_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Template Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserTemplateResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "put": {"tags": ["User Template"], "summary": "Modify User Template", "description": "Modify User Template\n\n- **name** can be up to 64 characters\n- **data_limit** must be in bytes and larger or equal to 0\n- **expire_duration** must be in seconds and larger or equat to 0\n- **inbounds** dictionary of protocol:inbound_tags, empty means all inbounds", "operationId": "modify_user_template_api_user_template__template_id__put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "template_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Template Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserTemplateModify"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserTemplateResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["User Template"], "summary": "Remove User Template", "description": "Remove a User Template by its ID", "operationId": "remove_user_template_api_user_template__template_id__delete", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "template_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Template Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/user": {"post": {"tags": ["User"], "summary": "Add User", "description": "Add a new user\n\n- **username**: 3 to 32 characters, can include a-z, 0-9, and underscores.\n- **status**: User's status, defaults to `active`. Special rules if `on_hold`.\n- **expire**: UTC timestamp for account expiration. Use `0` for unlimited.\n- **data_limit**: Max data usage in bytes (e.g., `1073741824` for 1GB). `0` means unlimited.\n- **data_limit_reset_strategy**: Defines how/if data limit resets. `no_reset` means it never resets.\n- **proxies**: Dictionary of protocol settings (e.g., `vmess`, `vless`).\n- **inbounds**: Dictionary of protocol tags to specify inbound connections.\n- **note**: Optional text field for additional user information or notes.\n- **on_hold_timeout**: UTC timestamp when `on_hold` status should start or end.\n- **on_hold_expire_duration**: Duration (in seconds) for how long the user should stay in `on_hold` status.\n- **next_plan**: Next user plan (resets after use).", "operationId": "add_user_api_user_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserCreate"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "400": {"description": "Bad request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPException"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Conflict"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/user/{username}": {"get": {"tags": ["User"], "summary": "Get User", "description": "Get user information", "operationId": "get_user_api_user__username__get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "put": {"tags": ["User"], "summary": "Modify User", "description": "Modify an existing user\n\n- **username**: Cannot be changed. Used to identify the user.\n- **status**: User's new status. Can be 'active', 'disabled', 'on_hold', 'limited', or 'expired'.\n- **expire**: UTC timestamp for new account expiration. Set to `0` for unlimited, `null` for no change.\n- **data_limit**: New max data usage in bytes (e.g., `1073741824` for 1GB). Set to `0` for unlimited, `null` for no change.\n- **data_limit_reset_strategy**: New strategy for data limit reset. Options include 'daily', 'weekly', 'monthly', or 'no_reset'.\n- **proxies**: Dictionary of new protocol settings (e.g., `vmess`, `vless`). Empty dictionary means no change.\n- **inbounds**: Dictionary of new protocol tags to specify inbound connections. Empty dictionary means no change.\n- **note**: New optional text for additional user information or notes. `null` means no change.\n- **on_hold_timeout**: New UTC timestamp for when `on_hold` status should start or end. Only applicable if status is changed to 'on_hold'.\n- **on_hold_expire_duration**: New duration (in seconds) for how long the user should stay in `on_hold` status. Only applicable if status is changed to 'on_hold'.\n- **next_plan**: Next user plan (resets after use).\n\nNote: Fields set to `null` or omitted will not be modified.", "operationId": "modify_user_api_user__username__put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserModify"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "400": {"description": "Bad request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPException"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["User"], "summary": "Remove User", "description": "Remove a user", "operationId": "remove_user_api_user__username__delete", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/user/{username}/reset": {"post": {"tags": ["User"], "summary": "Reset User Data Usage", "description": "Reset user data usage", "operationId": "reset_user_data_usage_api_user__username__reset_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/user/{username}/revoke_sub": {"post": {"tags": ["User"], "summary": "Revoke User Subscription", "description": "Revoke users subscription (Subscription link and proxies)", "operationId": "revoke_user_subscription_api_user__username__revoke_sub_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/user/{username}/sub-token": {"put": {"tags": ["User"], "summary": "Set User Sub Token", "description": "Give a user a fixed, readable subscription token (/sub/<token>), or take it away.\nWhile it is set only it opens the subscription: the default signed link stops working.\nSudo admins and the user's own admin.", "operationId": "set_user_sub_token_api_user__username__sub_token_put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubTokenIn"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "400": {"description": "Bad request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPException"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Conflict"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/user/{username}/rename": {"put": {"tags": ["User"], "summary": "Rename User", "description": "Change a user's username (sudo admins and the user's own admin). Usage, limits and\ndevices stay with the user; the Xray clients are re-keyed. The default subscription link\ncarries the name, so it stops working: the new link (or a custom token, which is kept)\nmust be given to the customer.", "operationId": "rename_user_api_user__username__rename_put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RenameIn"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "400": {"description": "Bad request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPException"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Conflict"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/users": {"get": {"tags": ["User"], "summary": "Get Users", "description": "Get all users", "operationId": "get_users_api_users_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "title": "Offset"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "title": "Limit"}}, {"name": "username", "in": "query", "required": false, "schema": {"type": "array", "items": {"type": "string"}, "title": "Username"}}, {"name": "search", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Search"}}, {"name": "admin", "in": "query", "required": false, "schema": {"anyOf": [{"type": "array", "items": {"type": "string"}}, {"type": "null"}], "title": "Admin"}}, {"name": "status", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/UserStatus"}}, {"name": "sort", "in": "query", "required": false, "schema": {"type": "string", "title": "Sort"}}, {"name": "expiring_within", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "description": "only users whose expiry is within this many seconds from now", "title": "Expiring Within"}, "description": "only users whose expiry is within this many seconds from now"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UsersResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "400": {"description": "Bad request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPException"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/users/bulk/protocol": {"post": {"tags": ["User"], "summary": "Bulk Protocol", "description": "Turn a protocol on or off for many users at once (e.g. give every user Hysteria).\n\nA sudo admin may target every user, or one owner's with `admin`, or a list with\n`usernames`. A newly enabled protocol gives the user every inbound of that type.", "operationId": "bulk_protocol_api_users_bulk_protocol_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BulkProtocol"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "400": {"description": "Bad request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPException"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/users/transfer": {"post": {"tags": ["User"], "summary": "Transfer Users", "description": "Move users from one admin to another, one by one (usernames) or all of an admin's\n(from_admin). A sudo admin can't see or move the creator accounts' users.", "operationId": "transfer_users_api_users_transfer_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TransferUsers"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "400": {"description": "Bad request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPException"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/users/reset": {"post": {"tags": ["User"], "summary": "Reset Users Data Usage", "description": "Reset all users data usage", "operationId": "reset_users_data_usage_api_users_reset_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/user/{username}/usage": {"get": {"tags": ["User"], "summary": "Get User Usage", "description": "Get users usage", "operationId": "get_user_usage_api_user__username__usage_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}, {"name": "start", "in": "query", "required": false, "schema": {"type": "string", "default": "", "title": "Start"}}, {"name": "end", "in": "query", "required": false, "schema": {"type": "string", "default": "", "title": "End"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserUsagesResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/user/{username}/inbound-usage": {"get": {"tags": ["User"], "summary": "Get User Inbound Usage", "description": "Get users usage per inbound (since the last usage reset)", "operationId": "get_user_inbound_usage_api_user__username__inbound_usage_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserInboundUsagesResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/user/{username}/devices": {"get": {"tags": ["User"], "summary": "Get User Devices", "description": "Devices (HWID) the user fetched the subscription from", "operationId": "get_user_devices_api_user__username__devices_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserHWIDDevicesResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["User"], "summary": "Remove User Devices", "description": "Forget all devices of the user", "operationId": "remove_user_devices_api_user__username__devices_delete", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/user/{username}/devices/{device_id}": {"delete": {"tags": ["User"], "summary": "Remove User Device", "description": "Forget one device of the user, so another one can take its place", "operationId": "remove_user_device_api_user__username__devices__device_id__delete", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "device_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Device Id"}}, {"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/user/{username}/active-next": {"post": {"tags": ["User"], "summary": "Active Next Plan", "description": "Reset user by next plan", "operationId": "active_next_plan_api_user__username__active_next_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "Not found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/users/usage": {"get": {"tags": ["User"], "summary": "Get Users Usage", "description": "Get all users usage", "operationId": "get_users_usage_api_users_usage_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "start", "in": "query", "required": false, "schema": {"type": "string", "default": "", "title": "Start"}}, {"name": "end", "in": "query", "required": false, "schema": {"type": "string", "default": "", "title": "End"}}, {"name": "admin", "in": "query", "required": false, "schema": {"anyOf": [{"type": "array", "items": {"type": "string"}}, {"type": "null"}], "title": "Admin"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UsersUsagesResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/user/{username}/set-owner": {"put": {"tags": ["User"], "summary": "Set Owner", "description": "Set a new owner (admin) for a user.", "operationId": "set_owner_api_user__username__set_owner_put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}, {"name": "admin_username", "in": "query", "required": true, "schema": {"type": "string", "title": "Admin Username"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/users/expired": {"get": {"tags": ["User"], "summary": "Get Expired Users", "description": "Get users who have expired within the specified date range.\n\n- **expired_after** UTC datetime (optional)\n- **expired_before** UTC datetime (optional)\n- At least one of expired_after or expired_before must be provided for filtering\n- If both are omitted, returns all expired users", "operationId": "get_expired_users_api_users_expired_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "expired_after", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "examples": ["2024-01-01T00:00:00"], "title": "Expired After"}}, {"name": "expired_before", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "examples": ["2024-01-31T23:59:59"], "title": "Expired Before"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"type": "string"}, "title": "Response Get Expired Users Api Users Expired Get"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["User"], "summary": "Delete Expired Users", "description": "Delete users who have expired within the specified date range.\n\n- **expired_after** UTC datetime (optional)\n- **expired_before** UTC datetime (optional)\n- At least one of expired_after or expired_before must be provided", "operationId": "delete_expired_users_api_users_expired_delete", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "expired_after", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "examples": ["2024-01-01T00:00:00"], "title": "Expired After"}}, {"name": "expired_before", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "examples": ["2024-01-31T23:59:59"], "title": "Expired Before"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"type": "string"}, "title": "Response Delete Expired Users Api Users Expired Delete"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/users/delete-expired": {"post": {"tags": ["User"], "summary": "Delete All Expired Users", "description": "Delete ALL currently expired users in one go (no date range, no grace period).\nWith include_limited/include_disabled, those users are removed too. Scoped to the admin's\nown users unless the admin is sudo.", "operationId": "delete_all_expired_users_api_users_delete_expired_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "include_limited", "in": "query", "required": false, "schema": {"type": "boolean", "description": "also delete data-limited users", "default": false, "title": "Include Limited"}, "description": "also delete data-limited users"}, {"name": "include_disabled", "in": "query", "required": false, "schema": {"type": "boolean", "description": "also delete disabled users", "default": false, "title": "Include Disabled"}, "description": "also delete disabled users"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"type": "string"}, "title": "Response Delete All Expired Users Api Users Delete Expired Post"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/": {"get": {"summary": "Base", "operationId": "base__get", "responses": {"200": {"description": "Successful Response", "content": {"text/html": {"schema": {"type": "string"}}}}}}}, "/api/vpn": {"get": {"tags": ["VPN"], "summary": "Get Vpn", "operationId": "get_vpn_api_vpn_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/vpn/devices": {"put": {"tags": ["VPN"], "summary": "Put Devices", "description": "AmneziaWG files per user (one per device)", "operationId": "put_devices_api_vpn_devices_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevicesIn"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/vpn/servers/{key}": {"put": {"tags": ["VPN"], "summary": "Put Server", "operationId": "put_server_api_vpn_servers__key__put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "key", "in": "path", "required": true, "schema": {"type": "string", "title": "Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ServerIn"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/vpn/servers/{key}/reset-pin": {"post": {"tags": ["VPN"], "summary": "Reset Pin", "description": "trust the agent's certificate again (after reinstalling the agent)", "operationId": "reset_pin_api_vpn_servers__key__reset_pin_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "key", "in": "path", "required": true, "schema": {"type": "string", "title": "Key"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/vpn/servers/{key}/new-awg-params": {"post": {"tags": ["VPN"], "summary": "New Awg Params", "description": "fresh random obfuscation values (users then need the new config)", "operationId": "new_awg_params_api_vpn_servers__key__new_awg_params_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "key", "in": "path", "required": true, "schema": {"type": "string", "title": "Key"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/vpn/install": {"get": {"tags": ["VPN"], "summary": "Install Command", "description": "the command that installs the agent on a server", "operationId": "install_command_api_vpn_install_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/chain": {"get": {"tags": ["Chain"], "summary": "Get Chain", "operationId": "get_chain_api_chain_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/chain/{relay}": {"put": {"tags": ["Chain"], "summary": "Put Chain", "operationId": "put_chain_api_chain__relay__put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "relay", "in": "path", "required": true, "schema": {"type": "string", "title": "Relay"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LinkIn"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/chain/{key}/exit": {"put": {"tags": ["Chain"], "summary": "Put Exit", "description": "leave this server through one of its core's outbounds / balancers", "operationId": "put_exit_api_chain__key__exit_put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "key", "in": "path", "required": true, "schema": {"type": "string", "title": "Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExitIn"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/chain/{key}/inbounds": {"put": {"tags": ["Chain"], "summary": "Put Inbound Exits", "description": "choose where the users of these inbounds leave (several inbounds may share one server)", "operationId": "put_inbound_exits_api_chain__key__inbounds_put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "key", "in": "path", "required": true, "schema": {"type": "string", "title": "Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InboundExitIn"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/chain/{key}/check": {"post": {"tags": ["Chain"], "summary": "Check Exit", "description": "open a few sites from this server, the way its users' traffic leaves", "operationId": "check_exit_api_chain__key__check_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "key", "in": "path", "required": true, "schema": {"type": "string", "title": "Key"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/overview": {"get": {"tags": ["Overview"], "summary": "Overview", "operationId": "overview_api_overview_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "period", "in": "query", "required": false, "schema": {"type": "string", "default": "24h", "title": "Period"}}, {"name": "tz", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 900, "minimum": -900, "default": 0, "title": "Tz"}}, {"name": "start", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Start"}}, {"name": "end", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "End"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/activity": {"get": {"tags": ["Activity"], "summary": "Activity", "operationId": "activity_api_activity_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "kind", "in": "query", "required": false, "schema": {"type": "string", "pattern": "^(all|logins|changes|failed)$", "default": "all", "title": "Kind"}}, {"name": "admin", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Admin"}}, {"name": "q", "in": "query", "required": false, "schema": {"type": "string", "default": "", "title": "Q"}}, {"name": "before", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Before"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 500, "minimum": 1, "default": 100, "title": "Limit"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/anti-theft": {"get": {"tags": ["Notifications"], "summary": "Read Anti Theft", "operationId": "read_anti_theft_api_anti_theft_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TheftSettings"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["Notifications"], "summary": "Update Anti Theft", "operationId": "update_anti_theft_api_anti_theft_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TheftSettings"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TheftSettings"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/alerts": {"get": {"tags": ["Notifications"], "summary": "List Alerts", "operationId": "list_alerts_api_alerts_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "unread", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Unread"}}, {"name": "before", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Before"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "default": 100, "title": "Limit"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/alerts/read": {"post": {"tags": ["Notifications"], "summary": "Read Alerts", "operationId": "read_alerts_api_alerts_read_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReadBody"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/messages/threads": {"get": {"tags": ["Notifications"], "summary": "Message Threads", "description": "sudo: one thread per admin; an admin: its own thread with the sudo admins", "operationId": "message_threads_api_messages_threads_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/messages/{thread}": {"get": {"tags": ["Notifications"], "summary": "Read Messages", "operationId": "read_messages_api_messages__thread__get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "thread", "in": "path", "required": true, "schema": {"type": "string", "title": "Thread"}}, {"name": "after", "in": "query", "required": false, "schema": {"type": "integer", "default": 0, "title": "After"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["Notifications"], "summary": "Send Message", "operationId": "send_message_api_messages__thread__post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "thread", "in": "path", "required": true, "schema": {"type": "string", "title": "Thread"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageIn"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/messages/{thread}/media": {"post": {"tags": ["Notifications"], "summary": "Send Media", "description": "attach an image/audio/video (optionally with a caption)", "operationId": "send_media_api_messages__thread__media_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "thread", "in": "path", "required": true, "schema": {"type": "string", "title": "Thread"}}], "requestBody": {"required": true, "content": {"multipart/form-data": {"schema": {"$ref": "#/components/schemas/Body_send_media_api_messages__thread__media_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/messages/media/{msg_id}": {"get": {"tags": ["Notifications"], "summary": "Get Media", "description": "stream a message attachment (access checked against the message's thread)", "operationId": "get_media_api_messages_media__msg_id__get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "msg_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Msg Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/messages/{thread}/{msg_id}": {"put": {"tags": ["Notifications"], "summary": "Edit Message", "description": "edit the text of your own message", "operationId": "edit_message_api_messages__thread___msg_id__put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "thread", "in": "path", "required": true, "schema": {"type": "string", "title": "Thread"}}, {"name": "msg_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Msg Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageEdit"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["Notifications"], "summary": "Delete Message", "description": "delete your own message (and its attachment, if any)", "operationId": "delete_message_api_messages__thread___msg_id__delete", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "thread", "in": "path", "required": true, "schema": {"type": "string", "title": "Thread"}}, {"name": "msg_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Msg Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/notify/counts": {"get": {"tags": ["Notifications"], "summary": "Notify Counts", "operationId": "notify_counts_api_notify_counts_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/user/{username}/warning": {"put": {"tags": ["Notifications"], "summary": "Set User Warning", "operationId": "set_user_warning_api_user__username__warning_put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "username", "in": "path", "required": true, "schema": {"type": "string", "title": "Username"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WarningIn"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/outbounds/test": {"post": {"tags": ["Outbounds"], "summary": "Test Outbounds", "operationId": "test_outbounds_api_outbounds_test_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TestIn"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/outbounds/traffic": {"get": {"tags": ["Outbounds"], "summary": "Get Traffic", "operationId": "get_traffic_api_outbounds_traffic_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/outbounds/traffic/reset": {"post": {"tags": ["Outbounds"], "summary": "Reset Traffic", "operationId": "reset_traffic_api_outbounds_traffic_reset_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ResetIn"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/backup": {"get": {"tags": ["Backup"], "summary": "Download Backup", "description": "a backup of the panel as it is now (zip)", "operationId": "download_backup_api_backup_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/backup/list": {"get": {"tags": ["Backup"], "summary": "List Backups", "operationId": "list_backups_api_backup_list_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/backup/now": {"post": {"tags": ["Backup"], "summary": "Backup Now", "description": "write a backup to the server's backups folder", "operationId": "backup_now_api_backup_now_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/backup/file/{name}": {"get": {"tags": ["Backup"], "summary": "Download Saved", "operationId": "download_saved_api_backup_file__name__get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string", "title": "Name"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["Backup"], "summary": "Delete Saved", "operationId": "delete_saved_api_backup_file__name__delete", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "name", "in": "path", "required": true, "schema": {"type": "string", "title": "Name"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/backup/check": {"post": {"tags": ["Backup"], "summary": "Check Backup", "description": "what a backup file contains (nothing is changed)", "operationId": "check_backup_api_backup_check_post", "requestBody": {"content": {"multipart/form-data": {"schema": {"$ref": "#/components/schemas/Body_check_backup_api_backup_check_post"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/backup/restore": {"post": {"tags": ["Backup"], "summary": "Restore Backup", "description": "replace the panel's data with a backup, then restart (the current state is saved first)", "operationId": "restore_backup_api_backup_restore_post", "requestBody": {"content": {"multipart/form-data": {"schema": {"$ref": "#/components/schemas/Body_restore_backup_api_backup_restore_post"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/update": {"get": {"tags": ["Update"], "summary": "Update State", "description": "the panel version, the latest one, and how an update goes", "operationId": "update_state_api_update_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateState"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "post": {"tags": ["Update"], "summary": "Start Update", "description": "update the panel to the latest version (backup first, the old version back if it fails)", "operationId": "start_update_api_update_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateState"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/update/check": {"post": {"tags": ["Update"], "summary": "Check For Update", "description": "ask the updater to look for a new version", "operationId": "check_for_update_api_update_check_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateState"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/telegram": {"get": {"tags": ["Telegram"], "summary": "Read Bot", "operationId": "read_bot_api_telegram_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BotView"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["Telegram"], "summary": "Update Bot", "description": "save and (re)start the bot; a new token is checked with Telegram first", "operationId": "update_bot_api_telegram_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BotUpdate"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BotView"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/telegram/test": {"post": {"tags": ["Telegram"], "summary": "Test Bot", "description": "a message to every admin id: id -> \"\" when it went, else why not", "operationId": "test_bot_api_telegram_test_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Response Test Bot Api Telegram Test Post"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/telegram/backup": {"post": {"tags": ["Telegram"], "summary": "Send Backup Now", "description": "a backup to every admin now", "operationId": "send_backup_now_api_telegram_backup_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Response Send Backup Now Api Telegram Backup Post"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/license": {"get": {"tags": ["License"], "summary": "Get License", "description": "the license: everyone sees what it allows, the creator also how it talks to the server", "operationId": "get_license_api_license_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LicenseState"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/license/activate": {"post": {"tags": ["License"], "summary": "Activate", "description": "bind a license key to this server (an empty key: the one saved here again)", "operationId": "activate_api_license_activate_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ActivateBody"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LicenseState"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/license/check": {"post": {"tags": ["License"], "summary": "Check Now", "description": "ask the license server now (after a renewal, a change of limits)", "operationId": "check_now_api_license_check_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LicenseState"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/license/dismiss-message": {"post": {"tags": ["License"], "summary": "Dismiss Message", "description": "any admin can dismiss the seller's message once they've read it", "operationId": "dismiss_message_api_license_dismiss_message_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/profile": {"get": {"tags": ["Profile"], "summary": "Get Profile", "description": "my profile", "operationId": "get_profile_api_profile_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Profile"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["Profile"], "summary": "Edit Profile", "description": "change my picture, name, bio or contact (a field left out stays as it is)", "operationId": "edit_profile_api_profile_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProfileEdit"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Profile"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/profile/password": {"post": {"tags": ["Profile"], "summary": "Change Password", "description": "my own password: the current one first; my other sessions end, this one goes on", "operationId": "change_password_api_profile_password_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PasswordChange"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/profiles": {"get": {"tags": ["Profile"], "summary": "List Profiles", "description": "the admins' names and pictures, for the admins list (the ones this admin may see)", "operationId": "list_profiles_api_profiles_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"additionalProperties": {"$ref": "#/components/schemas/PublicProfile"}, "type": "object", "title": "Response List Profiles Api Profiles Get"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/external-panels": {"get": {"tags": ["External Panel"], "summary": "List Panels", "operationId": "list_panels_api_external_panels_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/ExternalPanelResponse"}, "type": "array", "title": "Response List Panels Api External Panels Get"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "post": {"tags": ["External Panel"], "summary": "Create Panel", "operationId": "create_panel_api_external_panels_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExternalPanelCreate"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExternalPanelResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Conflict"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/external-panels/{panel_id}": {"put": {"tags": ["External Panel"], "summary": "Modify Panel", "operationId": "modify_panel_api_external_panels__panel_id__put", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "panel_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Panel Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExternalPanelModify"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExternalPanelResponse"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["External Panel"], "summary": "Delete Panel", "operationId": "delete_panel_api_external_panels__panel_id__delete", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "panel_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Panel Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/external-panels/test": {"post": {"tags": ["External Panel"], "summary": "Test Unsaved", "description": "Try to log in with the given (unsaved) settings and count inbounds.", "operationId": "test_unsaved_api_external_panels_test_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExternalPanelCreate"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/external-panels/{panel_id}/test": {"post": {"tags": ["External Panel"], "summary": "Test Panel", "operationId": "test_panel_api_external_panels__panel_id__test_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "panel_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Panel Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/external-panels/{panel_id}/inbounds": {"get": {"tags": ["External Panel"], "summary": "Panel Inbounds", "operationId": "panel_inbounds_api_external_panels__panel_id__inbounds_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "panel_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Panel Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/external-panels/{panel_id}/stats": {"get": {"tags": ["External Panel"], "summary": "Panel Stats", "description": "Live traffic / online for the panel (poll this for near-real-time display).", "operationId": "panel_stats_api_external_panels__panel_id__stats_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "panel_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Panel Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/external-panels/{panel_id}/provision": {"post": {"tags": ["External Panel"], "summary": "Provision Users", "description": "Create the scoped Alexen users AS CLIENTS on the external panel's chosen inbound(s).\nWe let the panel assign the uuids and give each client a deterministic subId; the user's\nsubscription then pulls the panel's OWN share links for that subId (always valid).", "operationId": "provision_users_api_external_panels__panel_id__provision_post", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "panel_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Panel Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProvisionOptions"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/blocked-ips": {"get": {"tags": ["Blocked IPs"], "summary": "Get Blocked", "operationId": "get_blocked_api_blocked_ips_get", "security": [{"OAuth2PasswordBearer": []}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}}, "post": {"tags": ["Blocked IPs"], "summary": "Block", "operationId": "block_api_blocked_ips_post", "security": [{"OAuth2PasswordBearer": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BlockIn"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["Blocked IPs"], "summary": "Unblock", "operationId": "unblock_api_blocked_ips_delete", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "ip", "in": "query", "required": true, "schema": {"type": "string", "title": "Ip"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/blocked-ips/auto": {"put": {"tags": ["Blocked IPs"], "summary": "Auto", "operationId": "auto_api_blocked_ips_auto_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AutoIn"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/note-link": {"get": {"tags": ["Note links"], "summary": "Read Note Link", "description": "Whether the link in a user's note is used as their subscription link, which link starts count,\nhow many users have such a note, and the state of the webhook that usually writes it.", "operationId": "read_note_link_api_note_link_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NoteLinkState"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["Note links"], "summary": "Update Note Link", "description": "Turn the note link on or off and set the link starts (`prefixes`, each starting with https://).", "operationId": "update_note_link_api_note_link_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/NoteLinkSettings"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NoteLinkState"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/sub-stats/summary": {"get": {"tags": ["Subscription statistics"], "summary": "Summary", "operationId": "summary_api_sub_stats_summary_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "hours", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 8760, "minimum": 1, "default": 24, "title": "Hours"}}, {"name": "top", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 200, "minimum": 5, "default": 30, "title": "Top"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/sub-stats/log": {"get": {"tags": ["Subscription statistics"], "summary": "Log", "operationId": "log_api_sub_stats_log_get", "security": [{"OAuth2PasswordBearer": []}], "parameters": [{"name": "user", "in": "query", "required": false, "schema": {"type": "string", "default": "", "title": "User"}}, {"name": "ip", "in": "query", "required": false, "schema": {"type": "string", "default": "", "title": "Ip"}}, {"name": "app", "in": "query", "required": false, "schema": {"type": "string", "default": "", "title": "App"}}, {"name": "fmt", "in": "query", "required": false, "schema": {"type": "string", "default": "", "title": "Fmt"}}, {"name": "status", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Status"}}, {"name": "hours", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 8760, "minimum": 1, "default": 24, "title": "Hours"}}, {"name": "before", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Before"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 500, "minimum": 1, "default": 100, "title": "Limit"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/sub-stats/settings": {"get": {"tags": ["Subscription statistics"], "summary": "Get Stats Settings", "operationId": "get_stats_settings_api_sub_stats_settings_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StatsSettingsOut"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}, "put": {"tags": ["Subscription statistics"], "summary": "Put Stats Settings", "operationId": "put_stats_settings_api_sub_stats_settings_put", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/StatsSettingsIn"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StatsSettingsOut"}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/sub-stats": {"delete": {"tags": ["Subscription statistics"], "summary": "Clear", "operationId": "clear_api_sub_stats_delete", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "401": {"description": "Unauthorized", "headers": {"WWW-Authenticate": {"description": "Authentication type", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Unauthorized"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}}, "components": {"schemas": {"AWGIn": {"properties": {"enabled": {"type": "boolean", "title": "Enabled", "default": false}, "address": {"type": "string", "title": "Address", "default": ""}, "port": {"type": "integer", "title": "Port", "default": 51820}, "subnet": {"type": "string", "title": "Subnet", "default": "10.66.0.0/16"}, "mtu": {"type": "integer", "title": "Mtu", "default": 1420}, "dns": {"items": {"type": "string"}, "type": "array", "title": "Dns", "default": ["1.1.1.1", "8.8.8.8"]}, "keepalive": {"type": "integer", "title": "Keepalive", "default": 25}, "params": {"additionalProperties": {"type": "integer"}, "type": "object", "title": "Params", "default": {}}}, "type": "object", "title": "AWGIn"}, "ActivateBody": {"properties": {"key": {"type": "string", "title": "Key", "default": ""}}, "type": "object", "title": "ActivateBody"}, "Admin": {"properties": {"username": {"type": "string", "title": "Username"}, "is_sudo": {"type": "boolean", "title": "Is Sudo"}, "is_creator": {"type": "boolean", "title": "Is Creator", "default": false}, "telegram_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Telegram Id"}, "discord_webhook": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Discord Webhook"}, "users_usage": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Users Usage"}, "users_limit": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Users Limit", "description": "max users, null/0 means unlimited"}, "traffic_limit": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Traffic Limit", "description": "max data limit (bytes) the admin can hand out in total, null/0 means unlimited"}, "expire_date": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Expire Date"}, "max_user_ip_limit": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Max User Ip Limit", "description": "cap for each user's ip_limit"}, "max_user_hwid_limit": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Max User Hwid Limit", "description": "cap for each user's hwid_limit"}, "host_groups": {"items": {"type": "string"}, "type": "array", "title": "Host Groups", "description": "host groups of the admin's users, empty means all"}, "can_copy_configs": {"type": "boolean", "title": "Can Copy Configs", "default": true}, "can_edit_limits": {"type": "boolean", "title": "Can Edit Limits", "default": true}, "users_created": {"type": "integer", "title": "Users Created", "default": 0}, "users_deleted": {"type": "integer", "title": "Users Deleted", "default": 0}, "total_users": {"type": "integer", "title": "Total Users", "default": 0}}, "type": "object", "required": ["username", "is_sudo"], "title": "Admin"}, "AdminCreate": {"properties": {"username": {"type": "string", "title": "Username"}, "is_sudo": {"type": "boolean", "title": "Is Sudo"}, "is_creator": {"type": "boolean", "title": "Is Creator", "default": false}, "telegram_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Telegram Id"}, "discord_webhook": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Discord Webhook"}, "users_usage": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Users Usage"}, "users_limit": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Users Limit", "description": "max users, null/0 means unlimited"}, "traffic_limit": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Traffic Limit", "description": "max data limit (bytes) the admin can hand out in total, null/0 means unlimited"}, "expire_date": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Expire Date"}, "max_user_ip_limit": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Max User Ip Limit", "description": "cap for each user's ip_limit"}, "max_user_hwid_limit": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Max User Hwid Limit", "description": "cap for each user's hwid_limit"}, "host_groups": {"items": {"type": "string"}, "type": "array", "title": "Host Groups", "description": "host groups of the admin's users, empty means all"}, "can_copy_configs": {"type": "boolean", "title": "Can Copy Configs", "default": true}, "can_edit_limits": {"type": "boolean", "title": "Can Edit Limits", "default": true}, "users_created": {"type": "integer", "title": "Users Created", "default": 0}, "users_deleted": {"type": "integer", "title": "Users Deleted", "default": 0}, "total_users": {"type": "integer", "title": "Total Users", "default": 0}, "password": {"type": "string", "title": "Password"}}, "type": "object", "required": ["username", "is_sudo", "password"], "title": "AdminCreate"}, "AdminDomain": {"properties": {"url_prefix": {"type": "string", "maxLength": 300, "title": "Url Prefix", "default": ""}, "suffix": {"anyOf": [{"type": "string", "maxLength": 100}, {"type": "null"}], "title": "Suffix"}, "path": {"anyOf": [{"type": "string", "maxLength": 64}, {"type": "null"}], "title": "Path"}, "mode": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mode"}}, "type": "object", "title": "AdminDomain", "description": "an admin's own address for its users' links; empty fields: the general ones"}, "AdminExternal": {"properties": {"enabled": {"type": "boolean", "title": "Enabled", "default": true}, "label": {"type": "string", "maxLength": 64, "title": "Label", "default": ""}, "self_edit": {"type": "boolean", "title": "Self Edit", "default": false}, "include_general": {"type": "boolean", "title": "Include General", "default": true}, "configs": {"items": {"$ref": "#/components/schemas/ExternalConfig"}, "type": "array", "title": "Configs", "default": []}}, "type": "object", "title": "AdminExternal", "description": "an admin's own external configs: its users get them below the general ones"}, "AdminModify": {"properties": {"password": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Password"}, "is_sudo": {"type": "boolean", "title": "Is Sudo"}, "is_creator": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Creator"}, "telegram_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Telegram Id"}, "discord_webhook": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Discord Webhook"}, "users_limit": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Users Limit"}, "traffic_limit": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Traffic Limit"}, "expire_date": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Expire Date"}, "max_user_ip_limit": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Max User Ip Limit"}, "max_user_hwid_limit": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Max User Hwid Limit"}, "host_groups": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Host Groups"}, "can_copy_configs": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Can Copy Configs"}, "can_edit_limits": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Can Edit Limits"}}, "type": "object", "required": ["is_sudo"], "title": "AdminModify"}, "AdminSubProfile": {"properties": {"url_prefix": {"type": "string", "title": "Url Prefix", "default": ""}, "suffix": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Suffix"}, "sub_path": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sub Path"}, "mode": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mode"}, "templates": {"$ref": "#/components/schemas/AdminSubTemplates", "default": {"default_template": "", "expired_template": "", "disabled_template": "", "limited_template": "", "near_expire_template": ""}}, "external_enabled": {"type": "boolean", "title": "External Enabled", "default": true}, "external_label": {"type": "string", "title": "External Label", "default": ""}, "external_self_edit": {"type": "boolean", "title": "External Self Edit", "default": false}, "external_include_general": {"type": "boolean", "title": "External Include General", "default": true}, "external_count": {"type": "integer", "title": "External Count", "default": 0}, "example": {"type": "string", "title": "Example", "default": ""}}, "type": "object", "title": "AdminSubProfile"}, "AdminSubTemplates": {"properties": {"default_template": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Default Template", "default": ""}, "expired_template": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Expired Template", "default": ""}, "disabled_template": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Disabled Template", "default": ""}, "limited_template": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Limited Template", "default": ""}, "near_expire_template": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Near Expire Template", "default": ""}}, "type": "object", "title": "AdminSubTemplates"}, "App": {"properties": {"id": {"type": "string", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "featured": {"type": "boolean", "title": "Featured", "default": false}, "deeplink": {"type": "string", "title": "Deeplink", "default": ""}, "crypt": {"type": "boolean", "title": "Crypt", "default": false}, "install": {"items": {"$ref": "#/components/schemas/Button"}, "type": "array", "title": "Install", "default": []}, "note": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Note", "default": {}}}, "type": "object", "required": ["id", "name"], "title": "App"}, "AutoIn": {"properties": {"enabled": {"type": "boolean", "title": "Enabled"}}, "type": "object", "required": ["enabled"], "title": "AutoIn"}, "BackupSchedule": {"properties": {"enabled": {"type": "boolean", "title": "Enabled", "default": false}, "every_hours": {"type": "integer", "maximum": 168.0, "minimum": 1.0, "title": "Every Hours", "default": 24}}, "type": "object", "title": "BackupSchedule"}, "BlockIn": {"properties": {"ip": {"type": "string", "maxLength": 64, "title": "Ip"}, "reason": {"type": "string", "maxLength": 200, "title": "Reason", "default": ""}}, "type": "object", "required": ["ip"], "title": "BlockIn"}, "Body_admin_token_api_admin_token_post": {"properties": {"grant_type": {"anyOf": [{"type": "string", "pattern": "^password$"}, {"type": "null"}], "title": "Grant Type"}, "username": {"type": "string", "title": "Username"}, "password": {"type": "string", "format": "password", "title": "Password"}, "scope": {"type": "string", "title": "Scope", "default": ""}, "client_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Client Id"}, "client_secret": {"anyOf": [{"type": "string"}, {"type": "null"}], "format": "password", "title": "Client Secret"}}, "type": "object", "required": ["username", "password"], "title": "Body_admin_token_api_admin_token_post"}, "Body_check_backup_api_backup_check_post": {"properties": {"file": {"type": "string", "contentMediaType": "application/octet-stream", "title": "File"}}, "type": "object", "required": ["file"], "title": "Body_check_backup_api_backup_check_post"}, "Body_restore_backup_api_backup_restore_post": {"properties": {"file": {"type": "string", "contentMediaType": "application/octet-stream", "title": "File"}}, "type": "object", "required": ["file"], "title": "Body_restore_backup_api_backup_restore_post"}, "Body_send_media_api_messages__thread__media_post": {"properties": {"file": {"type": "string", "contentMediaType": "application/octet-stream", "title": "File"}, "text": {"type": "string", "title": "Text", "default": ""}}, "type": "object", "required": ["file"], "title": "Body_send_media_api_messages__thread__media_post"}, "BotUpdate": {"properties": {"enabled": {"type": "boolean", "title": "Enabled", "default": false}, "token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Token"}, "clear_token": {"type": "boolean", "title": "Clear Token", "default": false}, "admin_ids": {"items": {"type": "integer"}, "type": "array", "title": "Admin Ids"}, "language": {"type": "string", "title": "Language", "default": "tr"}, "proxy": {"type": "string", "title": "Proxy", "default": ""}, "backup": {"$ref": "#/components/schemas/BackupSchedule"}, "notify": {"$ref": "#/components/schemas/NotifySettings"}}, "type": "object", "title": "BotUpdate"}, "BotView": {"properties": {"enabled": {"type": "boolean", "title": "Enabled"}, "has_token": {"type": "boolean", "title": "Has Token"}, "token_masked": {"type": "string", "title": "Token Masked"}, "admin_ids": {"items": {"type": "integer"}, "type": "array", "title": "Admin Ids"}, "language": {"type": "string", "title": "Language"}, "proxy": {"type": "string", "title": "Proxy"}, "backup": {"$ref": "#/components/schemas/BackupSchedule"}, "notify": {"$ref": "#/components/schemas/NotifySettings"}, "intervals": {"items": {"type": "integer"}, "type": "array", "title": "Intervals"}, "last_backup_at": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Last Backup At"}, "last_backup_error": {"type": "string", "title": "Last Backup Error"}, "next_backup_at": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Next Backup At"}, "running": {"type": "boolean", "title": "Running"}, "username": {"type": "string", "title": "Username"}, "error": {"type": "string", "title": "Error"}}, "type": "object", "required": ["enabled", "has_token", "token_masked", "admin_ids", "language", "proxy", "backup", "notify", "intervals", "last_backup_at", "last_backup_error", "next_backup_at", "running", "username", "error"], "title": "BotView"}, "BrandSettings": {"properties": {"name": {"type": "string", "title": "Name", "default": ""}, "vendor": {"type": "string", "title": "Vendor", "default": ""}, "support_telegram": {"type": "string", "title": "Support Telegram", "default": ""}, "support_url": {"type": "string", "title": "Support Url", "default": ""}}, "type": "object", "title": "BrandSettings"}, "BulkProtocol": {"properties": {"protocol": {"type": "string", "title": "Protocol"}, "enable": {"type": "boolean", "title": "Enable", "default": true}, "admin": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Admin"}, "usernames": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Usernames"}}, "type": "object", "required": ["protocol"], "title": "BulkProtocol"}, "Button": {"properties": {"label": {"type": "string", "title": "Label"}, "url": {"type": "string", "title": "Url"}}, "type": "object", "required": ["label", "url"], "title": "Button"}, "Conflict": {"properties": {"detail": {"type": "string", "title": "Detail", "default": "Entity already exists"}}, "type": "object", "title": "Conflict"}, "CoreCreate": {"properties": {"name": {"type": "string", "maxLength": 64, "minLength": 1, "title": "Name"}, "config": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Config"}, "copy_from": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Copy From", "default": "main"}}, "type": "object", "required": ["name"], "title": "CoreCreate"}, "CoreInfo": {"properties": {"id": {"type": "string", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "inbounds": {"items": {"type": "string"}, "type": "array", "title": "Inbounds"}}, "type": "object", "required": ["id", "name", "inbounds"], "title": "CoreInfo"}, "CoreModify": {"properties": {"name": {"anyOf": [{"type": "string", "maxLength": 64, "minLength": 1}, {"type": "null"}], "title": "Name"}}, "type": "object", "title": "CoreModify"}, "CoreStats": {"properties": {"version": {"type": "string", "title": "Version"}, "started": {"type": "boolean", "title": "Started"}, "logs_websocket": {"type": "string", "title": "Logs Websocket"}}, "type": "object", "required": ["version", "started", "logs_websocket"], "title": "CoreStats"}, "Decorations": {"properties": {"newyear": {"type": "boolean", "title": "Newyear", "default": false}}, "type": "object", "title": "Decorations"}, "DevicesIn": {"properties": {"awg_devices": {"type": "integer", "title": "Awg Devices"}}, "type": "object", "required": ["awg_devices"], "title": "DevicesIn"}, "DomainSettings": {"properties": {"url_prefix": {"type": "string", "maxLength": 300, "title": "Url Prefix", "default": ""}, "path": {"type": "string", "maxLength": 64, "title": "Path", "default": ""}, "suffix": {"type": "string", "maxLength": 100, "title": "Suffix", "default": ""}, "mode": {"type": "string", "maxLength": 16, "title": "Mode", "default": "normal"}, "admins": {"additionalProperties": {"$ref": "#/components/schemas/AdminDomain"}, "type": "object", "title": "Admins", "default": {}}}, "type": "object", "title": "DomainSettings"}, "DomainState": {"properties": {"settings": {"$ref": "#/components/schemas/DomainSettings"}, "env_url_prefix": {"type": "string", "title": "Env Url Prefix"}, "env_path": {"type": "string", "title": "Env Path"}, "example": {"type": "string", "title": "Example"}}, "type": "object", "required": ["settings", "env_url_prefix", "env_path", "example"], "title": "DomainState"}, "ExitIn": {"properties": {"tag": {"type": "string", "maxLength": 128, "title": "Tag", "default": ""}}, "type": "object", "title": "ExitIn"}, "ExternalConfig": {"properties": {"id": {"type": "string", "title": "Id"}, "name": {"type": "string", "maxLength": 128, "title": "Name", "default": ""}, "kind": {"type": "string", "title": "Kind", "default": "links"}, "links": {"type": "string", "title": "Links", "default": ""}, "json_text": {"type": "string", "maxLength": 3000000, "title": "Json Text", "default": ""}, "url": {"type": "string", "title": "Url", "default": ""}, "urls": {"items": {"type": "string"}, "type": "array", "title": "Urls", "default": []}, "random_url": {"type": "boolean", "title": "Random Url", "default": false}, "user_agent": {"type": "string", "title": "User Agent", "default": ""}, "range_start": {"type": "integer", "minimum": 1.0, "title": "Range Start", "default": 1}, "range_end": {"type": "integer", "minimum": 0.0, "title": "Range End", "default": 0}, "protocols": {"items": {"type": "string"}, "type": "array", "title": "Protocols", "default": []}, "rename": {"type": "string", "title": "Rename", "default": "country"}, "rename_lang": {"type": "string", "title": "Rename Lang", "default": "en"}, "auto_name": {"type": "boolean", "title": "Auto Name", "default": false}, "test": {"type": "boolean", "title": "Test", "default": false}, "test_timeout": {"type": "integer", "maximum": 30.0, "minimum": 1.0, "title": "Test Timeout", "default": 5}, "ws_rename": {"type": "boolean", "title": "Ws Rename", "default": true}, "ws_label": {"type": "string", "maxLength": 32, "title": "Ws Label", "default": "4G/WiFi"}, "refresh_minutes": {"type": "integer", "maximum": 43200.0, "minimum": 1.0, "title": "Refresh Minutes", "default": 60}, "enabled": {"type": "boolean", "title": "Enabled", "default": true}, "position": {"type": "string", "title": "Position", "default": "bottom"}, "only_active": {"type": "boolean", "title": "Only Active", "default": true}, "groups": {"items": {"type": "string"}, "type": "array", "title": "Groups", "default": []}, "name_mode": {"type": "string", "title": "Name Mode", "default": "original"}, "name_lang": {"type": "string", "title": "Name Lang", "default": "en"}, "name_template": {"type": "string", "maxLength": 128, "title": "Name Template", "default": ""}}, "type": "object", "required": ["id"], "title": "ExternalConfig"}, "ExternalPanelCreate": {"properties": {"name": {"type": "string", "title": "Name"}, "kind": {"type": "string", "title": "Kind"}, "address": {"type": "string", "title": "Address"}, "panel_path": {"type": "string", "title": "Panel Path", "default": "/"}, "scope": {"$ref": "#/components/schemas/ExternalPanelScope", "default": {"admins": [], "groups": []}}, "enabled": {"type": "boolean", "title": "Enabled", "default": true}, "sync_interval": {"type": "integer", "title": "Sync Interval", "default": 0}, "live": {"type": "boolean", "title": "Live", "default": false}, "count_traffic": {"type": "boolean", "title": "Count Traffic", "default": false}, "username": {"type": "string", "title": "Username", "default": ""}, "password": {"type": "string", "title": "Password", "default": ""}, "token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Token"}}, "type": "object", "required": ["name", "kind", "address"], "title": "ExternalPanelCreate"}, "ExternalPanelModify": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "kind": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Kind"}, "address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Address"}, "panel_path": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Panel Path"}, "scope": {"anyOf": [{"$ref": "#/components/schemas/ExternalPanelScope"}, {"type": "null"}]}, "enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Enabled"}, "username": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Username"}, "password": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Password"}, "token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Token"}, "sync_interval": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Sync Interval"}, "live": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Live"}, "count_traffic": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Count Traffic"}}, "type": "object", "title": "ExternalPanelModify"}, "ExternalPanelResponse": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "kind": {"type": "string", "title": "Kind"}, "address": {"type": "string", "title": "Address"}, "panel_path": {"type": "string", "title": "Panel Path"}, "scope": {"$ref": "#/components/schemas/ExternalPanelScope", "default": {"admins": [], "groups": []}}, "enabled": {"type": "boolean", "title": "Enabled"}, "username": {"type": "string", "title": "Username", "default": ""}, "has_password": {"type": "boolean", "title": "Has Password", "default": false}, "has_token": {"type": "boolean", "title": "Has Token", "default": false}, "sync_interval": {"type": "integer", "title": "Sync Interval", "default": 0}, "live": {"type": "boolean", "title": "Live", "default": false}, "count_traffic": {"type": "boolean", "title": "Count Traffic", "default": false}, "auto_provision": {"type": "boolean", "title": "Auto Provision", "default": false}, "prov_config": {"type": "object", "title": "Prov Config", "default": {}}, "last_sync": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Sync"}, "last_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Error"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}}, "type": "object", "required": ["id", "name", "kind", "address", "panel_path", "enabled"], "title": "ExternalPanelResponse"}, "ExternalPanelScope": {"properties": {"admins": {"items": {"type": "string"}, "type": "array", "title": "Admins", "default": []}, "groups": {"items": {"type": "string"}, "type": "array", "title": "Groups", "default": []}}, "type": "object", "title": "ExternalPanelScope"}, "ExternalPreview": {"properties": {"username": {"type": "string", "title": "Username"}, "items": {"items": {"$ref": "#/components/schemas/ExternalPreviewItem"}, "type": "array", "title": "Items"}}, "type": "object", "required": ["username", "items"], "title": "ExternalPreview"}, "ExternalPreviewItem": {"properties": {"remark": {"type": "string", "title": "Remark"}, "link": {"type": "string", "title": "Link"}, "source": {"type": "string", "title": "Source"}}, "type": "object", "required": ["remark", "link", "source"], "title": "ExternalPreviewItem"}, "ExternalSettings-Input": {"properties": {"configs": {"items": {"$ref": "#/components/schemas/ExternalConfig"}, "type": "array", "title": "Configs", "default": []}, "admins": {"additionalProperties": {"$ref": "#/components/schemas/AdminExternal"}, "type": "object", "title": "Admins", "default": {}}, "generated_sort": {"type": "string", "title": "Generated Sort", "default": "default"}, "external_sort": {"type": "string", "title": "External Sort", "default": "manual"}, "protocol_order": {"items": {"type": "string"}, "type": "array", "title": "Protocol Order", "default": ["vless-reality", "vless-tcp", "vless-ws", "vless-grpc", "vless-xhttp", "vless-httpupgrade", "vmess", "trojan", "ss", "hysteria2", "tuic", "wireguard"]}, "test_url": {"type": "string", "title": "Test Url", "default": "https://www.gstatic.com/generate_204"}}, "type": "object", "title": "ExternalSettings"}, "ExternalSettings-Output": {"properties": {"configs": {"items": {"$ref": "#/components/schemas/ExternalConfig"}, "type": "array", "title": "Configs", "default": []}, "admins": {"additionalProperties": {"$ref": "#/components/schemas/AdminExternal"}, "type": "object", "title": "Admins", "default": {}}, "generated_sort": {"type": "string", "title": "Generated Sort", "default": "default"}, "external_sort": {"type": "string", "title": "External Sort", "default": "manual"}, "protocol_order": {"items": {"type": "string"}, "type": "array", "title": "Protocol Order", "default": ["vless-reality", "vless-tcp", "vless-ws", "vless-grpc", "vless-xhttp", "vless-httpupgrade", "vmess", "trojan", "ss", "hysteria2", "tuic", "wireguard"]}, "test_url": {"type": "string", "title": "Test Url", "default": "https://www.gstatic.com/generate_204"}}, "type": "object", "title": "ExternalSettings"}, "Forbidden": {"properties": {"detail": {"type": "string", "title": "Detail", "default": "You are not allowed to ..."}}, "type": "object", "title": "Forbidden"}, "Group": {"properties": {"name": {"type": "string", "title": "Name"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note", "default": ""}, "hosts": {"items": {"type": "integer"}, "type": "array", "title": "Hosts", "default": []}, "admins": {"items": {"type": "string"}, "type": "array", "title": "Admins", "default": []}, "vpn": {"items": {"type": "string"}, "type": "array", "title": "Vpn", "default": []}}, "type": "object", "required": ["name"], "title": "Group"}, "GroupCreate": {"properties": {"name": {"type": "string", "maxLength": 64, "minLength": 1, "title": "Name"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note", "default": ""}}, "type": "object", "required": ["name"], "title": "GroupCreate"}, "GroupHost": {"properties": {"id": {"type": "integer", "title": "Id"}, "remark": {"type": "string", "title": "Remark"}, "address": {"type": "string", "title": "Address"}, "inbound_tag": {"type": "string", "title": "Inbound Tag"}, "groups": {"items": {"type": "string"}, "type": "array", "title": "Groups", "default": []}, "is_disabled": {"type": "boolean", "title": "Is Disabled", "default": false}}, "type": "object", "required": ["id", "remark", "address", "inbound_tag"], "title": "GroupHost"}, "GroupModify": {"properties": {"name": {"anyOf": [{"type": "string", "maxLength": 64, "minLength": 1}, {"type": "null"}], "title": "Name"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note"}, "hosts": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Hosts"}, "vpn": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Vpn"}}, "type": "object", "title": "GroupModify"}, "GroupVPN": {"properties": {"id": {"type": "string", "title": "Id"}, "kind": {"type": "string", "title": "Kind"}, "server": {"type": "string", "title": "Server"}, "enabled": {"type": "boolean", "title": "Enabled"}, "groups": {"items": {"type": "string"}, "type": "array", "title": "Groups", "default": []}}, "type": "object", "required": ["id", "kind", "server", "enabled"], "title": "GroupVPN", "description": "a VPN service a group can hold"}, "GroupsResponse": {"properties": {"groups": {"items": {"$ref": "#/components/schemas/Group"}, "type": "array", "title": "Groups"}, "hosts": {"items": {"$ref": "#/components/schemas/GroupHost"}, "type": "array", "title": "Hosts"}, "vpn": {"items": {"$ref": "#/components/schemas/GroupVPN"}, "type": "array", "title": "Vpn", "default": []}}, "type": "object", "required": ["groups", "hosts"], "title": "GroupsResponse"}, "HTTPException": {"properties": {"detail": {"type": "string", "title": "Detail"}}, "type": "object", "required": ["detail"], "title": "HTTPException"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "HostOrder": {"properties": {"order": {"items": {"type": "string"}, "type": "array", "title": "Order"}}, "type": "object", "required": ["order"], "title": "HostOrder"}, "IPLimitSettings": {"properties": {"enabled": {"type": "boolean", "title": "Enabled", "default": true}}, "type": "object", "title": "IPLimitSettings"}, "InboundExitIn": {"properties": {"tags": {"items": {"type": "string"}, "type": "array", "maxItems": 300, "minItems": 1, "title": "Tags"}, "target": {"type": "string", "maxLength": 140, "title": "Target", "default": ""}}, "type": "object", "required": ["tags"], "title": "InboundExitIn"}, "InboundTraffic": {"properties": {"inbound_tag": {"type": "string", "title": "Inbound Tag"}, "protocol": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Protocol"}, "used_traffic": {"type": "integer", "title": "Used Traffic"}}, "type": "object", "required": ["inbound_tag", "used_traffic"], "title": "InboundTraffic"}, "InstallIn": {"properties": {"ssh": {"anyOf": [{"$ref": "#/components/schemas/SSHIn"}, {"type": "null"}]}, "save": {"type": "boolean", "title": "Save", "default": false}, "node": {"type": "boolean", "title": "Node", "default": true}, "agent": {"type": "boolean", "title": "Agent", "default": true}}, "type": "object", "title": "InstallIn"}, "JsonSubSettings": {"properties": {"clients": {"items": {"type": "string"}, "type": "array", "title": "Clients", "default": []}, "direct_domains": {"items": {"type": "string"}, "type": "array", "title": "Direct Domains", "default": []}, "direct_ips": {"items": {"type": "string"}, "type": "array", "title": "Direct Ips", "default": []}, "block_ads": {"type": "boolean", "title": "Block Ads", "default": false}, "include_external": {"type": "boolean", "title": "Include External", "default": true}, "balancer": {"type": "boolean", "title": "Balancer", "default": false}, "balancer_external": {"type": "boolean", "title": "Balancer External", "default": true}, "balancer_name": {"type": "string", "maxLength": 100, "title": "Balancer Name", "default": "⚡ Auto (fastest)"}, "balancer_strategy": {"type": "string", "title": "Balancer Strategy", "default": "leastPing"}, "balancer_position": {"type": "string", "title": "Balancer Position", "default": "top"}, "probe_url": {"type": "string", "title": "Probe Url", "default": "https://www.gstatic.com/generate_204"}, "probe_interval": {"type": "string", "title": "Probe Interval", "default": "1m"}}, "type": "object", "title": "JsonSubSettings"}, "LicenseState": {"properties": {"status": {"type": "string", "title": "Status"}, "locked": {"type": "boolean", "title": "Locked"}, "customer": {"type": "string", "title": "Customer", "default": ""}, "expires": {"type": "integer", "title": "Expires", "default": 0}, "activated": {"type": "integer", "title": "Activated", "default": 0}, "days_left": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Days Left"}, "grace_until": {"type": "integer", "title": "Grace Until", "default": 0}, "limits": {"additionalProperties": {"type": "integer"}, "type": "object", "title": "Limits", "default": {}}, "usage": {"additionalProperties": {"anyOf": [{"type": "integer"}, {"type": "null"}]}, "type": "object", "title": "Usage", "default": {}}, "message": {"type": "string", "title": "Message", "default": ""}, "message_at": {"type": "integer", "title": "Message At", "default": 0}, "key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key"}, "install_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Install Id"}, "last_check": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Last Check"}, "last_attempt": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Last Attempt"}, "last_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Error"}, "has_key": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Has Key"}}, "type": "object", "required": ["status", "locked"], "title": "LicenseState"}, "LinkIn": {"properties": {"exit": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Exit"}, "port": {"anyOf": [{"type": "integer", "maximum": 65535.0, "minimum": 1.0}, {"type": "null"}], "title": "Port"}, "address": {"type": "string", "title": "Address", "default": ""}, "sni": {"type": "string", "title": "Sni", "default": "www.microsoft.com"}}, "type": "object", "title": "LinkIn"}, "MessageEdit": {"properties": {"text": {"type": "string", "maxLength": 4000, "minLength": 1, "title": "Text"}}, "type": "object", "required": ["text"], "title": "MessageEdit"}, "MessageIn": {"properties": {"text": {"type": "string", "maxLength": 4000, "minLength": 1, "title": "Text"}}, "type": "object", "required": ["text"], "title": "MessageIn"}, "NextPlanModel": {"properties": {"data_limit": {"anyOf": [{"type": "integer", "maximum": 9.223372036854776e+18, "minimum": 0.0}, {"type": "null"}], "title": "Data Limit"}, "expire": {"anyOf": [{"type": "integer", "maximum": 3153600000.0, "minimum": 0.0}, {"type": "null"}], "title": "Expire"}, "add_remaining_traffic": {"type": "boolean", "title": "Add Remaining Traffic", "default": false}, "fire_on_either": {"type": "boolean", "title": "Fire On Either", "default": true}}, "type": "object", "title": "NextPlanModel"}, "NodeCreate": {"properties": {"name": {"type": "string", "maxLength": 256, "minLength": 1, "title": "Name"}, "address": {"type": "string", "maxLength": 256, "minLength": 1, "title": "Address"}, "port": {"type": "integer", "maximum": 65535.0, "minimum": 1.0, "title": "Port", "default": 62050}, "api_port": {"type": "integer", "maximum": 65535.0, "minimum": 1.0, "title": "Api Port", "default": 62051}, "usage_coefficient": {"type": "number", "exclusiveMinimum": 0.0, "title": "Usage Coefficient", "default": 1.0}, "agent_enabled": {"type": "boolean", "title": "Agent Enabled", "default": true}, "ip_limit_enabled": {"type": "boolean", "title": "Ip Limit Enabled", "default": true}, "add_as_new_host": {"type": "boolean", "title": "Add As New Host", "default": true}, "core_id": {"type": "string", "title": "Core Id", "default": "main"}}, "type": "object", "required": ["name", "address"], "title": "NodeCreate", "example": {"add_as_new_host": true, "address": "192.168.1.1", "api_port": 62051, "name": "DE node", "port": 62050, "usage_coefficient": 1}}, "NodeExtraIn": {"properties": {"flag": {"type": "string", "maxLength": 8, "title": "Flag", "default": ""}, "transport": {"anyOf": [{"type": "string", "pattern": "^(direct|ssh)$"}, {"type": "null"}], "title": "Transport"}, "ssh": {"anyOf": [{"$ref": "#/components/schemas/SSHIn"}, {"type": "null"}]}, "forget_ssh": {"type": "boolean", "title": "Forget Ssh", "default": false}}, "type": "object", "title": "NodeExtraIn"}, "NodeModify": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "nullable": true}, "address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Address", "nullable": true}, "port": {"anyOf": [{"type": "integer", "maximum": 65535.0, "minimum": 1.0}, {"type": "null"}], "title": "Port", "nullable": true}, "api_port": {"anyOf": [{"type": "integer", "maximum": 65535.0, "minimum": 1.0}, {"type": "null"}], "title": "Api Port", "nullable": true}, "usage_coefficient": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Usage Coefficient", "nullable": true}, "agent_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Agent Enabled", "nullable": true}, "ip_limit_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Ip Limit Enabled", "nullable": true}, "status": {"anyOf": [{"$ref": "#/components/schemas/NodeStatus"}, {"type": "null"}], "nullable": true}, "core_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Core Id", "nullable": true}}, "type": "object", "title": "NodeModify", "example": {"address": "192.168.1.1", "api_port": 62051, "name": "DE node", "port": 62050, "status": "disabled", "usage_coefficient": 1.0}}, "NodeResponse": {"properties": {"name": {"type": "string", "title": "Name"}, "address": {"type": "string", "title": "Address"}, "port": {"type": "integer", "title": "Port", "default": 62050}, "api_port": {"type": "integer", "title": "Api Port", "default": 62051}, "usage_coefficient": {"type": "number", "exclusiveMinimum": 0.0, "title": "Usage Coefficient", "default": 1.0}, "agent_enabled": {"type": "boolean", "title": "Agent Enabled", "default": true}, "ip_limit_enabled": {"type": "boolean", "title": "Ip Limit Enabled", "default": true}, "id": {"type": "integer", "title": "Id"}, "xray_version": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Xray Version"}, "status": {"$ref": "#/components/schemas/NodeStatus"}, "message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Message"}, "core_id": {"type": "string", "title": "Core Id", "default": "main"}}, "type": "object", "required": ["name", "address", "id", "status"], "title": "NodeResponse"}, "NodeSettings": {"properties": {"min_node_version": {"type": "string", "title": "Min Node Version", "default": "v0.2.0"}, "certificate": {"type": "string", "title": "Certificate"}}, "type": "object", "required": ["certificate"], "title": "NodeSettings"}, "NodeStatus": {"type": "string", "enum": ["connected", "connecting", "error", "disabled"], "title": "NodeStatus"}, "NodeUsageResponse": {"properties": {"node_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Node Id"}, "node_name": {"type": "string", "title": "Node Name"}, "uplink": {"type": "integer", "title": "Uplink"}, "downlink": {"type": "integer", "title": "Downlink"}}, "type": "object", "required": ["node_name", "uplink", "downlink"], "title": "NodeUsageResponse"}, "NodeXrayVersionIn": {"properties": {"version": {"type": "string", "title": "Version"}}, "type": "object", "required": ["version"], "title": "NodeXrayVersionIn"}, "NodesUsageResponse": {"properties": {"usages": {"items": {"$ref": "#/components/schemas/NodeUsageResponse"}, "type": "array", "title": "Usages"}}, "type": "object", "required": ["usages"], "title": "NodesUsageResponse"}, "NotFound": {"properties": {"detail": {"type": "string", "title": "Detail", "default": "Entity {} not found"}}, "type": "object", "title": "NotFound"}, "NoteLinkSettings": {"properties": {"enabled": {"type": "boolean", "title": "Enabled", "default": false}, "prefixes": {"items": {"type": "string"}, "type": "array", "title": "Prefixes", "default": ["https://www.googleapis.com/"]}}, "type": "object", "title": "NoteLinkSettings"}, "NoteLinkState": {"properties": {"enabled": {"type": "boolean", "title": "Enabled"}, "prefixes": {"items": {"type": "string"}, "type": "array", "title": "Prefixes"}, "matching_users": {"type": "integer", "title": "Matching Users"}, "total_users": {"type": "integer", "title": "Total Users"}, "webhook": {"type": "object", "title": "Webhook"}}, "type": "object", "required": ["enabled", "prefixes", "matching_users", "total_users", "webhook"], "title": "NoteLinkState"}, "NotifySettings": {"properties": {"events": {"additionalProperties": {"type": "boolean"}, "type": "object", "title": "Events"}, "silent": {"type": "boolean", "title": "Silent", "default": false}, "quiet": {"type": "boolean", "title": "Quiet", "default": false}, "quiet_from": {"type": "integer", "maximum": 23.0, "minimum": 0.0, "title": "Quiet From", "default": 23}, "quiet_to": {"type": "integer", "maximum": 23.0, "minimum": 0.0, "title": "Quiet To", "default": 8}, "utc_offset": {"type": "integer", "maximum": 14.0, "minimum": -12.0, "title": "Utc Offset", "default": 3}}, "type": "object", "title": "NotifySettings"}, "OVPNIn": {"properties": {"enabled": {"type": "boolean", "title": "Enabled", "default": false}, "address": {"type": "string", "title": "Address", "default": ""}, "port": {"type": "integer", "title": "Port", "default": 1194}, "proto": {"type": "string", "title": "Proto", "default": "udp"}, "subnet": {"type": "string", "title": "Subnet", "default": "10.67.0.0/16"}, "dns": {"items": {"type": "string"}, "type": "array", "title": "Dns", "default": ["1.1.1.1", "8.8.8.8"]}}, "type": "object", "title": "OVPNIn"}, "OnlineIP": {"properties": {"ip": {"type": "string", "title": "Ip"}, "nodes": {"items": {"type": "string"}, "type": "array", "title": "Nodes"}, "inbounds": {"items": {"type": "string"}, "type": "array", "title": "Inbounds"}, "last_seen": {"type": "string", "format": "date-time", "title": "Last Seen"}, "connected_seconds": {"type": "integer", "title": "Connected Seconds", "default": 0}, "provider": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Provider"}, "blocked": {"type": "boolean", "title": "Blocked", "default": false}, "protocol": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Protocol"}, "rate": {"type": "number", "title": "Rate", "default": 0}}, "type": "object", "required": ["ip", "nodes", "inbounds", "last_seen"], "title": "OnlineIP"}, "OnlineProviders": {"properties": {"users": {"additionalProperties": {"items": {"type": "string"}, "type": "array"}, "type": "object", "title": "Users"}, "providers": {"items": {"$ref": "#/components/schemas/ProviderStat"}, "type": "array", "title": "Providers"}}, "type": "object", "required": ["users", "providers"], "title": "OnlineProviders"}, "OnlineSummary": {"properties": {"online_users": {"type": "integer", "title": "Online Users"}, "online_ips": {"type": "integer", "title": "Online Ips"}, "external_online_users": {"type": "integer", "title": "External Online Users", "default": 0}, "updated_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Updated At"}, "users": {"items": {"$ref": "#/components/schemas/OnlineUser"}, "type": "array", "title": "Users"}}, "type": "object", "required": ["online_users", "online_ips", "users"], "title": "OnlineSummary"}, "OnlineUser": {"properties": {"username": {"type": "string", "title": "Username"}, "admin": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Admin"}, "ip_count": {"type": "integer", "title": "Ip Count"}, "device_count": {"type": "integer", "title": "Device Count", "default": 0}, "ip_limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Ip Limit"}, "blocked_ips": {"type": "integer", "title": "Blocked Ips", "default": 0}, "external": {"type": "integer", "title": "External", "default": 0}, "external_panels": {"items": {"type": "string"}, "type": "array", "title": "External Panels", "default": []}}, "type": "object", "required": ["username", "ip_count"], "title": "OnlineUser"}, "OutboundLink": {"properties": {"link": {"type": "string", "title": "Link"}, "tag": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Tag"}}, "type": "object", "required": ["link"], "title": "OutboundLink"}, "OwnExternal": {"properties": {"label": {"type": "string", "title": "Label", "default": ""}, "enabled": {"type": "boolean", "title": "Enabled", "default": true}, "configs": {"items": {"$ref": "#/components/schemas/ExternalConfig"}, "type": "array", "title": "Configs", "default": []}}, "type": "object", "title": "OwnExternal"}, "PasswordChange": {"properties": {"current": {"type": "string", "title": "Current"}, "new": {"type": "string", "title": "New"}}, "type": "object", "required": ["current", "new"], "title": "PasswordChange"}, "Profile": {"properties": {"username": {"type": "string", "title": "Username"}, "role": {"type": "string", "title": "Role"}, "display_name": {"type": "string", "title": "Display Name", "default": ""}, "bio": {"type": "string", "title": "Bio", "default": ""}, "contact": {"type": "string", "title": "Contact", "default": ""}, "avatar": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "updated_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Updated At"}, "users": {"type": "integer", "title": "Users", "default": 0}, "users_limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Users Limit"}, "traffic_limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Traffic Limit"}, "traffic_used": {"type": "integer", "title": "Traffic Used", "default": 0}, "expire_date": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Expire Date"}}, "type": "object", "required": ["username", "role"], "title": "Profile"}, "ProfileEdit": {"properties": {"display_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Display Name"}, "bio": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Bio"}, "contact": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Contact"}, "avatar": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar"}}, "type": "object", "title": "ProfileEdit"}, "ProviderStat": {"properties": {"name": {"type": "string", "title": "Name"}, "users": {"type": "integer", "title": "Users"}, "ips": {"type": "integer", "title": "Ips"}}, "type": "object", "required": ["name", "users", "ips"], "title": "ProviderStat"}, "ProvisionOptions": {"properties": {"inbound_ids": {"items": {}, "type": "array", "title": "Inbound Ids", "default": []}, "scope_all": {"type": "boolean", "title": "Scope All", "default": false}, "scope_admins": {"items": {}, "type": "array", "title": "Scope Admins", "default": []}, "name_mode": {"type": "string", "title": "Name Mode", "default": "original"}, "name_template": {"type": "string", "title": "Name Template", "default": ""}, "auto": {"type": "boolean", "title": "Auto", "default": false}, "port_map": {"type": "object", "title": "Port Map", "default": {}}, "host_over": {"type": "string", "title": "Host Over", "default": ""}}, "type": "object", "title": "ProvisionOptions"}, "ProxyHost": {"properties": {"remark": {"type": "string", "title": "Remark"}, "address": {"type": "string", "title": "Address"}, "group_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Group Name", "nullable": true}, "port": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Port", "nullable": true}, "sni": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sni", "nullable": true}, "host": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Host", "nullable": true}, "path": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Path", "nullable": true}, "security": {"$ref": "#/components/schemas/ProxyHostSecurity", "default": "inbound_default"}, "alpn": {"$ref": "#/components/schemas/ProxyHostALPN", "default": ""}, "fingerprint": {"$ref": "#/components/schemas/ProxyHostFingerprint", "default": ""}, "allowinsecure": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Allowinsecure"}, "is_disabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Disabled"}, "mux_enable": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Mux Enable"}, "fragment_setting": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Fragment Setting", "nullable": true}, "noise_setting": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Noise Setting", "nullable": true}, "random_user_agent": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Random User Agent"}, "use_sni_as_host": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Use Sni As Host"}, "xhttp_extra": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Xhttp Extra", "nullable": true}}, "type": "object", "required": ["remark", "address"], "title": "ProxyHost"}, "ProxyHostALPN": {"type": "string", "enum": ["", "h3", "h2", "http/1.1", "h3,h2,http/1.1", "h3,h2", "h2,http/1.1"], "title": "ProxyHostALPN"}, "ProxyHostFingerprint": {"type": "string", "enum": ["", "chrome", "firefox", "safari", "ios", "android", "edge", "360", "qq", "random", "randomized"], "title": "ProxyHostFingerprint"}, "ProxyHostSecurity": {"type": "string", "enum": ["inbound_default", "none", "tls"], "title": "ProxyHostSecurity"}, "ProxyInbound": {"properties": {"tag": {"type": "string", "title": "Tag"}, "protocol": {"$ref": "#/components/schemas/ProxyTypes"}, "network": {"type": "string", "title": "Network"}, "tls": {"type": "string", "title": "Tls"}, "port": {"anyOf": [{"type": "integer"}, {"type": "string"}], "title": "Port"}}, "type": "object", "required": ["tag", "protocol", "network", "tls", "port"], "title": "ProxyInbound"}, "ProxySettings": {"properties": {}, "type": "object", "title": "ProxySettings"}, "ProxyTypes": {"type": "string", "enum": ["vmess", "vless", "trojan", "shadowsocks", "hysteria"], "title": "ProxyTypes"}, "PublicProfile": {"properties": {"display_name": {"type": "string", "title": "Display Name", "default": ""}, "avatar": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar"}}, "type": "object", "title": "PublicProfile"}, "ReadBody": {"properties": {"ids": {"items": {"type": "integer"}, "type": "array", "title": "Ids", "default": []}, "all": {"type": "boolean", "title": "All", "default": false}}, "type": "object", "title": "ReadBody"}, "Release": {"properties": {"version": {"type": "string", "title": "Version"}, "date": {"type": "string", "title": "Date", "default": ""}, "tr": {"items": {"type": "string"}, "type": "array", "title": "Tr", "default": []}, "en": {"items": {"type": "string"}, "type": "array", "title": "En", "default": []}}, "type": "object", "required": ["version"], "title": "Release"}, "RenameIn": {"properties": {"new_username": {"type": "string", "title": "New Username"}}, "type": "object", "required": ["new_username"], "title": "RenameIn"}, "ResetIn": {"properties": {"tag": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Tag"}}, "type": "object", "title": "ResetIn"}, "Rule": {"properties": {"id": {"type": "string", "title": "Id", "default": ""}, "name": {"type": "string", "maxLength": 100, "title": "Name", "default": ""}, "enabled": {"type": "boolean", "title": "Enabled", "default": true}, "host_ids": {"items": {"type": "integer"}, "type": "array", "title": "Host Ids", "default": []}, "nodes": {"items": {"type": "string"}, "type": "array", "title": "Nodes", "default": []}, "require_online": {"type": "boolean", "title": "Require Online", "default": false}, "stages": {"items": {"$ref": "#/components/schemas/Stage"}, "type": "array", "title": "Stages", "default": []}, "stage": {"type": "integer", "title": "Stage", "default": 0}, "armed_at": {"type": "number", "title": "Armed At", "default": 0}, "last_change": {"type": "number", "title": "Last Change", "default": 0}}, "type": "object", "title": "Rule"}, "RulesPayload": {"properties": {"rules": {"items": {"$ref": "#/components/schemas/Rule"}, "type": "array", "title": "Rules"}}, "type": "object", "required": ["rules"], "title": "RulesPayload"}, "SSHIn": {"properties": {"host": {"type": "string", "maxLength": 255, "title": "Host", "default": ""}, "port": {"type": "integer", "maximum": 65535.0, "minimum": 1.0, "title": "Port", "default": 22}, "username": {"type": "string", "maxLength": 64, "minLength": 1, "title": "Username", "default": "root"}, "auth": {"type": "string", "pattern": "^(password|key)$", "title": "Auth", "default": "password"}, "password": {"type": "string", "title": "Password", "default": ""}, "private_key": {"type": "string", "title": "Private Key", "default": ""}, "passphrase": {"type": "string", "title": "Passphrase", "default": ""}, "key_id": {"type": "string", "title": "Key Id", "default": ""}}, "type": "object", "title": "SSHIn"}, "SSHKeyIn": {"properties": {"name": {"type": "string", "maxLength": 64, "title": "Name", "default": ""}, "private_key": {"type": "string", "title": "Private Key", "default": ""}, "passphrase": {"type": "string", "title": "Passphrase", "default": ""}, "generate": {"type": "boolean", "title": "Generate", "default": false}}, "type": "object", "title": "SSHKeyIn"}, "Section": {"properties": {"id": {"type": "string", "title": "Id"}, "enabled": {"type": "boolean", "title": "Enabled", "default": true}}, "type": "object", "required": ["id"], "title": "Section"}, "ServerIn": {"properties": {"agent_port": {"type": "integer", "title": "Agent Port", "default": 62060}, "agent_address": {"type": "string", "title": "Agent Address", "default": ""}, "public_address": {"type": "string", "title": "Public Address", "default": ""}, "awg": {"$ref": "#/components/schemas/AWGIn", "default": {"enabled": false, "address": "", "port": 51820, "subnet": "10.66.0.0/16", "mtu": 1420, "dns": ["1.1.1.1", "8.8.8.8"], "keepalive": 25, "params": {}}}, "ovpn": {"$ref": "#/components/schemas/OVPNIn", "default": {"enabled": false, "address": "", "port": 1194, "proto": "udp", "subnet": "10.67.0.0/16", "dns": ["1.1.1.1", "8.8.8.8"]}}}, "type": "object", "title": "ServerIn"}, "SourceStatus": {"properties": {"id": {"type": "string", "title": "Id"}, "running": {"type": "boolean", "title": "Running", "default": false}, "updated_at": {"type": "integer", "title": "Updated At", "default": 0}, "error": {"type": "string", "title": "Error", "default": ""}, "stats": {"type": "object", "title": "Stats", "default": {}}, "items": {"items": {"type": "object"}, "type": "array", "title": "Items", "default": []}}, "type": "object", "required": ["id"], "title": "SourceStatus"}, "Stage": {"properties": {"ip": {"type": "string", "title": "Ip", "default": ""}, "threshold_kbps": {"type": "number", "minimum": 0.0, "title": "Threshold Kbps", "default": 1}, "minutes": {"type": "integer", "maximum": 1440.0, "minimum": 1.0, "title": "Minutes", "default": 5}, "start_kbps": {"type": "number", "minimum": 0.0, "title": "Start Kbps", "default": 0}, "start_minutes": {"type": "integer", "maximum": 1440.0, "minimum": 0.0, "title": "Start Minutes", "default": 0}}, "type": "object", "title": "Stage"}, "StatsOverview": {"properties": {"total_users": {"type": "integer", "title": "Total Users"}, "active_users": {"type": "integer", "title": "Active Users"}, "total_traffic": {"type": "integer", "title": "Total Traffic"}, "inbounds": {"items": {"$ref": "#/components/schemas/InboundTraffic"}, "type": "array", "title": "Inbounds"}, "transports": {"items": {"$ref": "#/components/schemas/TransportTraffic"}, "type": "array", "title": "Transports", "default": []}, "top_users": {"items": {"$ref": "#/components/schemas/TopUser"}, "type": "array", "title": "Top Users"}}, "type": "object", "required": ["total_users", "active_users", "total_traffic", "inbounds", "top_users"], "title": "StatsOverview"}, "StatsSettingsIn": {"properties": {"enabled": {"type": "boolean", "title": "Enabled", "default": true}, "retention_days": {"type": "integer", "maximum": 365.0, "minimum": 1.0, "title": "Retention Days", "default": 30}, "ip_per_min": {"type": "integer", "maximum": 100000.0, "minimum": 0.0, "title": "Ip Per Min", "default": 0}, "user_per_hour": {"type": "integer", "maximum": 100000.0, "minimum": 0.0, "title": "User Per Hour", "default": 0}, "sub_rate_limit": {"type": "integer", "maximum": 86400.0, "minimum": 0.0, "title": "Sub Rate Limit", "default": 0}}, "type": "object", "title": "StatsSettingsIn"}, "StatsSettingsOut": {"properties": {"enabled": {"type": "boolean", "title": "Enabled", "default": true}, "retention_days": {"type": "integer", "maximum": 365.0, "minimum": 1.0, "title": "Retention Days", "default": 30}, "ip_per_min": {"type": "integer", "maximum": 100000.0, "minimum": 0.0, "title": "Ip Per Min", "default": 0}, "user_per_hour": {"type": "integer", "maximum": 100000.0, "minimum": 0.0, "title": "User Per Hour", "default": 0}, "sub_rate_limit": {"type": "integer", "title": "Sub Rate Limit", "default": 0}}, "type": "object", "title": "StatsSettingsOut"}, "SubTokenIn": {"properties": {"token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Token"}}, "type": "object", "title": "SubTokenIn"}, "SubscriptionSettings": {"properties": {"default_template": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Default Template", "default": ""}, "expired_template": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Expired Template", "default": ""}, "disabled_template": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Disabled Template", "default": ""}, "limited_template": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Limited Template", "default": ""}, "near_expire_template": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Near Expire Template", "default": ""}, "near_expire_days": {"type": "integer", "title": "Near Expire Days", "default": 1}, "update_interval": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Update Interval"}, "device_limit_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Device Limit Message", "default": ""}, "sub_rate_limit": {"type": "integer", "title": "Sub Rate Limit", "default": 0}, "fingerprint_devices": {"type": "boolean", "title": "Fingerprint Devices", "default": false}, "admins": {"additionalProperties": {"$ref": "#/components/schemas/AdminSubTemplates"}, "type": "object", "title": "Admins", "default": {}}}, "type": "object", "title": "SubscriptionSettings"}, "SubscriptionUserResponse": {"properties": {"proxies": {"type": "object", "title": "Proxies"}, "expire": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Expire", "nullable": true}, "data_limit": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Data Limit"}, "data_limit_reset_strategy": {"$ref": "#/components/schemas/UserDataLimitResetStrategy", "default": "no_reset"}, "ip_limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Ip Limit"}, "hwid_limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Hwid Limit"}, "announce": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Announce", "nullable": true}, "sub_updated_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Sub Updated At", "nullable": true}, "sub_last_user_agent": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sub Last User Agent", "nullable": true}, "sub_request_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Sub Request Count", "default": 0}, "online_ip_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Online Ip Count", "default": 0}, "hwid_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Hwid Count", "default": 0}, "online_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Online At", "nullable": true}, "on_hold_expire_duration": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "On Hold Expire Duration"}, "on_hold_timeout": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "On Hold Timeout", "nullable": true}, "next_plan": {"anyOf": [{"$ref": "#/components/schemas/NextPlanModel"}, {"type": "null"}], "nullable": true}, "username": {"type": "string", "title": "Username"}, "status": {"$ref": "#/components/schemas/UserStatus"}, "used_traffic": {"type": "integer", "title": "Used Traffic"}, "lifetime_used_traffic": {"type": "integer", "title": "Lifetime Used Traffic", "default": 0}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}, "ip_block_count": {"type": "integer", "title": "Ip Block Count", "default": 0}, "hwid_reject_count": {"type": "integer", "title": "Hwid Reject Count", "default": 0}, "links": {"items": {"type": "string"}, "type": "array", "title": "Links", "default": []}, "subscription_url": {"type": "string", "title": "Subscription Url", "default": ""}, "sub_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sub Token"}, "warning": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Warning"}, "warning_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Warning At"}}, "type": "object", "required": ["proxies", "username", "status", "used_traffic", "created_at"], "title": "SubscriptionUserResponse"}, "SystemStats": {"properties": {"version": {"type": "string", "title": "Version"}, "mem_total": {"type": "integer", "title": "Mem Total"}, "mem_used": {"type": "integer", "title": "Mem Used"}, "cpu_cores": {"type": "integer", "title": "Cpu Cores"}, "cpu_usage": {"type": "number", "title": "Cpu Usage"}, "total_user": {"type": "integer", "title": "Total User"}, "online_users": {"type": "integer", "title": "Online Users"}, "users_active": {"type": "integer", "title": "Users Active"}, "users_on_hold": {"type": "integer", "title": "Users On Hold"}, "users_disabled": {"type": "integer", "title": "Users Disabled"}, "users_expired": {"type": "integer", "title": "Users Expired"}, "users_limited": {"type": "integer", "title": "Users Limited"}, "users_expiring_soon": {"type": "integer", "title": "Users Expiring Soon", "default": 0}, "incoming_bandwidth": {"type": "integer", "title": "Incoming Bandwidth"}, "outgoing_bandwidth": {"type": "integer", "title": "Outgoing Bandwidth"}, "incoming_bandwidth_speed": {"type": "integer", "title": "Incoming Bandwidth Speed"}, "outgoing_bandwidth_speed": {"type": "integer", "title": "Outgoing Bandwidth Speed"}, "traffic_limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Traffic Limit"}}, "type": "object", "required": ["version", "mem_total", "mem_used", "cpu_cores", "cpu_usage", "total_user", "online_users", "users_active", "users_on_hold", "users_disabled", "users_expired", "users_limited", "incoming_bandwidth", "outgoing_bandwidth", "incoming_bandwidth_speed", "outgoing_bandwidth_speed"], "title": "SystemStats"}, "TestIn": {"properties": {"outbounds": {"items": {"type": "object"}, "type": "array", "maxItems": 64, "minItems": 1, "title": "Outbounds"}, "server": {"type": "string", "title": "Server", "default": "master"}, "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Url"}, "sites": {"type": "boolean", "title": "Sites", "default": true}}, "type": "object", "required": ["outbounds"], "title": "TestIn"}, "TheftRule": {"properties": {"id": {"type": "string", "title": "Id"}, "name": {"type": "string", "maxLength": 80, "title": "Name", "default": ""}, "window_minutes": {"type": "integer", "maximum": 1440.0, "minimum": 1.0, "title": "Window Minutes", "default": 60}, "max_gb": {"type": "number", "maximum": 100000.0, "exclusiveMinimum": 0.0, "title": "Max Gb", "default": 20}, "action": {"type": "string", "pattern": "^(notify|disable)$", "title": "Action", "default": "notify"}, "enabled": {"type": "boolean", "title": "Enabled", "default": true}}, "type": "object", "required": ["id"], "title": "TheftRule"}, "TheftSettings": {"properties": {"enabled": {"type": "boolean", "title": "Enabled", "default": false}, "rules": {"items": {"$ref": "#/components/schemas/TheftRule"}, "type": "array", "title": "Rules", "default": []}, "ignore": {"items": {"type": "string"}, "type": "array", "title": "Ignore", "default": []}}, "type": "object", "title": "TheftSettings"}, "Token": {"properties": {"access_token": {"type": "string", "title": "Access Token"}, "token_type": {"type": "string", "title": "Token Type", "default": "bearer"}}, "type": "object", "required": ["access_token"], "title": "Token"}, "TopUser": {"properties": {"username": {"type": "string", "title": "Username"}, "admin": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Admin"}, "used_traffic": {"type": "integer", "title": "Used Traffic"}}, "type": "object", "required": ["username", "used_traffic"], "title": "TopUser"}, "TransferUsers": {"properties": {"to_admin": {"type": "string", "title": "To Admin"}, "from_admin": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "From Admin"}, "usernames": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Usernames"}}, "type": "object", "required": ["to_admin"], "title": "TransferUsers"}, "TransportTraffic": {"properties": {"transport": {"type": "string", "title": "Transport"}, "protocols": {"items": {"type": "string"}, "type": "array", "title": "Protocols"}, "inbounds": {"type": "integer", "title": "Inbounds"}, "used_traffic": {"type": "integer", "title": "Used Traffic"}, "online_ips": {"type": "integer", "title": "Online Ips", "default": 0}}, "type": "object", "required": ["transport", "protocols", "inbounds", "used_traffic"], "title": "TransportTraffic"}, "Unauthorized": {"properties": {"detail": {"type": "string", "title": "Detail", "default": "Not authenticated"}}, "type": "object", "title": "Unauthorized"}, "UpdateState": {"properties": {"current": {"type": "string", "title": "Current"}, "installed": {"type": "boolean", "title": "Installed"}, "state": {"type": "string", "title": "State", "default": "idle"}, "step": {"type": "string", "title": "Step", "default": ""}, "latest": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Latest"}, "available": {"type": "boolean", "title": "Available", "default": false}, "checked_at": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Checked At"}, "started_at": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Started At"}, "finished_at": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Finished At"}, "error": {"type": "string", "title": "Error", "default": ""}, "pending": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pending"}, "log": {"items": {"type": "string"}, "type": "array", "title": "Log", "default": []}, "news": {"items": {"$ref": "#/components/schemas/Release"}, "type": "array", "title": "News", "default": []}, "history": {"items": {"$ref": "#/components/schemas/Release"}, "type": "array", "title": "History", "default": []}}, "type": "object", "required": ["current", "installed"], "title": "UpdateState"}, "UserCleanupSettings": {"properties": {"auto_delete_enabled": {"type": "boolean", "title": "Auto Delete Enabled", "default": false}, "auto_delete_hours": {"type": "integer", "title": "Auto Delete Hours", "default": 24}, "include_limited": {"type": "boolean", "title": "Include Limited", "default": false}, "include_disabled": {"type": "boolean", "title": "Include Disabled", "default": false}}, "type": "object", "title": "UserCleanupSettings"}, "UserCreate": {"properties": {"proxies": {"additionalProperties": {"$ref": "#/components/schemas/ProxySettings"}, "propertyNames": {"$ref": "#/components/schemas/ProxyTypes"}, "type": "object", "title": "Proxies", "default": {}}, "expire": {"anyOf": [{"type": "integer", "maximum": 253402300799.0}, {"type": "null"}], "title": "Expire", "nullable": true}, "data_limit": {"anyOf": [{"type": "integer", "maximum": 9.223372036854776e+18, "minimum": 0.0}, {"type": "null"}], "title": "Data Limit", "description": "data_limit can be 0 or greater"}, "data_limit_reset_strategy": {"$ref": "#/components/schemas/UserDataLimitResetStrategy", "default": "no_reset"}, "inbounds": {"additionalProperties": {"items": {"type": "string"}, "type": "array"}, "propertyNames": {"$ref": "#/components/schemas/ProxyTypes"}, "type": "object", "title": "Inbounds", "default": {}}, "ip_limit": {"anyOf": [{"type": "integer", "maximum": 100000.0, "minimum": 0.0}, {"type": "null"}], "title": "Ip Limit", "description": "max simultaneous IPs, 0 or null means unlimited"}, "hwid_limit": {"anyOf": [{"type": "integer", "maximum": 100000.0, "minimum": 0.0}, {"type": "null"}], "title": "Hwid Limit", "description": "max devices (HWID) that can fetch the subscription, 0 or null means unlimited"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note", "nullable": true}, "announce": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Announce", "nullable": true}, "sub_updated_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Sub Updated At", "nullable": true}, "sub_last_user_agent": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sub Last User Agent", "nullable": true}, "sub_request_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Sub Request Count", "default": 0}, "online_ip_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Online Ip Count", "default": 0}, "hwid_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Hwid Count", "default": 0}, "online_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Online At", "nullable": true}, "on_hold_expire_duration": {"anyOf": [{"type": "integer", "maximum": 3153600000.0, "minimum": 0.0}, {"type": "null"}], "title": "On Hold Expire Duration", "nullable": true}, "on_hold_timeout": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "On Hold Timeout", "nullable": true}, "auto_delete_in_days": {"anyOf": [{"type": "integer", "maximum": 36500.0}, {"type": "null"}], "title": "Auto Delete In Days", "nullable": true}, "next_plan": {"anyOf": [{"$ref": "#/components/schemas/NextPlanModel"}, {"type": "null"}], "nullable": true}, "username": {"type": "string", "title": "Username"}, "status": {"$ref": "#/components/schemas/UserStatusCreate"}, "owner_username": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Username"}}, "type": "object", "required": ["username"], "title": "UserCreate", "example": {"data_limit": 0, "data_limit_reset_strategy": "no_reset", "expire": 0, "inbounds": {"vless": ["VLESS TCP REALITY", "VLESS GRPC REALITY"], "vmess": ["VMess TCP", "VMess Websocket"]}, "next_plan": {"add_remaining_traffic": false, "data_limit": 0, "expire": 0, "fire_on_either": true}, "note": "", "on_hold_expire_duration": 0, "on_hold_timeout": "2023-11-03T20:30:00", "proxies": {"vless": {}, "vmess": {"id": "35e4e39c-7d5c-4f4b-8b71-558e4f37ff53"}}, "status": "active", "username": "user1234"}}, "UserDataLimitResetStrategy": {"type": "string", "enum": ["no_reset", "day", "week", "month", "year"], "title": "UserDataLimitResetStrategy"}, "UserHWIDDeviceResponse": {"properties": {"id": {"type": "integer", "title": "Id"}, "hwid": {"type": "string", "title": "Hwid"}, "platform": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Platform"}, "os_version": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Os Version"}, "device_model": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Device Model"}, "user_agent": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Agent"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "updated_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Updated At"}}, "type": "object", "required": ["id", "hwid"], "title": "UserHWIDDeviceResponse"}, "UserHWIDDevicesResponse": {"properties": {"username": {"type": "string", "title": "Username"}, "hwid_limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Hwid Limit"}, "devices": {"items": {"$ref": "#/components/schemas/UserHWIDDeviceResponse"}, "type": "array", "title": "Devices"}}, "type": "object", "required": ["username", "devices"], "title": "UserHWIDDevicesResponse"}, "UserInboundUsageResponse": {"properties": {"inbound_tag": {"type": "string", "title": "Inbound Tag"}, "protocol": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Protocol"}, "network": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Network"}, "used_traffic": {"type": "integer", "title": "Used Traffic"}}, "type": "object", "required": ["inbound_tag", "used_traffic"], "title": "UserInboundUsageResponse"}, "UserInboundUsagesResponse": {"properties": {"username": {"type": "string", "title": "Username"}, "usages": {"items": {"$ref": "#/components/schemas/UserInboundUsageResponse"}, "type": "array", "title": "Usages"}}, "type": "object", "required": ["username", "usages"], "title": "UserInboundUsagesResponse"}, "UserModify": {"properties": {"proxies": {"additionalProperties": {"$ref": "#/components/schemas/ProxySettings"}, "propertyNames": {"$ref": "#/components/schemas/ProxyTypes"}, "type": "object", "title": "Proxies", "default": {}}, "expire": {"anyOf": [{"type": "integer", "maximum": 253402300799.0}, {"type": "null"}], "title": "Expire", "nullable": true}, "data_limit": {"anyOf": [{"type": "integer", "maximum": 9.223372036854776e+18, "minimum": 0.0}, {"type": "null"}], "title": "Data Limit", "description": "data_limit can be 0 or greater"}, "data_limit_reset_strategy": {"$ref": "#/components/schemas/UserDataLimitResetStrategy"}, "inbounds": {"additionalProperties": {"items": {"type": "string"}, "type": "array"}, "propertyNames": {"$ref": "#/components/schemas/ProxyTypes"}, "type": "object", "title": "Inbounds", "default": {}}, "ip_limit": {"anyOf": [{"type": "integer", "maximum": 100000.0, "minimum": 0.0}, {"type": "null"}], "title": "Ip Limit", "description": "max simultaneous IPs, 0 or null means unlimited"}, "hwid_limit": {"anyOf": [{"type": "integer", "maximum": 100000.0, "minimum": 0.0}, {"type": "null"}], "title": "Hwid Limit", "description": "max devices (HWID) that can fetch the subscription, 0 or null means unlimited"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note", "nullable": true}, "announce": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Announce", "nullable": true}, "sub_updated_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Sub Updated At", "nullable": true}, "sub_last_user_agent": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sub Last User Agent", "nullable": true}, "sub_request_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Sub Request Count", "default": 0}, "online_ip_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Online Ip Count", "default": 0}, "hwid_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Hwid Count", "default": 0}, "online_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Online At", "nullable": true}, "on_hold_expire_duration": {"anyOf": [{"type": "integer", "maximum": 3153600000.0, "minimum": 0.0}, {"type": "null"}], "title": "On Hold Expire Duration", "nullable": true}, "on_hold_timeout": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "On Hold Timeout", "nullable": true}, "auto_delete_in_days": {"anyOf": [{"type": "integer", "maximum": 36500.0}, {"type": "null"}], "title": "Auto Delete In Days", "nullable": true}, "next_plan": {"anyOf": [{"$ref": "#/components/schemas/NextPlanModel"}, {"type": "null"}], "nullable": true}, "status": {"$ref": "#/components/schemas/UserStatusModify"}}, "type": "object", "title": "UserModify", "example": {"data_limit": 0, "data_limit_reset_strategy": "no_reset", "expire": 0, "inbounds": {"vless": ["VLESS TCP REALITY", "VLESS GRPC REALITY"], "vmess": ["VMess TCP", "VMess Websocket"]}, "next_plan": {"add_remaining_traffic": false, "data_limit": 0, "expire": 0, "fire_on_either": true}, "note": "", "on_hold_expire_duration": 0, "on_hold_timeout": "2023-11-03T20:30:00", "proxies": {"vless": {}, "vmess": {"id": "35e4e39c-7d5c-4f4b-8b71-558e4f37ff53"}}, "status": "active"}}, "UserOnlineIPs": {"properties": {"username": {"type": "string", "title": "Username"}, "ip_limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Ip Limit"}, "ips": {"items": {"$ref": "#/components/schemas/OnlineIP"}, "type": "array", "title": "Ips"}}, "type": "object", "required": ["username", "ips"], "title": "UserOnlineIPs"}, "UserResponse": {"properties": {"proxies": {"type": "object", "title": "Proxies"}, "expire": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Expire", "nullable": true}, "data_limit": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Data Limit"}, "data_limit_reset_strategy": {"$ref": "#/components/schemas/UserDataLimitResetStrategy", "default": "no_reset"}, "inbounds": {"additionalProperties": {"items": {"type": "string"}, "type": "array"}, "propertyNames": {"$ref": "#/components/schemas/ProxyTypes"}, "type": "object", "title": "Inbounds", "default": {}}, "ip_limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Ip Limit"}, "hwid_limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Hwid Limit"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note", "nullable": true}, "announce": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Announce", "nullable": true}, "sub_updated_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Sub Updated At", "nullable": true}, "sub_last_user_agent": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sub Last User Agent", "nullable": true}, "sub_request_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Sub Request Count", "default": 0}, "online_ip_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Online Ip Count", "default": 0}, "hwid_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Hwid Count", "default": 0}, "online_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Online At", "nullable": true}, "on_hold_expire_duration": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "On Hold Expire Duration"}, "on_hold_timeout": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "On Hold Timeout", "nullable": true}, "auto_delete_in_days": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Auto Delete In Days"}, "next_plan": {"anyOf": [{"$ref": "#/components/schemas/NextPlanModel"}, {"type": "null"}], "nullable": true}, "username": {"type": "string", "title": "Username"}, "status": {"$ref": "#/components/schemas/UserStatus"}, "used_traffic": {"type": "integer", "title": "Used Traffic"}, "lifetime_used_traffic": {"type": "integer", "title": "Lifetime Used Traffic", "default": 0}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}, "ip_block_count": {"type": "integer", "title": "Ip Block Count", "default": 0}, "hwid_reject_count": {"type": "integer", "title": "Hwid Reject Count", "default": 0}, "links": {"items": {"type": "string"}, "type": "array", "title": "Links", "default": []}, "subscription_url": {"type": "string", "title": "Subscription Url", "default": ""}, "sub_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sub Token"}, "excluded_inbounds": {"additionalProperties": {"items": {"type": "string"}, "type": "array"}, "propertyNames": {"$ref": "#/components/schemas/ProxyTypes"}, "type": "object", "title": "Excluded Inbounds", "default": {}}, "admin": {"anyOf": [{"$ref": "#/components/schemas/Admin"}, {"type": "null"}]}, "warning": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Warning"}, "warning_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Warning At"}}, "type": "object", "required": ["proxies", "username", "status", "used_traffic", "created_at"], "title": "UserResponse"}, "UserStatus": {"type": "string", "enum": ["active", "disabled", "limited", "expired", "on_hold"], "title": "UserStatus"}, "UserStatusCreate": {"type": "string", "enum": ["active", "on_hold"], "title": "UserStatusCreate"}, "UserStatusModify": {"type": "string", "enum": ["active", "disabled", "on_hold"], "title": "UserStatusModify"}, "UserTemplateCreate": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "nullable": true}, "data_limit": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Data Limit", "description": "data_limit can be 0 or greater"}, "expire_duration": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Expire Duration", "description": "expire_duration can be 0 or greater in seconds"}, "username_prefix": {"anyOf": [{"type": "string", "maxLength": 20, "minLength": 1}, {"type": "null"}], "title": "Username Prefix"}, "username_suffix": {"anyOf": [{"type": "string", "maxLength": 20, "minLength": 1}, {"type": "null"}], "title": "Username Suffix"}, "inbounds": {"additionalProperties": {"items": {"type": "string"}, "type": "array"}, "propertyNames": {"$ref": "#/components/schemas/ProxyTypes"}, "type": "object", "title": "Inbounds", "default": {}}}, "type": "object", "title": "UserTemplateCreate", "example": {"data_limit": 0, "expire_duration": 0, "inbounds": {"vless": ["VLESS_INBOUND"], "vmess": ["VMESS_INBOUND"]}, "name": "my template 1"}}, "UserTemplateModify": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "nullable": true}, "data_limit": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Data Limit", "description": "data_limit can be 0 or greater"}, "expire_duration": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Expire Duration", "description": "expire_duration can be 0 or greater in seconds"}, "username_prefix": {"anyOf": [{"type": "string", "maxLength": 20, "minLength": 1}, {"type": "null"}], "title": "Username Prefix"}, "username_suffix": {"anyOf": [{"type": "string", "maxLength": 20, "minLength": 1}, {"type": "null"}], "title": "Username Suffix"}, "inbounds": {"additionalProperties": {"items": {"type": "string"}, "type": "array"}, "propertyNames": {"$ref": "#/components/schemas/ProxyTypes"}, "type": "object", "title": "Inbounds", "default": {}}}, "type": "object", "title": "UserTemplateModify", "example": {"data_limit": 0, "expire_duration": 0, "inbounds": {"vless": ["VLESS_INBOUND"], "vmess": ["VMESS_INBOUND"]}, "name": "my template 1"}}, "UserTemplateResponse": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "nullable": true}, "data_limit": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Data Limit", "description": "data_limit can be 0 or greater"}, "expire_duration": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Expire Duration", "description": "expire_duration can be 0 or greater in seconds"}, "username_prefix": {"anyOf": [{"type": "string", "maxLength": 20, "minLength": 1}, {"type": "null"}], "title": "Username Prefix"}, "username_suffix": {"anyOf": [{"type": "string", "maxLength": 20, "minLength": 1}, {"type": "null"}], "title": "Username Suffix"}, "inbounds": {"additionalProperties": {"items": {"type": "string"}, "type": "array"}, "propertyNames": {"$ref": "#/components/schemas/ProxyTypes"}, "type": "object", "title": "Inbounds", "default": {}}, "id": {"type": "integer", "title": "Id"}}, "type": "object", "required": ["id"], "title": "UserTemplateResponse"}, "UserUsageResponse": {"properties": {"node_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Node Id"}, "node_name": {"type": "string", "title": "Node Name"}, "used_traffic": {"type": "integer", "title": "Used Traffic"}}, "type": "object", "required": ["node_name", "used_traffic"], "title": "UserUsageResponse"}, "UserUsagesResponse": {"properties": {"username": {"type": "string", "title": "Username"}, "usages": {"items": {"$ref": "#/components/schemas/UserUsageResponse"}, "type": "array", "title": "Usages"}}, "type": "object", "required": ["username", "usages"], "title": "UserUsagesResponse"}, "UsersResponse": {"properties": {"users": {"items": {"$ref": "#/components/schemas/UserResponse"}, "type": "array", "title": "Users"}, "total": {"type": "integer", "title": "Total"}}, "type": "object", "required": ["users", "total"], "title": "UsersResponse"}, "UsersUsagesResponse": {"properties": {"usages": {"items": {"$ref": "#/components/schemas/UserUsageResponse"}, "type": "array", "title": "Usages"}}, "type": "object", "required": ["usages"], "title": "UsersUsagesResponse"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, "input": {"title": "Input"}, "ctx": {"type": "object", "title": "Context"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}, "WarningIn": {"properties": {"text": {"type": "string", "maxLength": 500, "title": "Text", "default": ""}}, "type": "object", "title": "WarningIn"}, "WeatherLocation": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name", "default": ""}, "lat": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Lat"}, "lon": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Lon"}}, "type": "object", "title": "WeatherLocation"}, "WebPagePreview": {"properties": {"settings": {"$ref": "#/components/schemas/WebPageSettings-Input"}, "username": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Username"}}, "type": "object", "required": ["settings"], "title": "WebPagePreview"}, "WebPageSettings-Input": {"properties": {"enabled": {"type": "boolean", "title": "Enabled", "default": true}, "title": {"type": "string", "maxLength": 100, "title": "Title", "default": ""}, "logo_url": {"type": "string", "maxLength": 1000, "title": "Logo Url", "default": ""}, "support_url": {"type": "string", "maxLength": 1000, "title": "Support Url", "default": ""}, "accent": {"type": "string", "maxLength": 20, "title": "Accent", "default": "#5b7cfa"}, "theme": {"type": "string", "pattern": "^(auto|dark|light)$", "title": "Theme", "default": "auto"}, "style": {"type": "string", "pattern": "^(soft|glass|clay)$", "title": "Style", "default": "soft"}, "default_lang": {"type": "string", "maxLength": 8, "title": "Default Lang", "default": "auto"}, "languages": {"items": {"type": "string"}, "type": "array", "title": "Languages", "default": ["en", "tr", "tk", "ru", "fa", "zh"]}, "happ_crypt": {"type": "boolean", "title": "Happ Crypt", "default": true}, "show_links": {"type": "boolean", "title": "Show Links", "default": true}, "show_qr": {"type": "boolean", "title": "Show Qr", "default": true}, "sections": {"items": {"$ref": "#/components/schemas/Section"}, "type": "array", "title": "Sections", "default": [{"id": "announce", "enabled": true}, {"id": "intro", "enabled": true}, {"id": "user", "enabled": true}, {"id": "devices", "enabled": true}, {"id": "install", "enabled": true}, {"id": "vpn", "enabled": true}, {"id": "link", "enabled": true}, {"id": "configs", "enabled": true}]}, "intro": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Intro", "default": {}}, "footer": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Footer", "default": {}}, "texts": {"additionalProperties": {"additionalProperties": {"type": "string"}, "type": "object"}, "type": "object", "title": "Texts", "default": {}}, "custom_css": {"type": "string", "maxLength": 20000, "title": "Custom Css", "default": ""}, "link_domain": {"type": "string", "maxLength": 300, "title": "Link Domain", "default": ""}, "show_devices": {"type": "boolean", "title": "Show Devices", "default": true}, "lock_on_device_limit": {"type": "boolean", "title": "Lock On Device Limit", "default": true}, "apps": {"anyOf": [{"additionalProperties": {"items": {"$ref": "#/components/schemas/App"}, "type": "array"}, "type": "object"}, {"type": "null"}], "title": "Apps"}}, "type": "object", "title": "WebPageSettings"}, "WebPageSettings-Output": {"properties": {"enabled": {"type": "boolean", "title": "Enabled", "default": true}, "title": {"type": "string", "maxLength": 100, "title": "Title", "default": ""}, "logo_url": {"type": "string", "maxLength": 1000, "title": "Logo Url", "default": ""}, "support_url": {"type": "string", "maxLength": 1000, "title": "Support Url", "default": ""}, "accent": {"type": "string", "maxLength": 20, "title": "Accent", "default": "#5b7cfa"}, "theme": {"type": "string", "pattern": "^(auto|dark|light)$", "title": "Theme", "default": "auto"}, "style": {"type": "string", "pattern": "^(soft|glass|clay)$", "title": "Style", "default": "soft"}, "default_lang": {"type": "string", "maxLength": 8, "title": "Default Lang", "default": "auto"}, "languages": {"items": {"type": "string"}, "type": "array", "title": "Languages", "default": ["en", "tr", "tk", "ru", "fa", "zh"]}, "happ_crypt": {"type": "boolean", "title": "Happ Crypt", "default": true}, "show_links": {"type": "boolean", "title": "Show Links", "default": true}, "show_qr": {"type": "boolean", "title": "Show Qr", "default": true}, "sections": {"items": {"$ref": "#/components/schemas/Section"}, "type": "array", "title": "Sections", "default": [{"id": "announce", "enabled": true}, {"id": "intro", "enabled": true}, {"id": "user", "enabled": true}, {"id": "devices", "enabled": true}, {"id": "install", "enabled": true}, {"id": "vpn", "enabled": true}, {"id": "link", "enabled": true}, {"id": "configs", "enabled": true}]}, "intro": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Intro", "default": {}}, "footer": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Footer", "default": {}}, "texts": {"additionalProperties": {"additionalProperties": {"type": "string"}, "type": "object"}, "type": "object", "title": "Texts", "default": {}}, "custom_css": {"type": "string", "maxLength": 20000, "title": "Custom Css", "default": ""}, "link_domain": {"type": "string", "maxLength": 300, "title": "Link Domain", "default": ""}, "show_devices": {"type": "boolean", "title": "Show Devices", "default": true}, "lock_on_device_limit": {"type": "boolean", "title": "Lock On Device Limit", "default": true}, "apps": {"anyOf": [{"additionalProperties": {"items": {"$ref": "#/components/schemas/App"}, "type": "array"}, "type": "object"}, {"type": "null"}], "title": "Apps"}}, "type": "object", "title": "WebPageSettings"}, "XrayVersionIn": {"properties": {"version": {"type": "string", "title": "Version"}}, "type": "object", "required": ["version"], "title": "XrayVersionIn"}}, "securitySchemes": {"OAuth2PasswordBearer": {"type": "oauth2", "flows": {"password": {"scopes": {}, "tokenUrl": "/api/admin/token"}}}}}}