Creating an Application with the Applications API

Veracode APIs

This use case scenario provides the Applications REST API command and payload for creating an application with either the required fields or all of the possible fields.

Use this command to create an application:
http --auth-type=veracode_hmac POST "https://api.veracode.com/appsec/v1/applications"

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, you must also include a teams value in the payload.

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

{
        "profile": {
        "name": "Applications REST API Demo",
        "tags": "demo, restapi",
        "business_unit": {
        "guid": "08w93dm6-b5gf-4259-a895-39e7d933956k"
        },
        "business_owners": [],
        "archer_app_name": null,
        "policies": [
        {
        "guid": "1wg6dc84-76kk-5467-a5t2-c5885277jf1p"
        }
        ],
        "teams": [],
        "custom_fields": null,
        "description": null,
        "business_criticality": "HIGH"
        }
}

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