{"openapi":"3.1.0","info":{"title":"PasarGuardAPI","description":"Unified GUI Censorship Resistant Solution","version":"5.2.1"},"paths":{"/":{"get":{"summary":"Base","operationId":"base","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health"}}}}}}},"/api/admin/token":{"post":{"tags":["Admin"],"summary":"Admin Token","description":"Authenticate an admin and issue a token.","operationId":"admin_token","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_admin_token"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/miniapp/token":{"post":{"tags":["Admin"],"summary":"Admin Mini App Token","description":"Authenticate an admin via Telegram MiniApp and issue a token.","operationId":"admin_mini_app_token","parameters":[{"name":"x-telegram-authorization","in":"header","required":true,"schema":{"type":"string","title":"X-Telegram-Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"409":{"description":"Conflict Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conflict"}}}},"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","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDetails"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["Admin"],"summary":"Create Admin","description":"Create a new admin.","operationId":"create_admin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCreate"}}},"required":true},"responses":{"201":{"description":"Admin created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDetails"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"409":{"description":"Conflict Error","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.","operationId":"modify_admin","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/AdminDetails"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"409":{"description":"Conflict Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conflict"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Remove Admin","description":"Remove an admin from the database.","operationId":"remove_admin","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/by-username/{username}":{"put":{"tags":["Admin"],"summary":"Modify Admin By Username","operationId":"modify_admin_by_username","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/AdminDetails"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"409":{"description":"Conflict Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conflict"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Remove Admin By Username","operationId":"remove_admin_by_username","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/by-id/{admin_id}":{"put":{"tags":["Admin"],"summary":"Modify Admin By Id","operationId":"modify_admin_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"admin_id","in":"path","required":true,"schema":{"type":"integer","title":"Admin Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminModify"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDetails"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"409":{"description":"Conflict Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conflict"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Remove Admin By Id","operationId":"remove_admin_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"admin_id","in":"path","required":true,"schema":{"type":"integer","title":"Admin Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","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.","operationId":"get_admins","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Ids"}},{"name":"usernames","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Usernames"}},{"name":"username","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"}},{"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":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminsResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admins/simple":{"get":{"tags":["Admin"],"summary":"Get lightweight admin list","description":"Returns only id and username for admins. Optimized for dropdowns and autocomplete.","operationId":"get_admins_simple","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Ids"}},{"name":"usernames","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Usernames"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"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":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}},{"name":"all","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"All"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminsSimpleResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/{username}/usage":{"get":{"tags":["Admin"],"summary":"Get Admin Usage","description":"Get admin usage aggregated from user traffic.","operationId":"get_admin_usage","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","default":"hour"}},{"name":"node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Node Id"}},{"name":"group_by_node","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Group By Node"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-01T00:00:00+03:30"],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-31T23:59:59+03:30"],"title":"End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUsageStatsList"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/by-username/{username}/usage":{"get":{"tags":["Admin"],"summary":"Get Admin Usage By Username","operationId":"get_admin_usage_by_username","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","default":"hour"}},{"name":"node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Node Id"}},{"name":"group_by_node","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Group By Node"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-01T00:00:00+03:30"],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-31T23:59:59+03:30"],"title":"End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUsageStatsList"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/by-id/{admin_id}/usage":{"get":{"tags":["Admin"],"summary":"Get Admin Usage By Id","operationId":"get_admin_usage_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"admin_id","in":"path","required":true,"schema":{"type":"integer","title":"Admin Id"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","default":"hour"}},{"name":"node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Node Id"}},{"name":"group_by_node","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Group By Node"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-01T00:00:00+03:30"],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-31T23:59:59+03:30"],"title":"End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUsageStatsList"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"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","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/by-username/{username}/users/disable":{"post":{"tags":["Admin"],"summary":"Disable All Active Users By Username","operationId":"disable_all_active_users_by_username","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/by-id/{admin_id}/users/disable":{"post":{"tags":["Admin"],"summary":"Disable All Active Users By Id","operationId":"disable_all_active_users_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"admin_id","in":"path","required":true,"schema":{"type":"integer","title":"Admin Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","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","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/by-username/{username}/users/activate":{"post":{"tags":["Admin"],"summary":"Activate All Disabled Users By Username","operationId":"activate_all_disabled_users_by_username","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/by-id/{admin_id}/users/activate":{"post":{"tags":["Admin"],"summary":"Activate All Disabled Users By Id","operationId":"activate_all_disabled_users_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"admin_id","in":"path","required":true,"schema":{"type":"integer","title":"Admin Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/{username}/users":{"delete":{"tags":["Admin"],"summary":"Remove All Users","description":"Remove all users under a specific admin.","operationId":"remove_all_users","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/by-username/{username}/users":{"delete":{"tags":["Admin"],"summary":"Remove All Users By Username","operationId":"remove_all_users_by_username","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/by-id/{admin_id}/users":{"delete":{"tags":["Admin"],"summary":"Remove All Users By Id","operationId":"remove_all_users_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"admin_id","in":"path","required":true,"schema":{"type":"integer","title":"Admin Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/{username}/reset":{"post":{"tags":["Admin"],"summary":"Reset Admin Usage","description":"Resets usage of admin.","operationId":"reset_admin_usage","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/AdminDetails"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/by-username/{username}/reset":{"post":{"tags":["Admin"],"summary":"Reset Admin Usage By Username","operationId":"reset_admin_usage_by_username","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/AdminDetails"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/by-id/{admin_id}/reset":{"post":{"tags":["Admin"],"summary":"Reset Admin Usage By Id","operationId":"reset_admin_usage_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"admin_id","in":"path","required":true,"schema":{"type":"integer","title":"Admin Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDetails"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admins/bulk/delete":{"post":{"tags":["Admin"],"summary":"Bulk Delete Admins","description":"Delete selected admins by ID.","operationId":"bulk_delete_admins","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAdminSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveAdminsResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admins/bulk/reset":{"post":{"tags":["Admin"],"summary":"Bulk Reset Admins Usage","description":"Reset usage for selected admins by ID.","operationId":"bulk_reset_admins_usage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAdminSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAdminsActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admins/bulk/disable":{"post":{"tags":["Admin"],"summary":"Bulk Disable Admins","description":"Disable selected admins by ID.","operationId":"bulk_disable_admins","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAdminSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAdminsActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admins/bulk/enable":{"post":{"tags":["Admin"],"summary":"Bulk Enable Admins","description":"Enable selected admins by ID.","operationId":"bulk_enable_admins","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAdminSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAdminsActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admins/bulk/users/disable":{"post":{"tags":["Admin"],"summary":"Bulk Disable All Active Users","description":"Disable all active users under selected admins.","operationId":"bulk_disable_all_active_users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAdminSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAdminsActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admins/bulk/users/activate":{"post":{"tags":["Admin"],"summary":"Bulk Activate All Disabled Users","description":"Activate all disabled users under selected admins.","operationId":"bulk_activate_all_disabled_users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAdminSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAdminsActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admins/bulk/users":{"delete":{"tags":["Admin"],"summary":"Bulk Remove All Users","description":"Remove all users under selected admins.","operationId":"bulk_remove_all_users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAdminSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAdminsActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/api_key":{"post":{"tags":["API Keys"],"summary":"Create Api Key","operationId":"create_api_key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyCreateResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"409":{"description":"Conflict Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conflict"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/api_keys":{"get":{"tags":["API Keys"],"summary":"List Api Keys","operationId":"list_api_keys","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":"key_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Key Id"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/APIKeyStatus"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeysResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/api_keys/bulk/delete":{"post":{"tags":["API Keys"],"summary":"Bulk Delete Api Keys","operationId":"bulk_delete_api_keys","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAPIKeySelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveAPIKeysResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/api_key/{key_id}":{"patch":{"tags":["API Keys"],"summary":"Modify Api Key","operationId":"modify_api_key","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"409":{"description":"Conflict Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conflict"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["API Keys"],"summary":"Get Api Key","operationId":"get_api_key","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["API Keys"],"summary":"Remove Api Key","operationId":"remove_api_key","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/api_key/{key_id}/revoke":{"post":{"tags":["API Keys"],"summary":"Revoke Api Key","operationId":"revoke_api_key","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyCreateResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin-roles":{"get":{"tags":["Admin Roles"],"summary":"Get Roles","description":"List all roles.","operationId":"get_roles","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"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":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRolesResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin-roles/simple":{"get":{"tags":["Admin Roles"],"summary":"Get Roles Simple","description":"List all roles as lightweight id/name/is_owner tuples.","operationId":"get_roles_simple","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRolesSimpleResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin-role/{role_id}":{"get":{"tags":["Admin Roles"],"summary":"Get Role","description":"Get a role by ID.","operationId":"get_role","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"integer","title":"Role Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRoleResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Admin Roles"],"summary":"Modify Role","description":"Modify a role. Owner only. Owner role cannot be modified.","operationId":"modify_role","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"integer","title":"Role Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRoleModify"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRoleResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"409":{"description":"Conflict Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conflict"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Roles"],"summary":"Delete Role","description":"Delete a role. Owner only. Built-in roles and in-use roles cannot be deleted.","operationId":"delete_role","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"integer","title":"Role Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"409":{"description":"Conflict Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conflict"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin-role":{"post":{"tags":["Admin Roles"],"summary":"Create Role","description":"Create a new role. Owner only.","operationId":"create_role","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRoleCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRoleResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"409":{"description":"Conflict Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conflict"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/setup/owner":{"post":{"tags":["Setup"],"summary":"Create Owner","description":"Create the owner admin using a one-time temp key.","operationId":"create_owner","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDetails"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"409":{"description":"Conflict Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conflict"}}}},"410":{"description":"Key already used or expired"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Setup"],"summary":"Reset Owner Password","description":"Reset the owner admin's password using a one-time temp key.","operationId":"reset_owner_password","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerResetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDetails"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"410":{"description":"Key already used or expired"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Setup"],"summary":"Delete Owner","description":"Delete the owner admin using a one-time temp key.","operationId":"delete_owner","parameters":[{"name":"key","in":"query","required":true,"schema":{"type":"string","description":"One-time temp key for deleting the owner admin","title":"Key"},"description":"One-time temp key for deleting the owner admin"}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"410":{"description":"Key already used or expired"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/setup/owner/upgrade":{"post":{"tags":["Setup"],"summary":"Upgrade Owner","description":"Upgrade an existing admin to owner using a one-time temp key.","operationId":"upgrade_owner","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerUpgradeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDetails"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"409":{"description":"Conflict Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conflict"}}}},"410":{"description":"Key already used or expired"},"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, disk, and user metrics.","operationId":"get_system_stats","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"admin_username","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Username"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemStats"}}}},"401":{"description":"Unauthorized Error","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/system/resources":{"get":{"tags":["System"],"summary":"Get System Resource Stats","description":"Fetch system resource stats without user metrics.","operationId":"get_system_resource_stats","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemResourceStats"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/system/users":{"get":{"tags":["System"],"summary":"Get System Users Stats","description":"Fetch user stats and traffic metrics without system resource stats.","operationId":"get_system_users_stats","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"admin_username","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Username"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemUsersStats"}}}},"401":{"description":"Unauthorized Error","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/inbounds":{"get":{"tags":["System"],"summary":"Get Inbounds","description":"Retrieve inbound configurations grouped by protocol.","operationId":"get_inbounds","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Get Inbounds"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/inbounds/details":{"get":{"tags":["System"],"summary":"Get Inbound Details","description":"Retrieve lightweight inbound metadata for dashboard forms.","operationId":"get_inbound_details","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InboundSummary"},"type":"array","title":"Response Get Inbound Details"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/wireguard/subnets":{"get":{"tags":["System"],"summary":"Get Wireguard Subnets","description":"Per-subnet WireGuard address usage: capacity, used/free counts and the first free IPs.","operationId":"get_wireguard_subnets","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WireGuardSubnetUsage"},"type":"array","title":"Response Get Wireguard Subnets"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/workers/health":{"get":{"tags":["System"],"summary":"Get Workers Health","operationId":"get_workers_health","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkersHealth"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/settings":{"get":{"tags":["Settings"],"summary":"Get Settings","operationId":"get_settings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsSchema"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["Settings"],"summary":"Modify Settings","operationId":"modify_settings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsSchema"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/settings/general":{"get":{"tags":["Settings"],"summary":"Get General Settings","operationId":"get_general_settings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/General"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/group":{"post":{"tags":["Groups"],"summary":"Create a new group","description":"Creates a new group in the system. Only authorized administrators can create groups.","operationId":"create_group","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/groups":{"get":{"tags":["Groups"],"summary":"List all groups","description":"Retrieves a paginated list of all groups in the system. Requires admin authentication.","operationId":"get_all_groups","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Ids"}},{"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupsResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/groups/simple":{"get":{"tags":["Groups"],"summary":"Get lightweight group list","description":"Returns only id and name for groups. Optimized for dropdowns and autocomplete.","operationId":"get_groups_simple","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Ids"}},{"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":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}},{"name":"all","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"All"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupsSimpleResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/group/{group_id}":{"get":{"tags":["Groups"],"summary":"Get group details","description":"Retrieves detailed information about a specific group by its ID.","operationId":"get_group","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"integer","title":"Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Groups"],"summary":"Modify group","description":"Updates an existing group's information. Only authorized administrators can modify groups.","operationId":"modify_group","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"integer","title":"Group Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupModify"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Groups"],"summary":"Remove group","description":"Deletes a group from the system. Only authorized administrators can delete groups.","operationId":"remove_group","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"integer","title":"Group Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/groups/bulk/add":{"post":{"tags":["Groups"],"summary":"Bulk add groups to users","description":"Bulk assign groups to multiple users, users under specific admins, or all users.\n\n- **group_ids**: List of group IDs to add (required)\n- **users**: Optional list of user IDs to assign the groups to\n- **admins**: Optional list of admin IDs — their users will be targeted\n\nNotes:\n- If neither 'users' nor 'admins' are provided, groups will be added to *all users*\n- Existing user-group associations will be ignored (no duplication)\n- Returns list of affected users (those who received new group associations)","operationId":"bulk_add_groups_to_users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkGroup"}}},"required":true},"responses":{"200":{"description":"Success confirmation","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/groups/bulk/remove":{"post":{"tags":["Groups"],"summary":"Bulk remove groups from users","description":"Bulk remove groups from multiple users, users under specific admins, or all users.\n\n- **group_ids**: List of group IDs to remove (required)\n- **users**: Optional list of user IDs to remove the groups from\n- **admins**: Optional list of admin IDs — their users will be targeted\n\nNotes:\n- If neither 'users' nor 'admins' are provided, groups will be removed from *all users*\n- Only existing user-group associations will be removed\n- Returns list of affected users (those who had groups removed)","operationId":"bulk_remove_users_from_groups","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkGroup"}}},"required":true},"responses":{"200":{"description":"Success confirmation","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/groups/bulk/delete":{"post":{"tags":["Groups"],"summary":"Bulk Delete Groups","description":"Delete selected groups by ID.","operationId":"bulk_delete_groups","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkGroupSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveGroupsResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/groups/bulk/disable":{"post":{"tags":["Groups"],"summary":"Bulk Disable Groups","description":"Disable selected groups by ID.","operationId":"bulk_disable_groups","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkGroupSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkGroupsActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/groups/bulk/enable":{"post":{"tags":["Groups"],"summary":"Bulk Enable Groups","description":"Enable selected groups by ID.","operationId":"bulk_enable_groups","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkGroupSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkGroupsActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/core":{"post":{"tags":["Core"],"summary":"Create Core Config","description":"Create a new core configuration.","operationId":"create_core_config","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoreCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoreResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/core/reality-scan":{"post":{"tags":["Core"],"summary":"Scan Reality Target","operationId":"scan_reality_target","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealityScanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealityScanResult"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/core/{core_id}":{"get":{"tags":["Core"],"summary":"Get Core Config","description":"Get a core configuration by its ID.","operationId":"get_core_config","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"core_id","in":"path","required":true,"schema":{"type":"integer","title":"Core Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoreResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","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 Core Config","description":"Update an existing core configuration.","operationId":"modify_core_config","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"core_id","in":"path","required":true,"schema":{"type":"integer","title":"Core Id"}},{"name":"restart_nodes","in":"query","required":true,"schema":{"type":"boolean","title":"Restart Nodes"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoreCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoreResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","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 Config","description":"Delete a core configuration.","operationId":"delete_core_config","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"core_id","in":"path","required":true,"schema":{"type":"integer","title":"Core Id"}},{"name":"restart_nodes","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Restart Nodes"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cores":{"get":{"tags":["Core"],"summary":"Get All Cores","description":"Get a list of all core configurations.","operationId":"get_all_cores","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Ids"}},{"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoreResponseList"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cores/simple":{"get":{"tags":["Core"],"summary":"Get lightweight core list","description":"Returns only id and name for cores. Optimized for dropdowns and autocomplete.","operationId":"get_cores_simple","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Ids"}},{"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":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}},{"name":"all","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"All"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoresSimpleResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/core/{core_id}/restart":{"post":{"tags":["Core"],"summary":"Restart Core","description":"restart nodes related to the core config","operationId":"restart_core","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"core_id","in":"path","required":true,"schema":{"type":"integer","title":"Core Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cores/bulk/delete":{"post":{"tags":["Core"],"summary":"Bulk Delete Cores","description":"Delete selected cores by ID.","operationId":"bulk_delete_cores","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCoreSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveCoresResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/client_template":{"post":{"tags":["Client Template"],"summary":"Create Client Template","operationId":"create_client_template","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientTemplateCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientTemplateResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/client_template/{template_id}":{"get":{"tags":["Client Template"],"summary":"Get Client Template","operationId":"get_client_template","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/ClientTemplateResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Client Template"],"summary":"Modify Client Template","operationId":"modify_client_template","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/ClientTemplateModify"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientTemplateResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Client Template"],"summary":"Remove Client Template","operationId":"remove_client_template","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/client_templates":{"get":{"tags":["Client Template"],"summary":"Get Client Templates","operationId":"get_client_templates","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Ids"}},{"name":"template_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ClientTemplateType"},{"type":"null"}],"title":"Template Type"}},{"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientTemplateResponseList"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/client_templates/simple":{"get":{"tags":["Client Template"],"summary":"Get Client Templates Simple","operationId":"get_client_templates_simple","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Ids"}},{"name":"template_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ClientTemplateType"},{"type":"null"}],"title":"Template Type"}},{"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":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}},{"name":"all","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"All"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientTemplatesSimpleResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/client_templates/bulk/delete":{"post":{"tags":["Client Template"],"summary":"Bulk Delete Client Templates","description":"Delete selected client templates by ID.","operationId":"bulk_delete_client_templates","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkClientTemplateSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveClientTemplatesResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/host/{host_id}":{"get":{"tags":["Host"],"summary":"Get Host","description":"get host by **id**","operationId":"get_host","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"integer","title":"Host Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseHost"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Host"],"summary":"Modify Host","description":"modify host by **id**\n\n**inbound_tag** must be available in one of the configured cores","operationId":"modify_host","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"integer","title":"Host Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateHost"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseHost"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Host"],"summary":"Remove Host","description":"remove host by **id**","operationId":"remove_host","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"integer","title":"Host Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/hosts":{"get":{"tags":["Host"],"summary":"Get Hosts","description":"Get proxy hosts.","operationId":"get_hosts","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Ids"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BaseHost"},"title":"Response Get Hosts"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Host"],"summary":"Modify Hosts","description":"Modify proxy hosts and update the configuration.","operationId":"modify_hosts","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreateHost"},"title":"Modified Hosts"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BaseHost"},"title":"Response Modify Hosts"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/host/":{"post":{"tags":["Host"],"summary":"Create Host","description":"create a new host\n\n**inbound_tag** must be available in one of the configured cores","operationId":"create_host","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateHost"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseHost"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/hosts/bulk/delete":{"post":{"tags":["Host"],"summary":"Bulk Delete Hosts","description":"Delete selected hosts by ID.","operationId":"bulk_delete_hosts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkHostSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveHostsResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/hosts/bulk/disable":{"post":{"tags":["Host"],"summary":"Bulk Disable Hosts","description":"Disable selected hosts by ID.","operationId":"bulk_disable_hosts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkHostSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkHostsActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/hosts/bulk/enable":{"post":{"tags":["Host"],"summary":"Bulk Enable Hosts","description":"Enable selected hosts by ID.","operationId":"bulk_enable_hosts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkHostSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkHostsActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/node/settings":{"get":{"tags":["Node"],"summary":"Get Node Settings","description":"Retrieve the current node settings.","operationId":"get_node_settings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeSettings"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/node/usage":{"get":{"tags":["Node"],"summary":"Get Usage","description":"Retrieve usage statistics for nodes within a specified date range.","operationId":"get_usage","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","default":"hour"}},{"name":"node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Node Id"}},{"name":"group_by_node","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Group By Node"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-01T00:00:00+03:30"],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-31T23:59:59+03:30"],"title":"End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeUsageStatsList"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/node/user_counts/{metric}":{"get":{"tags":["Node"],"summary":"Get User Count Metric","description":"Retrieve one user activity/status count metric from node user usage rows.","operationId":"get_user_count_metric","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"metric","in":"path","required":true,"schema":{"$ref":"#/components/schemas/UserCountMetric"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","default":"hour"}},{"name":"node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Node Id"}},{"name":"group_by_node","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Group By Node"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-01T00:00:00+03:30"],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-31T23:59:59+03:30"],"title":"End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCountMetricStatsList"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","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 authorized admins.","operationId":"get_nodes","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"core_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Core Id"}},{"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":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Ids"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/NodeStatus"},{"type":"array","items":{"$ref":"#/components/schemas/NodeStatus"}},{"type":"null"}],"title":"Status"}},{"name":"enabled","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Enabled"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodesResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nodes/simple":{"get":{"tags":["Node"],"summary":"Get lightweight node list","description":"Returns only id and name for nodes. Optimized for dropdowns and autocomplete.","operationId":"get_nodes_simple","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Ids"}},{"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":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}},{"name":"all","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"All"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodesSimpleResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nodes/reconnect":{"post":{"tags":["Node"],"summary":"Reconnect All Node","description":"Trigger reconnection for all nodes or a specific core.","operationId":"reconnect_all_node","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"core_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Core Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/node":{"post":{"tags":["Node"],"summary":"Create Node","description":"Create a new node to the database.","operationId":"create_node","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"409":{"description":"Conflict Error","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","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","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":"Modify a node's details. Only accessible to authorized admins.","operationId":"modify_node","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","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":"Remove a node and remove it from xray in the background.","operationId":"remove_node","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"integer","title":"Node Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","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":{"post":{"tags":["Node"],"summary":"Update Node","operationId":"update_node","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/node/{node_id}/core_update":{"post":{"tags":["Node"],"summary":"Update Core","operationId":"update_core","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/NodeCoreUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/node/{node_id}/geofiles":{"post":{"tags":["Node"],"summary":"Update Geofiles","operationId":"update_geofiles","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/NodeGeoFilesUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/node/{node_id}/reset":{"post":{"tags":["Node"],"summary":"Reset Node Usage","description":"Reset node traffic usage (uplink and downlink).\nCreates a log entry in node_usage_reset_logs table.\nOnly accessible to authorized admins.","operationId":"reset_node_usage","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/node/{node_id}/reconnect":{"post":{"tags":["Node"],"summary":"Reconnect Node","description":"Trigger a reconnection for the specified node. Only accessible to authorized admins.","operationId":"reconnect_node","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/node/{node_id}/sync":{"put":{"tags":["Node"],"summary":"Sync Node","operationId":"sync_node","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"integer","title":"Node Id"}},{"name":"flush_users","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Flush Users"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/node/{node_id}/logs":{"get":{"tags":["Node"],"summary":"Node Logs","description":"Stream logs for a specific node as Server-Sent Events.","operationId":"node_logs","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/node/{node_id}/stats":{"get":{"tags":["Node"],"summary":"Get Node Stats Periodic","operationId":"get_node_stats_periodic","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"integer","title":"Node Id"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","default":"hour"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-01T00:00:00+03:30"],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-31T23:59:59+03:30"],"title":"End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeStatsList"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/node/{node_id}/realtime_stats":{"get":{"tags":["Node"],"summary":"Realtime Node Stats","description":"Retrieve node real-time statistics.","operationId":"realtime_node_stats","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/NodeRealtimeStats"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/node/{node_id}/outbounds_latency":{"get":{"tags":["Node"],"summary":"Node Outbounds Latency","description":"Retrieve outbound latency for one outbound or all outbounds of a node.","operationId":"node_outbounds_latency","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"integer","title":"Node Id"}},{"name":"name","in":"query","required":false,"schema":{"type":"string","default":"","title":"Name"}},{"name":"timeout","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Timeout"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeOutboundsLatencyResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nodes/realtime_stats":{"get":{"tags":["Node"],"summary":"Realtime Nodes Stats","description":"Retrieve nodes real-time statistics.","operationId":"realtime_nodes_stats","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/NodeRealtimeStats"},{"type":"null"}]},"type":"object","title":"Response Realtime Nodes Stats"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/node/online_stats/{user_id}/ip":{"get":{"tags":["Node"],"summary":"User Online Ip List All Nodes","description":"Retrieve user ips from all nodes.","operationId":"user_online_ip_list_all_nodes","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIPListAll"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/node/{node_id}/online_stats/{user_id}":{"get":{"tags":["Node"],"summary":"User Online Stats","description":"Retrieve user online stats by node.","operationId":"user_online_stats","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"integer","title":"Node Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer"},"title":"Response User Online Stats"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/node/{node_id}/online_stats/{user_id}/ip":{"get":{"tags":["Node"],"summary":"User Online Ip List","description":"Retrieve user ips by node.","operationId":"user_online_ip_list","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"integer","title":"Node Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIPList"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nodes/clear_usage_data/{table}":{"delete":{"tags":["Node"],"summary":"Clear usage data from a specified table","description":"Deletes **all rows** from the selected usage data table. Use with caution.\n\nAllowed tables:\n    - `node_user_usages`: Deletes user-specific node usage traffic records.\n    - `node_usages`: Deletes node-level aggregated traffic (uplink/downlink) records.\n\n**Optional filters:**\n    - `start`: ISO 8601 timestamp to filter from (inclusive)\n    - `end`: ISO 8601 timestamp to filter to (exclusive)\n\n⚠️ This operation is irreversible. Ensure correct usage in production environments.","operationId":"clear_usage_data","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"table","in":"path","required":true,"schema":{"$ref":"#/components/schemas/UsageTable"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nodes/bulk/delete":{"post":{"tags":["Node"],"summary":"Bulk Delete Nodes","description":"Delete selected nodes by ID.","operationId":"bulk_delete_nodes","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNodeSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveNodesResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/nodes/bulk/disable":{"post":{"tags":["Node"],"summary":"Bulk Disable Nodes","description":"Disable selected nodes by ID.","operationId":"bulk_disable_nodes","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNodeSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNodesActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/nodes/bulk/enable":{"post":{"tags":["Node"],"summary":"Bulk Enable Nodes","description":"Enable selected nodes by ID.","operationId":"bulk_enable_nodes","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNodeSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNodesActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/nodes/bulk/reset":{"post":{"tags":["Node"],"summary":"Bulk Reset Nodes Usage","description":"Reset usage for selected nodes by ID.","operationId":"bulk_reset_nodes_usage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNodeSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNodesActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/nodes/bulk/reconnect":{"post":{"tags":["Node"],"summary":"Bulk Reconnect Nodes","description":"Reconnect selected nodes by ID.","operationId":"bulk_reconnect_nodes","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNodeSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNodesActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/nodes/bulk/update":{"post":{"tags":["Node"],"summary":"Bulk Update Nodes","description":"Update selected nodes by ID.","operationId":"bulk_update_nodes","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNodeSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNodesActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/user":{"post":{"tags":["User"],"summary":"Create User","description":"Create 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 datetime 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- **proxy_settings**: Dictionary of protocol settings (e.g., `vmess`, `vless`) will generate data for all protocol by default.\n- **group_ids**: List of group IDs to assign to the user.\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":"create_user","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"409":{"description":"Conflict Error","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}":{"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 datetime 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- **group_ids**: List of new group IDs to assign to the user. Empty list 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","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","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","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["User"],"summary":"Get User","description":"Get user information","operationId":"get_user","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/by-username/{username}":{"put":{"tags":["User"],"summary":"Modify User By Username","operationId":"modify_user_by_username","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","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 By Username","operationId":"remove_user_by_username","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["User"],"summary":"Get User By Username","operationId":"get_user_by_username","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/by-id/{user_id}":{"put":{"tags":["User"],"summary":"Modify User By Id","operationId":"modify_user_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","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 By Id","operationId":"remove_user_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["User"],"summary":"Get User By Id","operationId":"get_user_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/{username}/disabled":{"put":{"tags":["User"],"summary":"Set User Disabled","operationId":"set_user_disabled","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserStatusToggle"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/by-username/{username}/disabled":{"put":{"tags":["User"],"summary":"Set User Disabled By Username","operationId":"set_user_disabled_by_username","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserStatusToggle"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/by-id/{user_id}/disabled":{"put":{"tags":["User"],"summary":"Set User Disabled By Id","operationId":"set_user_disabled_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserStatusToggle"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","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","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/by-username/{username}/reset":{"post":{"tags":["User"],"summary":"Reset User Data Usage By Username","operationId":"reset_user_data_usage_by_username","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/by-id/{user_id}/reset":{"post":{"tags":["User"],"summary":"Reset User Data Usage By Id","operationId":"reset_user_data_usage_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","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","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/by-username/{username}/revoke_sub":{"post":{"tags":["User"],"summary":"Revoke User Subscription By Username","operationId":"revoke_user_subscription_by_username","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/by-id/{user_id}/revoke_sub":{"post":{"tags":["User"],"summary":"Revoke User Subscription By Id","operationId":"revoke_user_subscription_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/reset":{"post":{"tags":["User"],"summary":"Reset Users Data Usage","description":"Reset all users data usage","operationId":"reset_users_data_usage","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/users/sub_update/chart":{"get":{"tags":["User"],"summary":"Get Users Sub Update Chart","description":"Get subscription agent distribution over a period (optionally filtered by user_id/username).","operationId":"get_users_sub_update_chart","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"}},{"name":"username","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"}},{"name":"admin_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Admin Id"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","default":"hour"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSubscriptionUpdateChart"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"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","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/by-username/{username}/set_owner":{"put":{"tags":["User"],"summary":"Set Owner By Username","operationId":"set_owner_by_username","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/by-id/{user_id}/set_owner":{"put":{"tags":["User"],"summary":"Set Owner By Id","operationId":"set_owner_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"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","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/by-username/{username}/active_next":{"post":{"tags":["User"],"summary":"Active Next Plan By Username","operationId":"active_next_plan_by_username","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 Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/by-id/{user_id}/active_next":{"post":{"tags":["User"],"summary":"Active Next Plan By Id","operationId":"active_next_plan_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/{user_id}/subscription/{client_type}":{"get":{"tags":["User"],"summary":"Get User Subscription By Id","description":"Get a user's subscription content in the requested format.","operationId":"get_user_subscription_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"client_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ConfigFormat"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/{username}/sub_update":{"get":{"tags":["User"],"summary":"Get User Sub Update List","description":"Get user subscription agent list","operationId":"get_user_sub_update_list","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSubscriptionUpdateList"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/by-username/{username}/sub_update":{"get":{"tags":["User"],"summary":"Get User Sub Update List By Username","operationId":"get_user_sub_update_list_by_username","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSubscriptionUpdateList"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/by-id/{user_id}/sub_update":{"get":{"tags":["User"],"summary":"Get User Sub Update List By Id","operationId":"get_user_sub_update_list_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSubscriptionUpdateList"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"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","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":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Ids"}},{"name":"username","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Username"}},{"name":"usernames","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Usernames"}},{"name":"admin","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Admin"}},{"name":"admin_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Admin Ids"}},{"name":"group","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Group"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/UserStatus"},{"type":"array","items":{"$ref":"#/components/schemas/UserStatus"}},{"type":"null"}],"title":"Status"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}},{"name":"proxy_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proxy Id"}},{"name":"data_limit_reset_strategy","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DataLimitResetStrategy"},{"type":"array","items":{"$ref":"#/components/schemas/DataLimitResetStrategy"}},{"type":"null"}],"title":"Data Limit Reset Strategy"}},{"name":"data_limit_min","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Data Limit Min"}},{"name":"data_limit_max","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Data Limit Max"}},{"name":"expire_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2026-01-01T00:00:00+03:30"],"title":"Expire After"}},{"name":"expire_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2026-01-31T23:59:59+03:30"],"title":"Expire Before"}},{"name":"online_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2026-01-01T00:00:00+03:30"],"title":"Online After"}},{"name":"online_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2026-01-31T23:59:59+03:30"],"title":"Online Before"}},{"name":"online","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Online"}},{"name":"no_data_limit","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"No Data Limit"}},{"name":"no_expire","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"No Expire"}},{"name":"load_sub","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Load Sub"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsersResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/simple":{"get":{"tags":["User"],"summary":"Get lightweight user list","description":"Returns only id and username for users. Optimized for dropdowns and autocomplete.","operationId":"get_users_simple","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Ids"}},{"name":"usernames","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Usernames"}},{"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":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}},{"name":"all","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"All"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsersSimpleResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/{username}/usage":{"get":{"tags":["User"],"summary":"Get User Usage","description":"Get users usage","operationId":"get_user_usage","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","default":"hour"}},{"name":"node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Node Id"}},{"name":"group_by_node","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Group By Node"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-01T00:00:00+03:30"],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-31T23:59:59+03:30"],"title":"End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUsageStatsList"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/by-username/{username}/usage":{"get":{"tags":["User"],"summary":"Get User Usage By Username","operationId":"get_user_usage_by_username","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","default":"hour"}},{"name":"node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Node Id"}},{"name":"group_by_node","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Group By Node"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-01T00:00:00+03:30"],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-31T23:59:59+03:30"],"title":"End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUsageStatsList"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/by-id/{user_id}/usage":{"get":{"tags":["User"],"summary":"Get User Usage By Id","operationId":"get_user_usage_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","default":"hour"}},{"name":"node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Node Id"}},{"name":"group_by_node","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Group By Node"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-01T00:00:00+03:30"],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-31T23:59:59+03:30"],"title":"End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUsageStatsList"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","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","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","default":"hour"}},{"name":"node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Node Id"}},{"name":"group_by_node","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Group By Node"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-01T00:00:00+03:30"],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-31T23:59:59+03:30"],"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/UserUsageStatsList"}}}},"401":{"description":"Unauthorized Error","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/counts/{metric}":{"get":{"tags":["User"],"summary":"Get Users Count Metric","description":"Get one users activity/status count metric from usage rows.","operationId":"get_users_count_metric","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"metric","in":"path","required":true,"schema":{"$ref":"#/components/schemas/UserCountMetric"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","default":"hour"}},{"name":"node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Node Id"}},{"name":"group_by_node","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Group By Node"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-01T00:00:00+03:30"],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-31T23:59:59+03:30"],"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/UserCountMetricStatsList"}}}},"401":{"description":"Unauthorized Error","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 cleanup-target users in the specified scope.\n\n- **target**: `expired` | `limited` | `on_hold` | `disabled`\n- **expired_after** / **expired_before** UTC datetime (optional)\n- For `expired`: filters by expiration date.\n- For `limited` / `on_hold` / `disabled`: filters by last_status_change (when they entered that status).","operationId":"get_expired_users","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"admin_username","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Username"}},{"name":"target","in":"query","required":false,"schema":{"enum":["expired","limited","on_hold","disabled"],"type":"string","default":"expired","title":"Target"}},{"name":"expired_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-01T00:00:00+03:30"],"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+03:30"],"title":"Expired Before"}},{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Dry Run"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Get Expired Users"}}}},"401":{"description":"Unauthorized Error","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 cleanup-target users in the specified scope.\n\n- **target**: `expired` | `limited` | `on_hold` | `disabled`\n- **expired_after** / **expired_before** UTC datetime (optional)\n- For `expired`: filters by expiration date.\n- For `limited` / `on_hold` / `disabled`: filters by last_status_change (when they entered that status).\n- **dry_run**: if true, returns users that would be deleted without deleting them.","operationId":"delete_expired_users","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"admin_username","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Username"}},{"name":"target","in":"query","required":false,"schema":{"enum":["expired","limited","on_hold","disabled"],"type":"string","default":"expired","title":"Target"}},{"name":"expired_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-01T00:00:00+03:30"],"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+03:30"],"title":"Expired Before"}},{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Dry Run"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveUsersResponse"}}}},"401":{"description":"Unauthorized Error","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/bulk/delete":{"post":{"tags":["User"],"summary":"Bulk Delete Users","description":"Delete selected users by ID.","operationId":"bulk_delete_users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUsersSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveUsersResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/users/bulk/reset":{"post":{"tags":["User"],"summary":"Bulk Reset Users Data Usage","description":"Reset usage for selected users by ID.","operationId":"bulk_reset_users_data_usage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUsersSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUsersActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/users/bulk/disable":{"post":{"tags":["User"],"summary":"Bulk Disable Users","description":"Disable selected users by ID.","operationId":"bulk_disable_users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUsersSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUsersActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/users/bulk/enable":{"post":{"tags":["User"],"summary":"Bulk Enable Users","description":"Enable selected users by ID.","operationId":"bulk_enable_users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUsersSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUsersActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/users/bulk/revoke_sub":{"post":{"tags":["User"],"summary":"Bulk Revoke Users Subscription","description":"Revoke subscriptions for selected users by ID.","operationId":"bulk_revoke_users_subscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUsersSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUsersActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/users/bulk/set_owner":{"put":{"tags":["User"],"summary":"Bulk Set Owner","description":"Set a new owner for selected users by ID.","operationId":"bulk_set_owner","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUsersSetOwner"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUsersActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/user/from_template":{"post":{"tags":["User"],"summary":"Create User From Template","operationId":"create_user_from_template","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserFromTemplate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"401":{"description":"Unauthorized Error","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/users/bulk/from_template":{"post":{"tags":["User"],"summary":"Bulk Create Users From Template","description":"Bulk create users from a template using configurable username strategies.\n\n- Includes the template creation fields plus `count`, `strategy`, and `start_number` (for sequences).\n- **strategy**: Username generation strategy — `sequence` or `random`.\n- **start_number**: Optional starting suffix for `sequence` strategy. Defaults to `1` and does not parse numbers from the base username.\n\nReturns subscription URLs for created users.","operationId":"bulk_create_users_from_template","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUsersFromTemplate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUsersCreateResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"409":{"description":"Conflict Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conflict"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/users/bulk/apply_template":{"post":{"tags":["User"],"summary":"Bulk Apply Template To Users","description":"Apply a user template to selected existing users by ID.","operationId":"bulk_apply_template_to_users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUsersApplyTemplate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUsersActionResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/user/from_template/{username}":{"put":{"tags":["User"],"summary":"Modify User With Template","operationId":"modify_user_with_template","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyUserByTemplate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"401":{"description":"Unauthorized Error","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/from_template/by-username/{username}":{"put":{"tags":["User"],"summary":"Modify User With Template By Username","operationId":"modify_user_with_template_by_username","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyUserByTemplate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"401":{"description":"Unauthorized Error","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/from_template/by-id/{user_id}":{"put":{"tags":["User"],"summary":"Modify User With Template By Id","operationId":"modify_user_with_template_by_id","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyUserByTemplate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"401":{"description":"Unauthorized Error","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/bulk/expire":{"post":{"tags":["User"],"summary":"Bulk sum/sub to expire of users","description":"Bulk expire users based on the provided criteria.\n\n- **amount**: amount to adjust the user's quota (in seconds, positive to increase, negative to decrease) required\n- **user_ids**: Optional list of user IDs to modify\n- **admins**: Optional list of admin IDs — their users will be targeted\n- **status**: Optional status to filter users (e.g., \"expired\", \"active\"), Empty means no filtering\n- **group_ids**: Optional list of group IDs to filter users by their group membership\n- **expire_after**: Optional UTC datetime to filter users whose expire date is on or after this date\n- **expire_before**: Optional UTC datetime to filter users whose expire date is on or before this date","operationId":"bulk_modify_users_expire","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUser"}}},"required":true},"responses":{"200":{"description":"Success confirmation","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized Error","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/users/bulk/data_limit":{"post":{"tags":["User"],"summary":"Bulk sum/sub to data limit of users","description":"Bulk modify users' data limit based on the provided criteria.\n\n- **amount**: amount to adjust the user's quota (positive to increase, negative to decrease) required\n- **user_ids**: Optional list of user IDs to modify\n- **admins**: Optional list of admin IDs — their users will be targeted\n- **status**: Optional status to filter users (e.g., \"expired\", \"active\"), Empty means no filtering\n- **group_ids**: Optional list of group IDs to filter users by their group membership\n- **expire_after**: Optional UTC datetime to filter users whose expire date is on or after this date\n- **expire_before**: Optional UTC datetime to filter users whose expire date is on or before this date","operationId":"bulk_modify_users_datalimit","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUser"}}},"required":true},"responses":{"200":{"description":"Success confirmation","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized Error","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/users/bulk/proxy_settings":{"post":{"tags":["User"],"summary":"Bulk modify users proxy settings","operationId":"bulk_modify_users_proxy_settings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUsersProxy"}}},"required":true},"responses":{"200":{"description":"Success confirmation","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized Error","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","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"}},{"name":"X-HWID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Hwid"}},{"name":"X-Device-OS","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Device-Os"}},{"name":"X-Ver-OS","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ver-Os"}},{"name":"X-Device-Model","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Device-Model"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"head":{"tags":["Subscription"],"summary":"User Subscription Headers","description":"Provides subscription headers without response body.","operationId":"user_subscription_headers","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","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}/raw":{"get":{"tags":["Subscription"],"summary":"User Subscription Raw","operationId":"user_subscription_raw","parameters":[{"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}/apps":{"get":{"tags":["Subscription"],"summary":"User Subscription Apps","description":"Get applications available for user's subscription.","operationId":"user_subscription_apps","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Application"},"title":"Response User Subscription Apps"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sub/{token}/usage":{"get":{"tags":["Subscription"],"summary":"Get Sub User Usage","description":"Fetches the usage statistics for the user within a specified date range.","operationId":"get_sub_user_usage","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","default":"hour"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-01T00:00:00+03:30"],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2024-01-31T23:59:59+03:30"],"title":"End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUsageStatsList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sub/{token}/{client_type}":{"get":{"tags":["Subscription"],"summary":"User Subscription With Client Type","description":"Provides a subscription link based on the specified client type (e.g., Clash, V2Ray).","operationId":"user_subscription_with_client_type","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"client_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ConfigFormat"}},{"name":"X-HWID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Hwid"}},{"name":"X-Device-OS","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Device-Os"}},{"name":"X-Ver-OS","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ver-Os"}},{"name":"X-Device-Model","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Device-Model"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user_template":{"post":{"tags":["User Template"],"summary":"Create User Template","description":"Create 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- **group_ids** list of group ids","operationId":"create_user_template","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserTemplateCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserTemplateResponse"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/user_template/{template_id}":{"get":{"tags":["User Template"],"summary":"Get User Template","description":"Get User Template information with id","operationId":"get_user_template","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- **group_ids** list of group ids","operationId":"modify_user_template","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"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"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","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"responses":{"204":{"description":"Successful Response"},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user_templates":{"get":{"tags":["User Template"],"summary":"Get User Templates","description":"Get a list of User Templates with optional pagination","operationId":"get_user_templates","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Ids"}},{"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserTemplateResponse"},"title":"Response Get User Templates"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user_templates/simple":{"get":{"tags":["User Template"],"summary":"Get lightweight user template list","description":"Returns only id and name for user templates. Optimized for dropdowns and autocomplete.","operationId":"get_user_templates_simple","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Ids"}},{"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":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}},{"name":"all","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"All"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserTemplatesSimpleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user_templates/bulk/delete":{"post":{"tags":["User Template"],"summary":"Bulk Delete User Templates","description":"Delete selected user templates by ID.","operationId":"bulk_delete_user_templates","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUserTemplateSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveUserTemplatesResponse"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/user_templates/bulk/disable":{"post":{"tags":["User Template"],"summary":"Bulk Disable User Templates","description":"Disable selected user templates by ID.","operationId":"bulk_disable_user_templates","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUserTemplateSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUserTemplatesActionResponse"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/user_templates/bulk/enable":{"post":{"tags":["User Template"],"summary":"Bulk Enable User Templates","description":"Enable selected user templates by ID.","operationId":"bulk_enable_user_templates","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUserTemplateSelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUserTemplatesActionResponse"}}}},"400":{"description":"BadRequest Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPException"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/user/{user_id}/hwids":{"get":{"tags":["User HWID"],"summary":"Get User Hwids","description":"Get user's registered hardware IDs","operationId":"get_user_hwids","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserHWIDListResponse"}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/{user_id}/hwids/{hwid}":{"delete":{"tags":["User HWID"],"summary":"Delete User Hwid","description":"Delete a specific hardware ID from user","operationId":"delete_user_hwid","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"hwid","in":"path","required":true,"schema":{"type":"string","title":"Hwid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/{user_id}/hwids/reset":{"post":{"tags":["User HWID"],"summary":"Reset User Hwids","description":"Delete all hardware IDs for user","operationId":"reset_user_hwids","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized Error","headers":{"WWW-Authenticate":{"description":"Authentication type","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"NotFound Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"APIKeyCreate":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name"},"note":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Note"},"permissions":{"$ref":"#/components/schemas/RolePermissions"},"inherit_permissions":{"type":"boolean","title":"Inherit Permissions","default":true},"expire_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expire Date"},"admin_id":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Admin Id"}},"type":"object","required":["name"],"title":"APIKeyCreate"},"APIKeyCreateResponse":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name"},"note":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Note"},"permissions":{"$ref":"#/components/schemas/RolePermissions"},"inherit_permissions":{"type":"boolean","title":"Inherit Permissions","default":true},"expire_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expire Date"},"id":{"type":"integer","title":"Id"},"admin_id":{"type":"integer","title":"Admin Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"api_key_trimmed":{"type":"string","title":"Api Key Trimmed"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"status":{"$ref":"#/components/schemas/APIKeyStatus","default":"active"},"is_expired":{"type":"boolean","title":"Is Expired","default":false},"api_key":{"type":"string","title":"Api Key"}},"type":"object","required":["name","id","admin_id","created_at","api_key_trimmed","api_key"],"title":"APIKeyCreateResponse"},"APIKeyResponse":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name"},"note":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Note"},"permissions":{"$ref":"#/components/schemas/RolePermissions"},"inherit_permissions":{"type":"boolean","title":"Inherit Permissions","default":true},"expire_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expire Date"},"id":{"type":"integer","title":"Id"},"admin_id":{"type":"integer","title":"Admin Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"api_key_trimmed":{"type":"string","title":"Api Key Trimmed"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"status":{"$ref":"#/components/schemas/APIKeyStatus","default":"active"},"is_expired":{"type":"boolean","title":"Is Expired","default":false}},"type":"object","required":["name","id","admin_id","created_at","api_key_trimmed"],"title":"APIKeyResponse"},"APIKeyStatus":{"type":"string","enum":["active","disabled"],"title":"APIKeyStatus"},"APIKeyUpdate":{"properties":{"admin_id":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Admin Id"},"name":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Name"},"note":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Note"},"permissions":{"anyOf":[{"$ref":"#/components/schemas/RolePermissions"},{"type":"null"}]},"inherit_permissions":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Inherit Permissions"},"expire_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expire Date"},"status":{"anyOf":[{"$ref":"#/components/schemas/APIKeyStatus"},{"type":"null"}]}},"type":"object","title":"APIKeyUpdate"},"APIKeysPermissions":{"properties":{"create":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Create"},"read":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Read"},"read_simple":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Read Simple"},"update":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Update"},"delete":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Delete"}},"additionalProperties":false,"type":"object","title":"APIKeysPermissions"},"APIKeysResponse":{"properties":{"api_keys":{"items":{"$ref":"#/components/schemas/APIKeyResponse"},"type":"array","title":"Api Keys"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["api_keys","total"],"title":"APIKeysResponse"},"AdminBase":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"username":{"type":"string","title":"Username"}},"type":"object","required":["username"],"title":"AdminBase","description":"Minimal admin model containing only the username."},"AdminContactInfo":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"username":{"type":"string","title":"Username"},"telegram_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telegram Id"},"discord_webhook":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discord Webhook"},"sub_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Domain"},"profile_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Title"},"support_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Url"},"custom_variables":{"items":{"$ref":"#/components/schemas/CustomVariable"},"type":"array","title":"Custom Variables"},"notification_enable":{"anyOf":[{"$ref":"#/components/schemas/UserNotificationEnable"},{"type":"null"}]}},"type":"object","required":["username"],"title":"AdminContactInfo","description":"Base model containing the core admin identification fields."},"AdminCreate":{"properties":{"password":{"type":"string","title":"Password"},"telegram_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telegram Id"},"discord_webhook":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discord Webhook"},"status":{"anyOf":[{"type":"string","enum":["active","disabled"]},{"type":"null"}],"title":"Status"},"data_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Limit"},"sub_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Template"},"sub_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Domain"},"profile_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Title"},"support_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Url"},"custom_variables":{"anyOf":[{"items":{"$ref":"#/components/schemas/CustomVariable"},"type":"array"},{"type":"null"}],"title":"Custom Variables"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"notification_enable":{"anyOf":[{"$ref":"#/components/schemas/UserNotificationEnable"},{"type":"null"}]},"role_id":{"type":"integer","title":"Role Id"},"permission_overrides":{"anyOf":[{"$ref":"#/components/schemas/RoleLimits"},{"type":"null"}]},"username":{"type":"string","title":"Username"}},"type":"object","required":["password","role_id","username"],"title":"AdminCreate","description":"Model for creating new admin accounts requiring username and password."},"AdminDetails":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"username":{"type":"string","title":"Username"},"telegram_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telegram Id"},"discord_webhook":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discord Webhook"},"sub_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Domain"},"profile_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Title"},"support_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Url"},"custom_variables":{"items":{"$ref":"#/components/schemas/CustomVariable"},"type":"array","title":"Custom Variables"},"notification_enable":{"anyOf":[{"$ref":"#/components/schemas/UserNotificationEnable"},{"type":"null"}]},"total_users":{"type":"integer","title":"Total Users","default":0},"used_traffic":{"type":"integer","title":"Used Traffic","default":0},"data_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Limit"},"status":{"$ref":"#/components/schemas/AdminStatus","default":"active"},"sub_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Template"},"lifetime_used_traffic":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lifetime Used Traffic"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"role":{"anyOf":[{"$ref":"#/components/schemas/AdminRoleData"},{"type":"null"}]},"permission_overrides":{"anyOf":[{"$ref":"#/components/schemas/RoleLimits"},{"type":"null"}]},"is_disabled":{"type":"boolean","title":"Is Disabled","readOnly":true},"is_limited":{"type":"boolean","title":"Is Limited","readOnly":true}},"type":"object","required":["username","is_disabled","is_limited"],"title":"AdminDetails","description":"Complete admin model with all fields for database representation and API responses."},"AdminModify":{"properties":{"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"telegram_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telegram Id"},"discord_webhook":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discord Webhook"},"status":{"anyOf":[{"type":"string","enum":["active","disabled"]},{"type":"null"}],"title":"Status"},"data_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Limit"},"sub_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Template"},"sub_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Domain"},"profile_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Title"},"support_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Url"},"custom_variables":{"anyOf":[{"items":{"$ref":"#/components/schemas/CustomVariable"},"type":"array"},{"type":"null"}],"title":"Custom Variables"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"notification_enable":{"anyOf":[{"$ref":"#/components/schemas/UserNotificationEnable"},{"type":"null"}]},"role_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Role Id"},"permission_overrides":{"anyOf":[{"$ref":"#/components/schemas/RoleLimits"},{"type":"null"}]}},"type":"object","title":"AdminModify"},"AdminNotificationEnable":{"properties":{"create":{"type":"boolean","title":"Create","default":true},"modify":{"type":"boolean","title":"Modify","default":true},"delete":{"type":"boolean","title":"Delete","default":true},"reset_usage":{"type":"boolean","title":"Reset Usage","default":true},"login":{"type":"boolean","title":"Login","default":true},"usage_limit_warning":{"type":"boolean","title":"Usage Limit Warning","default":true},"usage_limit_warning_percentages":{"items":{"type":"integer"},"type":"array","title":"Usage Limit Warning Percentages"}},"type":"object","title":"AdminNotificationEnable"},"AdminRoleCreate":{"properties":{"name":{"type":"string","maxLength":64,"title":"Name"},"permissions":{"$ref":"#/components/schemas/RolePermissions"},"limits":{"$ref":"#/components/schemas/RoleLimits"},"features":{"$ref":"#/components/schemas/RoleFeatures"},"access":{"$ref":"#/components/schemas/RoleAccess"},"hwid":{"$ref":"#/components/schemas/RoleHWIDSettings"},"disabled_when_limited":{"type":"boolean","title":"Disabled When Limited","default":false},"disconnect_users_when_limited":{"type":"boolean","title":"Disconnect Users When Limited","default":true},"disconnect_users_when_disabled":{"type":"boolean","title":"Disconnect Users When Disabled","default":true}},"type":"object","required":["name"],"title":"AdminRoleCreate"},"AdminRoleData":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name","default":""},"is_owner":{"type":"boolean","title":"Is Owner","default":false},"permissions":{"$ref":"#/components/schemas/RolePermissions"},"limits":{"$ref":"#/components/schemas/RoleLimits"},"features":{"$ref":"#/components/schemas/RoleFeatures"},"access":{"$ref":"#/components/schemas/RoleAccess"},"hwid":{"$ref":"#/components/schemas/RoleHWIDSettings"},"disabled_when_limited":{"type":"boolean","title":"Disabled When Limited","default":false},"disconnect_users_when_limited":{"type":"boolean","title":"Disconnect Users When Limited","default":true},"disconnect_users_when_disabled":{"type":"boolean","title":"Disconnect Users When Disabled","default":true}},"type":"object","title":"AdminRoleData","description":"Runtime role data carried on AdminDetails — only the fields needed for permission checks."},"AdminRoleModify":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Name"},"permissions":{"anyOf":[{"$ref":"#/components/schemas/RolePermissions"},{"type":"null"}]},"limits":{"anyOf":[{"$ref":"#/components/schemas/RoleLimits"},{"type":"null"}]},"features":{"anyOf":[{"$ref":"#/components/schemas/RoleFeatures"},{"type":"null"}]},"access":{"anyOf":[{"$ref":"#/components/schemas/RoleAccess"},{"type":"null"}]},"hwid":{"anyOf":[{"$ref":"#/components/schemas/RoleHWIDSettings"},{"type":"null"}]},"disabled_when_limited":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disabled When Limited"},"disconnect_users_when_limited":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disconnect Users When Limited"},"disconnect_users_when_disabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disconnect Users When Disabled"}},"type":"object","title":"AdminRoleModify"},"AdminRoleResponse":{"properties":{"name":{"type":"string","maxLength":64,"title":"Name"},"permissions":{"$ref":"#/components/schemas/RolePermissions"},"limits":{"$ref":"#/components/schemas/RoleLimits"},"features":{"$ref":"#/components/schemas/RoleFeatures"},"access":{"$ref":"#/components/schemas/RoleAccess"},"hwid":{"$ref":"#/components/schemas/RoleHWIDSettings"},"disabled_when_limited":{"type":"boolean","title":"Disabled When Limited","default":false},"disconnect_users_when_limited":{"type":"boolean","title":"Disconnect Users When Limited","default":true},"disconnect_users_when_disabled":{"type":"boolean","title":"Disconnect Users When Disabled","default":true},"id":{"type":"integer","title":"Id"},"is_owner":{"type":"boolean","title":"Is Owner"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["name","id","is_owner","created_at"],"title":"AdminRoleResponse"},"AdminRoleSimple":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"is_owner":{"type":"boolean","title":"Is Owner"}},"type":"object","required":["id","name","is_owner"],"title":"AdminRoleSimple"},"AdminRolesResponse":{"properties":{"roles":{"items":{"$ref":"#/components/schemas/AdminRoleResponse"},"type":"array","title":"Roles"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["roles","total"],"title":"AdminRolesResponse"},"AdminRolesSimpleResponse":{"properties":{"roles":{"items":{"$ref":"#/components/schemas/AdminRoleSimple"},"type":"array","title":"Roles"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["roles","total"],"title":"AdminRolesSimpleResponse"},"AdminSimple":{"properties":{"id":{"type":"integer","title":"Id"},"username":{"type":"string","title":"Username"}},"type":"object","required":["id","username"],"title":"AdminSimple","description":"Lightweight admin model with only id and username for performance."},"AdminStatus":{"type":"string","enum":["active","disabled","limited"],"title":"AdminStatus"},"AdminsPermissions":{"properties":{"create":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Create"},"read":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Read"},"read_simple":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Read Simple"},"update":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Update"},"delete":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Delete"},"reset_usage":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Reset Usage"}},"additionalProperties":false,"type":"object","title":"AdminsPermissions"},"AdminsResponse":{"properties":{"admins":{"items":{"$ref":"#/components/schemas/AdminDetails"},"type":"array","title":"Admins"},"total":{"type":"integer","title":"Total"},"active":{"type":"integer","title":"Active"},"disabled":{"type":"integer","title":"Disabled"},"limited":{"type":"integer","title":"Limited"}},"type":"object","required":["admins","total","active","disabled","limited"],"title":"AdminsResponse","description":"Response model for admins list with pagination and statistics."},"AdminsSimpleResponse":{"properties":{"admins":{"items":{"$ref":"#/components/schemas/AdminSimple"},"type":"array","title":"Admins"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["admins","total"],"title":"AdminsSimpleResponse","description":"Response model for lightweight admin list."},"Application":{"properties":{"name":{"type":"string","maxLength":32,"title":"Name"},"icon_url":{"type":"string","maxLength":512,"title":"Icon Url","default":""},"import_url":{"type":"string","maxLength":256,"title":"Import Url","default":""},"description":{"additionalProperties":{"type":"string"},"propertyNames":{"$ref":"#/components/schemas/Language"},"type":"object","title":"Description"},"recommended":{"type":"boolean","title":"Recommended","default":false},"show_when_hwid_enabled":{"type":"boolean","title":"Show When Hwid Enabled","default":false},"platform":{"$ref":"#/components/schemas/Platform"},"download_links":{"items":{"$ref":"#/components/schemas/DownloadLink"},"type":"array","title":"Download Links"}},"type":"object","required":["name","platform","download_links"],"title":"Application"},"BaseHost":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"remark":{"type":"string","title":"Remark"},"address":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Address"},"inbound_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inbound Tag"},"port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Port"},"sni":{"anyOf":[{"items":{"type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"title":"Sni"},"host":{"anyOf":[{"items":{"type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"title":"Host"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"},"security":{"$ref":"#/components/schemas/ProxyHostSecurity","default":"inbound_default"},"alpn":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProxyHostALPN"},"type":"array"},{"type":"null"}],"title":"Alpn"},"fingerprint":{"$ref":"#/components/schemas/ProxyHostFingerprint","default":""},"allowinsecure":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allowinsecure"},"is_disabled":{"type":"boolean","title":"Is Disabled","default":false},"http_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Http Headers"},"transport_settings":{"anyOf":[{"$ref":"#/components/schemas/TransportSettings"},{"type":"null"}]},"mux_settings":{"anyOf":[{"$ref":"#/components/schemas/MuxSettings-Output"},{"type":"null"}]},"fragment_settings":{"anyOf":[{"$ref":"#/components/schemas/FragmentSettings"},{"type":"null"}]},"noise_settings":{"anyOf":[{"$ref":"#/components/schemas/NoiseSettings"},{"type":"null"}]},"random_user_agent":{"type":"boolean","title":"Random User Agent","default":false},"use_sni_as_host":{"type":"boolean","title":"Use Sni As Host","default":false},"vless_route":{"anyOf":[{"type":"string","pattern":"^$|^[0-9a-fA-F]{4}$"},{"type":"null"}],"title":"Vless Route"},"priority":{"type":"integer","title":"Priority"},"status":{"anyOf":[{"items":{"$ref":"#/components/schemas/UserStatus"},"type":"array","uniqueItems":true},{"type":"null"}],"title":"Status"},"ech_config_list":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ech Config List"},"ech_query_strategy":{"anyOf":[{"$ref":"#/components/schemas/ECHQueryStrategy"},{"type":"null"}]},"pinned_peer_cert_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pinned Peer Cert Sha256"},"verify_peer_cert_by_name":{"anyOf":[{"items":{"type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"title":"Verify Peer Cert By Name"},"wireguard_overrides":{"anyOf":[{"$ref":"#/components/schemas/WireGuardHostOverrides"},{"type":"null"}]},"subscription_templates":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionTemplates"},{"type":"null"}]},"final_mask_settings":{"anyOf":[{"$ref":"#/components/schemas/FinalMask"},{"type":"null"}]}},"type":"object","required":["remark","priority"],"title":"BaseHost"},"BaseNotificationEnable":{"properties":{"create":{"type":"boolean","title":"Create","default":true},"modify":{"type":"boolean","title":"Modify","default":true},"delete":{"type":"boolean","title":"Delete","default":true}},"type":"object","title":"BaseNotificationEnable"},"Body_admin_token":{"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"},"Brutal":{"properties":{"enable":{"type":"boolean","title":"Enable","default":false},"up_mbps":{"type":"integer","title":"Up Mbps"},"down_mbps":{"type":"integer","title":"Down Mbps"}},"type":"object","required":["up_mbps","down_mbps"],"title":"Brutal"},"BulkAPIKeySelection":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Ids"}},"type":"object","title":"BulkAPIKeySelection","description":"Model for bulk API key selection by IDs."},"BulkAdminSelection":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Ids"}},"type":"object","title":"BulkAdminSelection","description":"Model for bulk admin selection by IDs"},"BulkAdminsActionResponse":{"properties":{"admins":{"items":{"type":"string"},"type":"array","title":"Admins"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["admins","count"],"title":"BulkAdminsActionResponse","description":"Response model for bulk admin actions."},"BulkClientTemplateSelection":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Ids"}},"type":"object","title":"BulkClientTemplateSelection","description":"Model for bulk client template selection by IDs"},"BulkCoreSelection":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Ids"}},"type":"object","title":"BulkCoreSelection","description":"Model for bulk core selection by IDs"},"BulkGroup":{"properties":{"group_ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Group Ids"},"has_group_ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Has Group Ids"},"admins":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Admins"},"users":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Users"},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","required":["group_ids"],"title":"BulkGroup"},"BulkGroupSelection":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Ids"}},"type":"object","title":"BulkGroupSelection","description":"Model for bulk group selection by IDs"},"BulkGroupsActionResponse":{"properties":{"groups":{"items":{"type":"string"},"type":"array","title":"Groups"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["groups","count"],"title":"BulkGroupsActionResponse","description":"Response model for bulk group actions."},"BulkHostSelection":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Ids"}},"type":"object","title":"BulkHostSelection","description":"Model for bulk host selection by IDs"},"BulkHostsActionResponse":{"properties":{"hosts":{"items":{"type":"string"},"type":"array","title":"Hosts"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["hosts","count"],"title":"BulkHostsActionResponse","description":"Response model for bulk host actions."},"BulkNodeSelection":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Ids"}},"type":"object","title":"BulkNodeSelection","description":"Model for bulk node selection by IDs"},"BulkNodesActionResponse":{"properties":{"nodes":{"items":{"type":"string"},"type":"array","title":"Nodes"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["nodes","count"],"title":"BulkNodesActionResponse","description":"Response model for bulk node actions."},"BulkUser":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","default":false},"group_ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Group Ids"},"admins":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Admins"},"users":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Users"},"status":{"items":{"$ref":"#/components/schemas/UserStatus"},"type":"array","uniqueItems":true,"title":"Status"},"expire_after":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expire After"},"expire_before":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expire Before"},"amount":{"type":"integer","title":"Amount"}},"type":"object","required":["amount"],"title":"BulkUser"},"BulkUserTemplateSelection":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Ids"}},"type":"object","title":"BulkUserTemplateSelection","description":"Model for bulk user template selection by IDs"},"BulkUserTemplatesActionResponse":{"properties":{"templates":{"items":{"type":"string"},"type":"array","title":"Templates"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["templates","count"],"title":"BulkUserTemplatesActionResponse","description":"Response model for bulk user template actions."},"BulkUsersActionResponse":{"properties":{"users":{"items":{"type":"string"},"type":"array","title":"Users"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["users","count"],"title":"BulkUsersActionResponse"},"BulkUsersApplyTemplate":{"properties":{"user_template_id":{"type":"integer","title":"User Template Id"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"},"ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Ids"}},"type":"object","required":["user_template_id"],"title":"BulkUsersApplyTemplate","description":"Apply a user template to a selection of existing users (by ID)."},"BulkUsersCreateResponse":{"properties":{"subscription_urls":{"items":{"type":"string"},"type":"array","title":"Subscription Urls"},"created":{"type":"integer","title":"Created","default":0}},"type":"object","title":"BulkUsersCreateResponse"},"BulkUsersFromTemplate":{"properties":{"user_template_id":{"type":"integer","title":"User Template Id"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"count":{"type":"integer","maximum":500.0,"exclusiveMinimum":0.0,"title":"Count"},"strategy":{"$ref":"#/components/schemas/UsernameGenerationStrategy","default":"random"},"start_number":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Start Number","description":"Starting suffix for sequence strategy (defaults to 1; base username digits are ignored)"}},"type":"object","required":["user_template_id","count"],"title":"BulkUsersFromTemplate"},"BulkUsersProxy":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","default":false},"group_ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Group Ids"},"admins":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Admins"},"users":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Users"},"status":{"items":{"$ref":"#/components/schemas/UserStatus"},"type":"array","uniqueItems":true,"title":"Status"},"expire_after":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expire After"},"expire_before":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expire Before"},"method":{"anyOf":[{"$ref":"#/components/schemas/ShadowsocksMethods"},{"type":"null"}]}},"type":"object","title":"BulkUsersProxy"},"BulkUsersSelection":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Ids"}},"type":"object","title":"BulkUsersSelection"},"BulkUsersSetOwner":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","uniqueItems":true,"title":"Ids"},"admin_username":{"type":"string","title":"Admin Username"}},"type":"object","required":["admin_username"],"title":"BulkUsersSetOwner"},"CRUDPermissions":{"properties":{"create":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Create"},"read":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Read"},"read_simple":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Read Simple"},"update":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Update"},"delete":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Delete"}},"additionalProperties":false,"type":"object","title":"CRUDPermissions","description":"Standard create/read/read_simple/update/delete permissions.\nUsed directly by: groups, templates, client_templates, cores, admin_roles.\nAlso serves as base for resources with additional actions."},"ClashMuxSettings":{"properties":{"enable":{"type":"boolean","title":"Enable","default":false},"protocol":{"$ref":"#/components/schemas/MultiplexProtocol","default":"smux"},"max_connections":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Connections"},"max_streams":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Streams"},"min_streams":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Streams"},"padding":{"type":"boolean","title":"Padding","default":false},"brutal":{"anyOf":[{"$ref":"#/components/schemas/Brutal"},{"type":"null"}]},"statistic":{"type":"boolean","title":"Statistic","default":false},"only_tcp":{"type":"boolean","title":"Only Tcp","default":false}},"type":"object","title":"ClashMuxSettings"},"ClientTemplateCreate":{"properties":{"name":{"type":"string","maxLength":64,"title":"Name"},"template_type":{"$ref":"#/components/schemas/ClientTemplateType"},"content":{"type":"string","title":"Content"},"is_default":{"type":"boolean","title":"Is Default","default":false}},"type":"object","required":["name","template_type","content"],"title":"ClientTemplateCreate"},"ClientTemplateModify":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Name"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"}},"type":"object","title":"ClientTemplateModify"},"ClientTemplateResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"template_type":{"$ref":"#/components/schemas/ClientTemplateType"},"content":{"type":"string","title":"Content"},"is_default":{"type":"boolean","title":"Is Default"},"is_system":{"type":"boolean","title":"Is System"}},"type":"object","required":["id","name","template_type","content","is_default","is_system"],"title":"ClientTemplateResponse"},"ClientTemplateResponseList":{"properties":{"count":{"type":"integer","title":"Count"},"templates":{"items":{"$ref":"#/components/schemas/ClientTemplateResponse"},"type":"array","title":"Templates","default":[]}},"type":"object","required":["count"],"title":"ClientTemplateResponseList"},"ClientTemplateSimple":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"template_type":{"$ref":"#/components/schemas/ClientTemplateType"},"is_default":{"type":"boolean","title":"Is Default"}},"type":"object","required":["id","name","template_type","is_default"],"title":"ClientTemplateSimple"},"ClientTemplateType":{"type":"string","enum":["clash_subscription","xray_subscription","singbox_subscription","user_agent","grpc_user_agent"],"title":"ClientTemplateType"},"ClientTemplatesSimpleResponse":{"properties":{"templates":{"items":{"$ref":"#/components/schemas/ClientTemplateSimple"},"type":"array","title":"Templates"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["templates","total"],"title":"ClientTemplatesSimpleResponse"},"ConfigFormat":{"type":"string","enum":["links","links_base64","xray","wireguard","sing_box","clash","clash_meta","outline","block"],"title":"ConfigFormat"},"Conflict":{"properties":{"detail":{"type":"string","title":"Detail","default":"Entity already exists"}},"type":"object","title":"Conflict"},"CoreCreate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Name"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"type":{"anyOf":[{"$ref":"#/components/schemas/CoreType"},{"type":"null"}]},"exclude_inbound_tags":{"anyOf":[{"items":{},"type":"array","uniqueItems":true},{"type":"null"}],"title":"Exclude Inbound Tags"},"fallbacks_inbound_tags":{"anyOf":[{"items":{},"type":"array","uniqueItems":true},{"type":"null"}],"title":"Fallbacks Inbound Tags"}},"type":"object","required":["config"],"title":"CoreCreate"},"CoreResponse":{"properties":{"name":{"type":"string","title":"Name"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"type":{"anyOf":[{"$ref":"#/components/schemas/CoreType"},{"type":"null"}]},"exclude_inbound_tags":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Exclude Inbound Tags"},"fallbacks_inbound_tags":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Fallbacks Inbound Tags"},"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["name","config","exclude_inbound_tags","fallbacks_inbound_tags","id","created_at"],"title":"CoreResponse"},"CoreResponseList":{"properties":{"count":{"type":"integer","title":"Count"},"cores":{"items":{"$ref":"#/components/schemas/CoreResponse"},"type":"array","title":"Cores","default":[]}},"type":"object","required":["count"],"title":"CoreResponseList"},"CoreSimple":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"$ref":"#/components/schemas/CoreType"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"CoreSimple","description":"Lightweight core model with only id, name and type for performance."},"CoreType":{"type":"string","enum":["xray","wg","mtproto","singbox"],"title":"CoreType"},"CoresSimpleResponse":{"properties":{"cores":{"items":{"$ref":"#/components/schemas/CoreSimple"},"type":"array","title":"Cores"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["cores","total"],"title":"CoresSimpleResponse","description":"Response model for lightweight core list."},"CreateHost":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"remark":{"type":"string","title":"Remark"},"address":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Address"},"inbound_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inbound Tag"},"port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Port"},"sni":{"anyOf":[{"items":{"type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"title":"Sni"},"host":{"anyOf":[{"items":{"type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"title":"Host"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"},"security":{"$ref":"#/components/schemas/ProxyHostSecurity","default":"inbound_default"},"alpn":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProxyHostALPN"},"type":"array"},{"type":"null"}],"title":"Alpn"},"fingerprint":{"$ref":"#/components/schemas/ProxyHostFingerprint","default":""},"allowinsecure":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allowinsecure"},"is_disabled":{"type":"boolean","title":"Is Disabled","default":false},"http_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Http Headers"},"transport_settings":{"anyOf":[{"$ref":"#/components/schemas/TransportSettings"},{"type":"null"}]},"mux_settings":{"anyOf":[{"$ref":"#/components/schemas/MuxSettings-Input"},{"type":"null"}]},"fragment_settings":{"anyOf":[{"$ref":"#/components/schemas/FragmentSettings"},{"type":"null"}]},"noise_settings":{"anyOf":[{"$ref":"#/components/schemas/NoiseSettings"},{"type":"null"}]},"random_user_agent":{"type":"boolean","title":"Random User Agent","default":false},"use_sni_as_host":{"type":"boolean","title":"Use Sni As Host","default":false},"vless_route":{"anyOf":[{"type":"string","pattern":"^$|^[0-9a-fA-F]{4}$"},{"type":"null"}],"title":"Vless Route"},"priority":{"type":"integer","title":"Priority"},"status":{"anyOf":[{"items":{"$ref":"#/components/schemas/UserStatus"},"type":"array","uniqueItems":true},{"type":"null"}],"title":"Status"},"ech_config_list":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ech Config List"},"ech_query_strategy":{"anyOf":[{"$ref":"#/components/schemas/ECHQueryStrategy"},{"type":"null"}]},"pinned_peer_cert_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pinned Peer Cert Sha256"},"verify_peer_cert_by_name":{"anyOf":[{"items":{"type":"string"},"type":"array","uniqueItems":true},{"type":"null"}],"title":"Verify Peer Cert By Name"},"wireguard_overrides":{"anyOf":[{"$ref":"#/components/schemas/WireGuardHostOverrides"},{"type":"null"}]},"subscription_templates":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionTemplates"},{"type":"null"}]},"final_mask_settings":{"anyOf":[{"$ref":"#/components/schemas/FinalMask"},{"type":"null"}]}},"type":"object","required":["remark","priority"],"title":"CreateHost"},"CreateUserFromTemplate":{"properties":{"user_template_id":{"type":"integer","title":"User Template Id"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"},"username":{"type":"string","title":"Username"}},"type":"object","required":["user_template_id","username"],"title":"CreateUserFromTemplate"},"CustomVariable":{"properties":{"key":{"type":"string","maxLength":64,"title":"Key"},"value":{"type":"string","maxLength":512,"title":"Value","default":""}},"type":"object","required":["key"],"title":"CustomVariable"},"DataLimitResetStrategy":{"type":"string","enum":["no_reset","day","week","month","year"],"title":"DataLimitResetStrategy"},"DownloadLink":{"properties":{"name":{"type":"string","maxLength":64,"title":"Name"},"url":{"type":"string","title":"Url"},"language":{"$ref":"#/components/schemas/Language"}},"type":"object","required":["name","url","language"],"title":"DownloadLink"},"ECHQueryStrategy":{"type":"string","enum":["none","half","full"],"title":"ECHQueryStrategy"},"ExtraSettings":{"properties":{"method":{"anyOf":[{"$ref":"#/components/schemas/ShadowsocksMethods"},{"type":"null"}],"default":"chacha20-ietf-poly1305"}},"type":"object","title":"ExtraSettings"},"FinalMask":{"properties":{"tcp":{"anyOf":[{"items":{"$ref":"#/components/schemas/FinalMaskTcpLayer"},"type":"array"},{"type":"null"}],"title":"Tcp"},"udp":{"anyOf":[{"items":{"$ref":"#/components/schemas/FinalMaskUdpLayer"},"type":"array"},{"type":"null"}],"title":"Udp"},"quicParams":{"anyOf":[{"$ref":"#/components/schemas/FinalMaskQuicParams"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"FinalMask"},"FinalMaskDomainSettings":{"properties":{"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"}},"additionalProperties":true,"type":"object","title":"FinalMaskDomainSettings"},"FinalMaskFragmentSettings":{"properties":{"packets":{"anyOf":[{"type":"string","pattern":"^$|^(:?tlshello|[\\d-]{1,16})$"},{"type":"null"}],"title":"Packets"},"lengths":{"anyOf":[{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array"},{"type":"null"}],"title":"Lengths"},"delays":{"anyOf":[{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array"},{"type":"null"}],"title":"Delays"},"maxSplit":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Maxsplit"}},"additionalProperties":true,"type":"object","title":"FinalMaskFragmentSettings"},"FinalMaskMkcpLegacySettings":{"properties":{"header":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"}},"additionalProperties":true,"type":"object","title":"FinalMaskMkcpLegacySettings"},"FinalMaskNoiseSettings":{"properties":{"reset":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Reset"},"noise":{"anyOf":[{"items":{"$ref":"#/components/schemas/XrayNoiseSettings"},"type":"array"},{"type":"null"}],"title":"Noise"}},"additionalProperties":true,"type":"object","title":"FinalMaskNoiseSettings"},"FinalMaskPasswordSettings":{"properties":{"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"}},"additionalProperties":true,"type":"object","title":"FinalMaskPasswordSettings"},"FinalMaskQuicCongestion":{"type":"string","enum":["reno","bbr","brutal","force-brutal"],"title":"FinalMaskQuicCongestion"},"FinalMaskQuicParams":{"properties":{"congestion":{"anyOf":[{"$ref":"#/components/schemas/FinalMaskQuicCongestion"},{"type":"null"}]},"debug":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Debug"},"bbrProfile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bbrprofile"},"brutalUp":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"null"}],"title":"Brutalup"},"brutalDown":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"null"}],"title":"Brutaldown"},"udpHop":{"anyOf":[{"$ref":"#/components/schemas/FinalMaskUdpHop"},{"type":"null"}]},"initStreamReceiveWindow":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Initstreamreceivewindow"},"maxStreamReceiveWindow":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maxstreamreceivewindow"},"initConnectionReceiveWindow":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Initconnectionreceivewindow"},"maxConnectionReceiveWindow":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maxconnectionreceivewindow"},"maxIdleTimeout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maxidletimeout"},"keepAlivePeriod":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Keepaliveperiod"},"disablePathMTUDiscovery":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disablepathmtudiscovery"},"maxIncomingStreams":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maxincomingstreams"}},"additionalProperties":true,"type":"object","title":"FinalMaskQuicParams"},"FinalMaskRealmSettings":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"stunServers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stunservers"},"tlsConfig":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tlsconfig"}},"additionalProperties":true,"type":"object","title":"FinalMaskRealmSettings"},"FinalMaskSalamanderSettings":{"properties":{"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"packetSize":{"anyOf":[{},{"type":"null"}],"title":"Packetsize"}},"additionalProperties":true,"type":"object","title":"FinalMaskSalamanderSettings"},"FinalMaskSudokuSettings":{"properties":{"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"ascii":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ascii"},"customTable":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customtable"},"customTables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customtables"},"paddingMin":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Paddingmin"},"paddingMax":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Paddingmax"}},"additionalProperties":true,"type":"object","title":"FinalMaskSudokuSettings"},"FinalMaskTcpHeaderCustomSettings":{"properties":{"clients":{"anyOf":[{"items":{"items":{"$ref":"#/components/schemas/XrayNoiseSettings"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Clients"},"servers":{"anyOf":[{"items":{"items":{"$ref":"#/components/schemas/XrayNoiseSettings"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Servers"},"errors":{"anyOf":[{"items":{"items":{"$ref":"#/components/schemas/XrayNoiseSettings"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Errors"}},"additionalProperties":true,"type":"object","title":"FinalMaskTcpHeaderCustomSettings"},"FinalMaskTcpLayer":{"properties":{"type":{"$ref":"#/components/schemas/FinalMaskTcpType"},"settings":{"anyOf":[{"$ref":"#/components/schemas/FinalMaskTcpHeaderCustomSettings"},{"$ref":"#/components/schemas/FinalMaskFragmentSettings"},{"$ref":"#/components/schemas/FinalMaskSudokuSettings"},{"$ref":"#/components/schemas/FinalMaskXmcSettings"},{"additionalProperties":true,"type":"object"}],"title":"Settings"}},"additionalProperties":true,"type":"object","required":["type"],"title":"FinalMaskTcpLayer"},"FinalMaskTcpType":{"type":"string","enum":["header-custom","fragment","sudoku","xmc"],"title":"FinalMaskTcpType"},"FinalMaskUdpHeaderCustomSettings":{"properties":{"client":{"anyOf":[{"items":{"$ref":"#/components/schemas/XrayNoiseSettings"},"type":"array"},{"type":"null"}],"title":"Client"},"server":{"anyOf":[{"items":{"$ref":"#/components/schemas/XrayNoiseSettings"},"type":"array"},{"type":"null"}],"title":"Server"}},"additionalProperties":true,"type":"object","title":"FinalMaskUdpHeaderCustomSettings"},"FinalMaskUdpHop":{"properties":{"ports":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ports"},"interval":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Interval"}},"additionalProperties":true,"type":"object","title":"FinalMaskUdpHop"},"FinalMaskUdpLayer":{"properties":{"type":{"$ref":"#/components/schemas/FinalMaskUdpType"},"settings":{"anyOf":[{"$ref":"#/components/schemas/FinalMaskUdpHeaderCustomSettings"},{"$ref":"#/components/schemas/FinalMaskPasswordSettings"},{"$ref":"#/components/schemas/FinalMaskSudokuSettings"},{"$ref":"#/components/schemas/FinalMaskDomainSettings"},{"$ref":"#/components/schemas/FinalMaskXdnsSettings"},{"$ref":"#/components/schemas/FinalMaskXicmpSettings"},{"$ref":"#/components/schemas/FinalMaskNoiseSettings"},{"$ref":"#/components/schemas/FinalMaskSalamanderSettings"},{"$ref":"#/components/schemas/FinalMaskRealmSettings"},{"$ref":"#/components/schemas/FinalMaskMkcpLegacySettings"},{"additionalProperties":true,"type":"object"}],"title":"Settings"}},"additionalProperties":true,"type":"object","required":["type"],"title":"FinalMaskUdpLayer"},"FinalMaskUdpType":{"type":"string","enum":["header-custom","mkcp-legacy","noise","salamander","sudoku","xdns","xicmp","realm","header-dns","header-dtls","header-srtp","header-utp","header-wechat","header-wireguard","mkcp-original","mkcp-aes128gcm"],"title":"FinalMaskUdpType"},"FinalMaskXdnsSettings":{"properties":{"domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Domains"},"resolvers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Resolvers"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"}},"additionalProperties":true,"type":"object","title":"FinalMaskXdnsSettings"},"FinalMaskXicmpSettings":{"properties":{"dgram":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dgram"},"ips":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ips"},"listenIp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Listenip"},"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"}},"additionalProperties":true,"type":"object","title":"FinalMaskXicmpSettings"},"FinalMaskXmcProfile":{"properties":{"username":{"type":"string","title":"Username"},"uuid":{"type":"string","title":"Uuid"},"texturesValue":{"type":"string","title":"Texturesvalue"},"texturesSignature":{"type":"string","title":"Texturessignature"}},"additionalProperties":true,"type":"object","required":["username","uuid","texturesValue","texturesSignature"],"title":"FinalMaskXmcProfile"},"FinalMaskXmcSettings":{"properties":{"hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hostname"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"profiles":{"anyOf":[{"items":{"$ref":"#/components/schemas/FinalMaskXmcProfile"},"type":"array"},{"type":"null"}],"title":"Profiles"},"usernames":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Usernames"}},"additionalProperties":true,"type":"object","title":"FinalMaskXmcSettings"},"Forbidden":{"properties":{"detail":{"type":"string","title":"Detail","default":"You are not allowed to ..."}},"type":"object","title":"Forbidden"},"FragmentSettings":{"properties":{"xray":{"anyOf":[{"$ref":"#/components/schemas/XrayFragmentSettings"},{"type":"null"}]},"sing_box":{"anyOf":[{"$ref":"#/components/schemas/SingBoxFragmentSettings"},{"type":"null"}]}},"type":"object","title":"FragmentSettings"},"GRPCSettings":{"properties":{"multi_mode":{"type":"boolean","title":"Multi Mode","default":false},"idle_timeout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Idle Timeout"},"health_check_timeout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Health Check Timeout"},"permit_without_stream":{"type":"boolean","title":"Permit Without Stream","default":false},"initial_windows_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Initial Windows Size"}},"type":"object","title":"GRPCSettings"},"General":{"properties":{"default_method":{"$ref":"#/components/schemas/ShadowsocksMethods","default":"chacha20-ietf-poly1305"},"custom_variables":{"anyOf":[{"items":{"$ref":"#/components/schemas/CustomVariable"},"type":"array"},{"type":"null"}],"title":"Custom Variables"}},"type":"object","title":"General"},"GeoFilseRegion":{"type":"string","enum":["iran","china","russia"],"title":"GeoFilseRegion"},"GroupCreate":{"properties":{"name":{"type":"string","maxLength":64,"minLength":3,"title":"Name"},"inbound_tags":{"items":{"type":"string"},"type":"array","title":"Inbound Tags"},"is_disabled":{"type":"boolean","title":"Is Disabled","default":false}},"type":"object","required":["name","inbound_tags"],"title":"GroupCreate"},"GroupModify":{"properties":{"name":{"type":"string","maxLength":64,"minLength":3,"title":"Name"},"inbound_tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Inbound Tags","default":[]},"is_disabled":{"type":"boolean","title":"Is Disabled","default":false}},"type":"object","required":["name"],"title":"GroupModify"},"GroupResponse":{"properties":{"name":{"type":"string","maxLength":64,"minLength":3,"title":"Name"},"inbound_tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Inbound Tags","default":[]},"is_disabled":{"type":"boolean","title":"Is Disabled","default":false},"id":{"type":"integer","title":"Id"},"total_users":{"type":"integer","title":"Total Users","default":0}},"type":"object","required":["name","id"],"title":"GroupResponse"},"GroupSimple":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"GroupSimple","description":"Lightweight group model with only id and name for performance."},"GroupsResponse":{"properties":{"groups":{"items":{"$ref":"#/components/schemas/GroupResponse"},"type":"array","title":"Groups"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["groups","total"],"title":"GroupsResponse"},"GroupsSimpleResponse":{"properties":{"groups":{"items":{"$ref":"#/components/schemas/GroupSimple"},"type":"array","title":"Groups"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["groups","total"],"title":"GroupsSimpleResponse","description":"Response model for lightweight group list."},"HTTPException":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"HTTPException"},"HTTPRequest":{"properties":{"version":{"type":"string","pattern":"^(1(?:\\.0|\\.1)|2\\.0|3\\.0)$","title":"Version","default":"1.1"},"headers":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Headers"},"method":{"type":"string","pattern":"^(GET|POST|PUT|DELETE|HEAD|OPTIONS|PATCH|TRACE|CONNECT)$","title":"Method","default":"GET"}},"type":"object","title":"HTTPRequest"},"HTTPResponse":{"properties":{"version":{"type":"string","pattern":"^(1(?:\\.0|\\.1)|2\\.0|3\\.0)$","title":"Version","default":"1.1"},"headers":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Headers"},"status":{"type":"string","pattern":"^[1-5]\\d{2}$","title":"Status","default":"200"},"reason":{"type":"string","pattern":"^(?i)(?:OK|Created|Accepted|Non-Authoritative Information|No Content|Reset Content|Partial Content|Multiple Choices|Moved Permanently|Found|See Other|Not Modified|Use Proxy|Temporary Redirect|Permanent Redirect|Bad Request|Unauthorized|Payment Required|Forbidden|Not Found|Method Not Allowed|Not Acceptable|Proxy Authentication Required|Request Timeout|Conflict|Gone|Length Required|Precondition Failed|Payload Too Large|URI Too Long|Unsupported Media Type|Range Not Satisfiable|Expectation Failed|I'm a teapot|Misdirected Request|Unprocessable Entity|Locked|Failed Dependency|Too Early|Upgrade Required|Precondition Required|Too Many Requests|Request Header Fields Too Large|Unavailable For Legal Reasons|Internal Server Error|Not Implemented|Bad Gateway|Service Unavailable|Gateway Timeout|HTTP Version Not Supported)$","title":"Reason","default":"OK"}},"type":"object","title":"HTTPResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HWIDMode":{"type":"string","enum":["disabled","use_global","override"],"title":"HWIDMode"},"HWIDSettings":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"forced":{"type":"boolean","title":"Forced","default":false},"require_hwid_for_manual_sub":{"type":"boolean","title":"Require Hwid For Manual Sub","default":false},"fallback_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Fallback Limit"},"min_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Min Limit"},"max_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Limit"}},"type":"object","title":"HWIDSettings"},"HostNotificationEnable":{"properties":{"create":{"type":"boolean","title":"Create","default":true},"modify":{"type":"boolean","title":"Modify","default":true},"delete":{"type":"boolean","title":"Delete","default":true},"modify_hosts":{"type":"boolean","title":"Modify Hosts","default":true}},"type":"object","title":"HostNotificationEnable"},"HostsPermissions":{"properties":{"create":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Create"},"read":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Read"},"update":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Update"}},"additionalProperties":false,"type":"object","title":"HostsPermissions"},"HwidsPermissions":{"properties":{"read":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Read"},"delete":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Delete"}},"additionalProperties":false,"type":"object","title":"HwidsPermissions"},"HysteriaSettings":{"properties":{"auth":{"type":"string","minLength":1,"title":"Auth"}},"type":"object","title":"HysteriaSettings"},"InboundSummary":{"properties":{"tag":{"type":"string","title":"Tag"},"protocol":{"type":"string","title":"Protocol"},"network":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Network"}},"type":"object","required":["tag","protocol"],"title":"InboundSummary"},"KCPSettings":{"properties":{"mtu":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mtu"},"tti":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tti"},"uplink_capacity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Uplink Capacity"},"downlink_capacity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Downlink Capacity"},"congestion":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Congestion"},"read_buffer_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Read Buffer Size"},"write_buffer_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Write Buffer Size"}},"type":"object","title":"KCPSettings"},"Language":{"type":"string","enum":["fa","en","ru","zh"],"title":"Language"},"ModifyUserByTemplate":{"properties":{"user_template_id":{"type":"integer","title":"User Template Id"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"}},"type":"object","required":["user_template_id"],"title":"ModifyUserByTemplate"},"MultiplexProtocol":{"type":"string","enum":["smux","yamux","h2mux"],"title":"MultiplexProtocol"},"MuxSettings-Input":{"properties":{"sing_box":{"anyOf":[{"$ref":"#/components/schemas/SingBoxMuxSettings"},{"type":"null"}]},"clash":{"anyOf":[{"$ref":"#/components/schemas/ClashMuxSettings"},{"type":"null"}]},"xray":{"anyOf":[{"$ref":"#/components/schemas/XrayMuxSettings-Input"},{"type":"null"}]}},"type":"object","title":"MuxSettings"},"MuxSettings-Output":{"properties":{"sing_box":{"anyOf":[{"$ref":"#/components/schemas/SingBoxMuxSettings"},{"type":"null"}]},"clash":{"anyOf":[{"$ref":"#/components/schemas/ClashMuxSettings"},{"type":"null"}]},"xray":{"anyOf":[{"$ref":"#/components/schemas/XrayMuxSettings-Output"},{"type":"null"}]}},"type":"object","title":"MuxSettings"},"NextPlanModel":{"properties":{"user_template_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Template Id"},"data_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Limit"},"expire":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expire"},"add_remaining_traffic":{"type":"boolean","title":"Add Remaining Traffic","default":false}},"type":"object","title":"NextPlanModel"},"NodeConnectionType":{"type":"string","enum":["grpc","rest"],"title":"NodeConnectionType"},"NodeCoreUpdate":{"properties":{"core_version":{"type":"string","pattern":"^(latest|v?\\d+\\.\\d+\\.\\d+)$","title":"Core Version","default":"latest","examples":["v25.8.31"]}},"type":"object","title":"NodeCoreUpdate"},"NodeCreate":{"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},"connection_type":{"$ref":"#/components/schemas/NodeConnectionType"},"server_ca":{"type":"string","title":"Server Ca"},"keep_alive":{"type":"integer","title":"Keep Alive"},"core_config_id":{"type":"integer","title":"Core Config Id"},"api_key":{"type":"string","title":"Api Key"},"data_limit":{"type":"integer","title":"Data Limit","default":0},"data_limit_reset_strategy":{"$ref":"#/components/schemas/DataLimitResetStrategy","default":"no_reset"},"reset_time":{"type":"integer","title":"Reset Time","default":-1},"default_timeout":{"type":"integer","maximum":60.0,"minimum":3.0,"title":"Default Timeout","default":10},"internal_timeout":{"type":"integer","maximum":60.0,"minimum":3.0,"title":"Internal Timeout","default":15},"proxy_url":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Proxy Url"}},"type":"object","required":["name","address","connection_type","server_ca","keep_alive","core_config_id","api_key"],"title":"NodeCreate","example":{"address":"192.168.1.1","api_key":"valid uuid","connection_type":"grpc","core_config_id":1,"keep_alive":60,"name":"DE node","port":62050,"server_ca":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----","usage_coefficient":1}},"NodeGeoFilesUpdate":{"properties":{"region":{"$ref":"#/components/schemas/GeoFilseRegion","default":"iran","examples":["iran"]}},"type":"object","title":"NodeGeoFilesUpdate"},"NodeModify":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Port"},"api_port":{"type":"integer","title":"Api Port","default":62051},"usage_coefficient":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Usage Coefficient"},"connection_type":{"anyOf":[{"$ref":"#/components/schemas/NodeConnectionType"},{"type":"null"}]},"server_ca":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server Ca"},"keep_alive":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Keep Alive"},"core_config_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Core Config Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"data_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Limit"},"data_limit_reset_strategy":{"anyOf":[{"$ref":"#/components/schemas/DataLimitResetStrategy"},{"type":"null"}]},"reset_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reset Time"},"default_timeout":{"anyOf":[{"type":"integer","maximum":60.0,"minimum":3.0},{"type":"null"}],"title":"Default Timeout"},"internal_timeout":{"anyOf":[{"type":"integer","maximum":60.0,"minimum":3.0},{"type":"null"}],"title":"Internal Timeout"},"proxy_url":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Proxy Url"},"status":{"anyOf":[{"$ref":"#/components/schemas/NodeStatus"},{"type":"null"}]}},"type":"object","title":"NodeModify","example":{"address":"192.168.1.1","api_key":"valid uuid","connection_type":"grpc","core_config_id":1,"keep_alive":60,"name":"DE node","port":62050,"server_ca":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----","status":"disabled","usage_coefficient":1.0}},"NodeNotificationEnable":{"properties":{"create":{"type":"boolean","title":"Create","default":true},"modify":{"type":"boolean","title":"Modify","default":true},"delete":{"type":"boolean","title":"Delete","default":true},"connect":{"type":"boolean","title":"Connect","default":true},"recovered":{"type":"boolean","title":"Recovered","default":true},"error":{"type":"boolean","title":"Error","default":true},"limited":{"type":"boolean","title":"Limited","default":true},"reset_usage":{"type":"boolean","title":"Reset Usage","default":true}},"type":"object","title":"NodeNotificationEnable"},"NodeOutboundLatency":{"properties":{"name":{"type":"string","title":"Name"},"alive":{"type":"boolean","title":"Alive"},"delay":{"type":"integer","title":"Delay"},"link":{"type":"string","title":"Link"},"last_seen_time":{"type":"integer","title":"Last Seen Time"},"last_try_time":{"type":"integer","title":"Last Try Time"},"source":{"type":"string","title":"Source"}},"type":"object","required":["name","alive","delay","link","last_seen_time","last_try_time","source"],"title":"NodeOutboundLatency"},"NodeOutboundsLatencyResponse":{"properties":{"latencies":{"items":{"$ref":"#/components/schemas/NodeOutboundLatency"},"type":"array","title":"Latencies"}},"type":"object","required":["latencies"],"title":"NodeOutboundsLatencyResponse"},"NodeRealtimeStats":{"properties":{"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"},"incoming_bandwidth_speed":{"type":"integer","title":"Incoming Bandwidth Speed"},"outgoing_bandwidth_speed":{"type":"integer","title":"Outgoing Bandwidth Speed"},"uptime":{"type":"integer","title":"Uptime"}},"type":"object","required":["mem_total","mem_used","cpu_cores","cpu_usage","incoming_bandwidth_speed","outgoing_bandwidth_speed","uptime"],"title":"NodeRealtimeStats"},"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},"connection_type":{"$ref":"#/components/schemas/NodeConnectionType"},"server_ca":{"type":"string","title":"Server Ca"},"keep_alive":{"type":"integer","title":"Keep Alive"},"core_config_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Core Config Id"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"data_limit":{"type":"integer","title":"Data Limit","default":0},"data_limit_reset_strategy":{"$ref":"#/components/schemas/DataLimitResetStrategy","default":"no_reset"},"reset_time":{"type":"integer","title":"Reset Time","default":-1},"default_timeout":{"type":"integer","maximum":60.0,"minimum":3.0,"title":"Default Timeout","default":10},"internal_timeout":{"type":"integer","maximum":60.0,"minimum":3.0,"title":"Internal Timeout","default":15},"proxy_url":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Proxy Url"},"id":{"type":"integer","title":"Id"},"xray_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Xray Version"},"node_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Node Version"},"status":{"$ref":"#/components/schemas/NodeStatus"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"uplink":{"type":"integer","title":"Uplink","default":0},"downlink":{"type":"integer","title":"Downlink","default":0},"lifetime_uplink":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lifetime Uplink"},"lifetime_downlink":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lifetime Downlink"},"core_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Core Version","readOnly":true}},"type":"object","required":["name","address","connection_type","server_ca","keep_alive","core_config_id","api_key","id","xray_version","node_version","status","message","core_version"],"title":"NodeResponse"},"NodeSettings":{"properties":{"min_node_version":{"type":"string","title":"Min Node Version","default":"v1.0.0"}},"type":"object","title":"NodeSettings"},"NodeSimple":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"$ref":"#/components/schemas/NodeStatus"}},"type":"object","required":["id","name","status"],"title":"NodeSimple","description":"Lightweight node model with only id and name for performance."},"NodeStats":{"properties":{"period_start":{"type":"string","format":"date-time","title":"Period Start"},"mem_usage_percentage":{"type":"number","title":"Mem Usage Percentage"},"cpu_usage_percentage":{"type":"number","title":"Cpu Usage Percentage"},"incoming_bandwidth_speed":{"type":"number","title":"Incoming Bandwidth Speed"},"outgoing_bandwidth_speed":{"type":"number","title":"Outgoing Bandwidth Speed"}},"type":"object","required":["period_start","mem_usage_percentage","cpu_usage_percentage","incoming_bandwidth_speed","outgoing_bandwidth_speed"],"title":"NodeStats"},"NodeStatsList":{"properties":{"period":{"anyOf":[{"$ref":"#/components/schemas/Period"},{"type":"null"}]},"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"},"stats":{"items":{"$ref":"#/components/schemas/NodeStats"},"type":"array","title":"Stats"}},"type":"object","required":["start","end","stats"],"title":"NodeStatsList"},"NodeStatus":{"type":"string","enum":["connected","connecting","error","disabled","limited"],"title":"NodeStatus"},"NodeUsageStat":{"properties":{"period_start":{"type":"string","format":"date-time","title":"Period Start"},"uplink":{"type":"integer","title":"Uplink"},"downlink":{"type":"integer","title":"Downlink"}},"type":"object","required":["period_start","uplink","downlink"],"title":"NodeUsageStat"},"NodeUsageStatsList":{"properties":{"period":{"anyOf":[{"$ref":"#/components/schemas/Period"},{"type":"null"}]},"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"},"stats":{"additionalProperties":{"items":{"$ref":"#/components/schemas/NodeUsageStat"},"type":"array"},"type":"object","title":"Stats"}},"type":"object","required":["start","end","stats"],"title":"NodeUsageStatsList"},"NodesPermissions":{"properties":{"create":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Create"},"read":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Read"},"read_simple":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Read Simple"},"update":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Update"},"delete":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Delete"},"reconnect":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Reconnect"},"update_core":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Update Core"},"logs":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Logs"},"stats":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Stats"}},"additionalProperties":false,"type":"object","title":"NodesPermissions"},"NodesResponse":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/NodeResponse"},"type":"array","title":"Nodes"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["nodes","total"],"title":"NodesResponse"},"NodesSimpleResponse":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/NodeSimple"},"type":"array","title":"Nodes"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["nodes","total"],"title":"NodesSimpleResponse","description":"Response model for lightweight node list."},"NoiseSettings":{"properties":{"xray":{"anyOf":[{"items":{"$ref":"#/components/schemas/XrayNoiseSettings"},"type":"array"},{"type":"null"}],"title":"Xray"}},"type":"object","title":"NoiseSettings"},"NotFound":{"properties":{"detail":{"type":"string","title":"Detail","default":"Entity {} not found"}},"type":"object","title":"NotFound"},"NotificationChannel":{"properties":{"telegram_chat_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telegram Chat Id"},"telegram_topic_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telegram Topic Id"},"discord_webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discord Webhook Url"}},"type":"object","title":"NotificationChannel","description":"Channel configuration for sending notifications to a specific entity"},"NotificationChannels":{"properties":{"admin":{"$ref":"#/components/schemas/NotificationChannel"},"admin_role":{"$ref":"#/components/schemas/NotificationChannel"},"core":{"$ref":"#/components/schemas/NotificationChannel"},"group":{"$ref":"#/components/schemas/NotificationChannel"},"host":{"$ref":"#/components/schemas/NotificationChannel"},"node":{"$ref":"#/components/schemas/NotificationChannel"},"user":{"$ref":"#/components/schemas/NotificationChannel"},"user_template":{"$ref":"#/components/schemas/NotificationChannel"},"api_key":{"$ref":"#/components/schemas/NotificationChannel"}},"type":"object","title":"NotificationChannels","description":"Per-object notification channels"},"NotificationEnable":{"properties":{"admin":{"$ref":"#/components/schemas/AdminNotificationEnable"},"admin_role":{"$ref":"#/components/schemas/BaseNotificationEnable"},"core":{"$ref":"#/components/schemas/BaseNotificationEnable"},"group":{"$ref":"#/components/schemas/BaseNotificationEnable"},"host":{"$ref":"#/components/schemas/HostNotificationEnable"},"node":{"$ref":"#/components/schemas/NodeNotificationEnable"},"user":{"$ref":"#/components/schemas/UserNotificationEnable"},"user_template":{"$ref":"#/components/schemas/BaseNotificationEnable"},"api_key":{"$ref":"#/components/schemas/BaseNotificationEnable"},"days_left":{"type":"boolean","title":"Days Left","default":true},"percentage_reached":{"type":"boolean","title":"Percentage Reached","default":true}},"type":"object","title":"NotificationEnable"},"NotificationSettings":{"properties":{"notify_telegram":{"type":"boolean","title":"Notify Telegram","default":false},"notify_discord":{"type":"boolean","title":"Notify Discord","default":false},"telegram_api_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telegram Api Token"},"telegram_chat_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telegram Chat Id"},"telegram_topic_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telegram Topic Id"},"discord_webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discord Webhook Url"},"channels":{"$ref":"#/components/schemas/NotificationChannels"},"proxy_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proxy Url"},"max_retries":{"type":"integer","exclusiveMinimum":1.0,"title":"Max Retries"}},"type":"object","required":["max_retries"],"title":"NotificationSettings"},"OwnerCreateRequest":{"properties":{"key":{"type":"string","title":"Key"},"password":{"type":"string","title":"Password"},"username":{"type":"string","title":"Username"}},"type":"object","required":["key","password","username"],"title":"OwnerCreateRequest"},"OwnerResetRequest":{"properties":{"key":{"type":"string","title":"Key"},"password":{"type":"string","title":"Password"}},"type":"object","required":["key","password"],"title":"OwnerResetRequest"},"OwnerUpgradeRequest":{"properties":{"key":{"type":"string","title":"Key"},"username":{"type":"string","title":"Username"}},"type":"object","required":["key","username"],"title":"OwnerUpgradeRequest"},"Period":{"type":"string","enum":["minute","hour","day","month"],"title":"Period"},"PermissionScope":{"type":"integer","enum":[0,1,2],"title":"PermissionScope","description":"Scope for user-resource permissions. Stored as int in JSON for efficiency."},"Platform":{"type":"string","enum":["android","ios","windows","macos","linux","appletv","androidtv"],"title":"Platform"},"ProxyHostALPN":{"type":"string","enum":["http/1.1","h2","h3"],"title":"ProxyHostALPN"},"ProxyHostFingerprint":{"type":"string","enum":["","chrome","firefox","safari","ios","android","edge","360","qq","random","randomized","randomizednoalpn","unsafe"],"title":"ProxyHostFingerprint"},"ProxyHostSecurity":{"type":"string","enum":["inbound_default","none","tls"],"title":"ProxyHostSecurity"},"ProxyTable":{"properties":{"vmess":{"$ref":"#/components/schemas/VMessSettings"},"vless":{"$ref":"#/components/schemas/VlessSettings"},"trojan":{"$ref":"#/components/schemas/TrojanSettings"},"shadowsocks":{"$ref":"#/components/schemas/ShadowsocksSettings"},"wireguard":{"$ref":"#/components/schemas/WireGuardSettings"},"hysteria":{"$ref":"#/components/schemas/HysteriaSettings"}},"type":"object","title":"ProxyTable"},"RealityScanRequest":{"properties":{"target":{"type":"string","maxLength":253,"minLength":1,"title":"Target","description":"host or host:port to probe (port defaults to 443)"},"timeout":{"anyOf":[{"type":"number","maximum":20.0,"minimum":1.0},{"type":"null"}],"title":"Timeout","description":"Per-probe timeout in seconds (1-20, default 10)"}},"type":"object","required":["target"],"title":"RealityScanRequest"},"RealityScanResult":{"properties":{"target":{"type":"string","title":"Target"},"host":{"type":"string","title":"Host"},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip"},"port":{"type":"integer","title":"Port"},"sni":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sni"},"sni_discovered":{"type":"boolean","title":"Sni Discovered","default":false},"feasible":{"type":"boolean","title":"Feasible"},"tls13":{"type":"boolean","title":"Tls13"},"tls_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tls Version"},"h2":{"type":"boolean","title":"H2"},"alpn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alpn"},"x25519":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"X25519"},"post_quantum":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Post Quantum"},"curve":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curve"},"h3":{"type":"boolean","title":"H3","default":false},"cert_valid":{"type":"boolean","title":"Cert Valid"},"cert_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cert Subject"},"cert_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cert Issuer"},"not_after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Not After"},"server_names":{"items":{"type":"string"},"type":"array","title":"Server Names"},"latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Ms"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["target","host","port","feasible","tls13","h2","cert_valid"],"title":"RealityScanResult"},"RemoveAPIKeysResponse":{"properties":{"api_keys":{"items":{"type":"string"},"type":"array","title":"Api Keys"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["api_keys","count"],"title":"RemoveAPIKeysResponse","description":"Response model for bulk API key deletion."},"RemoveAdminsResponse":{"properties":{"admins":{"items":{"type":"string"},"type":"array","title":"Admins"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["admins","count"],"title":"RemoveAdminsResponse","description":"Response model for bulk admin deletion"},"RemoveClientTemplatesResponse":{"properties":{"templates":{"items":{"type":"string"},"type":"array","title":"Templates"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["templates","count"],"title":"RemoveClientTemplatesResponse","description":"Response model for bulk client template deletion"},"RemoveCoresResponse":{"properties":{"cores":{"items":{"type":"string"},"type":"array","title":"Cores"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["cores","count"],"title":"RemoveCoresResponse","description":"Response model for bulk core deletion"},"RemoveGroupsResponse":{"properties":{"groups":{"items":{"type":"string"},"type":"array","title":"Groups"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["groups","count"],"title":"RemoveGroupsResponse","description":"Response model for bulk group deletion"},"RemoveHostsResponse":{"properties":{"hosts":{"items":{"type":"string"},"type":"array","title":"Hosts"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["hosts","count"],"title":"RemoveHostsResponse","description":"Response model for bulk host deletion"},"RemoveNodesResponse":{"properties":{"nodes":{"items":{"type":"string"},"type":"array","title":"Nodes"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["nodes","count"],"title":"RemoveNodesResponse","description":"Response model for bulk node deletion"},"RemoveUserTemplatesResponse":{"properties":{"templates":{"items":{"type":"string"},"type":"array","title":"Templates"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["templates","count"],"title":"RemoveUserTemplatesResponse","description":"Response model for bulk user template deletion"},"RemoveUsersResponse":{"properties":{"users":{"items":{"type":"string"},"type":"array","title":"Users"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["users","count"],"title":"RemoveUsersResponse"},"RoleAccess":{"properties":{"require_template":{"type":"boolean","title":"Require Template","default":false},"allowed_template_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Allowed Template Ids"},"allowed_group_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Allowed Group Ids"}},"type":"object","title":"RoleAccess"},"RoleFeatures":{"properties":{"can_use_reset_strategy":{"type":"boolean","title":"Can Use Reset Strategy","default":true},"can_use_next_plan":{"type":"boolean","title":"Can Use Next Plan","default":true}},"type":"object","title":"RoleFeatures"},"RoleHWIDSettings":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"forced":{"type":"boolean","title":"Forced","default":false},"require_hwid_for_manual_sub":{"type":"boolean","title":"Require Hwid For Manual Sub","default":false},"fallback_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Fallback Limit"},"min_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Min Limit"},"max_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Limit"},"mode":{"$ref":"#/components/schemas/HWIDMode","default":"use_global"}},"type":"object","title":"RoleHWIDSettings"},"RoleLimits":{"properties":{"max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Users"},"data_limit_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Limit Min"},"data_limit_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Limit Max"},"expire_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expire Min"},"expire_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expire Max"},"min_hwid_per_user":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Hwid Per User"},"max_hwid_per_user":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Hwid Per User"},"on_hold_timeout_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"On Hold Timeout Min"},"on_hold_timeout_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"On Hold Timeout Max"}},"type":"object","title":"RoleLimits"},"RolePermissions":{"properties":{"users":{"anyOf":[{"$ref":"#/components/schemas/UsersPermissions"},{"type":"null"}]},"admins":{"anyOf":[{"$ref":"#/components/schemas/AdminsPermissions"},{"type":"null"}]},"nodes":{"anyOf":[{"$ref":"#/components/schemas/NodesPermissions"},{"type":"null"}]},"groups":{"anyOf":[{"$ref":"#/components/schemas/CRUDPermissions"},{"type":"null"}]},"hosts":{"anyOf":[{"$ref":"#/components/schemas/HostsPermissions"},{"type":"null"}]},"templates":{"anyOf":[{"$ref":"#/components/schemas/CRUDPermissions"},{"type":"null"}]},"client_templates":{"anyOf":[{"$ref":"#/components/schemas/CRUDPermissions"},{"type":"null"}]},"cores":{"anyOf":[{"$ref":"#/components/schemas/CRUDPermissions"},{"type":"null"}]},"settings":{"anyOf":[{"$ref":"#/components/schemas/SettingsPermissions"},{"type":"null"}]},"system":{"anyOf":[{"$ref":"#/components/schemas/SystemPermissions"},{"type":"null"}]},"hwids":{"anyOf":[{"$ref":"#/components/schemas/HwidsPermissions"},{"type":"null"}]},"admin_roles":{"anyOf":[{"$ref":"#/components/schemas/CRUDPermissions"},{"type":"null"}]},"api_keys":{"anyOf":[{"$ref":"#/components/schemas/APIKeysPermissions"},{"type":"null"}]}},"type":"object","title":"RolePermissions","description":"Typed permission map. Missing resource or action = denied.\nEach action value is True (allowed), {\"scope\": N} (scoped), or None (denied)."},"RunMethod":{"type":"string","enum":["webhook","long-polling"],"title":"RunMethod"},"SettingsPermissions":{"properties":{"read":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Read"},"read_general":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Read General"},"update":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Update"}},"additionalProperties":false,"type":"object","title":"SettingsPermissions"},"SettingsSchema":{"properties":{"telegram":{"anyOf":[{"$ref":"#/components/schemas/Telegram"},{"type":"null"}]},"webhook":{"anyOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"null"}]},"notification_settings":{"anyOf":[{"$ref":"#/components/schemas/NotificationSettings"},{"type":"null"}]},"notification_enable":{"anyOf":[{"$ref":"#/components/schemas/NotificationEnable"},{"type":"null"}]},"subscription":{"anyOf":[{"$ref":"#/components/schemas/Subscription"},{"type":"null"}]},"hwid":{"anyOf":[{"$ref":"#/components/schemas/HWIDSettings"},{"type":"null"}]},"general":{"anyOf":[{"$ref":"#/components/schemas/General"},{"type":"null"}]}},"type":"object","title":"SettingsSchema"},"ShadowsocksMethods":{"type":"string","enum":["aes-128-gcm","aes-256-gcm","chacha20-ietf-poly1305","xchacha20-poly1305"],"title":"ShadowsocksMethods"},"ShadowsocksSettings":{"properties":{"password":{"type":"string","minLength":22,"title":"Password"},"method":{"$ref":"#/components/schemas/ShadowsocksMethods","default":"chacha20-ietf-poly1305"}},"type":"object","title":"ShadowsocksSettings"},"SingBoxFragmentSettings":{"properties":{"fragment":{"type":"boolean","title":"Fragment","default":false},"fragment_fallback_delay":{"type":"string","pattern":"^$|^\\d+ms$","title":"Fragment Fallback Delay","default":""},"record_fragment":{"type":"boolean","title":"Record Fragment","default":false}},"type":"object","title":"SingBoxFragmentSettings"},"SingBoxMuxSettings":{"properties":{"enable":{"type":"boolean","title":"Enable","default":false},"protocol":{"$ref":"#/components/schemas/MultiplexProtocol","default":"smux"},"max_connections":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Connections"},"max_streams":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Streams"},"min_streams":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Streams"},"padding":{"type":"boolean","title":"Padding","default":false},"brutal":{"anyOf":[{"$ref":"#/components/schemas/Brutal"},{"type":"null"}]}},"type":"object","title":"SingBoxMuxSettings"},"SubFormatEnable":{"properties":{"links":{"type":"boolean","title":"Links","default":true},"links_base64":{"type":"boolean","title":"Links Base64","default":true},"xray":{"type":"boolean","title":"Xray","default":true},"wireguard":{"type":"boolean","title":"Wireguard","default":true},"sing_box":{"type":"boolean","title":"Sing Box","default":true},"clash":{"type":"boolean","title":"Clash","default":true},"clash_meta":{"type":"boolean","title":"Clash Meta","default":true},"outline":{"type":"boolean","title":"Outline","default":true}},"type":"object","title":"SubFormatEnable"},"SubRule":{"properties":{"pattern":{"type":"string","title":"Pattern"},"target":{"$ref":"#/components/schemas/ConfigFormat"},"response_headers":{"additionalProperties":true,"type":"object","title":"Response Headers"}},"type":"object","required":["pattern","target"],"title":"SubRule"},"Subscription":{"properties":{"url_prefix":{"type":"string","title":"Url Prefix","default":""},"update_interval":{"type":"integer","title":"Update Interval","default":12},"support_url":{"type":"string","title":"Support Url","default":"https://t.me/"},"profile_title":{"type":"string","title":"Profile Title","default":"Subscription"},"announce":{"type":"string","maxLength":128,"title":"Announce","default":""},"announce_url":{"type":"string","title":"Announce Url","default":""},"response_headers":{"additionalProperties":true,"type":"object","title":"Response Headers"},"rules":{"items":{"$ref":"#/components/schemas/SubRule"},"type":"array","title":"Rules"},"manual_sub_request":{"$ref":"#/components/schemas/SubFormatEnable"},"applications":{"items":{"$ref":"#/components/schemas/Application"},"type":"array","title":"Applications"},"allow_browser_config":{"type":"boolean","title":"Allow Browser Config","default":true},"disable_sub_template":{"type":"boolean","title":"Disable Sub Template","default":false},"randomize_order":{"type":"boolean","title":"Randomize Order","default":false},"custom_variables":{"items":{"$ref":"#/components/schemas/CustomVariable"},"type":"array","title":"Custom Variables"}},"type":"object","required":["rules"],"title":"Subscription"},"SubscriptionTemplates":{"properties":{"xray":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Xray"}},"type":"object","title":"SubscriptionTemplates"},"SubscriptionUserResponse":{"properties":{"proxy_settings":{"$ref":"#/components/schemas/ProxyTable"},"expire":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Expire"},"data_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Data Limit","description":"data_limit can be 0 or greater"},"data_limit_reset_strategy":{"anyOf":[{"$ref":"#/components/schemas/DataLimitResetStrategy"},{"type":"null"}]},"on_hold_expire_duration":{"anyOf":[{"type":"integer","maximum":2147483647.0,"minimum":0.0},{"type":"null"}],"title":"On Hold Expire Duration","description":"on_hold_expire_duration can be 0 or greater in seconds"},"on_hold_timeout":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"On Hold Timeout"},"group_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Group Ids"},"hwid_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hwid Limit"},"next_plan":{"anyOf":[{"$ref":"#/components/schemas/NextPlanModel"},{"type":"null"}]},"id":{"type":"integer","title":"Id"},"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"},"edit_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Edit At"},"online_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Online At"},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip"}},"type":"object","required":["id","username","status","used_traffic","created_at"],"title":"SubscriptionUserResponse"},"SystemPermissions":{"properties":{"read":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Read"}},"additionalProperties":false,"type":"object","title":"SystemPermissions"},"SystemResourceStats":{"properties":{"version":{"type":"string","title":"Version"},"uptime_seconds":{"type":"integer","title":"Uptime Seconds"},"mem_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mem Total"},"mem_used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mem Used"},"disk_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Disk Total"},"disk_used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Disk Used"},"cpu_cores":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cpu Cores"},"cpu_usage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpu Usage"}},"type":"object","required":["version","uptime_seconds"],"title":"SystemResourceStats"},"SystemStats":{"properties":{"total_user":{"type":"integer","title":"Total User"},"online_users":{"type":"integer","title":"Online Users"},"active_users":{"type":"integer","title":"Active Users"},"on_hold_users":{"type":"integer","title":"On Hold Users"},"disabled_users":{"type":"integer","title":"Disabled Users"},"expired_users":{"type":"integer","title":"Expired Users"},"limited_users":{"type":"integer","title":"Limited Users"},"incoming_bandwidth":{"type":"integer","title":"Incoming Bandwidth"},"outgoing_bandwidth":{"type":"integer","title":"Outgoing Bandwidth"},"version":{"type":"string","title":"Version"},"uptime_seconds":{"type":"integer","title":"Uptime Seconds"},"mem_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mem Total"},"mem_used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mem Used"},"disk_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Disk Total"},"disk_used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Disk Used"},"cpu_cores":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cpu Cores"},"cpu_usage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpu Usage"}},"type":"object","required":["total_user","online_users","active_users","on_hold_users","disabled_users","expired_users","limited_users","incoming_bandwidth","outgoing_bandwidth","version","uptime_seconds"],"title":"SystemStats"},"SystemUsersStats":{"properties":{"total_user":{"type":"integer","title":"Total User"},"online_users":{"type":"integer","title":"Online Users"},"active_users":{"type":"integer","title":"Active Users"},"on_hold_users":{"type":"integer","title":"On Hold Users"},"disabled_users":{"type":"integer","title":"Disabled Users"},"expired_users":{"type":"integer","title":"Expired Users"},"limited_users":{"type":"integer","title":"Limited Users"},"incoming_bandwidth":{"type":"integer","title":"Incoming Bandwidth"},"outgoing_bandwidth":{"type":"integer","title":"Outgoing Bandwidth"}},"type":"object","required":["total_user","online_users","active_users","on_hold_users","disabled_users","expired_users","limited_users","incoming_bandwidth","outgoing_bandwidth"],"title":"SystemUsersStats"},"TcpSettings":{"properties":{"header":{"type":"string","pattern":"^(?:|none|http)$","title":"Header","default":"none"},"request":{"anyOf":[{"$ref":"#/components/schemas/HTTPRequest"},{"type":"null"}]},"response":{"anyOf":[{"$ref":"#/components/schemas/HTTPResponse"},{"type":"null"}]}},"type":"object","title":"TcpSettings"},"Telegram":{"properties":{"enable":{"type":"boolean","title":"Enable","default":false},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"webhook_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Secret"},"proxy_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proxy Url"},"method":{"$ref":"#/components/schemas/RunMethod","default":"webhook"},"mini_app_login":{"type":"boolean","title":"Mini App Login","default":true},"mini_app_web_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mini App Web Url","default":""},"for_admins_only":{"type":"boolean","title":"For Admins Only","default":true}},"type":"object","title":"Telegram"},"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"},"TransportSettings":{"properties":{"xhttp_settings":{"anyOf":[{"$ref":"#/components/schemas/XHttpSettings"},{"type":"null"}]},"grpc_settings":{"anyOf":[{"$ref":"#/components/schemas/GRPCSettings"},{"type":"null"}]},"kcp_settings":{"anyOf":[{"$ref":"#/components/schemas/KCPSettings"},{"type":"null"}]},"tcp_settings":{"anyOf":[{"$ref":"#/components/schemas/TcpSettings"},{"type":"null"}]},"websocket_settings":{"anyOf":[{"$ref":"#/components/schemas/WebSocketSettings"},{"type":"null"}]}},"type":"object","title":"TransportSettings"},"TrojanSettings":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","title":"TrojanSettings"},"Unauthorized":{"properties":{"detail":{"type":"string","title":"Detail","default":"Not authenticated"}},"type":"object","title":"Unauthorized"},"UsageTable":{"type":"string","enum":["node_user_usages","node_usages"],"title":"UsageTable"},"UserCountMetric":{"type":"string","enum":["online","expired","limited"],"title":"UserCountMetric"},"UserCountMetricStat":{"properties":{"period_start":{"type":"string","format":"date-time","title":"Period Start"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["period_start","count"],"title":"UserCountMetricStat"},"UserCountMetricStatsList":{"properties":{"period":{"anyOf":[{"$ref":"#/components/schemas/Period"},{"type":"null"}]},"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"},"metric":{"$ref":"#/components/schemas/UserCountMetric"},"count_during_period":{"type":"integer","title":"Count During Period","default":0},"stats":{"additionalProperties":{"items":{"$ref":"#/components/schemas/UserCountMetricStat"},"type":"array"},"type":"object","title":"Stats"}},"type":"object","required":["start","end","metric","stats"],"title":"UserCountMetricStatsList"},"UserCreate":{"properties":{"proxy_settings":{"$ref":"#/components/schemas/ProxyTable"},"expire":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Expire"},"data_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Data Limit","description":"data_limit can be 0 or greater"},"data_limit_reset_strategy":{"anyOf":[{"$ref":"#/components/schemas/DataLimitResetStrategy"},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"},"on_hold_expire_duration":{"anyOf":[{"type":"integer","maximum":2147483647.0,"minimum":0.0},{"type":"null"}],"title":"On Hold Expire Duration","description":"on_hold_expire_duration can be 0 or greater in seconds"},"on_hold_timeout":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"On Hold Timeout"},"group_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Group Ids"},"auto_delete_in_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Auto Delete In Days"},"hwid_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hwid Limit"},"next_plan":{"anyOf":[{"$ref":"#/components/schemas/NextPlanModel"},{"type":"null"}]},"username":{"type":"string","title":"Username"},"status":{"anyOf":[{"$ref":"#/components/schemas/UserStatus"},{"type":"null"}]}},"type":"object","required":["username"],"title":"UserCreate"},"UserHWIDListResponse":{"properties":{"hwids":{"items":{"$ref":"#/components/schemas/UserHWIDResponse"},"type":"array","title":"Hwids"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["hwids","count"],"title":"UserHWIDListResponse"},"UserHWIDResponse":{"properties":{"id":{"type":"integer","title":"Id"},"hwid":{"type":"string","title":"Hwid"},"device_os":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Os"},"os_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os Version"},"device_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Model"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"type":"string","format":"date-time","title":"Last Used At"}},"type":"object","required":["id","hwid","created_at","last_used_at"],"title":"UserHWIDResponse"},"UserIPList":{"properties":{"ips":{"additionalProperties":{"type":"integer"},"type":"object","title":"Ips"}},"type":"object","required":["ips"],"title":"UserIPList","description":"User IP list - mapping of IP addresses to connection counts"},"UserIPListAll":{"properties":{"nodes":{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/UserIPList"},{"type":"null"}]},"type":"object","title":"Nodes"}},"type":"object","required":["nodes"],"title":"UserIPListAll","description":"User IP lists for all nodes"},"UserModify":{"properties":{"proxy_settings":{"anyOf":[{"$ref":"#/components/schemas/ProxyTable"},{"type":"null"}]},"expire":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Expire"},"data_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Data Limit","description":"data_limit can be 0 or greater"},"data_limit_reset_strategy":{"anyOf":[{"$ref":"#/components/schemas/DataLimitResetStrategy"},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"},"on_hold_expire_duration":{"anyOf":[{"type":"integer","maximum":2147483647.0,"minimum":0.0},{"type":"null"}],"title":"On Hold Expire Duration","description":"on_hold_expire_duration can be 0 or greater in seconds"},"on_hold_timeout":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"On Hold Timeout"},"group_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Group Ids"},"auto_delete_in_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Auto Delete In Days"},"hwid_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hwid Limit"},"next_plan":{"anyOf":[{"$ref":"#/components/schemas/NextPlanModel"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/UserStatus"},{"type":"null"}]}},"type":"object","title":"UserModify"},"UserNotificationEnable":{"properties":{"create":{"type":"boolean","title":"Create","default":true},"modify":{"type":"boolean","title":"Modify","default":true},"delete":{"type":"boolean","title":"Delete","default":true},"status_change":{"type":"boolean","title":"Status Change","default":true},"reset_data_usage":{"type":"boolean","title":"Reset Data Usage","default":true},"data_reset_by_next":{"type":"boolean","title":"Data Reset By Next","default":true},"subscription_revoked":{"type":"boolean","title":"Subscription Revoked","default":true}},"type":"object","title":"UserNotificationEnable"},"UserResponse":{"properties":{"proxy_settings":{"$ref":"#/components/schemas/ProxyTable"},"expire":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Expire"},"data_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Data Limit","description":"data_limit can be 0 or greater"},"data_limit_reset_strategy":{"anyOf":[{"$ref":"#/components/schemas/DataLimitResetStrategy"},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"},"on_hold_expire_duration":{"anyOf":[{"type":"integer","maximum":2147483647.0,"minimum":0.0},{"type":"null"}],"title":"On Hold Expire Duration","description":"on_hold_expire_duration can be 0 or greater in seconds"},"on_hold_timeout":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"On Hold Timeout"},"group_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Group Ids"},"auto_delete_in_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Auto Delete In Days"},"hwid_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hwid Limit"},"next_plan":{"anyOf":[{"$ref":"#/components/schemas/NextPlanModel"},{"type":"null"}]},"id":{"type":"integer","title":"Id"},"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"},"edit_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Edit At"},"online_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Online At"},"subscription_url":{"type":"string","title":"Subscription Url","default":""},"admin":{"anyOf":[{"$ref":"#/components/schemas/AdminBase"},{"type":"null"}]}},"type":"object","required":["id","username","status","used_traffic","created_at"],"title":"UserResponse"},"UserSimple":{"properties":{"id":{"type":"integer","title":"Id"},"username":{"type":"string","title":"Username"}},"type":"object","required":["id","username"],"title":"UserSimple","description":"Lightweight user model with only id and username for performance."},"UserStatus":{"type":"string","enum":["active","disabled","limited","expired","on_hold"],"title":"UserStatus"},"UserStatusCreate":{"type":"string","enum":["active","on_hold"],"title":"UserStatusCreate"},"UserStatusToggle":{"properties":{"disabled":{"type":"boolean","title":"Disabled"}},"type":"object","required":["disabled"],"title":"UserStatusToggle"},"UserSubscriptionUpdateChart":{"properties":{"period":{"anyOf":[{"$ref":"#/components/schemas/Period"},{"type":"null"}]},"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"},"total":{"type":"integer","title":"Total"},"segments":{"items":{"$ref":"#/components/schemas/UserSubscriptionUpdateChartSegment"},"type":"array","title":"Segments"},"stats":{"items":{"$ref":"#/components/schemas/UserSubscriptionUpdateChartStat"},"type":"array","title":"Stats"}},"type":"object","required":["start","end","total"],"title":"UserSubscriptionUpdateChart"},"UserSubscriptionUpdateChartSegment":{"properties":{"name":{"type":"string","title":"Name"},"count":{"type":"integer","title":"Count"},"percentage":{"type":"number","title":"Percentage"}},"type":"object","required":["name","count","percentage"],"title":"UserSubscriptionUpdateChartSegment"},"UserSubscriptionUpdateChartStat":{"properties":{"period_start":{"type":"string","format":"date-time","title":"Period Start"},"agent":{"type":"string","title":"Agent"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["period_start","agent","count"],"title":"UserSubscriptionUpdateChartStat"},"UserSubscriptionUpdateList":{"properties":{"updates":{"items":{"$ref":"#/components/schemas/UserSubscriptionUpdateSchema"},"type":"array","title":"Updates"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["count"],"title":"UserSubscriptionUpdateList"},"UserSubscriptionUpdateSchema":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At"},"user_agent":{"type":"string","title":"User Agent"},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip"},"hwid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hwid"}},"type":"object","required":["created_at","user_agent"],"title":"UserSubscriptionUpdateSchema"},"UserTemplateCreate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"data_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Data Limit","description":"data_limit can be 0 or greater"},"hwid_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hwid Limit"},"expire_duration":{"anyOf":[{"type":"integer","maximum":2147483647.0,"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},{"type":"null"}],"title":"Username Prefix"},"username_suffix":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Username Suffix"},"group_ids":{"items":{"type":"integer"},"type":"array","title":"Group Ids"},"extra_settings":{"anyOf":[{"$ref":"#/components/schemas/ExtraSettings"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/UserStatusCreate"},{"type":"null"}]},"reset_usages":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reset Usages"},"on_hold_timeout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"On Hold Timeout"},"data_limit_reset_strategy":{"$ref":"#/components/schemas/DataLimitResetStrategy","default":"no_reset"},"is_disabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Disabled"}},"type":"object","required":["group_ids"],"title":"UserTemplateCreate"},"UserTemplateModify":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"data_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Data Limit","description":"data_limit can be 0 or greater"},"hwid_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hwid Limit"},"expire_duration":{"anyOf":[{"type":"integer","maximum":2147483647.0,"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},{"type":"null"}],"title":"Username Prefix"},"username_suffix":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Username Suffix"},"group_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Group Ids"},"extra_settings":{"anyOf":[{"$ref":"#/components/schemas/ExtraSettings"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/UserStatusCreate"},{"type":"null"}]},"reset_usages":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reset Usages"},"on_hold_timeout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"On Hold Timeout"},"data_limit_reset_strategy":{"$ref":"#/components/schemas/DataLimitResetStrategy","default":"no_reset"},"is_disabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Disabled"}},"type":"object","title":"UserTemplateModify"},"UserTemplateResponse":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"data_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Data Limit","description":"data_limit can be 0 or greater"},"hwid_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hwid Limit"},"expire_duration":{"anyOf":[{"type":"integer","maximum":2147483647.0,"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},{"type":"null"}],"title":"Username Prefix"},"username_suffix":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Username Suffix"},"group_ids":{"items":{"type":"integer"},"type":"array","title":"Group Ids"},"extra_settings":{"anyOf":[{"$ref":"#/components/schemas/ExtraSettings"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/UserStatusCreate"},{"type":"null"}]},"reset_usages":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reset Usages"},"on_hold_timeout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"On Hold Timeout"},"data_limit_reset_strategy":{"$ref":"#/components/schemas/DataLimitResetStrategy","default":"no_reset"},"is_disabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Disabled"},"id":{"type":"integer","title":"Id"}},"type":"object","required":["group_ids","id"],"title":"UserTemplateResponse"},"UserTemplateSimple":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["id"],"title":"UserTemplateSimple","description":"Lightweight user template model with only id and name for performance."},"UserTemplatesSimpleResponse":{"properties":{"templates":{"items":{"$ref":"#/components/schemas/UserTemplateSimple"},"type":"array","title":"Templates"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["templates","total"],"title":"UserTemplatesSimpleResponse","description":"Response model for lightweight user template list."},"UserUsageStat":{"properties":{"period_start":{"type":"string","format":"date-time","title":"Period Start"},"total_traffic":{"type":"integer","title":"Total Traffic"}},"type":"object","required":["period_start","total_traffic"],"title":"UserUsageStat"},"UserUsageStatsList":{"properties":{"period":{"anyOf":[{"$ref":"#/components/schemas/Period"},{"type":"null"}]},"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"},"stats":{"additionalProperties":{"items":{"$ref":"#/components/schemas/UserUsageStat"},"type":"array"},"type":"object","title":"Stats"}},"type":"object","required":["start","end","stats"],"title":"UserUsageStatsList"},"UsernameGenerationStrategy":{"type":"string","enum":["random","sequence"],"title":"UsernameGenerationStrategy"},"UsersPermissions":{"properties":{"create":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Create"},"read":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Read"},"read_simple":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Read Simple"},"update":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Update"},"delete":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Delete"},"reset_usage":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Reset Usage"},"revoke_sub":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Revoke Sub"},"set_owner":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Set Owner"},"activate_next_plan":{"anyOf":[{"type":"boolean"},{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PermissionScope"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Activate Next Plan"}},"additionalProperties":false,"type":"object","title":"UsersPermissions"},"UsersResponse":{"properties":{"users":{"items":{"$ref":"#/components/schemas/UserResponse"},"type":"array","title":"Users"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["users","total"],"title":"UsersResponse"},"UsersSimpleResponse":{"properties":{"users":{"items":{"$ref":"#/components/schemas/UserSimple"},"type":"array","title":"Users"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["users","total"],"title":"UsersSimpleResponse","description":"Response model for lightweight user list."},"VMessSettings":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","title":"VMessSettings"},"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"},"VlessSettings":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","title":"VlessSettings"},"WebSocketSettings":{"properties":{"heartbeatPeriod":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Heartbeatperiod"}},"type":"object","title":"WebSocketSettings"},"Webhook":{"properties":{"enable":{"type":"boolean","title":"Enable","default":false},"webhooks":{"items":{"$ref":"#/components/schemas/WebhookInfo"},"type":"array","title":"Webhooks","default":[]},"days_left":{"items":{"type":"integer"},"type":"array","title":"Days Left","default":[]},"usage_percent":{"items":{"type":"integer"},"type":"array","title":"Usage Percent","default":[]},"timeout":{"type":"integer","exclusiveMinimum":0.0,"title":"Timeout"},"recurrent":{"type":"integer","exclusiveMinimum":0.0,"title":"Recurrent"},"proxy_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proxy Url"}},"type":"object","required":["timeout","recurrent"],"title":"Webhook"},"WebhookInfo":{"properties":{"url":{"type":"string","title":"Url"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["url","secret"],"title":"WebhookInfo"},"WireGuardHostOverrides":{"properties":{"allowed_ips":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Ips"},"mtu":{"anyOf":[{"type":"integer","maximum":9000.0,"minimum":576.0},{"type":"null"}],"title":"Mtu"},"reserved":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Reserved"},"keepalive_seconds":{"anyOf":[{"type":"integer","maximum":86400.0,"minimum":0.0},{"type":"null"}],"title":"Keepalive Seconds"},"dns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Dns"}},"type":"object","title":"WireGuardHostOverrides","description":"Optional per-host values merged into WireGuard subscription output."},"WireGuardSettings":{"properties":{"private_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Private Key"},"public_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Key"},"peer_ips":{"items":{"type":"string"},"type":"array","title":"Peer Ips"}},"type":"object","title":"WireGuardSettings"},"WireGuardSubnetUsage":{"properties":{"subnet":{"type":"string","title":"Subnet"},"interface_tags":{"items":{"type":"string"},"type":"array","title":"Interface Tags"},"capacity":{"type":"integer","title":"Capacity"},"used":{"type":"integer","title":"Used"},"free":{"type":"integer","title":"Free"},"free_ips":{"items":{"type":"string"},"type":"array","title":"Free Ips"}},"type":"object","required":["subnet","interface_tags","capacity","used","free","free_ips"],"title":"WireGuardSubnetUsage"},"WorkerHealth":{"properties":{"status":{"type":"string","title":"Status"},"response_time_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Time Ms"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["status"],"title":"WorkerHealth"},"WorkersHealth":{"properties":{"scheduler":{"$ref":"#/components/schemas/WorkerHealth"},"node":{"$ref":"#/components/schemas/WorkerHealth"}},"type":"object","required":["scheduler","node"],"title":"WorkersHealth"},"XHttpModes":{"type":"string","enum":["auto","packet-up","stream-up","stream-one"],"title":"XHttpModes"},"XHttpSettings":{"properties":{"mode":{"anyOf":[{"$ref":"#/components/schemas/XHttpModes"},{"type":"null"}]},"no_grpc_header":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"No Grpc Header"},"x_padding_bytes":{"anyOf":[{"type":"string","pattern":"^\\d{1,16}(-\\d{1,16})?$"},{"type":"null"}],"title":"X Padding Bytes"},"x_padding_obfs_mode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"X Padding Obfs Mode"},"x_padding_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Padding Key"},"x_padding_header":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Padding Header"},"x_padding_placement":{"anyOf":[{"type":"string","pattern":"^$|^(cookie|header|query|queryInHeader)$"},{"type":"null"}],"title":"X Padding Placement"},"x_padding_method":{"anyOf":[{"type":"string","pattern":"^$|^(repeat-x|tokenish)$"},{"type":"null"}],"title":"X Padding Method"},"uplink_http_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uplink Http Method"},"session_placement":{"anyOf":[{"type":"string","pattern":"^$|^(path|cookie|header|query)$"},{"type":"null"}],"title":"Session Placement"},"session_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Key"},"session_id_table":{"anyOf":[{"type":"string","pattern":"^[\\x20-\\x7E]*$"},{"type":"null"}],"title":"Session Id Table"},"session_id_length":{"anyOf":[{"type":"string","pattern":"^\\d{1,16}(-\\d{1,16})?$"},{"type":"null"}],"title":"Session Id Length"},"seq_placement":{"anyOf":[{"type":"string","pattern":"^$|^(path|cookie|header|query)$"},{"type":"null"}],"title":"Seq Placement"},"seq_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Seq Key"},"uplink_data_placement":{"anyOf":[{"type":"string","pattern":"^$|^(body|cookie|header)$"},{"type":"null"}],"title":"Uplink Data Placement"},"uplink_data_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uplink Data Key"},"uplink_chunk_size":{"anyOf":[{"type":"string","pattern":"^\\d{1,16}(-\\d{1,16})?$"},{"type":"null"}],"title":"Uplink Chunk Size"},"sc_max_each_post_bytes":{"anyOf":[{"type":"string","pattern":"^\\d{1,16}(-\\d{1,16})?$"},{"type":"null"}],"title":"Sc Max Each Post Bytes"},"sc_min_posts_interval_ms":{"anyOf":[{"type":"string","pattern":"^\\d{1,16}(-\\d{1,16})?$"},{"type":"null"}],"title":"Sc Min Posts Interval Ms"},"xmux":{"anyOf":[{"$ref":"#/components/schemas/XMuxSettings"},{"type":"null"}]},"download_settings":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Download Settings"}},"type":"object","title":"XHttpSettings"},"XMuxSettings":{"properties":{"maxConcurrency":{"anyOf":[{"type":"string","pattern":"^\\d{1,16}(-\\d{1,16})?$"},{"type":"null"}],"title":"Maxconcurrency"},"maxConnections":{"anyOf":[{"type":"string","pattern":"^\\d{1,16}(-\\d{1,16})?$"},{"type":"null"}],"title":"Maxconnections"},"cMaxReuseTimes":{"anyOf":[{"type":"string","pattern":"^\\d{1,16}(-\\d{1,16})?$"},{"type":"null"}],"title":"Cmaxreusetimes"},"hMaxReusableSecs":{"anyOf":[{"type":"string","pattern":"^\\d{1,16}(-\\d{1,16})?$"},{"type":"null"}],"title":"Hmaxreusablesecs"},"hMaxRequestTimes":{"anyOf":[{"type":"string","pattern":"^\\d{1,16}(-\\d{1,16})?$"},{"type":"null"}],"title":"Hmaxrequesttimes"},"hKeepAlivePeriod":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hkeepaliveperiod"}},"type":"object","title":"XMuxSettings"},"XUDP":{"type":"string","enum":["reject","allow","skip"],"title":"XUDP"},"XrayFragmentSettings":{"properties":{"packets":{"type":"string","pattern":"^(:?tlshello|[\\d-]{1,16})$","title":"Packets"},"length":{"type":"string","pattern":"^[\\d-]{1,16}$","title":"Length"},"interval":{"type":"string","pattern":"^[\\d-]{1,16}$","title":"Interval"},"maxSplit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Maxsplit"}},"additionalProperties":true,"type":"object","required":["packets","length","interval"],"title":"XrayFragmentSettings"},"XrayMuxSettings-Input":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"concurrency":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Concurrency"},"xudp_concurrency":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Xudp Concurrency"},"xudp_proxy_udp_443":{"$ref":"#/components/schemas/XUDP","default":"reject"}},"type":"object","title":"XrayMuxSettings"},"XrayMuxSettings-Output":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"concurrency":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Concurrency"},"xudpConcurrency":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Xudpconcurrency"},"xudpProxyUDP443":{"$ref":"#/components/schemas/XUDP","default":"reject"}},"type":"object","title":"XrayMuxSettings"},"XrayNoiseSettings":{"properties":{"type":{"type":"string","pattern":"^$|^(:?rand|array|str|base64|hex)$","title":"Type"},"packet":{"anyOf":[{"type":"string"},{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Packet"},"delay":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Delay"},"apply_to":{"type":"string","pattern":"ip|ipv4|ipv6","title":"Apply To","default":"ip"},"rand":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Rand"},"randRange":{"anyOf":[{"type":"string","pattern":"^\\d{1,16}(-\\d{1,16})?$"},{"type":"null"}],"title":"Randrange"}},"additionalProperties":true,"type":"object","required":["type"],"title":"XrayNoiseSettings"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/admin/token"}}}}}}