Logo
Akamai APIs API Documentation

CP codes

Number of APIs: 3


1. Create a new CP code

POST https://{{host}}/papi/v1/cpcodes?contractId={{contractId}}&groupId={{groupId}}

To create a new CP code, you need to associate it with a product. You can assign any CP code within a property's rule tree as detailed in the Rule Trees section. Make sure the CP code's productId value matches the one assigned to the properties that invoke your CP code, otherwise you may get a warning about problems this may cause in traffic reports. To view or update certain CP code data, such as name, time zone, and purgeability, use the CP Codes and Reporting Groups API. You can write contractid and groupId data only on the initial POST operation. They're read-only in subsequent PUT operations. To reassign a CP code's contract or group, contact your Akamai representative for help.



2. List CP codes

GET https://{{host}}/papi/v1/cpcodes?contractId={{contractId}}&groupId={{groupId}}

This operation lists CP codes available within your contract and group pairing. You assign CP codes to a property within its rule tree. To list all CP codes in your account at once, without having to filter the request by contracts and groups, use the CP Codes and Reporting Groups API. CP codes include information about their product assignment. When creating a new property, you need to apply the same product you specified for the assigned CP code.

To view or update certain CP code data, such as name, time zone, and purgeability, use the CP Codes and Reporting Groups API.



3. Get a CP code

GET https://{{host}}/papi/v1/cpcodes/:cpcodeId?contractId={{contractId}}&groupId={{groupId}}

This operation gets details about a CP code. To view or update certain CP code data, such as name, time zone, and purgeability, use the CP Codes and Reporting Groups API.



ENDPOINTS