{"openapi":"3.1.0","info":{"title":"TIVRA VPN API","version":"0.1.0"},"paths":{"/healthz":{"get":{"summary":"Health","operationId":"health_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/register":{"post":{"summary":"Register","operationId":"register_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/login":{"post":{"summary":"Login","operationId":"login_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me":{"get":{"summary":"Me","operationId":"me_v1_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"summary":"Delete Account","operationId":"delete_account_v1_me_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAccount"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/logout":{"post":{"summary":"Logout","operationId":"logout_v1_auth_logout_post","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/v1/locations":{"get":{"summary":"Locations","operationId":"locations_v1_locations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/app-config":{"get":{"summary":"App Config","operationId":"app_config_v1_app_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/carrier-profiles":{"get":{"summary":"Carrier Profiles","operationId":"carrier_profiles_v1_carrier_profiles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/devices":{"get":{"summary":"Devices","operationId":"devices_v1_devices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Add Device","operationId":"add_device_v1_devices_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/devices/{device_id}":{"delete":{"summary":"Delete Device","operationId":"delete_device_v1_devices__device_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/experimental/devices":{"get":{"summary":"List Devices","operationId":"list_devices_v1_experimental_devices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Add Device","operationId":"add_device_v1_experimental_devices_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentalRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/experimental/devices/{device_id}":{"delete":{"summary":"Delete Device","operationId":"delete_device_v1_experimental_devices__device_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/transports/capabilities":{"get":{"summary":"Capabilities","operationId":"capabilities_v1_transports_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/transports/devices":{"get":{"summary":"Devices","operationId":"devices_v1_transports_devices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Issue","operationId":"issue_v1_transports_devices_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/transports/devices/{device_id}":{"delete":{"summary":"Revoke","operationId":"revoke_v1_transports_devices__device_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Device Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/amnezia/capabilities":{"get":{"summary":"Capabilities","operationId":"capabilities_v1_amnezia_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/amnezia/devices":{"get":{"summary":"Devices","operationId":"devices_v1_amnezia_devices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Issue","operationId":"issue_v1_amnezia_devices_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmneziaRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/amnezia/devices/{device_id}":{"delete":{"summary":"Revoke","operationId":"revoke_v1_amnezia_devices__device_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Device Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/installations/{installation_id}":{"patch":{"summary":"Rename","operationId":"rename_v1_installations__installation_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"installation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Installation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameInstallation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/installations/{installation_id}/profiles":{"post":{"summary":"Bind","operationId":"bind_v1_installations__installation_id__profiles_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"installation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Installation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindInstallation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/connection-events":{"post":{"summary":"Report","operationId":"report_v1_connection_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/admin/connection-stats":{"get":{"summary":"Stats","operationId":"stats_v1_admin_connection_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"AmneziaRequest":{"properties":{"installation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Installation Id"},"installation_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Installation Name"},"client_device_id":{"type":"string","format":"uuid","title":"Client Device Id"},"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"transport":{"type":"string","const":"amneziawg","title":"Transport"},"exit_location":{"type":"string","enum":["nl","de","ru","kz","fi","gb","es","hk","fr","il"],"title":"Exit Location"},"exit_node_id":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9-]{0,39}$"},{"type":"null"}],"title":"Exit Node Id"},"russia_node_id":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9-]{0,39}$"},{"type":"null"}],"title":"Russia Node Id"},"smart_routing":{"type":"boolean","const":false,"title":"Smart Routing","default":false},"selection_version":{"type":"integer","const":2,"title":"Selection Version","default":2},"public_key":{"type":"string","title":"Public Key"}},"additionalProperties":false,"type":"object","required":["client_device_id","name","transport","exit_location","public_key"],"title":"AmneziaRequest"},"BindInstallation":{"properties":{"wireguard_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":32,"title":"Wireguard Ids"},"https_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":32,"title":"Https Ids"},"transport_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":32,"title":"Transport Ids"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","title":"BindInstallation"},"ConnectionEvent":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"profile_id":{"type":"string","format":"uuid","title":"Profile Id"},"transport":{"type":"string","enum":["wireguard","https","vless_reality","hysteria2","amneziawg"],"title":"Transport"}},"additionalProperties":false,"type":"object","required":["event_id","profile_id","transport"],"title":"ConnectionEvent"},"Credentials":{"properties":{"email":{"type":"string","maxLength":254,"format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":12,"title":"Password"}},"additionalProperties":false,"type":"object","required":["email","password"],"title":"Credentials"},"DeleteAccount":{"properties":{"password":{"type":"string","maxLength":128,"minLength":1,"title":"Password"}},"additionalProperties":false,"type":"object","required":["password"],"title":"DeleteAccount"},"DeviceRequest":{"properties":{"installation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Installation Id"},"installation_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Installation Name"},"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"public_key":{"type":"string","maxLength":44,"minLength":44,"title":"Public Key"},"location":{"type":"string","enum":["nl","de","ru","kz","fi","gb","es","hk","fr","il"],"title":"Location"},"node_id":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9-]{0,39}$"},{"type":"null"}],"title":"Node Id"},"russia_node_id":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9-]{0,39}$"},{"type":"null"}],"title":"Russia Node Id"},"smart_routing":{"type":"boolean","title":"Smart Routing","default":false},"selection_version":{"type":"integer","enum":[1,2],"title":"Selection Version","default":1}},"additionalProperties":false,"type":"object","required":["name","public_key","location"],"title":"DeviceRequest"},"ExperimentalRequest":{"properties":{"installation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Installation Id"},"installation_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Installation Name"},"client_device_id":{"type":"string","format":"uuid","title":"Client Device Id"},"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"carrier_profile":{"type":"string","enum":["mts","megafon","beeline","t2","yota","other"],"title":"Carrier Profile"},"exit_location":{"type":"string","enum":["nl","de","ru","kz","fi","gb","es","hk","fr","il"],"title":"Exit Location"},"exit_node_id":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9-]{0,39}$"},{"type":"null"}],"title":"Exit Node Id"},"russia_node_id":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9-]{0,39}$"},{"type":"null"}],"title":"Russia Node Id"},"smart_routing":{"type":"boolean","title":"Smart Routing","default":true},"selection_version":{"type":"integer","enum":[1,2],"title":"Selection Version","default":1},"ingress_mode":{"type":"string","enum":["relay","direct"],"title":"Ingress Mode","default":"relay"}},"additionalProperties":false,"type":"object","required":["client_device_id","name","carrier_profile","exit_location"],"title":"ExperimentalRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"RenameInstallation":{"properties":{"name":{"type":"string","title":"Name"}},"additionalProperties":false,"type":"object","required":["name"],"title":"RenameInstallation"},"TransportRequest":{"properties":{"installation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Installation Id"},"installation_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Installation Name"},"client_device_id":{"type":"string","format":"uuid","title":"Client Device Id"},"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"transport":{"type":"string","enum":["vless_reality","hysteria2"],"title":"Transport"},"exit_location":{"type":"string","enum":["nl","de","ru","kz","fi","gb","es","hk","fr","il"],"title":"Exit Location"},"exit_node_id":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9-]{0,39}$"},{"type":"null"}],"title":"Exit Node Id"},"russia_node_id":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9-]{0,39}$"},{"type":"null"}],"title":"Russia Node Id"},"smart_routing":{"type":"boolean","title":"Smart Routing","default":true},"selection_version":{"type":"integer","const":2,"title":"Selection Version","default":2}},"additionalProperties":false,"type":"object","required":["client_device_id","name","transport","exit_location"],"title":"TransportRequest"},"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"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}