Skip to main content
Version: 2608.1

Web Vulnerability Analysis Request API


POSThttps://ondemand.sparrowcloud.ai/api/v1/analysis/tool/dast

Description

To analyze vulnerabilities in a site published on the web, users can send an API request and receive a response about the status of that request.

Request

You need a. the information about the URL to be analyzed and the analysis options that set the scope and depth of the analysis, and b. the callback URL information to which the analysis results will be delivered. See Request and fill in the API accordingly.

Response

Immediately after you send the analysis request, you receive a success or failure response. For details, see Response for the web vulnerability analysis request API.

Callback

Depending on the callback information entered in the request, you receive a progress callback or an analysis completion callback. For details, see Callback.

:::info For information about the analysis request process, see Analysis requests and callbacks. :::

Request

{
"resultVersion": `2`,
"memo": "test memo",
"dastOptions": {
"crawlerTargetSeedUrls": ["http://52.78.58.6:38380/dcta-for-java/hostHeader"],
"crawlerCrawlMaxUrl": 999,
"commonRecordsLogin": ["eyJ2ZXJzaW9uIjoiMS4xIiwic2VlZFVybCI6Imh0dHBzOi8vZ2l0aHViLmNvbS8iLCJkYXN0RXZlbnRMaXN0IjpbeyJkYXRhIjp7InRhYklkIjoxODEzODAzNDY0LCJ2YWx1ZSI6IiIsIndpbmRvd0lkIjoxODEzODAzNDYzLCJ4cGF0aCI6Ii9IVE1MWzFdL0JPRFlbMV0vRElWWzFdL0RJVlsxXS9IRUFERVJbMV0vRElWWzFdL0RJVlsxXS9ESVZbMl0vRElWWzJdL05BVlsxXS9VTFsxXS9MSVsxXS9BWzFdL1NQQU5bMV0ifSwiZXZlbnRWYWxpZGF0aW9uIjpmYWxzZSwiZnJvbVVybCI6Imh0dHBzOi8vZ2l0aHViLmNvbS8iLCJpbnRlcnZhbCI6MCwidGltZXN0YW1wIjoyNzMxLCJ0eXBlIjoiZGFzdC5ldmVudC5wbGFpbi1ldmVudC5jbGljayJ9LHsiZGF0YSI6eyJ0YWJJZCI6MTgxMzgwMzQ2NCwidmFsdWUiOiIiLCJ3aW5kb3dJZCI6MTgxMzgwMzQ2MywieHBhdGgiOiIvSFRNTFsxXS9CT0RZWzFdL0RJVlsxXS9ESVZbNV0vRElWWzFdL0RJVlsxXS9BU0lERVsxXS9ESVZbMV0vRElWWzFdL0xPQURJTkctQ09OVEVYVFsxXS9ESVZbMV0vRElWWzFdL0RJVlsxXS9VTFsxXS9MSVsyXS9ESVZbMV0vRElWWzFdL0FbMV0ifSwiZXZlbnRWYWxpZGF0aW9uIjpmYWxzZSwiZnJvbVVybCI6Imh0dHBzOi8vZ2l0aHViLmNvbS8iLCJpbnRlcnZhbCI6MCwidGltZXN0YW1wIjozMjcyLCJ0eXBlIjoiZGFzdC5ldmVudC5wbGFpbi1ldmVudC5jbGljayJ9XX0="]
}

}

Response

✔️ Success response

Request succeeded

When the analysis request is processed normally, you receive 200 OK together with the following response.

{
"requestId": "REQUEST_ID",
"result": "SUCCESS",
"analysisList": [
{
"analysisId": "ANALYSIS_ID",
"reqestId": "REQUEST_ID",
"status": "INIT",
"toolType": "DAST",
"memo": "MEMO"
}
]
}

❌ Failure response

Authentication failure

If the credentials are incorrect, you receive a 401 Unauthorized response.

Bad request

For a bad request, you receive a 400 Bad Request response together with the following information.

  • resultCode: indicates the result of the request as a code. For details, see API result codes.
  • message: shows the error message.

Callback

✅ Analysis status callback

{
"analysisId": "ANALYSIS_ID"
"requestId": "REQUEST_ID"
"type": "ANALYSIS_PROGRESS"
"status": "ANALYSIS"
"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": "DAST"
"memo": "MEMO"
"startTime": "YYYY-MM-DDTHH:mm:ss.SSS±HH:mm"
"endTime": "YYYY-MM-DDTHH:mm:ss.SSS±HH:mm"
"issueCount": "TOTAL_ISSUES"
}
}