Create a sandbox

Flexible options for creating a sandbox in your development environment.

The Sandbox API gives you a variety of ways to create a sandbox. When you create a sandbox, you reference a property on the CDN and your sandbox inherits hostnames and a rule tree from the property configuration. If you have an Image Manager policy active on the staging network Sandbox traffic is automatically applied against those settings. Follow these steps to get up and running quickly.

Create a new sandbox

You need to form a JSON object and specify request parameters. Review this table to determine how to construct the POST request.

Create Sandbox Options
Parameter Type Description
contractID String The identifier you can use to create a sandbox from a specific contract. If you use this, you also need to specify the groupId.
cpcode Number Unique code that enables you to isolate sandbox traffic in report data. If you do not specify a cpcode value, the system creates one.
edgeHostname String The edge hostname associated with the property as configured in Property Manager. May be specified instead of propertyId, hostname, or propertyName.
groupId String The identifier you can use to create a sandbox from a specific group. If you use this, you also need to specify the contractID.
hostname String The hostname associated with the property as configured in Property Manager. May be specified instead of propertyId, edgeHostname, or propertyName. Use this option only if there is a one-to-one correspondence between the hostname and property. This method will fail if more than one property references the same hostname.
isClonable Boolean Indicates whether the sandbox can be cloned by other developers.
name String Descriptive name for the new sandbox. If you do not include a name, the default name will be sandboxId. You will get an error if the name is not unique.
propertyId Number The unique identifier for the property as it appears in Property Manager. May be specified instead of edgeHostname, hostname, or propertyName.
propertyName String The name of the property as it appears in Property Manager. May be specified instead of propertyId, edgeHostname, or hostname. Use this if you have more than one property configuration that references the same hostname.
propertyVersion Number You can include the version number with edgeHostname, hostname, propertyId, or propertyName. If not specified, the API will use the version that is active in production. If no such version is found, the call will fail.
requestHostname Array Specifies the hostnames for the request. If you try to create a sandbox with a requestHostname that is not already contained in the property configuration, you may get unexpected results.
ruleFormat String Specifies the rule format. The rule format is a dated version of the rule object in a property configuration. For more information, refer to the Property Manager API.
rules Object Defines how your website and applications process requests and the behaviors to apply to those requests. Include a rules object if you want to apply specific rules to test within your sandbox. The content-handling rules are defined in the Property Manager API.

For examples of how to form the JSON POST body, refer to Create a sandbox from a property and Code samples for creating sandboxes.

Clone a sandbox

Another mechanism for creating a sandbox is to clone an existing sandbox. This can be useful if you have already configured the sandbox with the property, rule tree behaviors, request hostnames, and other specifications. Any development team member who is proficient with Akamai property configurations can create a clonable sandbox and share it with downstream developers.

Note: Refer to Sandbox API documentation for a complete list of endpoints and JSON schema.