{"openapi":"3.1.0","info":{"title":"Soteri Scanning API","description":"Use Soteri Scanning to audit for login credentials, API keys, banking information, personally identifiable information (PII), and more.","contact":{"name":"Support","url":"https://support.soteri.io"},"version":"1.2.1"},"externalDocs":{"description":"Documentation","url":"https://docs.soteri.io/scanning-service/"},"servers":[{"url":"/","description":"Scanning Server"}],"tags":[{"name":"Scanning API","description":"API endpoints for scanning content."}],"paths":{"/rest/scan":{"post":{"tags":["Scanning API"],"summary":"Scan files.","description":"Scan files.","operationId":"scan","parameters":[{"name":"includeAllowlisted","in":"query","description":"If true, include allowlisted findings.","required":false,"schema":{"type":"boolean","default":false}},{"name":"includeEmpty","in":"query","description":"If true, include empty results for files with no findings.","required":false,"schema":{"type":"boolean","default":false}},{"name":"includeSkipped","in":"query","description":"If true, include results for skipped files.","required":false,"schema":{"type":"boolean","default":false}}],"requestBody":{"description":"The files to scan.","content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Scan_Request"}}}},"responses":{"200":{"description":"Successful scan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Overall_Response"}}}},"400":{"description":"Requests must be multipart formatted"},"413":{"description":"HTTP/1 Requests are limited to 32MB total."}}}}},"components":{"schemas":{"Scan_Request":{"type":"object","description":"The files to be scanned.","properties":{"file":{"type":"array","description":"The files to be scanned.","items":{"type":"string","format":"binary"}}}},"Overall_Response":{"type":"object","description":"The response to a single scan request.","properties":{"status":{"type":"string","description":"The overall status of the request.","enum":["SUCCESS","FAILURE"]},"failureReason":{"type":"string","description":"If applicable, the reason why scanning failed.\n\n <ul>\n   <li>NO_FILES - No files were uploaded to scan.\n   <li>FILE_FAILURE - Scanning of one or more files failed.\n </ul>","enum":["NO_FILES","FILE_FAILURE"]},"numScanned":{"type":"integer","format":"int32","description":"The number of files scanned."},"numFailed":{"type":"integer","format":"int32","description":"The number of files where scanning failed."},"numSkipped":{"type":"integer","format":"int32","description":"The number of files where scanning was skipped."},"results":{"type":"array","description":"The results for scanned files. Depending on request parameters, might not contain entries for files scanned\n without findings or errors.","items":{"$ref":"#/components/schemas/Per-File_Result"}}}},"Per-File_Result":{"type":"object","description":"The scan results of a single file.","properties":{"filename":{"type":"string","description":"The name of the file."},"status":{"type":"string","description":"The status of the file.","enum":["SUCCESS","FAILURE","SKIPPED"]},"failureReason":{"type":"string","description":"If applicable, the reason why scanning this file failed.\n <ul>\n <li>UNKNOWN - An unknown error occurred. Contact us at our\n <a href=\"https://support.soteri.io\">support portal</a>.</li>\n <li>TOO_MANY_FINDINGS - The file was partially scanned, but there were too many findings, and scanning was\n stopped.</li>\n </ul>","enum":["UNKNOWN","TOO_MANY_FINDINGS"]},"skipReason":{"type":"string","description":"The reason why a file was skipped.\n\n <ul>\n   <li>UNSUPPORTED_FORMAT - The file could not be decoded as UTF-8.\n </ul>","enum":["UNSUPPORTED_FORMAT"]},"numAllowlisted":{"type":"integer","format":"int32","description":"The number of allowlisted findings. These findings may or may not be present in the list of findings, depending\n on the request parameters."},"findings":{"type":"array","description":"The findings.","items":{"$ref":"#/components/schemas/Scan_Finding"}}}},"Scan_Finding":{"type":"object","description":"A single scan finding.","properties":{"ruleName":{"type":"string","description":"The name of the rule which generated this finding."},"lineNumber":{"type":"integer","format":"int32","description":"The line number this finding was on."},"line":{"type":"string","description":"The full line which was scanned. Not included if it's too long."},"finding":{"type":"string","description":"The finding: line.substring(startOffSet, endOffset)."},"startOffset":{"type":"integer","format":"int32","description":"The start offset of this finding in the text fragment it was found in."},"endOffset":{"type":"integer","format":"int32","description":"The start offset of this finding in the text fragment it was found in."},"allowlisted":{"type":"boolean","description":"If this finding was allow-listed using a pragma."}}}}}}