{"openapi":"3.1.0","info":{"title":"MTB ShortURL","description":"Short URL for MTB","contact":{"name":"Jakkraphan Saengsem","email":"jakkraphan.sa@gettgo.com"},"license":{"name":"Private Use ONLY"},"version":"1.0.0"},"paths":{"/v1/shorturl/info/{link_id}":{"post":{"tags":["url shortener"],"summary":"Shorturl V1 Info","operationId":"shorturl_v1_info_v1_shorturl_info__link_id__post","security":[{"API key query":[]},{"API key header":[]}],"parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"status":404,"message":"Not Found.","description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/shorturl/create":{"post":{"tags":["url shortener"],"summary":"Shorturl V1 Create","description":"To create normal shortURL send only [long_url] is mandate.\n\nTo create custom id shortURL such as s.gettgo.com/customid then [long_url] and [custom_id] are mandate.\n\nTo create date time limit shortURL then [eff_date] and [exp_date] must provide.\n\nTo create one time open shortURL then [is_onetime] must provide.\n\n*[eff_date] and [exp_date] must present in ISO8601 formatted (YYYY-MM-DD HH:MI:SS).","operationId":"shorturl_v1_create_v1_shorturl_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortURLParam"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not Found","status":404,"message":"Not Found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"API key query":[]},{"API key header":[]}]}},"/v1/shorturl/check_id/{link_id}":{"get":{"tags":["url shortener"],"summary":"Shorturl V1 Check Id","operationId":"shorturl_v1_check_id_v1_shorturl_check_id__link_id__get","security":[{"API key query":[]},{"API key header":[]}],"parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"status":404,"message":"Not Found.","description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{shorturl_id}":{"get":{"summary":"Redirect","operationId":"redirect__shorturl_id__get","parameters":[{"name":"shorturl_id","in":"path","required":true,"schema":{"type":"string","title":"Shorturl Id"}},{"name":"X-Real-IP","in":"header","required":false,"schema":{"type":"string","title":"X-Real-Ip"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ShortURLParam":{"properties":{"long_url":{"type":"string","title":"Long Url"},"custom_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Id"},"is_onetime":{"type":"boolean","title":"Is Onetime","default":false},"eff_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eff Date"},"exp_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exp Date"},"is_disabled":{"type":"boolean","title":"Is Disabled","default":false},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"}},"type":"object","required":["long_url"],"title":"ShortURLParam"},"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":{"API key query":{"type":"apiKey","in":"query","name":"api-key"},"API key header":{"type":"apiKey","in":"header","name":"api-key"}}}}