Your SlideShare is downloading. ×
0
API Control the Cloud Justin Kitagawa
Control the Cloud <ul><li>Who and What are we? </li></ul><ul><li>GoGrid is a global leader in hybrid cloud infrastructure ...
All possible through GoGrid’s portal… and…
GoGrid’s API <ul><li>HTTP Rest-Like Query API </li></ul><ul><li>https://api.gogrid.com </li></ul><ul><li>Easy to use state...
Anatomy of a GoGrid API Call
Common API Request Parameters
Sample API Request https://api.gogrid.com/api/grid/server/add   ?name=My+First+Server  &image= centos53_64_none   &ram= 8G...
Sample Code #!/bin/bash  APIKEY=a43c234fb2343064 SECRET=password GTIME=`date +%s`  SERVER='https://api.gogrid.com/api'  VE...
Objects server image loadbalancer ip password job Actions add edit delete list get
Challenges <ul><li>Keeping it Simple (KISS) </li></ul><ul><ul><li>SOAP vs REST vs HTTP </li></ul></ul><ul><ul><li>Consiste...
Who is this all for? <ul><li>Who here wants to leverage cloud infrastructure to improve the efficiency of their engineerin...
For More Information <ul><li>Website  –  www.GoGrid.com </li></ul><ul><li>Wiki  –  wiki.gogrid.com </li></ul><ul><li>Blog ...
Upcoming SlideShare
Loading in...5
×

GoGrid API - Presented at Cloud Connect Event 2010

1,820

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 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,820
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
44
Comments
1
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "GoGrid API - Presented at Cloud Connect Event 2010"

  1. 1. API Control the Cloud Justin Kitagawa
  2. 2. Control the Cloud <ul><li>Who and What are we? </li></ul><ul><li>GoGrid is a global leader in hybrid cloud infrastructure </li></ul><ul><li>We provide cloud datacenters where customers pay on demand for infrastructure that they use </li></ul><ul><li>Our infrastructure consists of inter-connected servers, load balancers, firewalls, network, and storage </li></ul><ul><li>Cloud Computing = Completely Outsourced IT Infrastructure </li></ul>
  3. 3. All possible through GoGrid’s portal… and…
  4. 4. GoGrid’s API <ul><li>HTTP Rest-Like Query API </li></ul><ul><li>https://api.gogrid.com </li></ul><ul><li>Easy to use stateless API using HTTP GET and POST Requests </li></ul><ul><li>Language agnostic </li></ul><ul><li>Every API request is a </li></ul><ul><li>combination of </li></ul><ul><li>an action (verb) and an object (noun) </li></ul><ul><li>Examples: </li></ul><ul><li>Add Server </li></ul><ul><li>List Load Balancer </li></ul>
  5. 5. Anatomy of a GoGrid API Call
  6. 6. Common API Request Parameters
  7. 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. 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=&quot;$1$2&sig=$3&format=$4&v=$5&api_key=$6&quot; } 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. 9. Objects server image loadbalancer ip password job Actions add edit delete list get
  10. 10. Challenges <ul><li>Keeping it Simple (KISS) </li></ul><ul><ul><li>SOAP vs REST vs HTTP </li></ul></ul><ul><ul><li>Consistent Terminology (Common Actions/Verbs) </li></ul></ul><ul><ul><li>Liberal Inputs > Conservative Output </li></ul></ul><ul><ul><li>Flexibility </li></ul></ul><ul><li>Versioning / Backward Compatibility </li></ul><ul><ul><li>Rules: </li></ul></ul><ul><ul><ul><li>Only add attributes to objects </li></ul></ul></ul><ul><ul><ul><li>Never remove attributes to objects </li></ul></ul></ul><ul><ul><ul><li>Never remove parameters from API request calls </li></ul></ul></ul><ul><ul><li>Test harnesses to test regressions </li></ul></ul>
  11. 11. Who is this all for? <ul><li>Who here wants to leverage cloud infrastructure to improve the efficiency of their engineering team’s development, staging, or production systems? </li></ul>YOU!
  12. 12. For More Information <ul><li>Website – www.GoGrid.com </li></ul><ul><li>Wiki – wiki.gogrid.com </li></ul><ul><li>Blog – blog.GoGrid.com </li></ul><ul><li>Twitter - @GoGrid </li></ul><ul><li>Facebook – www.facebook.com/gogrid </li></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×