createsandbox.do
The createsandbox.do
call creates a sandboxfor the specified application. If you have already reached the maximum number of sandboxes for the application, this call fails.
Before using this API, Veracode strongly recommends that you read API usage and access guidelines. Ensure you access the APIs with the domain for your region.
REST API equivalent
The REST API equivalent of this call is a POST
to /appsec/v1/applications/{applicationGuid}/sandboxes
using the Development Sandbox API. Veracode strongly recommends that you use the REST API for this action. For new integrations, always use the REST APIs.
Resource URL
https://analysiscenter.veracode.com/api/5.0/createsandbox.do
Parameters
Name | Type | Description |
---|---|---|
app_id Required | Integer | Application ID. |
sandbox_name Required | String | Name of the sandbox. |
auto_recreate | Boolean | If true, creates a new sandbox with the same name when the current sandbox expires. Default is false. |
HTTPie example
Examples use the HTTPie command-line tool.
http --auth-type=veracode_hmac "https://analysiscenter.veracode.com/api/5.0/createsandbox.do" "app_id==<app id>" "sandbox_name==Project Security"
HTTPie results
The createsandbox.do
call returns the sandboxinfo
XML document, which references the sandboxinfo.xsd
schema file. You can use the XSD schema file to validate the XML data.
<?xml version="1.0" encoding="UTF-8"?>
<sandboxinfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://analysiscenter.veracode.com/schema/4.0/sandboxinfo"
xsi:schemaLocation="https://analysiscenter.veracode.com/schema/4.0/sandboxinfo
https://analysiscenter.veracode.com/resource/4.0/sandboxinfo.xsd" sandboxinfo_version="1.2"
account_id="<account id>" app_id="<app id>">
<sandbox sandbox_id="<sandbox id>" sandbox_name="Project Security" sandbox_status="sandbox" owner="<Veracodeusername>"
modified_date="2019-09-17T14:08:35-04:00" created_date="2019-09-17T14:08:35-04:00">
<customfield name="Custom 1" value=""/>
<customfield name="Custom 2" value=""/>
<customfield name="Custom 3" value=""/>
<customfield name="Custom 4" value=""/>
<customfield name="Custom 5" value=""/>
</sandbox>
</sandboxinfo>
If you exceed the maximum number of sandboxes for the application, the return contains:
<?xml version="1.0" encoding="UTF-8"?>
<error>An application can have up to 25 sandboxes. To create a new sandbox, you must delete one.</error>