{"openapi":"3.1.0","info":{"title":"JetTunnel Partner API","description":"Бесплатные обычные серверы + оплаченный мобильный трафик. Ручной баланс партнёров, без платёжной системы.","version":"0.1.0"},"paths":{"/healthz":{"get":{"tags":["Service"],"summary":"Health","operationId":"health_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/balance":{"get":{"tags":["Partner"],"summary":"Balance","operationId":"balance_api_v1_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pricing":{"get":{"tags":["Partner"],"summary":"Pricing","operationId":"pricing_api_v1_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pricing/quote":{"get":{"tags":["Partner"],"summary":"Quote","operationId":"quote_api_v1_pricing_quote_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit_gb","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Limit Gb"}},{"name":"months","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Months"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Partner"],"summary":"Quote Post","operationId":"quote_post_api_v1_pricing_quote_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/keys":{"get":{"tags":["Keys"],"summary":"Keys","operationId":"keys_api_v1_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/keys/search":{"get":{"tags":["Keys"],"summary":"Search","operationId":"search_api_v1_keys_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":500,"default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/key/create":{"post":{"tags":["Keys"],"summary":"Create","operationId":"create_api_v1_key_create_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Create"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/key/info":{"post":{"tags":["Keys"],"summary":"Info","operationId":"info_api_v1_key_info_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyRef"}}},"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":[]}]}},"/api/v1/key/update":{"post":{"tags":["Keys"],"summary":"Update","operationId":"update_api_v1_key_update_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Update"}}},"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":[]}]}},"/api/v1/key/ban":{"post":{"tags":["Keys"],"summary":"Ban","operationId":"ban_api_v1_key_ban_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ban"}}},"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":[]}]}},"/api/v1/key/delete":{"post":{"tags":["Keys"],"summary":"Delete","operationId":"delete_api_v1_key_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyRef"}}},"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":[]}]}},"/api/v1/operations/{oid}":{"get":{"tags":["Keys"],"summary":"Operation","operationId":"operation_api_v1_operations__oid__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"oid","in":"path","required":true,"schema":{"type":"string","title":"Oid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Ban":{"properties":{"key":{"type":"string","pattern":"^K_[a-f0-9]{32}$","title":"Key"},"unblock":{"type":"boolean","title":"Unblock","default":false},"message":{"type":"string","maxLength":500,"title":"Message","default":""}},"additionalProperties":false,"type":"object","required":["key"],"title":"Ban"},"Create":{"properties":{"limit_gb":{"type":"integer","maximum":300.0,"minimum":0.0,"title":"Limit Gb","default":0},"months":{"type":"integer","maximum":12.0,"minimum":1.0,"title":"Months","default":1},"user_id":{"type":"string","title":"User Id","default":""},"login":{"type":"string","title":"Login","default":""},"comments":{"type":"string","title":"Comments","default":""}},"additionalProperties":false,"type":"object","title":"Create"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"KeyRef":{"properties":{"key":{"type":"string","pattern":"^K_[a-f0-9]{32}$","title":"Key"}},"additionalProperties":false,"type":"object","required":["key"],"title":"KeyRef"},"Update":{"properties":{"key":{"type":"string","pattern":"^K_[a-f0-9]{32}$","title":"Key"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"login":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Login"},"comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comments"}},"additionalProperties":false,"type":"object","required":["key"],"title":"Update"},"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"}}}}