These use case scenarios provide the Development Sandbox REST API commands and payloads for creating a development sandbox.
You can use the Applications API to get the GUID for an application or development sandbox.
Note: If you have already reached the
maximum number of sandboxes for the application, these commands fail.
Use this command to create a sandbox with a name only:
http --auth-type=veracode_hmac POST "https://api.veracode.com/appsec/v1/applications/<application GUID>/sandboxes" < input.json
The API passes the JSON file that you populate with the necessary
values as shown in this example:
{ "name": "Sandbox 2" }
Use this command to create a sandbox with a custom field and enable
the auto-recreate option, which, by default, is
disabled:
http --auth-type=veracode_hmac POST "https://api.veracode.com/appsec/v1/applications/<Veracode application GUID>/sandboxes" < input.json
For a sandbox, the custom field name must be in the range of Custom 1–Custom 5.
The API passes the JSON file that you populate with the necessary
values as shown in this example:
{ "custom_fields": [ { "name": "Custom 1", "value": "test" } ], "name": "Sandbox 2", "auto_recreate": true }