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.
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