To purge via the Akamai API, first make sure that you have the permissions to the API and to the purge utility.
Click "Configure" and "Manage API" on the Luna context menu to see the list of API calls you have permission to.
Next you should familiarize yourself with the CCU (Content Control Utility): Click "Publish" and "Content Control Utility" on the Luna context menu. This article does not deal with the intricacies of purging on Akamai, please RTFM.
Going forward to the API, the Akamai Developer Portal has the links and pointers to all available API, including the Purge APIs (there is more than one..)
The full documentation for the most widely used REST API is here https://api.ccu.akamai.com/ccu/v2/docs/index.html
The following code snippet is a working example for the REST purge API.
Prerequisites:
A valid Luna user and password with permissions to purge.
A JSON list of URLs to purge. In our example script, the list is in an external text file.
For example: {"objects":["http://assets.mydomain.com/img/logo.jpg"]}
And the script looks like this this:
echo off
setlocal
set U=user@customer.net
set P=mysecretpassword
set QUEUE=default
set APIpoint=api.ccu.akamai.com
curl -v -X POST https://%APIpoint%/ccu/v2/queues/%QUEUE% -H "Content-Type:application/json" -d @purgelist.txt -u "%U%:%P%"
Comments
1 comment
Personalised travel mugs Click "Configure" and "Manage API" on the Luna context menu to see the list of API calls you have permission to.
Please sign in to leave a comment.