Create a Dynamic Analysis of Multiple URLs

Veracode APIs

Use this code to create a Dynamic Analysis to scan multiple URLs with visibility, organization, and schedule restrictions.

To create an analysis of multiple URLs:
  1. After logging in to Veracode Platform, go to https://ui.analysiscenter.veracode.com/api/authn/business_units?sort=name&size=500 to obtain the ID of the business unit that owns the Dynamic Analysis.
  2. Make a POST call to https://api.veracode.com/was/configservice/v1/analyses, specifying the schedule parameters, business ownership, and visibility settings.

This is an example of a Dynamic Analysis for multiple URLs. This analysis runs on a specific day for three days, is owned by business unit 12345, and is only visible to users in the business unit who have the Security Lead role:

 {
  "name": "Veracode API Analysis",
  "scans": [
    {
      "scan_config_request": {
        "target_url": {
          "url": "https://www.example.com/one/"
        }
      }
    },
    {
      "scan_config_request": {
        "target_url": {
          "url": "https://www.example.com/two/"
        }
      }
    }
  ],
  "schedule": {
    "start_date": "2020-09-26T02:00+00:00",
    "duration": {
      "length": 3,
      "unit": "DAY"
    }
  },
  "visibility": {
    "setup_type": "SEC_LEADS_ONLY",
    "team_identifiers": []
  },
  "org_info": {
    "business_unit_id": "12345",
    "owner": "Test Development Team",
    "email": "[email protected]"
  }
}