Skip to content

Instantly share code, notes, and snippets.

@stulevine
Created May 22, 2013 20:00
Show Gist options
  • Save stulevine/5630442 to your computer and use it in GitHub Desktop.
Save stulevine/5630442 to your computer and use it in GitHub Desktop.
(api2):slevine> hapi files.objects.create customer_id=7614 container=stusworldofstuff object=stuobject
{
"response" : {
"status" : "ok",
"http_request" : {
"headers" : [
{
"X-Auth-Token" : "e01b4d573a52424c84c599c2408a0a54"
}
],
"url" : "https://api.storage.santa-clara.internapcloud.net/v1/YWiO9npEwCY2SvhdIQDFFFFF/stusworldofstuff/stuobject",
"method" : "POST"
}
}
}
💡 (api2):slevine> hapi files.containers.list customer_id=7614
{
"response" : {
"containers" : [
{
"name" : "stusworldofstuff"
}
],
"status" : "ok",
"size" : "1"
}
}
💡 (api2):slevine> hapi files.objects.list customer_id=7614 container=stusworldofstuff
{
"response" : {
"status" : "ok",
"name" : "stusworldofstuff",
"container" : [
{
"object" : "stuobject"
}
],
"size" : "1"
}
}
💡 (api2):slevine> hapi files.objects.read customer_id=7614 container=stusworldofstuff object=stuobject
{
"response" : {
"object" : {
"url" : "https://api.storage.santa-clara.internapcloud.net/v1/YWiO9npEwCY2SvhdIQDFFFFF/stusworldofstuff/stuobject",
"name" : "stuobject",
"metadata" : [
{
"name" : "Last-Modified",
"field" : "Wed, 22 May 2013 19:55:38 GMT"
},
{
"name" : "Etag",
"field" : "30db805005d20dc5be383071586b82e4"
},
{
"name" : "X-Timestamp",
"field" : "1369252538.81333"
},
{
"name" : "Accept-Ranges",
"field" : "bytes"
},
{
"name" : "Content-Length",
"field" : "290"
},
{
"name" : "Content-Type",
"field" : "application/octet-stream"
},
{
"name" : "X-Trans-Id",
"field" : "tx49d1f424c6db4d8889ea04c3241a177b"
}
],
"container" : "stusworldofstuff",
"auth-token" : "e01b4d573a52424c84c599c2408a0a54"
},
"status" : "ok"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment