Signed-off-by: Nishant Totla <nishanttotla@gmail.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: a89dd03c26885bb69450b28f10ef002cde0dadb7 Component: engine
23 KiB
23 KiB
title, description, keywords
| title | description | keywords |
|---|---|---|
| Engine API version history | Documentation of changes that have been made to Engine API. | API, Docker, rcli, REST, documentation |
v1.30 API changes
Docker Engine API v1.30 documentation
GET /infonow returns the list of supported logging drivers, including plugins.GET /infoandGET /swarmnow returns the cluster-wide swarm CA info if the node is in a swarm: the cluster root CA certificate, and the cluster TLS leaf certificate issuer's subject and public key.POST /build/now (when not silent) produces anAuxmessage in the JSON output stream with payloadtypes.BuildResultfor each image produced. The final such message will reference the image resulting from the build.GET /nodesandGET /nodes/{id}now returns additional information about swarm TLS info if the node is part of a swarm: the trusted root CA, and the issuer's subject and public key.GET /distribution/(name)/jsonis a new endpoint that returns a JSON output stream with payloadtypes.DistributionInspectfor an image name. It includes a descriptor with the digest, and supported platforms retrieved from directly contacting the registry.
v1.29 API changes
Docker Engine API v1.29 documentation
DELETE /networks/(name)now allows to remove the ingress network, the one used to provide the routing-mesh.POST /networks/createnow supports creating the ingress network, by specifying anIngressboolean field. As of now this is supported only when using the overlay network driver.GET /networks/(name)now returns anIngressfield showing whether the network is the ingress one.GET /networks/now supports ascopefilter to filter networks based on the network mode (swarm,global, orlocal).POST /containers/create,POST /service/createandPOST /services/(id or name)/updatenow takes the fieldStartPeriodas a part of theHealthConfigallowing for specification of a period during which the container should not be considered unhealthy even if health checks do not pass.GET /services/(id)now accepts aninsertDefaultsquery-parameter to merge default values into the service inspect output.POST /containers/prune,POST /images/prune,POST /volumes/prune, andPOST /networks/prunenow support alabelfilter to filter containers, images, volumes, or networks based on the label. The format of the label filter could belabel=<key>/label=<key>=<value>to remove those with the specified labels, orlabel!=<key>/label!=<key>=<value>to remove those without the specified labels.
v1.28 API changes
Docker Engine API v1.28 documentation
POST /containers/createnow includes aConsistencyfield to specify the consistency level for eachMount, with possible valuesdefault,consistent,cached, ordelegated.GET /containers/createnow takes aDeviceCgroupRulesfield inHostConfigallowing to set custom device cgroup rules for the created container.- Optional query parameter
verboseforGET /networks/(id or name)will now list all services with all the tasks, including the non-local tasks on the given network. GET /containers/(id or name)/attach/wsnow returns WebSocket in binary frame format for API version >= v1.28, and returns WebSocket in text frame format for API version< v1.28, for the purpose of backward-compatibility.GET /networksis optimised only to return list of all networks and network specific information. List of all containers attached to a specific network is removed from this API and is only available using the network specific `GET /networks/{network-id}.GET /containers/jsonnow supportspublishandexposefilters to filter containers that expose or publish certain ports.POST /services/createandPOST /services/(id or name)/updatenow accept theReadOnlyparameter, which mounts the container's root filesystem as read only.POST /buildnow acceptsextrahostsparameter to specify a host to ip mapping to use during the build.POST /services/createandPOST /services/(id or name)/updatenow accept arollbackvalue forFailureAction.POST /services/createandPOST /services/(id or name)/updatenow accept an optionalRollbackConfigobject which specifies rollback options.GET /servicesnow supports amodefilter to filter services based on the service mode (eitherglobalorreplicated).POST /containers/(name)/updatenow supports updatingNanoCPUsthat represents CPU quota in units of 10-9 CPUs.
v1.27 API changes
Docker Engine API v1.27 documentation
GET /containers/(id or name)/statsnow includes anonline_cpusfield in bothprecpu_statsandcpu_stats. If this field isnilthen for compatibility with older daemons the length of the correspondingcpu_usage.percpu_usagearray should be used.
v1.26 API changes
Docker Engine API v1.26 documentation
POST /plugins/(plugin name)/upgradeupgrade a plugin.
v1.25 API changes
Docker Engine API v1.25 documentation
- 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. GET /versionnow returnsMinAPIVersion.POST /buildacceptsnetworkmodeparameter to specify network used during build.GET /images/(name)/jsonnow returnsOsVersionif populatedGET /infonow returnsIsolation.POST /containers/createnow takesAutoRemovein HostConfig, to enable auto-removal of the container on daemon side when the container's process exits.GET /containers/jsonandGET /containers/(id or name)/jsonnow return"removing"as a value for theState.Statusfield if the container is being removed. Previously, "exited" was returned as status.GET /containers/jsonnow acceptsremovingas a valid value for thestatusfilter.GET /containers/jsonnow supports filtering containers byhealthstatus.DELETE /volumes/(name)now accepts aforcequery parameter to force removal of volumes that were already removed out of band by the volume driver plugin.POST /containers/create/andPOST /containers/(name)/updatenow validates restart policies.POST /containers/createnow validates IPAMConfig in NetworkingConfig, and returns error for invalid IPv4 and IPv6 addresses (--ipand--ip6indocker create/run).POST /containers/createnow takes aMountsfield inHostConfigwhich replacesBinds,Volumes, andTmpfs. note:Binds,Volumes, andTmpfsare still available and can be combined withMounts.POST /buildnow performs a preliminary validation of theDockerfilebefore starting the build, and returns an error if the syntax is incorrect. Note that this change is unversioned and applied to all API versions.POST /buildacceptscachefromparameter to specify images used for build cache.GET /networks/endpoint now correctly returns a list of all networks, instead of the default network if a trailing slash is provided, but nonameorid.DELETE /containers/(name)endpoint now returns an error ofremoval of container name is already in progresswith status code of 400, when container name is in a state of removal in progress.GET /containers/jsonnow supports ais-taskfilter to filter containers that are tasks (part of a service in swarm mode).POST /containers/createnow takesStopTimeoutfield.POST /services/createandPOST /services/(id or name)/updatenow acceptMonitorandMaxFailureRatioparameters, which control the response to failures during service updates.POST /services/(id or name)/updatenow accepts aForceUpdateparameter inside theTaskTemplate, which causes the service to be updated even if there are no changes which would ordinarily trigger an update.POST /services/createandPOST /services/(id or name)/updatenow return aWarningsarray.GET /networks/(name)now returns fieldCreatedin response to show network created time.POST /containers/(id or name)/execnow accepts anEnvfield, which holds a list of environment variables to be set in the context of the command execution.GET /volumes,GET /volumes/(name), andPOST /volumes/createnow return theOptionsfield which holds the driver specific options to use for when creating the volume.GET /exec/(id)/jsonnow returnsPid, which is the system pid for the exec'd process.POST /containers/pruneprunes stopped containers.POST /images/pruneprunes unused images.POST /volumes/pruneprunes unused volumes.POST /networks/pruneprunes unused networks.- Every API response now includes a
Docker-Experimentalheader specifying if experimental features are enabled (value can betrueorfalse). - Every API response now includes a
API-Versionheader specifying the default API version of the server. - The
hostConfigoption now accepts the fieldsCpuRealtimePeriodandCpuRtRuntimeto allocate cpu runtime to rt tasks whenCONFIG_RT_GROUP_SCHEDis enabled in the kernel. - The
SecurityOptionsfield within theGET /inforesponse now includesusernsif user namespaces are enabled in the daemon. GET /nodesandGET /node/(id or name)now returnAddras part of a node'sStatus, which is the address that that node connects to the manager from.- The
HostConfigfield now includesNanoCPUsthat represents CPU quota in units of 10-9 CPUs. GET /infonow returns more structured information about security options.- The
HostConfigfield now includesCpuCountthat represents the number of CPUs available for execution by the container. Windows daemon only. POST /services/createandPOST /services/(id or name)/updatenow accept theTTYparameter, which allocate a pseudo-TTY in container.POST /services/createandPOST /services/(id or name)/updatenow accept theDNSConfigparameter, which specifies DNS related configurations in resolver configuration file (resolv.conf) throughNameservers,Search, andOptions.GET /networks/(id or name)now includes IP and name of all peers nodes for swarm mode overlay networks.GET /pluginslist plugins.POST /plugins/pull?name=<plugin name>pulls a plugin.GET /plugins/(plugin name)inspect a plugin.POST /plugins/(plugin name)/setconfigure a plugin.POST /plugins/(plugin name)/enableenable a plugin.POST /plugins/(plugin name)/disabledisable a plugin.POST /plugins/(plugin name)/pushpush a plugin.POST /plugins/create?name=(plugin name)create a plugin.DELETE /plugins/(plugin name)delete a plugin.POST /node/(id or name)/updatenow accepts bothidornameto identify the node to update.GET /images/jsonnow support areferencefilter.GET /secretsreturns information on the secrets.POST /secrets/createcreates a secret.DELETE /secrets/{id}removes the secretid.GET /secrets/{id}returns information on the secretid.POST /secrets/{id}/updateupdates the secretid.POST /services/(id or name)/updatenow accepts service name or prefix of service id as a parameter.POST /containers/createadded 2 built-in log-opts that work on all logging drivers,mode(blocking|non-blocking), andmax-buffer-size(e.g.2m) which enables a non-blocking log buffer.
v1.24 API changes
Docker Engine API v1.24 documentation
POST /containers/createnow takesStorageOptfield.GET /infonow returnsSecurityOptionsfield, showing ifapparmor,seccomp, orselinuxis supported.GET /infono longer returns theExecutionDriverproperty. This property was no longer used after integration with ContainerD in Docker 1.11.GET /networksnow supports filtering bylabelanddriver.GET /containers/jsonnow supports filtering containers bynetworkname or id.POST /containers/createnow takesIOMaximumBandwidthandIOMaximumIOpsfields. Windows daemon only.POST /containers/createnow returns an HTTP 400 "bad parameter" message if no command is specified (instead of an HTTP 500 "server error")GET /images/searchnow takes afiltersquery parameter.GET /eventsnow supports areloadevent that is emitted when the daemon configuration is reloaded.GET /eventsnow supports filtering by daemon name or ID.GET /eventsnow supports adetachevent that is emitted on detaching from container process.GET /eventsnow supports anexec_detachevent that is emitted on detaching from exec process.GET /images/jsonnow supports filterssinceandbefore.POST /containers/(id or name)/startno longer accepts aHostConfig.POST /images/(name)/tagno longer has aforcequery parameter.GET /images/searchnow supports maximum returned search resultslimit.POST /containers/{name:.*}/copyis now removed and errors out starting from this API version.- API errors are now returned as JSON instead of plain text.
POST /containers/createandPOST /containers/(id)/startallow you to configure kernel parameters (sysctls) for use in the container.POST /containers/<container ID>/execandPOST /exec/<exec ID>/startno longer expects a "Container" field to be present. This property was not used and is no longer sent by the docker client.POST /containers/create/now validates the hostname (should be a valid RFC 1123 hostname).POST /containers/create/HostConfig.PidModefield now acceptscontainer:<name|id>, to have the container join the PID namespace of an existing container.
v1.23 API changes
Docker Engine API v1.23 documentation
GET /containers/jsonreturns the state of the container, one ofcreated,restarting,running,paused,exitedordead.GET /containers/jsonreturns the mount points for the container.GET /networks/(name)now returns anInternalfield showing whether the network is internal or not.GET /networks/(name)now returns anEnableIPv6field showing whether the network has ipv6 enabled or not.POST /containers/(name)/updatenow supports updating container's restart policy.POST /networks/createnow supports enabling ipv6 on the network by setting theEnableIPv6field (doing this with a label will no longer work).GET /infonow returnsCgroupDriverfield showing what cgroup driver the daemon is using;cgroupfsorsystemd.GET /infonow returnsKernelMemoryfield, showing if "kernel memory limit" is supported.POST /containers/createnow takesPidsLimitfield, if the kernel is >= 4.3 and the pids cgroup is supported.GET /containers/(id or name)/statsnow returnspids_stats, if the kernel is >= 4.3 and the pids cgroup is supported.POST /containers/createnow allows you to override usernamespaces remapping and use privileged options for the container.POST /containers/createnow allows specifyingnocopyfor named volumes, which disables automatic copying from the container path to the volume.POST /authnow returns anIdentityTokenwhen supported by a registry.POST /containers/createwith bothHostnameandDomainnamefields specified will result in the container's hostname being set toHostname, rather thanHostname.Domainname.GET /volumesnow supports more filters, new added filters arenameanddriver.GET /containers/(id or name)/logsnow accepts adetailsquery parameter to stream the extra attributes that were provided to the containersLogOpts, such as environment variables and labels, with the logs.POST /images/loadnow returns progress information as a JSON stream, and has aquietquery parameter to suppress progress details.
v1.22 API changes
Docker Engine API v1.22 documentation
POST /container/(name)/updateupdates the resources of a container.GET /containers/jsonsupports filterisolationon Windows.GET /containers/jsonnow returns the list of networks of containers.GET /infoNow returnsArchitectureandOSTypefields, providing information about the host architecture and operating system type that the daemon runs on.GET /networks/(name)now returns aNamefield for each container attached to the network.GET /versionnow returns theBuildTimefield in RFC3339Nano format to make it consistent with other date/time values returned by the API.AuthConfignow supports aregistrytokenfor token based authenticationPOST /containers/createnow has a 4M minimum value limit forHostConfig.KernelMemory- Pushes initiated with
POST /images/(name)/pushand pulls initiated withPOST /images/createwill be cancelled if the HTTP connection making the API request is closed before the push or pull completes. POST /containers/createnow allows you to set a read/write rate limit for a device (in bytes per second or IO per second).GET /networksnow supports filtering byname,idandtype.POST /containers/createnow allows you to set the static IPv4 and/or IPv6 address for the container.POST /networks/(id)/connectnow allows you to set the static IPv4 and/or IPv6 address for the container.GET /infonow includes the number of containers running, stopped, and paused.POST /networks/createnow supports restricting external access to the network by setting theInternalfield.POST /networks/(id)/disconnectnow includes aForceoption to forcefully disconnect a container from networkGET /containers/(id)/jsonnow returns theNetworkIDof containers.POST /networks/createNow supports an options field in the IPAM config that provides options for custom IPAM plugins.GET /networks/{network-id}Now returns IPAM config options for custom IPAM plugins if any are available.GET /networks/<network-id>now returns subnets info for user-defined networks.GET /infocan now return aSystemStatusfield useful for returning additional information about applications that are built on top of engine.
v1.21 API changes
Docker Engine API v1.21 documentation
GET /volumeslists volumes from all volume drivers.POST /volumes/createto create a volume.GET /volumes/(name)get low-level information about a volume.DELETE /volumes/(name)remove a volume with the specified name.VolumeDriverwas moved fromconfigtoHostConfigto make the configuration portable.GET /images/(name)/jsonnow returns information about an image'sRepoTagsandRepoDigests.- The
configoption now accepts the fieldStopSignal, which specifies the signal to use to kill a container. GET /containers/(id)/statswill return networking information respectively for each interface.- The
HostConfigoption now includes theDnsOptionsfield to configure the container's DNS options. POST /buildnow optionally takes a serialized map of build-time variables.GET /eventsnow includes atimenanofield, in addition to the existingtimefield.GET /eventsnow supports filtering by image and container labels.GET /infonow lists engine version information and return the information ofCPUSharesandCpuset.GET /containers/jsonwill returnImageIDof the image used by container.POST /exec/(name)/startwill now return an HTTP 409 when the container is either stopped or paused.POST /containers/createnow takesKernelMemoryin HostConfig to specify kernel memory limit.GET /containers/(name)/jsonnow accepts asizeparameter. Setting this parameter to '1' returns container size information in theSizeRwandSizeRootFsfields.GET /containers/(name)/jsonnow returns aNetworkSettings.Networksfield, detailing network settings per network. This field deprecates theNetworkSettings.Gateway,NetworkSettings.IPAddress,NetworkSettings.IPPrefixLen, andNetworkSettings.MacAddressfields, which are still returned for backward-compatibility, but will be removed in a future version.GET /exec/(id)/jsonnow returns aNetworkSettings.Networksfield, detailing networksettings per network. This field deprecates theNetworkSettings.Gateway,NetworkSettings.IPAddress,NetworkSettings.IPPrefixLen, andNetworkSettings.MacAddressfields, which are still returned for backward-compatibility, but will be removed in a future version.- The
HostConfigoption now includes theOomScoreAdjfield for adjusting the badness heuristic. This heuristic selects which processes the OOM killer kills under out-of-memory conditions.
v1.20 API changes
Docker Engine API v1.20 documentation
GET /containers/(id)/archiveget an archive of filesystem content from a container.PUT /containers/(id)/archiveupload an archive of content to be extracted to an existing directory inside a container's filesystem.POST /containers/(id)/copyis deprecated in favor of the abovearchiveendpoint which can be used to download files and directories from a container.- The
hostConfigoption now accepts the fieldGroupAdd, which specifies a list of additional groups that the container process will run as.
v1.19 API changes
Docker Engine API v1.19 documentation
- When the daemon detects a version mismatch with the client, usually when the client is newer than the daemon, an HTTP 400 is now returned instead of a 404.
GET /containers/(id)/statsnow acceptsstreambool to get only one set of stats and disconnect.GET /containers/(id)/logsnow accepts asincetimestamp parameter.GET /infoThe fieldsDebug,IPv4Forwarding,MemoryLimit, andSwapLimitare now returned as boolean instead of as an int. In addition, the end point now returns the new boolean fieldsCpuCfsPeriod,CpuCfsQuota, andOomKillDisable.- The
hostConfigoption now accepts the fieldsCpuPeriodandCpuQuota POST /buildacceptscpuperiodandcpuquotaoptions
v1.18 API changes
Docker Engine API v1.18 documentation
GET /versionnow returnsOs,ArchandKernelVersion.POST /containers/createandPOST /containers/(id)/startallow you to set ulimit settings for use in the container.GET /infonow returnsSystemTime,HttpProxy,HttpsProxyandNoProxy.GET /images/jsonadded aRepoDigestsfield to include image digest information.POST /buildcan now set resource constraints for all containers created for the build.CgroupParentcan be passed in the host config to setup container cgroups under a specific cgroup.POST /buildclosing the HTTP request cancels the buildPOST /containers/(id)/execincludesWarningsfield to response.