Home / Function/ getApiVersion() — spring-boot Function Reference

getApiVersion() — spring-boot Function Reference

Architecture documentation for the getApiVersion() function in DockerApi.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  950f4013_630e_2f38_fc15_c3d5c88bd8bd["getApiVersion()"]
  5a05bcfb_9993_f36f_e54b_1f28b5d2c962["getApiVersion()"]
  5a05bcfb_9993_f36f_e54b_1f28b5d2c962 -->|calls| 950f4013_630e_2f38_fc15_c3d5c88bd8bd
  5a05bcfb_9993_f36f_e54b_1f28b5d2c962["getApiVersion()"]
  950f4013_630e_2f38_fc15_c3d5c88bd8bd -->|calls| 5a05bcfb_9993_f36f_e54b_1f28b5d2c962
  fe17330d_1d3c_c6fb_1bd5_6cb12e48b7be["http()"]
  950f4013_630e_2f38_fc15_c3d5c88bd8bd -->|calls| fe17330d_1d3c_c6fb_1bd5_6cb12e48b7be
  style 950f4013_630e_2f38_fc15_c3d5c88bd8bd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/DockerApi.java lines 546–564

		ApiVersion getApiVersion() {
			try {
				URI uri = new URIBuilder("/_ping").build();
				try (Response response = http().head(uri)) {
					Header apiVersionHeader = response.getHeader(API_VERSION_HEADER_NAME);
					if (apiVersionHeader != null) {
						return ApiVersion.parse(apiVersionHeader.getValue());
					}
				}
				catch (Exception ex) {
					this.log.log("Warning: Failed to determine Docker API version: " + ex.getMessage());
					// fall through to return default value
				}
				return UNKNOWN_API_VERSION;
			}
			catch (URISyntaxException ex) {
				throw new IllegalStateException(ex);
			}
		}

Subdomains

Called By

Frequently Asked Questions

What does getApiVersion() do?
getApiVersion() is a function in the spring-boot codebase.
What does getApiVersion() call?
getApiVersion() calls 2 function(s): getApiVersion, http.
What calls getApiVersion()?
getApiVersion() is called by 1 function(s): getApiVersion.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free