
QTran794408 (Community Member) asked a question.
Hi Veracode,
I'm trying to submit Dynamic API Scan using Veracode API but it not work as expected.
What I'm tried to do:
- <Step 1> Upload the API Specification using https://app.swaggerhub.com/apis/Veracode/veracode-web_application_scanning_configuration_service_api/1.0#/v-1-api-specification-controller/apiSpecificationsPostUsingPOST
- <Step 2> After uploaded success, put the spec_id to the content and using https://app.swaggerhub.com/apis/Veracode/veracode-web_application_scanning_configuration_service_api/1.0#/v-1-analysis-api/createAnalysisUsingPOST to submit a Dynamic Scan
This is the sample json payload that I submitted to Veracode
{
"name": "xxxxx",
"org_info": {
"email": "yyyy",
"owner": "yyyy"
},
"scans": [
{
"scan_config_request": {
"api_scan_setting": {
"rate_limit_rps": 0,
"spec_id": "spec_id that I get from <Step1>"
}
}
}
],
"schedule": {
"duration": {
"length": 1,
"unit": "DAY"
},
"now": true,
"schedule_status": "ACTIVE"
},
"visibility": {
"setup_type": "SEC_LEADS_AND_TEAM",
"team_identifiers": [
"xxxxxxxxxxxx"
]
}
}
The response I received when I submit the request is
{"_embedded":{"errors":[{"code":"MISSING_TARGET_URL","title":"Target URL Is Missing","detail":"Target URL is needed to complete the request, but missing or empty."}}
When I put the target_url to the json payload, it create the Web Application Scan but what I want to API Scan.
Do you have any guideline on submit API Scan using Veracode API?
.png)
You can find more examples here - https://docs.veracode.com/r/t_dynamic_single
Actually, I already followed that guide, but it only show how to submit the Web Application Scan not API Specification Scan. So I want to know if Veracode have other guide to guide how to submit API Specification Scan