{"id":18264000,"url":"https://github.com/adoptopenjdk/openjdk-api","last_synced_at":"2025-04-04T20:31:27.938Z","repository":{"id":20379530,"uuid":"89795477","full_name":"AdoptOpenJDK/openjdk-api","owner":"AdoptOpenJDK","description":"DEPRECATED and replaced by of https://github.com/AdoptOpenJDK/openjdk-api-v3 - See README","archived":false,"fork":false,"pushed_at":"2024-06-18T05:17:30.000Z","size":3278,"stargazers_count":15,"open_issues_count":2,"forks_count":15,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-20T19:07:35.528Z","etag":null,"topics":["adoptopenjdk","adoptopenjdk-api","api"],"latest_commit_sha":null,"homepage":"https://api.adoptopenjdk.net/README","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AdoptOpenJDK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-29T15:48:15.000Z","updated_at":"2023-11-25T10:54:46.000Z","dependencies_parsed_at":"2023-01-12T03:30:34.889Z","dependency_job_id":"dc0c9a8b-93e3-40ae-91a1-1e2a71e11acf","html_url":"https://github.com/AdoptOpenJDK/openjdk-api","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdoptOpenJDK%2Fopenjdk-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdoptOpenJDK%2Fopenjdk-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdoptOpenJDK%2Fopenjdk-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdoptOpenJDK%2Fopenjdk-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdoptOpenJDK","download_url":"https://codeload.github.com/AdoptOpenJDK/openjdk-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247246421,"owners_count":20907798,"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":["adoptopenjdk","adoptopenjdk-api","api"],"created_at":"2024-11-05T11:13:27.130Z","updated_at":"2025-04-04T20:31:27.305Z","avatar_url":"https://github.com/AdoptOpenJDK.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AdoptOpenJDK API\n\n* **NOTICE:** AdoptOpenJDK API v1 Has now been removed.\n* **NOTICE:** AdoptOpenJDK API v2 Has now been deprecated.\n* **NOTICE:** If you are using v1 or v2 please move to the [latest version](https://api.adoptopenjdk.net) as soon as possible. Please raise any migration problems as an issue in the [v3 issue tracker](https://github.com/AdoptOpenJDK/openjdk-api-v3/issues/new).\n* **NOTICE:** The documentation below is kept for historical purposes.\n\n## Overview\n\nThe AdoptOpenJDK API provides a way to consume JSON information about the AdoptOpenJDK releases and nightly builds.  Sign up to the [mailing list](https://mail.openjdk.java.net/mailman/listinfo/adoption-discuss) where major API updates will be announced, and visit [adoptopenjdk.net](https://adoptopenjdk.net) to find out more about the community.\n\n## Deployment\n\nThe v2 API is currently deployed on AdoptOpenJDK's Heroku instance.\n\n## Usage\n\nHere is an example using `curl` (see the [curl documentation](https://curl.haxx.se/docs/tooldocs.html)):\n\n```sh\ncurl -L 'https://api.adoptopenjdk.net/v2/info/releases/openjdk8'\n```\n\nThis command returns information about all 'OpenJDK' releases, and defaults to the latest version of the API.\n\nThe following [Windows Powershell](https://docs.microsoft.com/en-us/powershell/scripting/getting-started/getting-started-with-windows-powershell?view=powershell-6) script uses `Invoke-Webrequest` to download the latest Windows 64-bit archive.\n\n```powershell\nfunction Get-RedirectedUrl\n{\n    Param (\n        [Parameter(Mandatory=$true)]\n        [String]$URL\n    )\n\n    $request = [System.Net.WebRequest]::Create($url)\n    $request.AllowAutoRedirect=$false\n    $response=$request.GetResponse()\n\n    If ($response.StatusCode -eq \"Found\")\n    {\n        $response.GetResponseHeader(\"Location\")\n    }\n}\n\n$url= \"https://api.adoptopenjdk.net/v2/binary/nightly/openjdk8?openjdk_impl=hotspot\u0026os=windows\u0026arch=x64\u0026release=latest\u0026type=jdk\"\n\n$fUrl = Get-RedirectedUrl $url\n$filename = [System.IO.Path]::GetFileName($fUrl);\n\nWrite-Host \"Downloading $filename\"\n\n[Net.ServicePointManager]::SecurityProtocol = \"tls12, tls11, tls\"\nInvoke-WebRequest -Uri $url -OutFile $filename\n```\n\n\u003e **Note on the API rate limit:** Add the `-i` option (e.g. `curl -i https://api.adoptopenjdk.net/v2/openjdk8/releases`) to return the response header as well as the response body. There is a limit of 100 API calls per hour per IP, and the value of `X-RateLimit-Remaining` in the response header is useful to determine how many API calls are remaining from this limit.\n\n## API v2.0.0 Specification\n\nYou can append different paths to the `https://api.adoptopenjdk.net/v2/` URL, either in the above `curl` format, in a browser, or through an HTTP client, to return different JSON information:\n\n```http\n/v2/\u003crequest type\u003e/\u003crelease type\u003e/\u003cversion\u003e\n```\n\nFor instance /info/nightly/openjdk10:\n\n```sh\ncurl -L 'https://api.adoptopenjdk.net/v2/info/nightly/openjdk10'\n```\n\n### Path Parameters\n\n#### Request Type\n\n##### info\n\nList of information about builds that match the current query\n\n```sh\ncurl -L 'https://api.adoptopenjdk.net/v2/info/nightly/openjdk8?openjdk_impl=hotspot'\n```\n\n##### binary\n\nRedirects to the binary that matches your current query. If multiple or no binaries match the query, an error code will be returned\n\n```sh\ncurl -L 'https://api.adoptopenjdk.net/v2/binary/nightly/openjdk8?openjdk_impl=hotspot\u0026os=windows\u0026arch=x64\u0026release=latest\u0026type=jdk'\n```\n\n##### latestAssets\n\nReturns the latest binary asset for every matching combination of `os`, `arch`, `type`, `openjdk_impl`, and `heap_size` query parameters.\n\ni.e to find the latest jdk/jre for linux, x64, normal heap, hotspot:\n\n```sh\ncurl -L 'https://api.adoptopenjdk.net/v2/latestAssets/nightly/openjdk8?os=linux\u0026arch=x64\u0026heap_size=normal\u0026openjdk_impl=hotspot'\n```\n\n```json\n[\n  {\n    \"os\": \"linux\",\n    \"architecture\": \"x64\",\n    \"binary_type\": \"jre\",\n    \"openjdk_impl\": \"hotspot\",\n    \"binary_name\": \"OpenJDK8U-jre_x64_linux_hotspot_2018-10-12-04-26.tar.gz\",\n    \"binary_link\": \"https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u-2018-10-12-04-26/OpenJDK8U-jre_x64_linux_hotspot_2018-10-12-04-26.tar.gz\",\n    \"binary_size\": 40564422,\n    \"checksum_link\": \"https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u-2018-10-12-04-26/OpenJDK8U-jre_x64_linux_hotspot_2018-10-12-04-26.tar.gz.sha256.txt\",\n    \"version\": \"8\",\n    \"heap_size\": \"normal\",\n    \"timestamp\": \"2018-10-12T04:26:10Z\"\n  },\n  {\n    \"os\": \"linux\",\n    \"architecture\": \"x64\",\n    \"binary_type\": \"jdk\",\n    \"openjdk_impl\": \"hotspot\",\n    \"binary_name\": \"OpenJDK8U-jdk_x64_linux_hotspot_2018-10-12-04-26.tar.gz\",\n    \"binary_link\": \"https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u-2018-10-12-04-26/OpenJDK8U-jdk_x64_linux_hotspot_2018-10-12-04-26.tar.gz\",\n    \"binary_size\": 78327417,\n    \"checksum_link\": \"https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u-2018-10-12-04-26/OpenJDK8U-jdk_x64_linux_hotspot_2018-10-12-04-26.tar.gz.sha256.txt\",\n    \"version\": \"8\",\n    \"heap_size\": \"normal\",\n    \"timestamp\": \"2018-10-12T04:26:10Z\"\n  }\n]\n```\n\n#### Release Type\n\nType of release, i.e `releases` for stable builds or `nightly` for most recent build.\n\n#### Version\n\nOpenJDK version, i.e `openjdk8`, `openjdk9`, `openjdk10`, `openjdk11`, `openjdk12`, `openjdk13`, `openjdk14`, `openjdk15`\n\n### Query Parameters\n\nThe data that can be returned can then be filtered to find builds of a specific type\n\n| Parameter | Query Parameter Name | Examples |\n|-----------|----------------------|----------|\n| JVM Implementation | `openjdk_impl` | `hotspot`, `openj9` |\n| Operating System | `os` | `windows`, `linux`, `mac`, `solaris`, `aix` |\n| Architecture | `arch` | `x64`, `x32`, `ppc64`, `s390x`, `ppc64le`, `aarch64`, `arm` |\n| Binary Type | `type` | `jdk`, `jre` |\n| Heap Size | `heap_size` | `normal`, `large` |\n\nIn the absence of a given parameter, it will return all elements.\n\nTo return latest, hotspot, windows, x64, jdk:\n\n```sh\ncurl -L 'https://api.adoptopenjdk.net/v2/binary/nightly/openjdk8?openjdk_impl=hotspot\u0026os=windows\u0026arch=x64\u0026release=latest\u0026type=jdk'\n```\n\nMultiple values can be supplied for a given parameter like so:\n\n```sh\ncurl 'https://api.adoptopenjdk.net/v2/info/releases/openjdk8?os=windows\u0026os=linux\u0026arch=x32\u0026arch=x64'\n```\n\nThis will return all Windows and Linux releases of OpenJDK8 for 32-bit and 64-bit x86 architectures. Multi-value `release` queries are not currently supported due to some idiosyncrasies with how it affects response formats. Queries such as `?release=latest\u0026release=jdk8u172-b00-201807161800` will return an appropriate error response.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadoptopenjdk%2Fopenjdk-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadoptopenjdk%2Fopenjdk-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadoptopenjdk%2Fopenjdk-api/lists"}