Skip to content

Commit

Permalink
Merge pull request #9742 from yadutaf/master
Browse files Browse the repository at this point in the history
Start new API v1.17 docs
  • Loading branch information
LK4D4 committed Dec 22, 2014
2 parents 0874f9a + 800a8e8 commit 67e3435
Show file tree
Hide file tree
Showing 3 changed files with 1,794 additions and 25 deletions.
19 changes: 16 additions & 3 deletions docs/sources/reference/api/docker_remote_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,26 @@ page_keywords: API, Docker, rcli, REST, documentation
Client applications need to take this into account to ensure
they will not break when talking to newer Docker daemons.

The current version of the API is v1.16
The current version of the API is v1.17

Calling `/info` is the same as calling
`/v1.16/info`.
`/v1.17/info`.

You can still call an old version of the API using
`/v1.15/info`.
`/v1.16/info`.

## v1.17

### Full Documentation

[*Docker Remote API v1.17*](/reference/api/docker_remote_api_v1.17/)

### What's new

`POST /containers/(id)/attach` and `POST /exec/(id)/start`

**New!**
Docker client now hints potential proxies about connection hijacking using HTTP Upgrade headers.

## v1.16

Expand Down
27 changes: 5 additions & 22 deletions docs/sources/reference/api/docker_remote_api_v1.16.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,8 @@ Get stdout and stderr logs from the container ``id``

**Example response**:

HTTP/1.1 101 UPGRADED
HTTP/1.1 200 OK
Content-Type: application/vnd.docker.raw-stream
Connection: Upgrade
Upgrade: tcp

{{ STREAM }}

Expand All @@ -411,8 +409,7 @@ Query Parameters:

Status Codes:

- **101** – no error, hints proxy about hijacking
- **200** – no error, no upgrade header found
- **200** – no error
- **404** – no such container
- **500** – server error

Expand Down Expand Up @@ -647,10 +644,8 @@ Attach to the container `id`

**Example response**:

HTTP/1.1 101 UPGRADED
HTTP/1.1 200 OK
Content-Type: application/vnd.docker.raw-stream
Connection: Upgrade
Upgrade: tcp

{{ STREAM }}

Expand All @@ -668,8 +663,7 @@ Query Parameters:

Status Codes:

- **101** – no error, hints proxy about hijacking
- **200** – no error, no upgrade header found
- **200** – no error
- **400** – bad parameter
- **404** – no such container
- **500** – server error
Expand Down Expand Up @@ -1752,18 +1746,7 @@ As an example, the `docker run` command line makes the following API calls:
## 3.2 Hijacking

In this version of the API, /attach, uses hijacking to transport stdin,
stdout and stderr on the same socket.

To hint potential proxies about connection hijacking, Docker client sends
connection upgrade headers similarly to websocket.

Upgrade: tcp
Connection: Upgrade

When Docker daemon detects the `Upgrade` header, it will switch its status code
from **200 OK** to **101 UPGRADED** and resend the same headers.

This might change in the future.
stdout and stderr on the same socket. This might change in the future.

## 3.3 CORS Requests

Expand Down

0 comments on commit 67e3435

Please sign in to comment.