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: redirect.github.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:7206c56b-963e-7bb3-7af8-c3372db3e0b1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 88C4:14AB50:2F2EDE1:3D4A570:69749BC2 |
| html-safe-nonce | 8a548766ddb4ec7c1e71c4d4880acb97a334db2eb4ab196e9fd03d6db268295d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OEM0OjE0QUI1MDoyRjJFREUxOjNENEE1NzA6Njk3NDlCQzIiLCJ2aXNpdG9yX2lkIjoiNjMyODU5NTI4NDA1NzQzMDk3OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1d90844c17c856c5ce3a7e1481afcf25a61940d0e8b7cac9a48edc22996d9d41 |
| 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 | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| 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 | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width