CP codes

Content Provider codes (CP codes) identify your traffic on the ​Akamai​ network for reporting, billing, and monitoring purposes. When you purchase an ​Akamai​ product, you create a CP code as you onboard associated properties. You may also generate additional CP codes, typically to implement more detailed billing and reporting functions, and to assign to customized properties. For more information refer to the CP codes documentation.

Creating a CP code for the first sandbox in a group

When creating the first sandbox in a group, a new CP code is created automatically. It can be used for all the sandboxes in the group, until you decide to change it.

Creating CP codes for the next sandboxes in a group

When creating the next sandboxes in the same group, choose one of the two options:

  • To keep using the CP code created for the first sandbox in the group, leave the cpcode field empty.

  • To set a new CP code for the group, enter a new CP code in the cpcode field. While the sandbox is being created, the server replaces all CP code behavior occurrences in all the rules, the advanced metadata, and the advanced xml tags. After the replacement, the rules have the same CP code as the sandbox response cpcode field.

Recreating a new sandbox with a new CP code

To recreate a new sandbox with a new CP code, follow the procedure below.

  1. Create a new sandbox with a new CP code.

  2. Get a rule tree for the old sandbox:
    GET /sandbox-api/v1/sandboxes/{sandboxId}/properties/{sandboxPropertyId}/rules

  3. Upload the downloaded rule tree to a new sandbox using:
    PUT /sandbox-api/v1/sandboxes/{sandboxId}/properties/{sandboxPropertyId}/rules

    All CP codes in the tree are replaced with the one that was provided to the sandbox during the creation process.

 

📘

There is no way to:

  • Update a CP code used for an existing sandbox. The cpcode field is a read-only field.
  • Retrieve all CP codes for user’s sandboxes.

Did this page help you?