{"openapi":"3.0.0","info":{"description":"API to handle scorm resources","version":"1.0.0","title":"scorm API"},"servers":[{"url":"https://api.coorpacademy.com/scorm","description":"production"},{"url":"https://api-staging.coorpacademy.com/scorm","description":"staging"},{"url":"http://localhost:7004","description":"local"}],"components":{"headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"},"example":"*"},"Cache-Control":{"schema":{"type":"string"},"example":"no-cache, no-store, must-revalidate"},"Content-Type":{"schema":{"type":"string"},"example":"application/json"},"Location":{"schema":{"type":"string"},"example":"/scorm/valid-scorm.zip/index_lms.html"}},"schemas":{"GetScormRootFileSuccess":{"type":"string","description":""},"GetSignedS3UrlSuccess":{"type":"string","description":"signed s3 url (contains uploadUrl && fetchUrl","example":"{\"uploadUrl\":\"https://BUCKET/file-id.zip\",\"fetchUrl\":\"//localhost:7004/file-id.zip\"}"},"GetScormFileSuccess":{"type":"string","description":"file in scorm zip, base64 encoded"},"ScormFileError":{"description":"ScormFileError","type":"string","example":"Unable to get presigned upload URL from S3"},"InvalidFileError":{"description":"InvalidFileError","type":"string","example":"Invalid scorm file $scormFile"},"NotFoundError":{"description":"NotFoundError","type":"string","example":"Could not find this scorm file $scormFile"},"NotDefinedError":{"description":"NotDefinedError","type":"string","example":"The Host header is not defined"},"InvalidMimeTypeError":{"description":"InvalidMimeTypeError","type":"string","example":"file should be a zip (index_lms.html)"},"PresignedBulkUrlBody":{"description":"InvalidMimeTypeError","type":"object","properties":{"repository":{"type":"string","description":"repository associated to the bulk"},"ref":{"type":"string","description":"bulk ref"},"name":{"type":"string","description":"file name"},"type":{"type":"string","description":"file type"}}}},"securitySchemes":{"Authorization":{"type":"apiKey","name":"Authorization","in":"header"}}},"paths":{"/presignedUrl":{"post":{"tags":["Signed S3 url/ SCORM upload"],"summary":"Get signed s3 url for scorm upload.","description":"","operationId":"presignedUrlPOST","responses":{"200":{"description":"Get signed s3 url for scorm upload.","headers":{"Access-Control-Allow-Origin":{"$ref":"#/components/headers/Access-Control-Allow-Origin"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Content-Type":{"$ref":"#/components/headers/Content-Type"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetScormFileSuccess"}}}},"400":{"description":"Undefined/ Internal errors.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotDefinedError"},{"$ref":"#/components/schemas/ScormFileError"}]}}}}}}},"/presignedBulkUrl":{"post":{"tags":["Signed S3 url BULK SCORM upload"],"summary":"Get signed s3 url for bulk scorm upload.","description":"","operationId":"presignedBulkUrlPOST","security":[{"Authorization":[]}],"requestBody":{"description":"Information to get s3 Url","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignedBulkUrlBody"},"examples":{"default":{"value":{"repository":"content-repo@cockpit-repo"}}}}}},"responses":{"200":{"description":"Get signed s3 url for bulk scorm upload.","headers":{"Access-Control-Allow-Origin":{"$ref":"#/components/headers/Access-Control-Allow-Origin"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"Content-Type":{"$ref":"#/components/headers/Content-Type"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetScormFileSuccess"}}}},"400":{"description":"Undefined/ Internal errors.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotDefinedError"},{"$ref":"#/components/schemas/ScormFileError"}]}}}}}}},"/{scormFile}":{"get":{"tags":["SCORM root file get"],"parameters":[{"name":"scormFile","in":"path","required":true,"schema":{"type":"string"},"description":"The SCORM zip","example":"valid-scorm.zip"}],"summary":"Get Root file in scorm resource.","description":"","operationId":"scormRootFileGET","responses":{"301":{"description":"Get Root file in scorm resource.","headers":{"Location":{"$ref":"#/components/headers/Location"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetScormRootFileSuccess"}}}},"400":{"description":"SCORM file error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScormFileError"}}}},"404":{"description":"Undefined/ Internal errors.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidFileError"},{"$ref":"#/components/schemas/NotFoundError"}]}}}}}}},"/{scormFile}/{path}":{"get":{"tags":["SCORM file get"],"parameters":[{"name":"scormFile","in":"path","required":true,"schema":{"type":"string"},"description":"The SCORM zip","example":"valid-scorm.zip"},{"name":"path","in":"path","required":true,"schema":{"type":"string"},"description":"The SCORM zip","example":"index_lms.html"}],"summary":"Get file in scorm resource.","description":"","operationId":"scormFileGET","responses":{"200":{"description":"Get file in scorm resource.","headers":{"Content-Type":{"$ref":"#/components/headers/Content-Type"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetScormFileSuccess"}}}},"400":{"description":"SCORM file error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScormFileError"}}}},"404":{"description":"Undefined/ Internal errors.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidFileError"},{"$ref":"#/components/schemas/NotFoundError"}]}}}}}}}}}