{"id":15056591,"url":"https://github.com/jeevatkm/digitalocean-api-java","last_synced_at":"2025-04-06T07:15:18.512Z","repository":{"id":9362926,"uuid":"11217182","full_name":"jeevatkm/digitalocean-api-java","owner":"jeevatkm","description":"DigitalOcean API Client in Java","archived":false,"fork":false,"pushed_at":"2022-09-05T19:41:38.000Z","size":910,"stargazers_count":177,"open_issues_count":19,"forks_count":69,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-30T06:08:47.920Z","etag":null,"topics":["digitalocean","droplet","groovy","java","java-library","scala"],"latest_commit_sha":null,"homepage":"https://www.digitalocean.com/community/projects/api-client-in-java","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeevatkm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-06T11:18:37.000Z","updated_at":"2024-10-14T19:57:48.000Z","dependencies_parsed_at":"2022-09-26T21:51:01.476Z","dependency_job_id":null,"html_url":"https://github.com/jeevatkm/digitalocean-api-java","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeevatkm%2Fdigitalocean-api-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeevatkm%2Fdigitalocean-api-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeevatkm%2Fdigitalocean-api-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeevatkm%2Fdigitalocean-api-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeevatkm","download_url":"https://codeload.github.com/jeevatkm/digitalocean-api-java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445682,"owners_count":20939961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["digitalocean","droplet","groovy","java","java-library","scala"],"created_at":"2024-09-24T21:53:50.342Z","updated_at":"2025-04-06T07:15:18.478Z","avatar_url":"https://github.com/jeevatkm.png","language":"Java","readme":"\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003eDigitalOcean API Client for Java\u003c/h1\u003e\n  \u003cp align=\"center\"\u003e\u003ca href=\"https://travis-ci.org/jeevatkm/digitalocean-api-java\"\u003e\u003cimg src=\"https://img.shields.io/travis/jeevatkm/digitalocean-api-java/master.svg?style=flat-square\" alt=\"Build Status\" /\u003e\u003c/a\u003e \u003ca href=\"https://github.com/jeevatkm/digitalocean-api-java/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/badge/version-2.17-blue.svg?style=flat-square\" alt=\"Version\" /\u003e\u003c/a\u003e \u003ca href=\"https://docs.myjeeva.com/javadoc/digitalocean-api-client/2.17/\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/javadoc-reference-00bcd4.svg?style=flat-square\" alt=\"Javadoc\" /\u003e\u003c/a\u003e \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/jeevatkm/digitalocean-api-java.svg?style=flat-square\" alt=\"License\" /\u003e\u003c/a\u003e \u003c/p\u003e\n  \u003cp align=\"center\"\u003eSimple \u0026 Lightweight API client library for Enterprise Application or Utilities Integration around \u003ca href=\"https://developers.digitalocean.com\" target=\"_blank\"\u003eDigitalOcean RESTful APIs\u003c/a\u003e. You can use this library with project based (JVM hosted languages) on Java, Groovy, Scala, Clojure, etc.\u003c/p\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\nGive your support by clicking Hearts on \u003ca href=\"https://www.digitalocean.com/community/projects/api-client-in-java\" target=\"_blank\"\u003eDigitalOcean Developers Community\u003c/a\u003e.\n\u003c/p\u003e\n\n## News\n\n  * [v2.17](https://github.com/jeevatkm/digitalocean-api-java/releases/tag/v2.17) released and tagged on Feb 03, 2019\n  * [v2.16](https://github.com/jeevatkm/digitalocean-api-java/releases/tag/v2.16) released and tagged on Sep 03, 2018\n  * [v2.15](https://github.com/jeevatkm/digitalocean-api-java/releases/tag/v2.15) released and tagged on May 5, 2018\n  * [v2.14](https://github.com/jeevatkm/digitalocean-api-java/releases/tag/v2.14) released and tagged on Mar 6, 2018\n  * [v2.13](https://github.com/jeevatkm/digitalocean-api-java/releases/tag/v2.13) eleased and tagged on Nov 18, 2017\n\n## Getting Started\n\nFor handy use, DigitalOcean API Client library project dependency definition provided below or you wanna jar [Download it](http://search.maven.org/remotecontent?filepath=com/myjeeva/digitalocean/digitalocean-api-client/2.17/digitalocean-api-client-2.17.jar) from Maven central repo.\n\n*Note: [master](https://github.com/jeevatkm/digitalocean-api-java) branch maps to v2 APIs and digitalocean turned off [v1 APIs](https://developers.digitalocean.com/documentation/changelog/api-v1/sunsetting-api-v1/) as on Nov 9, 2015 .*\n\n**Maven dependency**\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.myjeeva.digitalocean\u003c/groupId\u003e\n    \u003cartifactId\u003edigitalocean-api-client\u003c/artifactId\u003e\n    \u003cversion\u003e2.17\u003c/version\u003e\n\u003c/dependency\u003e\n```\n**Gradle/Grails dependency**\n```shell\ncompile 'com.myjeeva.digitalocean:digitalocean-api-client:2.17'\n```\n**Groovy Grape**\n```groovy\n@Grapes(\n@Grab(group='com.myjeeva.digitalocean', module='digitalocean-api-client', version='2.17')\n)\n```\n**Scala SBT**\n```shell\nlibraryDependencies += \"com.myjeeva.digitalocean\" % \"digitalocean-api-client\" % \"2.17\"\n```\n\n**Note:** \n\n  * For Android projects, kindly include the `httpclient-android` library explicitly in your project dependencies.\n  * Library `vx.x-SNAPSHOT` is [available](https://oss.sonatype.org/content/repositories/snapshots/com/myjeeva/digitalocean/digitalocean-api-client/) between the release version. Snapshot is update to with `master` branch.\n\n* * *\n\n## Getting Help\n\nFor API documentation see:\n\n* [DigitalOcean API Client in Java](https://docs.myjeeva.com/javadoc/digitalocean-api-client/2.17/)\n\nFor Example usage see:\n\n* Have a look at [DigitalOceanIntegrationTest](https://github.com/jeevatkm/digitalocean-api-java/blob/master/src/test/java/com/myjeeva/digitalocean/DigitalOceanIntegrationTest.java)\n\n## Samples\n\n**Creating a DigitalOcean Client in three simple ways!**\n```java\n// Way one, just pass on authToken\nDigitalOcean apiClient = new DigitalOceanClient(authToken);\n\n// Way two, pass on version number \u0026 authToken\nDigitalOcean apiClient = new DigitalOceanClient(\"v2\", authToken);\n\n// Way three, pass on version number, authToken \u0026 httpClient\n// Go ahead and customize httpClient attributes for requirements\nCloseableHttpClient httpClient = HttpClients.createDefault();\nDigitalOcean apiClient = new DigitalOceanClient(\"v2\", authToken, httpClient);\n```\n\n**Let's invoke the method(s) as per need via apiClient**\n```java\n// Fetching all the available droplets from control panel\nDroplets droplets = apiClient.getAvailableDroplets(pageNo, perPage);\n\n// Fetching all the available kernels for droplet\nKernels kernels = apiClient.getAvailableKernels(dropletId, pageNo, perPage);\n\n// Create a new droplet\nDroplet newDroplet = new Droplet();\nnewDroplet.setName(\"api-client-test-host\");\nnewDroplet.setSize(new Size(\"512mb\")); // setting size by slug value\nnewDroplet.setRegion(new Region(\"sgp1\")); // setting region by slug value; sgp1 =\u003e Singapore 1 Data center\nnewDroplet.setImage(new Image(1601)); // setting by Image Id 1601 =\u003e centos-5-8-x64 also available in image slug value\nnewDroplet.setEnableBackup(Boolean.TRUE);\nnewDroplet.setEnableIpv6(Boolean.TRUE);\nnewDroplet.setEnablePrivateNetworking(Boolean.TRUE);\n\n// Adding SSH key info\nList\u003cKey\u003e keys = new ArrayList\u003cKey\u003e();\nkeys.add(new Key(6536653));\nkeys.add(new Key(6536654));\nnewDroplet.setKeys(keys);\n\n// Adding Metadata API - User Data\nnewDroplet.setUserData(\" \u003c YAML Content \u003e \"); // Follow DigitalOcean documentation to prepare user_data value\nDroplet droplet = apiClient.createDroplet(newDroplet);\n\n\n// Creating multiple droplets\nDroplet droplet = new Droplet();\ndroplet.setNames(Arrays.asList(\"sub-01.example.com\", \"sub-02.example.com\"));\ndroplet.setSize(\"512mb\");\ndroplet.setImage(new Image(\"ubuntu-14-04-x64\"));\ndroplet.setRegion(new Region(\"nyc1\"));\nDroplets droplets = apiClient.createDroplets(droplet);\n\n// Fetch droplet information\nDroplet droplet = apiClient.getDropletInfo(dropletId);\n\n// Fetch Available Plans/Sizes supported by DigitalOcean\nSizes sizes = apiClient.getAvailableSizes(pageNo);\n\n// Fetch Available Regions supported by DigitalOcean\nRegions regions = apiClient.getAvailableRegions(pageNo);\n```\n\n**Accessing `RateLimit` header values from return object. This is applicable for all requests**.\n```java\nDroplets droplets = getAvailableDroplets(1, 20);\nRateLimit rateLimit = droplets.getRateLimit();\n\nActions actions = getAvailableActions(2, 40);\nRateLimit rateLimit = actions.getRateLimit();\n\nDomain domain = getDomainInfo(\"myjeeva.com\");\nRateLimit rateLimit = domain.getRateLimit();\n\nDroplet droplet = getDropletInfo(10000001);\nRateLimit rateLimit = droplet.getRateLimit();\n```\n\n## Reporting Issues\n\nDigitalOcean API Client uses [GitHub’s integrated issue tracking system](https://github.com/jeevatkm/digitalocean-api-java/issues) to record bugs and feature requests. If you want to raise an issue, please follow the recommendations bellow:\n\n* Before you log a bug, please search the issue tracker to see if someone has already reported the problem. If the issue doesn’t already exist, create a new issue.\n* Please provide as much information as possible with the issue report, we like to know the version of DigitalOcean API Client that you are using.\n* If you need to paste code, or include a stack trace use Markdown ``` escapes before and after your text.\n\n## Supported API's and Changelogs\n\nRefer to [CHANGELOG.md](CHANGELOG.md)\n\n## Author\n\nJeevanandam M. - jeeva@myjeeva.com\n\n## Contributors\n\nPlease refer to https://github.com/jeevatkm/digitalocean-api-java/graphs/contributors\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch - `git checkout -b my-new-feature`\n3. Implement your changes \n4. Format your code with `./mvnw com.coveo:fmt-maven-plugin:format`\n5. Check tests passig with `./mvnw verify`\n6. Commit your changes - `git commit -am 'Added feature'`\n7. Push to the branch - `git push origin my-new-feature`\n9. Create new Pull Request\n\n## License\n\nDigitalOcean API Client - [MIT License](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeevatkm%2Fdigitalocean-api-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeevatkm%2Fdigitalocean-api-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeevatkm%2Fdigitalocean-api-java/lists"}