Skip to content

Commit 993854f

Browse files
committed
Move API reference to new location
See: docker/docs#606 Also: - Add missing redirects to API reference pages - Remove v1.25 and 1.26, because they are being replaced with swagger generated docs. - Remove all other docs which aren't reference material, because this can live in docker/docker.github.io Signed-off-by: Ben Firshman <[email protected]>
1 parent 48c3df0 commit 993854f

19 files changed

+32
-12966
lines changed

docs/reference/api/docker_remote_api_v1.18.md renamed to docs/api/v1.18.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
title: "Remote API v1.18"
33
description: "API Documentation for Docker"
44
keywords: "API, Docker, rcli, REST, documentation"
5+
redirect_from:
6+
- /engine/reference/api/docker_remote_api_v1.18/
7+
- /reference/api/docker_remote_api_v1.18/
58
---
69

710
<!-- This file is maintained within the docker/docker Github

docs/reference/api/docker_remote_api_v1.19.md renamed to docs/api/v1.19.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
title: "Remote API v1.19"
33
description: "API Documentation for Docker"
44
keywords: "API, Docker, rcli, REST, documentation"
5+
redirect_from:
6+
- /engine/reference/api/docker_remote_api_v1.19/
7+
- /reference/api/docker_remote_api_v1.19/
58
---
69

710
<!-- This file is maintained within the docker/docker Github

docs/reference/api/docker_remote_api_v1.20.md renamed to docs/api/v1.20.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
title: "Remote API v1.20"
33
description: "API Documentation for Docker"
44
keywords: "API, Docker, rcli, REST, documentation"
5+
redirect_from:
6+
- /engine/reference/api/docker_remote_api_v1.20/
7+
- /reference/api/docker_remote_api_v1.20/
58
---
69

710
<!-- This file is maintained within the docker/docker Github

docs/reference/api/docker_remote_api_v1.21.md renamed to docs/api/v1.21.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
title: "Remote API v1.21"
33
description: "API Documentation for Docker"
44
keywords: "API, Docker, rcli, REST, documentation"
5+
redirect_from:
6+
- /engine/reference/api/docker_remote_api_v1.21/
7+
- /reference/api/docker_remote_api_v1.21/
58
---
69

710
<!-- This file is maintained within the docker/docker Github

docs/reference/api/docker_remote_api_v1.22.md renamed to docs/api/v1.22.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
title: "Remote API v1.22"
33
description: "API Documentation for Docker"
44
keywords: "API, Docker, rcli, REST, documentation"
5+
redirect_from:
6+
- /engine/reference/api/docker_remote_api_v1.22/
7+
- /reference/api/docker_remote_api_v1.22/
58
---
69

710
<!-- This file is maintained within the docker/docker Github

docs/reference/api/docker_remote_api_v1.23.md renamed to docs/api/v1.23.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
title: "Remote API v1.23"
33
description: "API Documentation for Docker"
44
keywords: "API, Docker, rcli, REST, documentation"
5+
redirect_from:
6+
- /engine/reference/api/docker_remote_api_v1.23/
7+
- /reference/api/docker_remote_api_v1.23/
58
---
69

710
<!-- This file is maintained within the docker/docker Github

docs/reference/api/docker_remote_api_v1.24.md renamed to docs/api/v1.24.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
title: "Remote API v1.24"
33
description: "API Documentation for Docker"
44
keywords: "API, Docker, rcli, REST, documentation"
5+
redirect_from:
6+
- /engine/reference/api/docker_remote_api_v1.24/
7+
- /reference/api/docker_remote_api_v1.24/
58
---
69

710
<!-- This file is maintained within the docker/docker Github
Lines changed: 11 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: "Remote API"
3-
description: "API Documentation for Docker"
2+
title: "Remote API version history"
3+
description: "Documentation of changes that have been made to Engine API."
44
keywords: "API, Docker, rcli, REST, documentation"
55
---
66

@@ -13,137 +13,12 @@ keywords: "API, Docker, rcli, REST, documentation"
1313
will be rejected.
1414
-->
1515

16-
# Docker Remote API
17-
18-
Docker's Remote API uses an open schema model. In this model, unknown
19-
properties in incoming messages are ignored. Client applications need to take
20-
this behavior into account to ensure they do not break when talking to newer
21-
Docker daemons.
22-
23-
The API tends to be REST, but for some complex commands, like attach or pull,
24-
the HTTP connection is hijacked to transport STDOUT, STDIN, and STDERR.
25-
26-
By default the Docker daemon listens on `unix:///var/run/docker.sock` and the
27-
client must have `root` access to interact with the daemon. If a group named
28-
`docker` exists on your system, `docker` applies ownership of the socket to the
29-
group.
30-
31-
To connect to the Docker daemon with cURL you need to use cURL 7.40 or
32-
later, as these versions have the `--unix-socket` flag available. To
33-
run `curl` against the daemon on the default socket, use the
34-
following:
35-
36-
When using cUrl 7.50 or later:
37-
38-
```console
39-
$ curl --unix-socket /var/run/docker.sock http://localhost/v1.25/containers/json
40-
```
41-
42-
When using cURL 7.40, `localhost` must be omitted:
43-
44-
```console
45-
$ curl --unix-socket /var/run/docker.sock http://v1.25/containers/json
46-
```
47-
48-
If you have bound the Docker daemon to a different socket path or TCP
49-
port, you would reference that in your cURL rather than the
50-
default.
51-
52-
## Versioning
53-
54-
It is required to to supply a version to API calls. This is done by prefixing
55-
the URL with the version number.
56-
57-
The current version of the API is 1.26, so to call the `/info` endpoint, you
58-
would send a request to the URL `/v1.26/info`. To call, for example, version
59-
1.24 of the API instead, you would request `/v1.24/info`.
60-
61-
If a newer daemon is installed, new properties may be returned even when
62-
calling older versions of the API.
63-
64-
In previous versions of Docker, it was possible to access the API without
65-
providing a version. This behaviour is now deprecated will be removed in a
66-
future version of Docker.
67-
68-
Use the table below to find the API version for a Docker version:
69-
70-
Docker version | API version | Changes
71-
----------------|------------------------------------|------------------------------------------------------
72-
1.14.x | [1.26](docker_remote_api_v1.26.md) | [API changes](docker_remote_api.md#v1-26-api-changes)
73-
1.13.x | [1.25](docker_remote_api_v1.25.md) | [API changes](docker_remote_api.md#v1-25-api-changes)
74-
1.12.x | [1.24](docker_remote_api_v1.24.md) | [API changes](docker_remote_api.md#v1-24-api-changes)
75-
1.11.x | [1.23](docker_remote_api_v1.23.md) | [API changes](docker_remote_api.md#v1-23-api-changes)
76-
1.10.x | [1.22](docker_remote_api_v1.22.md) | [API changes](docker_remote_api.md#v1-22-api-changes)
77-
1.9.x | [1.21](docker_remote_api_v1.21.md) | [API changes](docker_remote_api.md#v1-21-api-changes)
78-
1.8.x | [1.20](docker_remote_api_v1.20.md) | [API changes](docker_remote_api.md#v1-20-api-changes)
79-
1.7.x | [1.19](docker_remote_api_v1.19.md) | [API changes](docker_remote_api.md#v1-19-api-changes)
80-
1.6.x | [1.18](docker_remote_api_v1.18.md) | [API changes](docker_remote_api.md#v1-18-api-changes)
81-
82-
Refer to the [GitHub repository](
83-
https://github.com/docker/docker/tree/master/docs/reference/api) for
84-
older releases.
85-
86-
## Authentication
87-
88-
Authentication configuration is handled client side, so the
89-
client has to send the `authConfig` as a `POST` in `/images/(name)/push`. The
90-
`authConfig`, set as the `X-Registry-Auth` header, is currently a Base64 encoded
91-
(JSON) string with the following structure:
92-
93-
```JSON
94-
{"username": "string", "password": "string", "email": "string",
95-
"serveraddress" : "string", "auth": ""}
96-
```
97-
98-
Callers should leave the `auth` empty. The `serveraddress` is a domain/ip
99-
without protocol. Throughout this structure, double quotes are required.
100-
101-
## Using Docker Machine with the API
102-
103-
If you are using `docker-machine`, the Docker daemon is on a host that
104-
uses an encrypted TCP socket using TLS. This means, for Docker Machine users,
105-
you need to add extra parameters to `curl` or `wget` when making test
106-
API requests, for example:
107-
108-
```
109-
curl --insecure \
110-
--cert $DOCKER_CERT_PATH/cert.pem \
111-
--key $DOCKER_CERT_PATH/key.pem \
112-
https://YOUR_VM_IP:2376/v1.25/images/json
113-
114-
wget --no-check-certificate --certificate=$DOCKER_CERT_PATH/cert.pem \
115-
--private-key=$DOCKER_CERT_PATH/key.pem \
116-
https://YOUR_VM_IP:2376/v1.25/images/json -O - -q
117-
```
118-
119-
## Docker Events
120-
121-
The following diagram depicts the container states accessible through the API.
122-
123-
![States](images/event_state.png)
124-
125-
Some container-related events are not affected by container state, so they are not included in this diagram. These events are:
126-
127-
* **export** emitted by `docker export`
128-
* **exec_create** emitted by `docker exec`
129-
* **exec_start** emitted by `docker exec` after **exec_create**
130-
* **detach** emitted when client is detached from container process
131-
* **exec_detach** emitted when client is detached from exec process
132-
133-
Running `docker rmi` emits an **untag** event when removing an image name. The `rmi` command may also emit **delete** events when images are deleted by ID directly or by deleting the last tag referring to the image.
134-
135-
> **Acknowledgment**: This diagram and the accompanying text were used with the permission of Matt Good and Gilder Labs. See Matt's original blog post [Docker Events Explained](https://gliderlabs.com/blog/2015/04/14/docker-events-explained/).
136-
137-
## Version history
138-
139-
This section lists each version from latest to oldest. Each listing includes a link to the full documentation set and the changes relevant in that release.
140-
141-
### v1.26 API changes
16+
## v1.26 API changes
14217

14318
[Docker Remote API v1.26](docker_remote_api_v1.26.md) documentation
14419

14520

146-
### v1.25 API changes
21+
## v1.25 API changes
14722

14823
[Docker Remote API v1.25](docker_remote_api_v1.25.md) documentation
14924

@@ -204,7 +79,7 @@ This section lists each version from latest to oldest. Each listing includes a
20479
* `GET /images/json` now support a `reference` filter.
20580

20681

207-
### v1.24 API changes
82+
## v1.24 API changes
20883

20984
[Docker Remote API v1.24](docker_remote_api_v1.24.md) documentation
21085

@@ -236,7 +111,7 @@ This section lists each version from latest to oldest. Each listing includes a
236111
* `POST /containers/create/` `HostConfig.PidMode` field now accepts `container:<name|id>`,
237112
to have the container join the PID namespace of an existing container.
238113

239-
### v1.23 API changes
114+
## v1.23 API changes
240115

241116
[Docker Remote API v1.23](docker_remote_api_v1.23.md) documentation
242117

@@ -258,7 +133,7 @@ This section lists each version from latest to oldest. Each listing includes a
258133
* `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.
259134
* `POST /images/load` now returns progress information as a JSON stream, and has a `quiet` query parameter to suppress progress details.
260135

261-
### v1.22 API changes
136+
## v1.22 API changes
262137

263138
[Docker Remote API v1.22](docker_remote_api_v1.22.md) documentation
264139

@@ -292,7 +167,7 @@ This section lists each version from latest to oldest. Each listing includes a
292167
* `GET /info` can now return a `SystemStatus` field useful for returning additional information about applications
293168
that are built on top of engine.
294169

295-
### v1.21 API changes
170+
## v1.21 API changes
296171

297172
[Docker Remote API v1.21](docker_remote_api_v1.21.md) documentation
298173

@@ -327,7 +202,7 @@ This section lists each version from latest to oldest. Each listing includes a
327202
badness heuristic. This heuristic selects which processes the OOM killer kills
328203
under out-of-memory conditions.
329204

330-
### v1.20 API changes
205+
## v1.20 API changes
331206

332207
[Docker Remote API v1.20](docker_remote_api_v1.20.md) documentation
333208

@@ -339,7 +214,7 @@ endpoint which can be used to download files and directories from a container.
339214
* The `hostConfig` option now accepts the field `GroupAdd`, which specifies a
340215
list of additional groups that the container process will run as.
341216

342-
### v1.19 API changes
217+
## v1.19 API changes
343218

344219
[Docker Remote API v1.19](docker_remote_api_v1.19.md) documentation
345220

@@ -355,7 +230,7 @@ end point now returns the new boolean fields `CpuCfsPeriod`, `CpuCfsQuota`, and
355230
* The `hostConfig` option now accepts the fields `CpuPeriod` and `CpuQuota`
356231
* `POST /build` accepts `cpuperiod` and `cpuquota` options
357232

358-
### v1.18 API changes
233+
## v1.18 API changes
359234

360235
[Docker Remote API v1.18](docker_remote_api_v1.18.md) documentation
361236

docs/reference/api/README.md

Lines changed: 0 additions & 22 deletions
This file was deleted.
-38.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)