Title: Automatically negotiate API version to use · Issue #2547 · docker-java/docker-java · GitHub
Open Graph Title: Automatically negotiate API version to use · Issue #2547 · docker-java/docker-java
X Title: Automatically negotiate API version to use · Issue #2547 · docker-java/docker-java
Description: The go client has an option to automatically negotiate what API version should be selected. This could also be used here. Fork example calling `/version` returns the following: { "Platform" : { "Name" : "Docker Desktop 4.51.0 (210443)" }...
Open Graph Description: The go client has an option to automatically negotiate what API version should be selected. This could also be used here. Fork example calling `/version` returns the following: { "Platform" : { "Na...
X Description: The go client has an option to automatically negotiate what API version should be selected. This could also be used here. Fork example calling `/version` returns the following: { "Platform&quo...
Opengraph URL: https://github.com/docker-java/docker-java/issues/2547
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Automatically negotiate API version to use","articleBody":"The [go client has an option to automatically negotiate what API version should be selected](https://github.com/moby/moby/blob/6e52828ec38b2f53f695b97ffb0b4ba94fa255e4/client/client.go#L312-L351).\n\nThis could also be used here.\n\n\u003cdetails\u003e\u003csummary\u003eFork example calling `/version` returns the following:\u003c/summary\u003e\n\n```\n{\n \"Platform\" : {\n \"Name\" : \"Docker Desktop 4.51.0 (210443)\"\n },\n \"Components\" : [ {\n \"Name\" : \"Engine\",\n \"Version\" : \"28.5.2\",\n \"Details\" : {\n \"ApiVersion\" : \"1.51\",\n \"Arch\" : \"amd64\",\n \"BuildTime\" : \"2025-11-05T14:43:25.000000000+00:00\",\n \"Experimental\" : \"false\",\n \"GitCommit\" : \"89c5e8f\",\n \"GoVersion\" : \"go1.25.3\",\n \"KernelVersion\" : \"6.6.87.2-microsoft-standard-WSL2\",\n \"MinAPIVersion\" : \"1.24\",\n \"Os\" : \"linux\"\n }\n }, {\n \"Name\" : \"containerd\",\n \"Version\" : \"v1.7.29\",\n \"Details\" : {\n \"GitCommit\" : \"442cb34bda9a6a0fed82a2ca7cade05c5c749582\"\n }\n }, {\n \"Name\" : \"runc\",\n \"Version\" : \"1.3.3\",\n \"Details\" : {\n \"GitCommit\" : \"v1.3.3-0-gd842d771\"\n }\n }, {\n \"Name\" : \"docker-init\",\n \"Version\" : \"0.19.0\",\n \"Details\" : {\n \"GitCommit\" : \"de40ad0\"\n }\n } ],\n \"Version\" : \"28.5.2\",\n \"ApiVersion\" : \"1.51\",\n \"MinAPIVersion\" : \"1.24\",\n \"GitCommit\" : \"89c5e8f\",\n \"GoVersion\" : \"go1.25.3\",\n \"Os\" : \"linux\",\n \"Arch\" : \"amd64\",\n \"KernelVersion\" : \"6.6.87.2-microsoft-standard-WSL2\",\n \"BuildTime\" : \"2025-11-05T14:43:25.000000000+00:00\"\n}\n```\n\n```\n{\n \"Platform\" : {\n \"Name\" : \"Docker Desktop 4.52.0 (210994)\"\n },\n \"Components\" : [ {\n \"Name\" : \"Engine\",\n \"Version\" : \"29.0.1\",\n \"Details\" : {\n \"ApiVersion\" : \"1.52\",\n \"Arch\" : \"amd64\",\n \"BuildTime\" : \"2025-11-14T16:17:57.000000000+00:00\",\n \"Experimental\" : \"false\",\n \"GitCommit\" : \"198b5e3\",\n \"GoVersion\" : \"go1.25.4\",\n \"KernelVersion\" : \"6.6.87.2-microsoft-standard-WSL2\",\n \"MinAPIVersion\" : \"1.44\",\n \"Os\" : \"linux\"\n }\n }, {\n \"Name\" : \"containerd\",\n \"Version\" : \"v2.1.5\",\n \"Details\" : {\n \"GitCommit\" : \"fcd43222d6b07379a4be9786bda52438f0dd16a1\"\n }\n }, {\n \"Name\" : \"runc\",\n \"Version\" : \"1.3.3\",\n \"Details\" : {\n \"GitCommit\" : \"v1.3.3-0-gd842d771\"\n }\n }, {\n \"Name\" : \"docker-init\",\n \"Version\" : \"0.19.0\",\n \"Details\" : {\n \"GitCommit\" : \"de40ad0\"\n }\n } ],\n \"Version\" : \"29.0.1\",\n \"ApiVersion\" : \"1.52\",\n \"MinAPIVersion\" : \"1.44\",\n \"GitCommit\" : \"198b5e3\",\n \"GoVersion\" : \"go1.25.4\",\n \"Os\" : \"linux\",\n \"Arch\" : \"amd64\",\n \"KernelVersion\" : \"6.6.87.2-microsoft-standard-WSL2\",\n \"BuildTime\" : \"2025-11-14T16:17:57.000000000+00:00\"\n}\n```\n\u003c/details\u003e\n\nThe `MinAPIVersion` attribute could be used to compare it with the client's version.\nIf `ClientAPIVersion` \u003c `MinAPIVersion` the client could log an warning and force the use of `MinAPIVersion` - this should prevent hard errors at the cost that the API might be incompatible and not work 100%.\n\nThe same can also be done the other way around if `ClientAPIVersion` \u003e `ApiVersion`.\n\nNOTE: It's currently possible to just omit the ``/\u003cversion\u003e`` prefix from the paths.\nHowever [using the API without a version-prefix is deprecated and will be removed in a future release](https://docs.docker.com/reference/api/engine/version/v1.52/#section/Versioning).","author":{"url":"https://github.com/AB-xdev","@type":"Person","name":"AB-xdev"},"datePublished":"2025-11-24T09:17:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2547/docker-java/issues/2547"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6544e92e-ddcd-c937-033c-1711dcec51d4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AEA6:1B1778:9FE961:D9EDB1:6971C90F |
| html-safe-nonce | e418bf47d67014177ab128c772874d0c5d71c54d4cd9843b98d43d0365a08ea2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRUE2OjFCMTc3ODo5RkU5NjE6RDlFREIxOjY5NzFDOTBGIiwidmlzaXRvcl9pZCI6Ijg3MTcwODk5NzM5MDAyNjU3NDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 83ab349922d3c8812f2bd2542e3e620676a071e9104ddba5401f68e947ba74b4 |
| hovercard-subject-tag | issue:3657895084 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/docker-java/docker-java/2547/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e2b1957a2b4ac41c75741479f6c41f02a3f919f2eb9db5d992f821fc336d0b3b/docker-java/docker-java/issues/2547 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e2b1957a2b4ac41c75741479f6c41f02a3f919f2eb9db5d992f821fc336d0b3b/docker-java/docker-java/issues/2547 |
| og:image:alt | The go client has an option to automatically negotiate what API version should be selected. This could also be used here. Fork example calling `/version` returns the following: { "Platform" : { "Na... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AB-xdev |
| hostname | github.com |
| expected-hostname | github.com |
| None | ac615aa66802dad9a938c6abe95edf09ee43c0c7f508315b64b08612858ef32e |
| turbo-cache-control | no-preview |
| go-import | github.com/docker-java/docker-java git https://github.com/docker-java/docker-java.git |
| octolytics-dimension-user_id | 7772003 |
| octolytics-dimension-user_login | docker-java |
| octolytics-dimension-repository_id | 20415251 |
| octolytics-dimension-repository_nwo | docker-java/docker-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20415251 |
| octolytics-dimension-repository_network_root_nwo | docker-java/docker-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6b618569a5f93e0b31f97f620112341421ef5f69 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width