{"openapi":"3.0.1","servers":[{"url":"https://retina-api.intrasonics.com/v1"}],"info":{"title":"retina-api","description":"This page documents the Retina API","contact":{"name":"Intrasonics","email":"itadmin@intrasonics.com","url":"https://www.intrasonics.com"},"version":"0.0.1","x-logo":{"url":"/Ipsos_Intrasonics_Logo_Metropolis.png"}},"security":[{"API KEY":[]}],"tags":[{"name":"OpenAPI","description":"Operations relating to the serving of the API specification in JSON format"},{"name":"Assets","description":"Operations relating to the 'Asset' records in the system."}],"paths":{"/v1/openapi":{"get":{"parameters":[],"responses":{"200":{"description":"OpenAPI JSON"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}},"tags":["OpenAPI"],"security":[],"operationId":"openapi_fetchOpenAPIDocument","summary":"Fetch OpenAPI Document","description":"Returns the raw OpenAPI JSON document"}},"/v1/assets":{"post":{"parameters":[{"name":"signature","in":"query","description":"A signature as part of a Signed URL from the Retina API","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Asset Information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Asset"}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}},"tags":["Assets"],"security":[],"operationId":"assets_uploadAsset","summary":"Upload Asset","description":"Receives a multipart/form-data request with a file upload 'file' from which to create an Asset"},"get":{"parameters":[],"responses":{"200":{"description":"List of Assets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetList"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}},"tags":["Assets"],"operationId":"assets_fetchAssets","summary":"List Assets","description":"Returns a list of Assets for the currently authenticated Organisations"}},"/v1/assets/upload":{"get":{"parameters":[],"responses":{"200":{"description":"Signed URL Details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedUrlDetails"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}},"tags":["Assets"],"operationId":"assets_fetchSignedUrl","summary":"Fetch Signed URL","description":"Returns details for a time-limited, pre-authenticated upload URL for an Asset"}},"/v1/assets/{ref}":{"get":{"parameters":[{"in":"path","name":"ref","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"File Download"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}},"tags":["Assets"],"operationId":"assets_downloadAsset","summary":"Download Asset","description":"Downloads the Asset matched by 'ref'"}}},"components":{"securitySchemes":{"API KEY":{"type":"apiKey","name":"Authorization","in":"header","description":"Authentication\napi_key\nThis server application uses API keys to secure API endpoints.\n\nRequests to API endpoints secured with API key authentication should use an 'Authorization' HTTP Header with a Bearer token containing the API key.\n\nExample: Authorization: Bearer API_KEY\n\nSecurity Scheme Type API Key\nHeader parameter name: Authorization"}},"responses":{"401":{"description":"Not Authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":401,"message":"Not Authorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":403,"message":"Forbidden"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":404,"message":"Not Found"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":500,"message":"Server Error"}}}}},"schemas":{"ErrorResponse":{"title":"Error Response","description":"General response format for an error occurring in the system as a result of an API request","type":"object","properties":{"detail":{"type":"string"},"stack":{"oneOf":[{"type":"string"},{"type":"object"}]}},"required":["detail"]},"AssetProperties":{"title":"Asset Properties","description":"Extended properties of an Asset","type":"object","properties":{"filesize_bytes":{"type":"integer","minimum":0}},"required":["filesize_bytes"]},"Asset":{"title":"Asset","description":"An asset managed by the Retina system","type":"object","properties":{"id":{"type":"string","format":"uuid"},"date_added":{"type":"string","format":"date-time"},"url":{"type":"string","format":"url"},"media_type":{"type":"string","enum":["audio","video","image"]},"mime_type":{"type":"string","minLength":1},"properties":{"$ref":"#/components/schemas/AssetProperties"}},"required":["id","date_added","url","media_type","mime_type","properties"]},"AssetList":{"title":"Asset List","description":"Some Description","type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/Asset"}}},"required":["assets"]},"SignedUrlDetails":{"title":"Signed URL Details","description":"Some Description","type":"object","properties":{"method":{"type":"string","minLength":1,"default":"POST"},"operation":{"type":"string","enum":["upload"],"default":"upload"},"url":{"type":"string","format":"url"},"date_expires":{"type":"string","format":"date-time"}},"required":["method","operation","url","date_expires"]}}}}