Docker Engine API (original) (raw)

Docker provides an API for interacting with the Docker daemon (called the Docker Engine API), as well as SDKs for Go and Python. The SDKs allow you to efficiently build and scale Docker apps and solutions. If Go or Python don't work for you, you can use the Docker Engine API directly.

For information about Docker Engine SDKs, see Develop with Docker Engine SDKs.

The Docker Engine API is a RESTful API accessed by an HTTP client such as wget orcurl, or the HTTP library which is part of most modern programming languages.

You canview the reference for the latest version of the APIorchoose a specific version.

The version of the Docker Engine API you should use depends upon the version of your Docker daemon and Docker client.

A given version of the Docker Engine SDK supports a specific version of the Docker Engine API, as well as all earlier versions. If breaking changes occur, they are documented prominently.

The Docker daemon and client don't necessarily need to be the same version at all times. However, keep the following in mind.

A new version of the API is released when new features are added. The Docker API is backward-compatible, so you don't need to update code that uses the API unless you need to take advantage of new features.

To see the highest and lowest version of the API your Docker daemon and client support, use docker version:

You can specify the API version to use in any of the following ways:

Minimum API version

The Docker Engine API server and client support API-version negotiation. If a client connects to an older version of the Docker Engine, it negotiates the highest version of the API supported by both the client and daemon, downgrading to an older version of the API if necessary.

When downgrading to an older API version, features introduced in later API versions are disabled, and API requests and responses are adjusted for the API version negotiated.

API version negotiation allows tools that have not been upgraded yet to the latest API version specification to communicate with newer Docker Engines (and vice versa), but compatibility is "best effort"; while Docker strives to provide full compatibility, some functionality may not be available.

API version matrix

Deprecated API versions

API versions before v1.40 are deprecated and no longer supported by current versions of the Docker Engine and CLI. You can find archived documentation for deprecated versions of the API in the code repository on GitHub: