Create a Dynamic Analysis of a Single URL with Prescan Verification Using the REST API

Veracode APIs

Publication
Veracode APIs
Edition date
2022-11-17
Last publication
2022-11-17T20:57:01.546120

You can use the Dynamic Analysis API to create an analysis with prescan verification.

Before You Begin

To be able to run a prescan verification before the Dynamic Analysis, you must allow two hours for the prescan to complete before you schedule the analysis to begin.

Steps

  1. Enter values for the scan_config_request and schedule properties in the JSON file.

  2. Run this command:

    http --auth-type=veracode_hmac POST "https://api.veracode.com/was/configservice/v1/analyses?run_verification=true" < input.json
    

    The run_verification=true query property specifies that the prescan run after the command creates the analysis.

    Note: If your prescan verification fails, the Dynamic Analysis also fails.

This is an example of a Dynamic Analysis for a single URL with prescan:

 {
  "name": "Name-of-Your-Dynamic-Analysis",
  "scans": [
    {
      "scan_config_request": {
        "target_url": {
          "url": "http://www.example.com"
        }
      }
    }
  ],
  "schedule": {
    "start_date": "2020-02-27T02:00+00:00",
    "duration": {
      "length": 3,
      "unit": "DAY"
    }
  }
}

You can call GET /analyses to see the status of your analyses.