Creating a Development Sandbox with the REST API
note
To avoid command failures, ensure your application has not reached the maximum number of sandboxes. In the Veracode Platform, on the Sandboxes page for an application, check the value for Sandboxes Remaining.
Use this command to create a sandbox:
http --auth-type=veracode_hmac POST "https://api.veracode.com/appsec/v1/applications/{applicationGuid}/sandboxes" < input.json
You can use the Applications API to get the GUID for an application or development sandbox.
The API passes the JSON file that you populate with the necessary values as shown in this example payload:
{
"name": "Sandbox 2"
}
Use this command to create a sandbox with a custom field and enable the auto-recreate option:
http --auth-type=veracode_hmac POST "https://api.veracode.com/appsec/v1/applications/{applicationGuid}/sandboxes" < input.json
The API passes the JSON file that you populate with the necessary values as shown in this example payload:
{
"custom_fields": [
{
"name": "Custom 1",
"value": "test"
}
],
"name": "Sandbox 2",
"auto_recreate": true
}
The custom field name must be in the range of Custom 1
–Custom 5
.