{"openapi":"3.1.0","info":{"title":"Doc Downloader Service for ThinkOwl","description":"<CENTER><img src=\"/static/doc-downloader.png\"></CENTER><BR>Service for uploading and sharing documents.","contact":{"url":"http://www.thinkowl.com/"},"license":{"name":"ThinkOwl Usage License","url":"http://www.thinkowl.com/"},"version":"v1"},"paths":{"/metrics":{"get":{"summary":"Combined Metrics","description":"Expose combined metrics from the local instrumentator and the external server.","operationId":"combined_metrics_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/upload":{"post":{"summary":"Upload Document","description":"Store multipart file + metadata; require Bearer credentials and ttl > 0.","operationId":"upload_document_v1_upload_post","parameters":[{"name":"X-TOTP","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Totp"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_document_v1_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/download/{token}":{"get":{"summary":"Download Document","description":"Stream file if token exists, TTL not exceeded, and optional Basic password matches.","operationId":"download_document_v1_download__token__get","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"}}}}}}}},"components":{"schemas":{"Body_upload_document_v1_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"filename":{"type":"string","title":"Filename"},"author":{"type":"string","title":"Author"},"ttl":{"type":"integer","title":"Ttl"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"}},"type":"object","required":["file","filename","author","ttl"],"title":"Body_upload_document_v1_upload_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"UploadResponse":{"properties":{"token":{"type":"string","title":"Token"},"download_url":{"type":"string","title":"Download Url"}},"type":"object","required":["token","download_url"],"title":"UploadResponse","description":"JSON body of ``POST /v1/upload`` on success."},"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"}}}}