Creating an Application with the REST API

Veracode APIs

Use this command to create an application:

http --auth-type=veracode_hmac POST "https://api.veracode.com/appsec/v1/applications" < input.json

To define only the required fields in the application, include a payload like this example:

{
  "profile": {
    "name": "Applications REST API Example",
    "business_unit": {
      "guid": "08w93dm6-b5gf-4259-a895-39e7d933956k"
    },
    "policies": [
      {
        "guid": "1wg6dc84-76kk-5467-a5t2-c5885277jf1p"
      }
    ],
    "business_criticality": "HIGH"
  }
}     

Note: If you have the Creator role, but not the Security Lead role, the payload must include the teams property.

To define all possible fields in the application, include a payload like this example:

{
  "profile": {
    "name": "Applications REST API Example",
    "business_unit": {
      "guid": "08w93dm6-b5gf-4259-a895-39e7d933956k"
    },
    "policies": [
      {
        "guid": "1wg6dc84-76kk-5467-a5t2-c5885277jf1p"
      }
    ],
    "business_criticality": "HIGH"
  }
}

You can get the guid value for the business_unit property from the Identity API and get the guid value for the policies property from the Policy API.