github.com/sld880311/docker@v0.0.0-20200524143708-d5593973a475/docs/api/version-history.md (about) 1 --- 2 title: "Engine API version history" 3 description: "Documentation of changes that have been made to Engine API." 4 keywords: "API, Docker, rcli, REST, documentation" 5 --- 6 7 <!-- This file is maintained within the docker/docker Github 8 repository at https://github.com/docker/docker/. Make all 9 pull requests against that repo. If you see this file in 10 another repository, consider it read-only there, as it will 11 periodically be overwritten by the definitive file. Pull 12 requests which include edits to this file in other repositories 13 will be rejected. 14 --> 15 16 ## v1.27 API changes 17 18 [Docker Engine API v1.27](https://docs.docker.com/engine/api/v1.27/) documentation 19 20 * `GET /containers/(id or name)/stats` now includes an `online_cpus` field in both `precpu_stats` and `cpu_stats`. If this field is `nil` then for compatibility with older daemons the length of the corresponding `cpu_usage.percpu_usage` array should be used. 21 22 ## v1.26 API changes 23 24 [Docker Engine API v1.26](https://docs.docker.com/engine/api/v1.26/) documentation 25 26 * `POST /plugins/(plugin name)/upgrade` upgrade a plugin. 27 28 ## v1.25 API changes 29 30 [Docker Engine API v1.25](https://docs.docker.com/engine/api/v1.25/) documentation 31 32 * The API version is now required in all API calls. Instead of just requesting, for example, the URL `/containers/json`, you must now request `/v1.25/containers/json`. 33 * `GET /version` now returns `MinAPIVersion`. 34 * `POST /build` accepts `networkmode` parameter to specify network used during build. 35 * `GET /images/(name)/json` now returns `OsVersion` if populated 36 * `GET /info` now returns `Isolation`. 37 * `POST /containers/create` now takes `AutoRemove` in HostConfig, to enable auto-removal of the container on daemon side when the container's process exits. 38 * `GET /containers/json` and `GET /containers/(id or name)/json` now return `"removing"` as a value for the `State.Status` field if the container is being removed. Previously, "exited" was returned as status. 39 * `GET /containers/json` now accepts `removing` as a valid value for the `status` filter. 40 * `GET /containers/json` now supports filtering containers by `health` status. 41 * `DELETE /volumes/(name)` now accepts a `force` query parameter to force removal of volumes that were already removed out of band by the volume driver plugin. 42 * `POST /containers/create/` and `POST /containers/(name)/update` now validates restart policies. 43 * `POST /containers/create` now validates IPAMConfig in NetworkingConfig, and returns error for invalid IPv4 and IPv6 addresses (`--ip` and `--ip6` in `docker create/run`). 44 * `POST /containers/create` now takes a `Mounts` field in `HostConfig` which replaces `Binds`, `Volumes`, and `Tmpfs`. *note*: `Binds`, `Volumes`, and `Tmpfs` are still available and can be combined with `Mounts`. 45 * `POST /build` now performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. Note that this change is _unversioned_ and applied to all API versions. 46 * `POST /build` accepts `cachefrom` parameter to specify images used for build cache. 47 * `GET /networks/` endpoint now correctly returns a list of *all* networks, 48 instead of the default network if a trailing slash is provided, but no `name` 49 or `id`. 50 * `DELETE /containers/(name)` endpoint now returns an error of `removal of container name is already in progress` with status code of 400, when container name is in a state of removal in progress. 51 * `GET /containers/json` now supports a `is-task` filter to filter 52 containers that are tasks (part of a service in swarm mode). 53 * `POST /containers/create` now takes `StopTimeout` field. 54 * `POST /services/create` and `POST /services/(id or name)/update` now accept `Monitor` and `MaxFailureRatio` parameters, which control the response to failures during service updates. 55 * `POST /services/(id or name)/update` now accepts a `ForceUpdate` parameter inside the `TaskTemplate`, which causes the service to be updated even if there are no changes which would ordinarily trigger an update. 56 * `POST /services/create` and `POST /services/(id or name)/update` now return a `Warnings` array. 57 * `GET /networks/(name)` now returns field `Created` in response to show network created time. 58 * `POST /containers/(id or name)/exec` now accepts an `Env` field, which holds a list of environment variables to be set in the context of the command execution. 59 * `GET /volumes`, `GET /volumes/(name)`, and `POST /volumes/create` now return the `Options` field which holds the driver specific options to use for when creating the volume. 60 * `GET /exec/(id)/json` now returns `Pid`, which is the system pid for the exec'd process. 61 * `POST /containers/prune` prunes stopped containers. 62 * `POST /images/prune` prunes unused images. 63 * `POST /volumes/prune` prunes unused volumes. 64 * `POST /networks/prune` prunes unused networks. 65 * Every API response now includes a `Docker-Experimental` header specifying if experimental features are enabled (value can be `true` or `false`). 66 * Every API response now includes a `API-Version` header specifying the default API version of the server. 67 * The `hostConfig` option now accepts the fields `CpuRealtimePeriod` and `CpuRtRuntime` to allocate cpu runtime to rt tasks when `CONFIG_RT_GROUP_SCHED` is enabled in the kernel. 68 * The `SecurityOptions` field within the `GET /info` response now includes `userns` if user namespaces are enabled in the daemon. 69 * `GET /nodes` and `GET /node/(id or name)` now return `Addr` as part of a node's `Status`, which is the address that that node connects to the manager from. 70 * The `HostConfig` field now includes `NanoCPUs` that represents CPU quota in units of 10<sup>-9</sup> CPUs. 71 * `GET /info` now returns more structured information about security options. 72 * The `HostConfig` field now includes `CpuCount` that represents the number of CPUs available for execution by the container. Windows daemon only. 73 * `POST /services/create` and `POST /services/(id or name)/update` now accept the `TTY` parameter, which allocate a pseudo-TTY in container. 74 * `POST /services/create` and `POST /services/(id or name)/update` now accept the `DNSConfig` parameter, which specifies DNS related configurations in resolver configuration file (resolv.conf) through `Nameservers`, `Search`, and `Options`. 75 * `GET /networks/(id or name)` now includes IP and name of all peers nodes for swarm mode overlay networks. 76 * `GET /plugins` list plugins. 77 * `POST /plugins/pull?name=<plugin name>` pulls a plugin. 78 * `GET /plugins/(plugin name)` inspect a plugin. 79 * `POST /plugins/(plugin name)/set` configure a plugin. 80 * `POST /plugins/(plugin name)/enable` enable a plugin. 81 * `POST /plugins/(plugin name)/disable` disable a plugin. 82 * `POST /plugins/(plugin name)/push` push a plugin. 83 * `POST /plugins/create?name=(plugin name)` create a plugin. 84 * `DELETE /plugins/(plugin name)` delete a plugin. 85 * `POST /node/(id or name)/update` now accepts both `id` or `name` to identify the node to update. 86 * `GET /images/json` now support a `reference` filter. 87 * `GET /secrets` returns information on the secrets. 88 * `POST /secrets/create` creates a secret. 89 * `DELETE /secrets/{id}` removes the secret `id`. 90 * `GET /secrets/{id}` returns information on the secret `id`. 91 * `POST /secrets/{id}/update` updates the secret `id`. 92 * `POST /services/(id or name)/update` now accepts service name or prefix of service id as a parameter. 93 94 ## v1.24 API changes 95 96 [Docker Engine API v1.24](v1.24.md) documentation 97 98 * `POST /containers/create` now takes `StorageOpt` field. 99 * `GET /info` now returns `SecurityOptions` field, showing if `apparmor`, `seccomp`, or `selinux` is supported. 100 * `GET /info` no longer returns the `ExecutionDriver` property. This property was no longer used after integration 101 with ContainerD in Docker 1.11. 102 * `GET /networks` now supports filtering by `label` and `driver`. 103 * `GET /containers/json` now supports filtering containers by `network` name or id. 104 * `POST /containers/create` now takes `IOMaximumBandwidth` and `IOMaximumIOps` fields. Windows daemon only. 105 * `POST /containers/create` now returns an HTTP 400 "bad parameter" message 106 if no command is specified (instead of an HTTP 500 "server error") 107 * `GET /images/search` now takes a `filters` query parameter. 108 * `GET /events` now supports a `reload` event that is emitted when the daemon configuration is reloaded. 109 * `GET /events` now supports filtering by daemon name or ID. 110 * `GET /events` now supports a `detach` event that is emitted on detaching from container process. 111 * `GET /events` now supports an `exec_detach ` event that is emitted on detaching from exec process. 112 * `GET /images/json` now supports filters `since` and `before`. 113 * `POST /containers/(id or name)/start` no longer accepts a `HostConfig`. 114 * `POST /images/(name)/tag` no longer has a `force` query parameter. 115 * `GET /images/search` now supports maximum returned search results `limit`. 116 * `POST /containers/{name:.*}/copy` is now removed and errors out starting from this API version. 117 * API errors are now returned as JSON instead of plain text. 118 * `POST /containers/create` and `POST /containers/(id)/start` allow you to configure kernel parameters (sysctls) for use in the container. 119 * `POST /containers/<container ID>/exec` and `POST /exec/<exec ID>/start` 120 no longer expects a "Container" field to be present. This property was not used 121 and is no longer sent by the docker client. 122 * `POST /containers/create/` now validates the hostname (should be a valid RFC 1123 hostname). 123 * `POST /containers/create/` `HostConfig.PidMode` field now accepts `container:<name|id>`, 124 to have the container join the PID namespace of an existing container. 125 126 ## v1.23 API changes 127 128 [Docker Engine API v1.23](v1.23.md) documentation 129 130 * `GET /containers/json` returns the state of the container, one of `created`, `restarting`, `running`, `paused`, `exited` or `dead`. 131 * `GET /containers/json` returns the mount points for the container. 132 * `GET /networks/(name)` now returns an `Internal` field showing whether the network is internal or not. 133 * `GET /networks/(name)` now returns an `EnableIPv6` field showing whether the network has ipv6 enabled or not. 134 * `POST /containers/(name)/update` now supports updating container's restart policy. 135 * `POST /networks/create` now supports enabling ipv6 on the network by setting the `EnableIPv6` field (doing this with a label will no longer work). 136 * `GET /info` now returns `CgroupDriver` field showing what cgroup driver the daemon is using; `cgroupfs` or `systemd`. 137 * `GET /info` now returns `KernelMemory` field, showing if "kernel memory limit" is supported. 138 * `POST /containers/create` now takes `PidsLimit` field, if the kernel is >= 4.3 and the pids cgroup is supported. 139 * `GET /containers/(id or name)/stats` now returns `pids_stats`, if the kernel is >= 4.3 and the pids cgroup is supported. 140 * `POST /containers/create` now allows you to override usernamespaces remapping and use privileged options for the container. 141 * `POST /containers/create` now allows specifying `nocopy` for named volumes, which disables automatic copying from the container path to the volume. 142 * `POST /auth` now returns an `IdentityToken` when supported by a registry. 143 * `POST /containers/create` with both `Hostname` and `Domainname` fields specified will result in the container's hostname being set to `Hostname`, rather than `Hostname.Domainname`. 144 * `GET /volumes` now supports more filters, new added filters are `name` and `driver`. 145 * `GET /containers/(id or name)/logs` now accepts a `details` query parameter to stream the extra attributes that were provided to the containers `LogOpts`, such as environment variables and labels, with the logs. 146 * `POST /images/load` now returns progress information as a JSON stream, and has a `quiet` query parameter to suppress progress details. 147 148 ## v1.22 API changes 149 150 [Docker Engine API v1.22](v1.22.md) documentation 151 152 * `POST /container/(name)/update` updates the resources of a container. 153 * `GET /containers/json` supports filter `isolation` on Windows. 154 * `GET /containers/json` now returns the list of networks of containers. 155 * `GET /info` Now returns `Architecture` and `OSType` fields, providing information 156 about the host architecture and operating system type that the daemon runs on. 157 * `GET /networks/(name)` now returns a `Name` field for each container attached to the network. 158 * `GET /version` now returns the `BuildTime` field in RFC3339Nano format to make it 159 consistent with other date/time values returned by the API. 160 * `AuthConfig` now supports a `registrytoken` for token based authentication 161 * `POST /containers/create` now has a 4M minimum value limit for `HostConfig.KernelMemory` 162 * Pushes initiated with `POST /images/(name)/push` and pulls initiated with `POST /images/create` 163 will be cancelled if the HTTP connection making the API request is closed before 164 the push or pull completes. 165 * `POST /containers/create` now allows you to set a read/write rate limit for a 166 device (in bytes per second or IO per second). 167 * `GET /networks` now supports filtering by `name`, `id` and `type`. 168 * `POST /containers/create` now allows you to set the static IPv4 and/or IPv6 address for the container. 169 * `POST /networks/(id)/connect` now allows you to set the static IPv4 and/or IPv6 address for the container. 170 * `GET /info` now includes the number of containers running, stopped, and paused. 171 * `POST /networks/create` now supports restricting external access to the network by setting the `Internal` field. 172 * `POST /networks/(id)/disconnect` now includes a `Force` option to forcefully disconnect a container from network 173 * `GET /containers/(id)/json` now returns the `NetworkID` of containers. 174 * `POST /networks/create` Now supports an options field in the IPAM config that provides options 175 for custom IPAM plugins. 176 * `GET /networks/{network-id}` Now returns IPAM config options for custom IPAM plugins if any 177 are available. 178 * `GET /networks/<network-id>` now returns subnets info for user-defined networks. 179 * `GET /info` can now return a `SystemStatus` field useful for returning additional information about applications 180 that are built on top of engine. 181 182 ## v1.21 API changes 183 184 [Docker Engine API v1.21](v1.21.md) documentation 185 186 * `GET /volumes` lists volumes from all volume drivers. 187 * `POST /volumes/create` to create a volume. 188 * `GET /volumes/(name)` get low-level information about a volume. 189 * `DELETE /volumes/(name)` remove a volume with the specified name. 190 * `VolumeDriver` was moved from `config` to `HostConfig` to make the configuration portable. 191 * `GET /images/(name)/json` now returns information about an image's `RepoTags` and `RepoDigests`. 192 * The `config` option now accepts the field `StopSignal`, which specifies the signal to use to kill a container. 193 * `GET /containers/(id)/stats` will return networking information respectively for each interface. 194 * The `HostConfig` option now includes the `DnsOptions` field to configure the container's DNS options. 195 * `POST /build` now optionally takes a serialized map of build-time variables. 196 * `GET /events` now includes a `timenano` field, in addition to the existing `time` field. 197 * `GET /events` now supports filtering by image and container labels. 198 * `GET /info` now lists engine version information and return the information of `CPUShares` and `Cpuset`. 199 * `GET /containers/json` will return `ImageID` of the image used by container. 200 * `POST /exec/(name)/start` will now return an HTTP 409 when the container is either stopped or paused. 201 * `POST /containers/create` now takes `KernelMemory` in HostConfig to specify kernel memory limit. 202 * `GET /containers/(name)/json` now accepts a `size` parameter. Setting this parameter to '1' returns container size information in the `SizeRw` and `SizeRootFs` fields. 203 * `GET /containers/(name)/json` now returns a `NetworkSettings.Networks` field, 204 detailing network settings per network. This field deprecates the 205 `NetworkSettings.Gateway`, `NetworkSettings.IPAddress`, 206 `NetworkSettings.IPPrefixLen`, and `NetworkSettings.MacAddress` fields, which 207 are still returned for backward-compatibility, but will be removed in a future version. 208 * `GET /exec/(id)/json` now returns a `NetworkSettings.Networks` field, 209 detailing networksettings per network. This field deprecates the 210 `NetworkSettings.Gateway`, `NetworkSettings.IPAddress`, 211 `NetworkSettings.IPPrefixLen`, and `NetworkSettings.MacAddress` fields, which 212 are still returned for backward-compatibility, but will be removed in a future version. 213 * The `HostConfig` option now includes the `OomScoreAdj` field for adjusting the 214 badness heuristic. This heuristic selects which processes the OOM killer kills 215 under out-of-memory conditions. 216 217 ## v1.20 API changes 218 219 [Docker Engine API v1.20](v1.20.md) documentation 220 221 * `GET /containers/(id)/archive` get an archive of filesystem content from a container. 222 * `PUT /containers/(id)/archive` upload an archive of content to be extracted to 223 an existing directory inside a container's filesystem. 224 * `POST /containers/(id)/copy` is deprecated in favor of the above `archive` 225 endpoint which can be used to download files and directories from a container. 226 * The `hostConfig` option now accepts the field `GroupAdd`, which specifies a 227 list of additional groups that the container process will run as. 228 229 ## v1.19 API changes 230 231 [Docker Engine API v1.19](v1.19.md) documentation 232 233 * When the daemon detects a version mismatch with the client, usually when 234 the client is newer than the daemon, an HTTP 400 is now returned instead 235 of a 404. 236 * `GET /containers/(id)/stats` now accepts `stream` bool to get only one set of stats and disconnect. 237 * `GET /containers/(id)/logs` now accepts a `since` timestamp parameter. 238 * `GET /info` The fields `Debug`, `IPv4Forwarding`, `MemoryLimit`, and 239 `SwapLimit` are now returned as boolean instead of as an int. In addition, the 240 end point now returns the new boolean fields `CpuCfsPeriod`, `CpuCfsQuota`, and 241 `OomKillDisable`. 242 * The `hostConfig` option now accepts the fields `CpuPeriod` and `CpuQuota` 243 * `POST /build` accepts `cpuperiod` and `cpuquota` options 244 245 ## v1.18 API changes 246 247 [Docker Engine API v1.18](v1.18.md) documentation 248 249 * `GET /version` now returns `Os`, `Arch` and `KernelVersion`. 250 * `POST /containers/create` and `POST /containers/(id)/start`allow you to set ulimit settings for use in the container. 251 * `GET /info` now returns `SystemTime`, `HttpProxy`,`HttpsProxy` and `NoProxy`. 252 * `GET /images/json` added a `RepoDigests` field to include image digest information. 253 * `POST /build` can now set resource constraints for all containers created for the build. 254 * `CgroupParent` can be passed in the host config to setup container cgroups under a specific cgroup. 255 * `POST /build` closing the HTTP request cancels the build 256 * `POST /containers/(id)/exec` includes `Warnings` field to response.