Open Source Analysis Request API
Description
Users can send API requests to identify known vulnerabilities or license-related issues in open source software and receive responses about the status of those requests.
Request
a. The repository location of the files to analyze and, if necessary, authentication information for that repository, and b. Callback URL information to receive analysis results are required. Refer to Request to enter the API.
Response
You will receive a success or failure response immediately after sending the analysis request. For details, refer to the Response section of the Open Source Analysis Request API.
Callback
You will receive progress or analysis completion callbacks according to the callback information entered in the request. For details, refer to Callback.
For information about the analysis request process, refer to Analysis Request and Callback.
{
"resultVersion": `2`,
"callbacks": [
{
"type": [
"ANALYSIS_COMPLETE"
],
"url": "CALLBACK_URL",
"headers": [
{
"key": "HEADER_KEY",
"value": "HEADER_VALUE"
}
]
}
],
"memo": "MEMO",
"scaOptions": {
"maxSourceSize": "SOURCE_SIZE",
"analysisSource": {
"type": "VCS",
"vcsInfo": {
"type": "git",
"url": "VCS_URL",
"auth": {
"id": "VCS_ID",
"password": "VCS_PASSWORD",
"authToken": "VCS_TOKEN"
},
"branch": "BRANCH_NAME",
"commitId": "COMMIT_ID",
"tag": "TAG_NAME"
}
},
"extensions": ["FILE_EXTENSION1", "FILE_EXTENSION2"],
"excludedPath": ["EXCLUDED_PATH1", "EXCLUDED_PATH2", "EXCLUDED_PATH3"]
}
}
Request Body
Response
✔️ Success Response
Request Success
If the analysis request is processed normally, you will receive the following response along with 200 OK.
{
"requestId": "REQUEST_ID",
"result": "SUCCESS",
"analysisList": [
{
"analysisId": "ANALYSIS_ID",
"reqestId": "REQUEST_ID",
"status": "INIT",
"toolType": "SCA",
"memo": "MEMO"
}
]
}
❌ Failure Response
Authentication Failure
If authentication information is incorrect, you will receive a 401 Unauthorized response.
Invalid Request
If the request is invalid, you will receive a 400 Bad Request response along with the following information.
resultCode: Displays the result of the request as a code. For details, refer to Result Code Collection.message: Displays an error message.
Callback
✅ Analysis Status Callback
{
"analysisId": "ANALYSIS_ID"
"requestId": "REQUEST_ID"
"type": "ANALYSIS_PROGRESS"
"status": "PRE_PROCESS"
"progress": null
"step": "STEP"
"totalStep": 5
"updateTime": "YYYY-MM-DDTHH:mm:ss.SSS±HH:mm"
}
☑️ Analysis Completion Callback
{
"analysisId": "ANALYSIS_ID"
"requestId": "REQUEST_ID"
"type": "ANALYSIS_COMPLETE"
"errorCode": null
"analysis": {
"analysisId": 2992
"requestId": 3837
"status": "COMPLETE"
"result": "SUCCESS"
"progress": null
"toolType": "SCA"
"memo": "MEMO"
"startTime": "YYYY-MM-DDTHH:mm:ss.SSS±HH:mm"
"endTime": "YYYY-MM-DDTHH:mm:ss.SSS±HH:mm"
"issueCount": "TOTAL_ISSUES"
}
}