{"id":3400,"date":"2013-04-29T20:34:30","date_gmt":"2013-04-30T03:34:30","guid":{"rendered":"http:\/\/blog.networkpresence.co\/?p=3400"},"modified":"2014-11-28T05:15:56","modified_gmt":"2014-11-28T12:15:56","slug":"json-based-web-api-for-customer-vps","status":"publish","type":"post","link":"http:\/\/blog.networkpresence.co\/?p=3400","title":{"rendered":"JSON based Web API for customer VPS"},"content":{"rendered":"<p>For 4 years now we&#8217;ve had an in-house API for VPS customers to automate management of their Network Presence VPS through web-based URLs that access the API and respond with simple JSON text.<\/p>\n<p>Our VPS API allows you to manage &#038; report on (any of) your Network Presence VPS and some information (contact details, VPS Plan information, etc) on the Account that owns the VPS.<\/p>\n<p>API functionality includes;<\/p>\n<p>+ Display the current status of your running VPS, including memory, CPU and network usage<br \/>\n+ Stop your VPS<br \/>\n+ Start your VPS<br \/>\n+ Get Usage information of the VPS Account<br \/>\n+ List your Backups of your VPS<br \/>\n+ Initiate a Backup of your VPS<br \/>\n+ Get basic information on the VPS Account<br \/>\n+ Regeneratable \u201cKey\u201d or code required with each call to the API<\/p>\n<p>The way that the API works is by providing a means to generate a unique Key or code for access to the API, which means that the customer\u2019s username and password doesn\u2019t need to be supplied in calls to the API.<\/p>\n<p>The Network Presence <a href=\"https:\/\/networkpresence.com.au\/support\/vps-management.html\">VPS Management page <\/a>has an option to \u201cGenerate and Store an API Key\u201d, which is returned back on-screen and should be saved for use in calls to the API.<\/p>\n<p>Calling the API is as simple as supplying the \u201cAPI Key\u201d in standard (GET format) URLs, like:<\/p>\n<p>API-URL\/api?key=MyAPIKey?a=command<\/p>\n<p>Note: please <a href=\"http:\/\/netpr.es\/contactus\">contact us<\/a> for the full API-URL, as it\u2019s not listed here in a public resource..<\/p>\n<p>Where \u2018command\u2019 can be: status, info, usage, listbackup, takebackup, stop, terminate, start<\/p>\n<p>status = list information about the running VPS &#038; whether the VPS is running<\/p>\n<p>info = list some account or contact information on the VPS<\/p>\n<p>usage = list network traffic (for billing month to date) and other basic resource usage information on the VPS<\/p>\n<p>stop = perform an \u2018orderly\u2019 shutdown of the VPS (like \u201cpressing the power button\u201d)<\/p>\n<p>terminate = immediately shutdown the VPS (like \u201cpulling the power cord\u201d)<\/p>\n<p>start = perform a startup or \u201cboot up\u201d of the VPS<\/p>\n<p>listbackup = list stored backups of your VPS Disk<\/p>\n<p>takebackup = Initiate a backup to be taken of your VPS Disk<\/p>\n<p>All customers are welcome to use the API and please report and problems to us by email to help AT networkpresence.com.au (ie: don\u2019t post here for API Feedback).<\/p>\n<p>Of course, if you&#8217;d like a 100% AWS compatible interface for your VPS, then we can provision your VPS within a <a href=\"http:\/\/eucalyptus.com\">Eucalyptus<\/a> based environment, on separate hosting platforms too.<\/p>\n<p>FYI &#038; regards,<br \/>\nRichard.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For 4 years now we&#8217;ve had an in-house API for VPS customers to automate management of their Network Presence VPS through web-based URLs that access the API and respond with simple JSON text. Our VPS API allows you to manage &hellip; <a href=\"http:\/\/blog.networkpresence.co\/?p=3400\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,70],"tags":[59,171,60,9],"class_list":["post-3400","post","type-post","status-publish","format-standard","hentry","category-network-presence","category-sales","tag-api","tag-eucalyptus","tag-json","tag-vps"],"_links":{"self":[{"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts\/3400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3400"}],"version-history":[{"count":8,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts\/3400\/revisions"}],"predecessor-version":[{"id":5876,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts\/3400\/revisions\/5876"}],"wp:attachment":[{"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3400"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}