Your SlideShare is downloading. ×
0

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

GoGrid API - Presented at Cloud Connect Event 2010

1,794

Published on

This presentation was given by Justin Kitagawa (GoGrid's Lead Senior Software Engineer) at the Cloud Connect Event 2010 as part of a panel "Writing Code for Many Clouds". Video of the presentation is …

This presentation was given by Justin Kitagawa (GoGrid's Lead Senior Software Engineer) at the Cloud Connect Event 2010 as part of a panel "Writing Code for Many Clouds". Video of the presentation is located at: http://blog.gogrid.com/?p=1807
The presentation provides an overview of GoGrid's API.

Published in: Technology
1 Comment
0 Likes
Statistics
Notes
  • Find coupons for your hosting. Get a promo deal before you purchase hosting http://vpsnet.wordpress.com/2010/05/03/vps-net-review/
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Views
Total Views
1,794
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
44
Comments
1
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. API Control the Cloud Justin Kitagawa
  • 2. Control the Cloud
    • Who and What are we?
    • GoGrid is a global leader in hybrid cloud infrastructure
    • We provide cloud datacenters where customers pay on demand for infrastructure that they use
    • Our infrastructure consists of inter-connected servers, load balancers, firewalls, network, and storage
    • Cloud Computing = Completely Outsourced IT Infrastructure
  • 3. All possible through GoGrid’s portal… and…
  • 4. GoGrid’s API
    • HTTP Rest-Like Query API
    • https://api.gogrid.com
    • Easy to use stateless API using HTTP GET and POST Requests
    • Language agnostic
    • Every API request is a
    • combination of
    • an action (verb) and an object (noun)
    • Examples:
    • Add Server
    • List Load Balancer
  • 5. Anatomy of a GoGrid API Call
  • 6. Common API Request Parameters
  • 7. Sample API Request https://api.gogrid.com/api/grid/server/add   ?name=My+First+Server &image= centos53_64_none &ram= 8GB &ip= 192.200.10.101 &api_key=SK1mndkKSjsALKSExdsj30 &sig=Lsmdfj3kw99sdklnasdkjhds &v=1.4 API request adds an 8GB CentOS Linux virtual server accessible at a public ip of 192.200.10.101
  • 8. Sample Code #!/bin/bash APIKEY=a43c234fb2343064 SECRET=password GTIME=`date +%s` SERVER='https://api.gogrid.com/api' VERSION='1.4' FORMAT=json METHOD='/grid/server/list?' function getMD5sum { HASH=$1$2$3 SIG=`echo -n $HASH | md5sum | cut -d' ' -f1` } function buildBaseURL { #without array, cleaner in bash URL="$1$2&sig=$3&format=$4&v=$5&api_key=$6" } function getURL { # have curl fail silently and spit out error code to STDERR curl -f $1 } # Get to work getMD5sum $APIKEY $SECRET $GTIME buildBaseURL $SERVER $METHOD $SIG $FORMAT $VERSION $APIKEY getURL $URL
  • 9. Objects server image loadbalancer ip password job Actions add edit delete list get
  • 10. Challenges
    • Keeping it Simple (KISS)
      • SOAP vs REST vs HTTP
      • Consistent Terminology (Common Actions/Verbs)
      • Liberal Inputs > Conservative Output
      • Flexibility
    • Versioning / Backward Compatibility
      • Rules:
        • Only add attributes to objects
        • Never remove attributes to objects
        • Never remove parameters from API request calls
      • Test harnesses to test regressions
  • 11. Who is this all for?
    • Who here wants to leverage cloud infrastructure to improve the efficiency of their engineering team’s development, staging, or production systems?
    YOU!
  • 12. For More Information
    • Website – www.GoGrid.com
    • Wiki – wiki.gogrid.com
    • Blog – blog.GoGrid.com
    • Twitter - @GoGrid
    • Facebook – www.facebook.com/gogrid

×