Create a Dynamic Analysis with a crawl script using the REST API
You can use the Dynamic Analysis API with a prerecorded crawl sequence to supplement the crawl automation of the Veracode scan engine.
See the example Selenium scripts.
To complete this task:
-
Enter values for the
scan_config_request,crawl_configuration, andscheduleproperties in the JSON file. -
Send the following request:
http --auth-type=veracode_hmac POST "https://api.veracode.com/was/configservice/v1/analyses" < input.jsonThis is an example of how to use a Dynamic Analysis with a crawl script:
ImportantBefore you paste the crawl script into the API body, you must escape the JSON. To escape the JSON, you can use an application such as JSON formatter.
{"name": "Name-of-Your-Dynamic-Analysis","scans": [{"scan_config_request": {"target_url": {"url": "http://www.example.com","http_and_https": true,"directory_restriction_type": "DIRECTORY_AND_SUBDIRECTORY"},"crawl_configuration": {"scripts": [{"crawl_script_data": {"script_type": "SELENIUM","script_body": "<escaped JSON>"},"name": "ExampleCrawlScript.side"}],"disabled": false}}}],"schedule": {"now": true,"duration": {"length": 1,"unit": "DAY"}}}