{"openapi":"3.1.0","info":{"title":"IP Checker Service","version":"0.1.0"},"paths":{"/":{"get":{"summary":"Root","description":"Root endpoint for health checking.\nReturns 200 OK if the service is running.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ip-check/":{"get":{"summary":"Get Proxy Ip","description":"Returns the IP address that external services (like bookmakers) will see.\nSupports various proxy headers:\n- X-Forwarded-For: Standard proxy header\n- X-Real-IP: Common nginx proxy header\n- CF-Connecting-IP: Cloudflare proxy header\n\nRequires valid API key in X-API-Key header.","operationId":"get_proxy_ip_ip_check__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/reserve_ip/":{"post":{"summary":"Reserve Ip","description":"Reserve an IP for a bookmaker account.\n\n- Extracts IP from request headers (same as ip-check)\n- Checks if IP is already reserved for this bookmaker\n- If not reserved: reserves it for this username\n- If reserved by same username: returns ok\n- If reserved by different username: returns collision\n\nRedis structure:\n    Key: ip_pool_check:{bookmaker}:{date}\n    Type: Hash\n    Fields: IP addresses\n    Values: usernames","operationId":"reserve_ip_reserve_ip__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReserveIPRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReserveIPResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ReserveIPRequest":{"properties":{"bookmaker":{"type":"string","title":"Bookmaker"},"username":{"type":"string","title":"Username"}},"type":"object","required":["bookmaker","username"],"title":"ReserveIPRequest"},"ReserveIPResponse":{"properties":{"status":{"type":"string","title":"Status"},"ip":{"type":"string","title":"Ip"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"}},"type":"object","required":["status","ip"],"title":"ReserveIPResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key"}}}}