Properties
Get base IDs
You need your contract and group IDs to work with these commands. If you don't have them, use the commands below to find them.
ID | Command |
---|---|
ContractID | Get-Contracts |
GroupID | Get-Groups |
Create property
To create a property, pass your contract and group IDs as parameters with either a JSON file or body parameter with the remaining attributes.
-
Get a product ID from the list of your available Akamai products.
List-Products -ContractID C-0N7RAC7
# The list returned varies depending on which products you use productName productId ----------- --------- Site_Del prd_Site_Del Site_Defender prd_Site_Defender Obj_Delivery prd_Obj_Delivery Adaptive_Media_Delivery prd_Adaptive_Media_Delivery HTTP_Content_Del prd_HTTP_Content_Del Progressive_Media prd_Progressive_Media Security_Failover prd_Security_Failover Download_Delivery prd_Download_Delivery Web_App_Accel prd_Web_App_Accel Alta prd_Alta Site_Accel prd_Site_Accel Mobile_Accel prd_Mobile_Accel Enterprise prd_Enterprise Fresca prd_Fresca # Ion Standard SPM prd_SPM # Ion Premier
-
Pass the product ID as a parameter in the
New-Property
command, using the prefix if needed.New-Property -PropertyName MyProperty -ProductID Fresca -GroupID 12345 -ContractID C-0N7RAC7
# The return is a partial HATEOAS link to the new property propertyLink ------------ /papi/v1/properties/prp_97654?contractId=ctr_C-0N7RAC7&groupId=grp_12345
You can use the URL with the host in your API client as a fully qualified HATEOAS link to get information about your new property.
Clone existing property
If you already have a configuration that you'd like to reuse in another property, you can clone it instead of creating a brand new one. The clone will maintain all of the original settings.
To clone a property, use the New-Property
command along with parameters that identify the original property
Parameter | Purpose |
---|---|
ClonePropertyID |
ID of the property you would like to clone |
ClonePropertyVersion |
Version of the property you would like to clone |
CloneFromVersionE tag |
The Etag of the original property version, to ensure no changes have been made since you reviewed it |
CopyHostnames |
Copies hostnames as well as rules from your original property |
New-Property -PropertyName MyProperty -ProductID Fresca -GroupID 12345 -ContractID C-0N7RAC7 -ClonePropertyID 97654 -ClonePropertyVersion 10 -CopyHostnames
# The return is a partial HATEOAS link to the new property
propertyLink
------------
/papi/v1/properties/prp_65432?contractId=ctr_C-0N7RAC7&groupId=grp_12345
Use this URL with the host in your API client as a fully qualified HATEOAS link to get information about your new property.
Find property
The Find-Property
command locates a property or include by its name, hostname, Edge Hostname, or include name.
# Find by property name
Find-Property -PropertyName MyProperty
# Find by property hostname
Find-Property -PropertyHostname www.example.com
# Find by property Edge Hostname
Find-Property -EdgeHostname www.example.com.edgesuite.net
# Find by property include name
Find-Property -IncludeName MyInclude
The response can have multiple entries for a given property.
- The latest version of the property/include
- The active production version of the property/include
- The active staging version of the property/include
If any of these are the same version, they're combined, but if they are all different, then one for each returns for a single property. If, however, you only want to find a specific one, you can add the following switches to your command:
-Latest
returns only the latest version.-JustProductionActive
returns the active production version.-JustStagingActive
returns only the active staging version.
Get properties
List all properties
To get a list of your properties, you can get all properties no matter the contract or group they belong to or get a list of them narrowed to a particular contract and group. Depending on how many properties you have, the response may take a minute or two.
# Get all
List-AllProperties
# Get all for a particular contract and group
List-Properties -ContractID ctr_C-2ndctr -GroupID 65432
# Get all
accountId: act_A-CCT1234
contractId: ctr_C-0N7RAC7
groupId: grp_12345
propertyId: prp_76543
propertyName: MyProperty
latestVersion: 4
stagingVersion: 2
productionVersion:
assetId: aid_12345
accountId: act_A-CCT1234
contractId: ctr_C-2ndctr
groupId: grp_65432
propertyId: prp_76543
propertyName: MyProperty-G2-2
latestVersion: 2
stagingVersion: 1
productionVersion:
assetId: aid_98765
...
# List all by contract and group
accountId: act_A-CCT1234
contractId: ctr_C-2ndctr
groupId: grp_65432
propertyId: prp_76543
propertyName: MyProperty-G2-1
latestVersion: 7
stagingVersion: 8
productionVersion:
assetId: aid_112233
accountId: act_A-CCT1234
contractId: ctr_C-2ndctr
groupId: grp_65432
propertyId: prp_76543
propertyName: MyProperty-G2-2
latestVersion: 1
stagingVersion:
productionVersion:
assetId: aid_98765
...
Get specific property
To get information about a specific property, pass the property name as a parameter in the Get-Property
command.
Note: You don't need to include the contract or group IDs in this command. This request runs the
Find-Property
in the background and adds in their values on a redirected request. To reduce turn around on this call, you can add in the values to make a direct request.
# Get property by name
Get-Property -PropertyName MyProperty
accountId: act_A-CCT1234
contractId: ctr_C-0N7RAC7
groupId: grp_12345
propertyId: prp_76543
propertyName: MyProperty
latestVersion: 4
stagingVersion: 2
productionVersion:
assetId: aid_12345
The response for these does not return the product ID, version notes, or Etag as they change from version to version. If you need these, add a version number or latest
to your command to get that version's data.
Get-PropertyVersion -PropertyName MyProperty -PropertyVersion 3
propertyVersion : 3
updatedByUser : jsmith
updatedDate : 03/11/2022 13:32:50
productionStatus : INACTIVE
stagingStatus : INACTIVE
etag : exetag7888b96a6b6aeb49bec6ddcc823079b2e7
productId : Fresca
ruleFormat : latest
note : Adding rule index tracking
Update property
How you update a property depends on what you're trying to change.
- You do not need to create new versions of includes, rule trees, and properties that have never been activated on staging or production.
- Until a version has been activated, you can continue to push changes and save them using the
Set
commands. - Updating includes does not require a new property version or property activation.
Change type | Update path |
---|---|
Includes | |
Rule tree | |
Property |
Create new property version
Create a new version of your property to update an activated or deactivated property or its rule trees.
You can create a new version by referencing a specific version, a property Etag, or by providing the entire POST
body as a JSON string directly.
# Create new using specific version
New-PropertyVersion -PropertyName MyProperty -CreateFromVersion 10
# Create new using an Etag
New-PropertyVersion -PropertyName MyProperty -CreateFromEtag etagex7888b96a6b6aeb49bec6ddcc823079b2e7
# The return is a partial HATEOAS link to the new property
versionLink
-----------
/papi/v1/properties/prp_76543/versions/5
You can use the URL with the host in your API client as a fully qualified HATEOAS link to get information about your new property.
Activate property
When you're done making all your changes, activate your property on either staging or production network. Specify the version, network, notification email parameter values in the Activate-Property
command.
# Activates a property to latest on the production network
Activate-Property -PropertyName MyProperty -PropertyVersion latest -Network Production -NotifyEmails jsmith@example.com
versionLink
-----------
# The return is a partial HATEOAS link to the new property
/papi/v1/properties/prp_76543/activations/atv_12345?contractId=ctr_C-0N7RAC&groupId=grp_12345
You can use the URL with the host in your API client as a fully qualified HATEOAS link to get information about your new property.
Updated 3 months ago