Skip to content


Repository files navigation

A2 - CLI

A command line interface for Akamai's Adaptive Acceleration offering. It allows you to reset the A2 Push and Preconnect optimizations manually. It can be used in continuous deployment environments where popular resources change often or quickly.


First, install the Akamai CLI. Second, install the adaptive-acceleration CLI package with

akamai install adaptive-acceleration

Setting Up

Before you can use the CLI, you need to install API keys and find the id of the property you wish to reset.

Configuring API Keys

Generate API keys with READ-WRITE available on the Adaptive Acceleration capability as described here and save them to your ~/.edgerc file. Alternatively, you can also add the Adaptive Acceleration capability to your existing credentials.


Before you run the A2 reset command, you need to know the id of your property. That's exposed in the Akamai Control Center, on the Automatic Push and Preconnect Policy page. To find it:

  1. open your property on,
  2. expand the Related Apps dropdown and select Automatic Push and Preconnect,
  3. click Reset on the Automatic Push and Preconnect Policy page,
  4. the resulting dialog contains a sample command line that performs a reset for the property you are viewing.

The command line is of the form akamai a2 reset ### where ### is the property id. You can copy and paste the entire line into a terminal or script and run it:

akamai a2 reset 123456

If you want to check that the reset succeeded, use the exit code.

Exit Codes

The exit code is 0 on success, or 1 in case of an error returned by the underlying API.

Global Flags

  • --edgerc value — Location of the credentials file (default: user's directory like "/Users/vzaytsev/.edgerc") [$AKAMAI_EDGERC]
  • --section value — Section of the credentials file to use (default: "default") .
  • --debug - -d - prints concise debug information about network endpoints
  • --verbose - -v - prints network headers and other communication information
  • --help, -h — Show help

The flags are passed to the adaptive-acceleration portion of the command-line:

$ akamai a2 --section default -v reset 123456
Reset policy for: 123456


If the API key you provisioned does not have permission to reset the given property, you will get the following message:

$ akamai a2 reset 459153
Reset policy for: 459153
ERROR: Call to failed with a 403 result
ERROR: This indicates a problem with authorization.
ERROR: Please ensure that the credentials you created for this script

You can resolve this by editing the permissions of the credentials you created to ensure they include READ-WRITE permissiong on Adaptive Acceleration for your account.


No description, website, or topics provided.






No releases published


No packages published