simple Program to access digitalocean droplet information in java

假装没事ソ 提交于 2019-12-24 02:23:49

问题


I am new to DigitalOcean.I would like to run basic java program to access DigitalOcean droplet. please let me know step by step procedure.


回答1:


You can get information about your droplets using their official API. It is a simple REST api which you can call using Java's URL class.

More about howto make HTTP GET using Java:

Using java.net.URLConnection to fire and handle HTTP requests

For simple retrieval of information about your account, Droplets etc. you should use the GET method. The information you request will be returned to you as a JSON object. You can find numerous JSON libraries for Java (e.g. json.org/java).

API docs

Documentation of DigitalOcean API:

https://developers.digitalocean.com/

Documention section related to Droplets:

https://developers.digitalocean.com/#droplets

List of all Droplets:

https://developers.digitalocean.com/#list-all-droplets

Retrieve an existing Droplet by id:

https://developers.digitalocean.com/#retrieve-an-existing-droplet-by-id



来源:https://stackoverflow.com/questions/25739119/simple-program-to-access-digitalocean-droplet-information-in-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!