Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Hands-on Automation of Akamai with PAPI and Python

Hands-on Automation of Akamai with PAPI and Python

So you've read and heard all about PAPI (Property Manager API), but perhaps you're afraid to use it because you think it's too complicated. Well, it doesn't have to be! In this session we'll demonstrate all the steps needed to create a Luna API user and interact with the portal via your favorite scripting language -- Python! This session will include a brief presentation on the Akamai APIs, a Luna demo to create keys, and a lab with hands-on development using Python to automate Akamai.

Akamai Developer

October 11, 2017
Tweet

More Decks by Akamai Developer

Other Decks in Technology

Transcript

  1. © AKAMAI - EDGE 2017 PAPI and Python. How to

    automate Akamai John Councilman – Enterprise Architect
  2. © AKAMAI - EDGE 2017 Global Consulting Services Accelerate our

    customer's business through a partnership focused on expertise, innovation, and education. [email protected]
  3. © AKAMAI - EDGE 2017 What Business Outcomes can we

    help you achieve? CLOUD MIGRATIONS EVENT READINESS NEW MARKET LAUNCHES ARCHITECTURE ASSESSMENTS PERFORMANCE OPTIMIZATION DEVOPS INTEGRATIO N HIGH IMPACT WORK WITH HIGH VISIBILITY FOR DEADLINE DRIVEN INITIATIVES [email protected] Global Consulting Services
  4. © AKAMAI - EDGE 2017 Objectives 1. Understand where to

    obtain information about Akamai APIs. 2. Understand how to initialize Akamai authentication and begin development framework. 3. Obtain enough background to begin incorporating Akamai into custom applications.
  5. © AKAMAI - EDGE 2017 WHOIS John Councilman Enterprise Architect

    Atlanta, GA, USA [email protected] https://www.linkedin.com/in/jcouncilman/ Today’s Instructor
  6. © AKAMAI - EDGE 2017 Akamai API Documentation https://developer.akamai.com APIs

    are categorized by Use Case. Today, we will discuss Property Manager and Purge APIs. Other APIs are integrated in a similar manner. Akamai OPEN API Site
  7. © AKAMAI - EDGE 2017 API Usage GET, POST, PUT,

    JSON, Oh My! POST HTTP POST is used to create a new item. GET HTTP GET is used to pull information via the API. PUT HTTP PUT is for updating an existing item. No need to worry. The documentation will clearly explain which one to use. As we work today, please notice that HTTP Method is important in how your application interacts with Akamai’s APIs.
  8. © AKAMAI - EDGE 2017 Setting up your first application!

    • Obtain one or more sets of API credentials from within your Luna account. • Populate API information into your application. • Test a GET request. • Begin coding!
  9. © AKAMAI - EDGE 2017 API Credential Request Notice that

    two filters exist. OPEN APIs and CCU APIS. You’ll need a separate API key for OPEN and PURGE.
  10. © AKAMAI - EDGE 2017 API Credential Request When creating

    new credential, take note of all keys! They will not re-appear!
  11. © AKAMAI - EDGE 2017 Application setup! 1. Download library

    from Github. https://github.com/akamai 1. Include library into code. • Python from akamai.edgegrid import EdgeGridAuth from urlparse import urljoin import json import re • Perl use Akamai::Edgegrid; use JSON::XS 'decode_json'; use Data::Dumper;
  12. © AKAMAI - EDGE 2017 Interactive Code Jam + Q/A!

    For the remainder of the time during this class, we will build a simple application to automate Akamai. This is intended to be interactive, questions will be answered during development. Demo by Instructor (10 mins) Q/A (10 mins)