Skip to main content

updatesandbox.do

The updatesandbox.do call allows you to update the custom field values for the specified sandbox.

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 PUT to /appsec/v1/applications/{applicationGuid}/sandboxes/{sandboxGuid} 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.

Permissions

You must have the Creator, Security Lead, or Sandbox Administrator API role to use this API.

Resource URL

https://analysiscenter.veracode.com/api/5.0/updatesandbox.do

Parameters

NameTypeDescription
sandbox_nameStringName of the sandbox.
sandbox_id
Required
IntegerID of the target sandbox.
custom_field_nameStringSpecifies the custom field to update with the custom_field_value. You can change one custom field value per call to updatesandbox.do.
NOTE:
If you include the custom_field_value parameter, you must also include the custom_field_name parameter.
custom_field_valueStringSpecifies the custom_field_value to store in the specified custom_field_name. You can change one custom field value per call to updatesandbox.do.
auto_recreateBooleanIf 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/updatesandbox.do" "sandbox_id==<sandbox id>" "custom_field_name==Custom 2" "custom_field_value==Work on hold." "auto_recreate==false"

HTTPie results

The updatesandbox.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>" build_id="<build id>" analysis_id="4978995" analysis_unit_id="4994637">
<sandbox sandbox_id="<sandbox id>" sandbox_status="policy" owner="<Veracodeusername>"
modified_date="2019-09-18T17:11:45-04:00" created_date="2019-09-18T17:11:45-04:00" auto_recreate="false">
<sandbox sandbox_id="<sandbox id>" sandbox_name="Project Security" sandbox_status="sandbox" owner="<Veracodeusername>" modified_date="2019-09-17T14&#x3a;08&#x3a;35-04&#x3a;00" created_date="2019-09-17T14&#x3a;08&#x3a;35-04&#x3a;00"> <customfield name="Custom 1" value=""/>
<customfield name="Custom 2" value="Work on hold."/>
<customfield name="Custom 3" value=""/>
<customfield name="Custom 4" value=""/>
<customfield name="Custom 5" value=""/>
</sandbox>
</sandboxinfo>

HTTPie example

http --auth-type=veracode_hmac "https://analysiscenter.veracode.com/api/5.0/updatesandbox.do" "sandbox_id==<sandbox id>" "sandbox_name==<sandbox name>""custom_field_name==Custom 2" "custom_field_value==Work on hold." "auto_recreate==true"

HTTPie results

<?xml version="1.0" encoding="UTF-8"?>
<sandbox sandbox_id=<sandbox id> <sandbox_name=<sandbox name> <last_modified="2020-03-19T15:04:30-04:00"
<expires="2020-06-17T15:04:30-04:00" <auto_recreate="true">
<customfield name="Custom 1" value=""/>
<customfield name="Custom 2" value="Work on hold."/>
<customfield name="Custom 2" value=""/>
<customfield name="Custom 3" value=""/>
<customfield name="Custom 4" value=""/>
<customfield name="Custom 5" value=""/>
</sandbox>
</sandboxinfo>