If you already have a configuration that you'd like to reuse in another property, you can simply clone it instead of creating a new one from scratch and mimicking all the settings. Optionally, you can also clone the set of assigned hostnames.
PAPI's ability to clone properties means that you can design a system of rule templates targeted to specific domains, rather than maintain a single set of rules with conditional logic for your full range of domains.
Authenticate to Akamai and DNS
To make calls through PAPI, in the API client tool authenticate to Akamai using the tokens you generated. You should also access your DNS provider, as you'll need to make a few changes to your records to onboard the property.
Get contracts, groups and products
These identifiers specify what modules and features are available in your configuration.
Create a CP code
CP codes track any web traffic handled by edge servers. Each property’s default rule needs a valid CP code to bill and report for the service.
Pick the property and version you want to clone
You need an identifier of the property you want to clone.
Pick the particular version to base your new property on. Store the
Clone a property
With this operation, version 1 of a new property is created automatically. The new property clones the rule tree from the original, along with its assigned
cloneFromVersionEtag allows you to perform an etags check to ensure the original property hasn’t changed. See Concurrency control for guidance.
To apply the same set of hostnames as the original property, enable
copyHostnames. A property that you clone along with all of its hostnames can be activated independently of the property on which it was based. If you activate a cloned property with the hostnames that are already active on another property, the original property automatically activates a new version without the common set of hostnames, or deactivates if all its hostnames are part of the new property.
Set property's hostnames
Map your property to an edge hostname that will take over the client traffic from your origin. If you have Secure By Default enabled in your contract, the easiest way is to specify a setup with a
"certificateProvisioningType": "DEFAULT" that secures your HTTPS delivery and automatically creates an edge hostname upon activation.
Get the hostname certificate validation challenge
Note down the DNS challenge you receive in the
Add the validation challenge to DNS
Confirm that you control the domain name used in the edge certificate. In your DNS configuration, create a CNAME record and map the hostname part of the challenge to the target part.
Confirm the hostname certificate deployment
Re-run the operation to check the
Get the rule tree
Get the property's rule tree to set up the mandatory behaviors. You may also want to modify the cloned rules.
Edit the rule tree
Provide necessary details for the top-level default rule. At minimum, configure mandatory
Rule trees are maintained in a special form of JSON that you can best edit and validate in the dedicated VS code or Eclipse IDE plugins.
Validate the rule tree changes
Make sure your JSON file is correct and complete before deploying it on edge servers. You need to resolve returned errors as they block an activation, but you can activate a property version that yields less severe warnings. For more information, see Rule tree errors and warnings. Both VS code and Eclipse plugins support full rule tree validation.
Update the property's rule tree
Push the updated JSON file to the property configuration.
Activate the property on staging and production
With brand new setups, it's enough that you test your configuration on production. You can activate your property on both networks at the same time.
Make sure the activation status is
Start serving live traffic through Akamai Edge Platform. Replace your existing CNAME record and with a new one, setting its value to the Akamai edge hostname.
Remember to remove any entries from your local hosts file you set up for testing. Now you can restart your browser and do a smoke test of your website or application.