Closed javiergarza closed 3 years ago
Closing this since @aetsai shared with me the show-ruletree command can be used to download the rules in one go.
Here is the some sample usage:
1) To show the JSON rules (including property MD and warnings) of the latest version of a configuration:
akamai property-manager show-ruletree --property
Right now in order to download the JSON rules of a property you need to run 2 commands: import + merge It will be great to implement a "retrieve" command which works similarly to the "property" CLI that will just pull the JSON rules from Akamai (this is one of the main reasons why people still use the legacy property CLI).
Here are the parameters the retrieve command had: --format Rules format only [boolean] --hostnames Retrieve hostnames for property [boolean] --variables Retrieve user variables [boolean] --propver Retrieve specified version [number] --file Output file [file]
For example to download the JSON rules of the latest version of a property into a file called "rules.json" you could run: akamai property-manager retrieve [property-name] --file rules.json
To retrieve version 2 you would run: akamai property-manager retrieve [property-name] --propver 2 --file rules_v2.json