Advertisement
eva2000

doapi.sh Digital Ocean Management API script example output

Sep 14th, 2013
147
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.78 KB | None
  1. doapi.sh is in alpha status not fully tested yet !!! use at your own risk !!!
  2.  
  3. ###############################################
  4. #Example output:
  5.  
  6. ./doapi.sh        
  7. basic commands
  8.  
  9. ./doapi.sh reboot
  10. ./doapi.sh recycle
  11. ./doapi.sh poweron
  12. ./doapi.sh poweroff
  13. ./doapi.sh listdroplets
  14. ./doapi.sh dropletinfo
  15. ./doapi.sh spinup
  16. ./doapi.sh resize
  17. ./doapi.sh snapshot
  18. ./doapi.sh regions
  19. ./doapi.sh imglist
  20. ./doapi.sh imgid
  21. ./doapi.sh transferimgid
  22. ./doapi.sh listsizes
  23. ./doapi.sh listdomains
  24. ./doapi.sh showdomain
  25. ./doapi.sh listrecords
  26.  
  27. automated commands
  28.  
  29. ./doapi.sh reboot auto {dropletid}
  30. ./doapi.sh recycle auto {dropletid}
  31. ./doapi.sh poweron auto {dropletid}
  32. ./doapi.sh poweroff auto {dropletid}
  33. ./doapi.sh dropletinfo auto {dropletid}
  34.  
  35. ###############################################
  36. # List regions
  37.  
  38. ./doapi.sh regions
  39.  
  40. status:OK
  41. regions:[
  42.  
  43. id:2
  44. name:Amsterdam 1
  45. slug:ams1
  46.  
  47. id:3
  48. name:San Francisco 1
  49. slug:sfo1
  50.  
  51. id:4
  52. name:New York 2
  53. slug:nyc2
  54.  
  55. ###############################################
  56. # List droplet sizes
  57.  
  58. ./doapi.sh listsizes
  59. id:66
  60. name:512MB
  61. slug:null
  62. memory:512
  63. cpu:1
  64. disk:20
  65. cost_per_hour:0.00744
  66. cost_per_month:5.0
  67.  
  68. id:63
  69. name:1GB
  70. slug:null
  71. memory:1024
  72. cpu:1
  73. disk:30
  74. cost_per_hour:0.01488
  75. cost_per_month:10.0
  76.  
  77. id:62
  78. name:2GB
  79. slug:null
  80. memory:2048
  81. cpu:2
  82. disk:40
  83. cost_per_hour:0.02976
  84. cost_per_month:20.0
  85.  
  86. id:64
  87. name:4GB
  88. slug:null
  89. memory:4096
  90. cpu:2
  91. disk:60
  92. cost_per_hour:0.05952
  93. cost_per_month:40.0
  94.  
  95. id:65
  96. name:8GB
  97. slug:null
  98. memory:8192
  99. cpu:4
  100. disk:80
  101. cost_per_hour:0.11905
  102. cost_per_month:80.0
  103.  
  104. id:61
  105. name:16GB
  106. slug:null
  107. memory:16384
  108. cpu:8
  109. disk:160
  110. cost_per_hour:0.2381
  111. cost_per_month:160.0
  112.  
  113. id:60
  114. name:32GB
  115. slug:null
  116. memory:32768
  117. cpu:12
  118. disk:320
  119. cost_per_hour:0.47619
  120. cost_per_month:320.0
  121.  
  122. id:70
  123. name:48GB
  124. slug:null
  125. memory:49152
  126. cpu:16
  127. disk:480
  128. cost_per_hour:0.71429
  129. cost_per_month:480.0
  130.  
  131. id:69
  132. name:64GB
  133. slug:null
  134. memory:65536
  135. cpu:20
  136. disk:640
  137. cost_per_hour:0.95238
  138. cost_per_month:640.0
  139.  
  140. id:68
  141. name:96GB
  142. slug:null
  143. memory:94208
  144. cpu:24
  145. disk:960
  146. cost_per_hour:1.42857
  147. cost_per_month:960.0
  148.  
  149.  
  150. ###############################################
  151. # List images
  152.  
  153. ./doapi.sh imglist  
  154.  
  155. status:OK | images:[
  156. id:1601 | name:CentOS 5.8 x64 | slug:null | distribution:CentOS | public:true |
  157. id:1602 | name:CentOS 5.8 x32 | slug:null | distribution:CentOS | public:true |
  158. id:12573 | name:Debian 6.0 x64 | slug:null | distribution:Debian | public:true |
  159. id:12575 | name:Debian 6.0 x32 | slug:null | distribution:Debian | public:true |
  160. id:14097 | name:Ubuntu 10.04 x64 | slug:null | distribution:Ubuntu | public:true |
  161. id:14098 | name:Ubuntu 10.04 x32 | slug:null | distribution:Ubuntu | public:true |
  162. id:32387 | name:Fedora 17 x32 | slug:null | distribution:Fedora | public:true |
  163. id:32399 | name:Fedora 17 x32 Desktop | slug:null | distribution:Fedora | public:true |
  164. id:32419 | name:Fedora 17 x64 Desktop | slug:null | distribution:Fedora | public:true |
  165. id:32428 | name:Fedora 17 x64 | slug:null | distribution:Fedora | public:true |
  166. id:284203 | name:Ubuntu 12.04 x64 | slug:null | distribution:Ubuntu | public:true |
  167. id:284211 | name:Ubuntu 12.04 x32 | slug:null | distribution:Ubuntu | public:true |
  168. id:303619 | name:Debian 7.0 x32 | slug:null | distribution:Debian | public:true |
  169. id:308287 | name:Debian 7.0 x64 | slug:null | distribution:Debian | public:true |
  170. id:345791 | name:Ubuntu 13.04 x32 | slug:null | distribution:Ubuntu | public:true |
  171. id:350076 | name:Ubuntu 13.04 x64 | slug:null | distribution:Ubuntu | public:true |
  172. id:350424 | name:Arch Linux 2013.05 x64 | slug:null | distribution:Arch Linux | public:true |
  173. id:361740 | name:Arch Linux 2013.05 x32 | slug:null | distribution:Arch Linux | public:true |
  174. id:376568 | name:CentOS 6.4 x32 | slug:null | distribution:CentOS | public:true |
  175. id:433240 | name:Ubuntu 12.10 x32 | slug:null | distribution:Ubuntu | public:true |
  176. id:459444 | name:LAMP on Ubuntu 12.04 | slug:null | distribution:Ubuntu | public:true |
  177. id:464235 | name:Ruby on Rails on Ubuntu 12.10 (Nginx + Unicorn) | slug:null | distribution:Ubuntu | public:true |
  178. id:473123 | name:Ubuntu 12.10 x64 | slug:null | distribution:Ubuntu | public:true |
  179. id:473136 | name:Ubuntu 12.10 x64 Desktop | slug:null | distribution:Ubuntu | public:true |
  180. id:483575 | name:Redmine on Ubuntu 12.04 | slug:null | distribution:Ubuntu | public:true |
  181. id:562354 | name:CentOS 6.4 x64 | slug:null | distribution:CentOS | public:true |
  182. id:682275 | name:Wordpress on Ubuntu 12.10 | slug:null | distribution:Ubuntu | public:true |
  183. id:696598 | name:Fedora 19 x86-64 | slug:null | distribution:Fedora | public:true |
  184. id:697056 | name:Fedora 19 x86 | slug:null | distribution:Fedora | public:true |
  185. id:719193 | name:Docker on Ubuntu 13.04 (9/2) | slug:null | distribution:Ubuntu | public:true
Advertisement
RAW Paste Data Copied
Advertisement