Create a Dynamic Analysis with a Crawl Script

Veracode APIs

The Dynamic Analysis API enables you to use a prerecorded crawl sequence to supplement the crawl automation of the Veracode scan engine.

To create an analysis that includes a crawl script, make a POST call to https://api.veracode.com/was/configservice/v1/analyses, specifying the authentication details.

The following is an example of how to use a Dynamic Analysis with a crawl script:

Note: Before you paste the crawl script into the API body, you must escape the JSON. If you need assistance, use the JSON escape utility available at https://jsonformatter.orghttps://jsonformatter.org.
{
  "name": "Veracode API",
  "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"
    }
  }
}