{"openapi":"3.1.0","info":{"title":"QBiC Data Manager Download API","version":"v1"},"servers":[{"url":"https://download.qbic.uni-tuebingen.de","description":"Generated server url"}],"security":[{"personal_access_token":[]}],"tags":[{"name":"Download Endpoints","description":"Rest endpoints related to downloading data"}],"paths":{"/measurements/{measurementId}":{"get":{"tags":["Download Endpoints"],"summary":"Download all files of a measurement as a ZIP archive","operationId":"downloadMeasurementAsZip","parameters":[{"name":"measurementId","in":"path","description":"The identifier of the measurement","required":true,"schema":{"type":"string"},"example":"NGSQ0001006AO-25948529211108"}],"responses":{"200":{"description":"successful operation, the ZIP archive is downloaded"},"403":{"description":"forbidden, you do not have access to this resource","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/StreamingResponseBody"}}}},"404":{"description":"measurement not found","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/StreamingResponseBody"}}}}}}},"/measurements/{measurementId}/files/{index}":{"get":{"tags":["Download Endpoints"],"summary":"Download a single file of a measurement by its index, supporting resumable range requests","operationId":"downloadFile","parameters":[{"name":"measurementId","in":"path","description":"The identifier of the measurement","required":true,"schema":{"type":"string"},"example":"NGSQ0001006AO-25948529211108"},{"name":"index","in":"path","description":"The zero-based index of the file within the manifest","required":true,"schema":{"type":"integer","format":"int32"},"example":0},{"name":"Range","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation, the file is downloaded"},"206":{"description":"partial content, the requested byte range is downloaded"},"403":{"description":"forbidden, you do not have access to this resource","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/StreamingResponseBody"}}}},"404":{"description":"measurement or file not found","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/StreamingResponseBody"}}}},"416":{"description":"the requested byte range is not satisfiable","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/StreamingResponseBody"}}}}}}},"/measurements/{measurementId}/files":{"get":{"tags":["Download Endpoints"],"summary":"List the files of a measurement in stable order","operationId":"manifest","parameters":[{"name":"measurementId","in":"path","description":"The identifier of the measurement","required":true,"schema":{"type":"string"},"example":"NGSQ0001006AO-25948529211108"}],"responses":{"200":{"description":"successful operation, the manifest is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeasurementManifest"}}}},"403":{"description":"forbidden, you do not have access to this resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeasurementManifest"}}}},"404":{"description":"measurement not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeasurementManifest"}}}}}}},"/measurements/{measurementId}/files/":{"get":{"tags":["Download Endpoints"],"summary":"List the files of a measurement in stable order","operationId":"manifest_1","parameters":[{"name":"measurementId","in":"path","description":"The identifier of the measurement","required":true,"schema":{"type":"string"},"example":"NGSQ0001006AO-25948529211108"}],"responses":{"200":{"description":"successful operation, the manifest is returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeasurementManifest"}}}},"403":{"description":"forbidden, you do not have access to this resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeasurementManifest"}}}},"404":{"description":"measurement not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeasurementManifest"}}}}}}}},"components":{"schemas":{"StreamingResponseBody":{},"Download":{"type":"object","description":"Download-related links of a file","properties":{"href":{"type":"string","description":"The relative URL to download the file","example":"/measurements/NGSQ0001006AO-25948529211108/files/0"}}},"FileEntry":{"type":"object","description":"A single file entry in a manifest","properties":{"index":{"type":"integer","format":"int32","description":"The zero-based stable index of the file","example":0},"path":{"type":"string","description":"The relative path of the file within the dataset","example":"data/read1.fastq.gz"},"fileName":{"type":"string","description":"The name of the file","example":"read1.fastq.gz"},"length":{"type":"integer","format":"int64","description":"The file size in bytes","example":1048576},"crc32":{"type":"integer","format":"int64","description":"The CRC-32 checksum of the file content","example":123456789},"registrationTime":{"type":"string","format":"date-time","description":"The time the file was registered in the system as an ISO-8601 formatted date-time in UTC","example":"2024-01-15T10:30:00Z"},"_links":{"$ref":"#/components/schemas/Links","description":"Links to related resources for the file entry"}}},"Links":{"type":"object","description":"Links to related resources for a manifest file entry","properties":{"download":{"$ref":"#/components/schemas/Download","description":"The download link of the file"}}},"MeasurementManifest":{"type":"object","description":"A manifest of the files of a measurement in stable order","properties":{"measurementId":{"type":"string","description":"The identifier of the measurement","example":"NGSQ0001006AO-25948529211108"},"files":{"type":"array","description":"The files of the measurement","items":{"$ref":"#/components/schemas/FileEntry"}}}}},"securitySchemes":{"personal_access_token":{"type":"apiKey","description":"A personal access token (PAT) obtained through by the data manager. Please prefix your token with 'Bearer ' e.g. 'Bearer  abcdefg1234'.","name":"Authorization","in":"header"}}}}