Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -23,6 +23,8 @@ redirect_from: |
| 23 | 23 |
- The API tends to be REST, but for some complex commands, like `attach` |
| 24 | 24 |
or `pull`, the HTTP connection is hijacked to transport `stdout`, |
| 25 | 25 |
`stdin` and `stderr`. |
| 26 |
+ - A `Content-Length` header should be present in `POST` requests to endpoints |
|
| 27 |
+ that expect a body. |
|
| 26 | 28 |
|
| 27 | 29 |
## 2. Endpoints |
| 28 | 30 |
|
| ... | ... |
@@ -131,6 +133,7 @@ Create a container |
| 131 | 131 |
|
| 132 | 132 |
POST /v1.18/containers/create HTTP/1.1 |
| 133 | 133 |
Content-Type: application/json |
| 134 |
+ Content-Length: 12345 |
|
| 134 | 135 |
|
| 135 | 136 |
{
|
| 136 | 137 |
"Hostname": "", |
| ... | ... |
@@ -1077,6 +1080,7 @@ Copy files or folders of container `id` |
| 1077 | 1077 |
|
| 1078 | 1078 |
POST /v1.18/containers/4fa6e0f0c678/copy HTTP/1.1 |
| 1079 | 1079 |
Content-Type: application/json |
| 1080 |
+ Content-Length: 12345 |
|
| 1080 | 1081 |
|
| 1081 | 1082 |
{
|
| 1082 | 1083 |
"Resource": "test.txt" |
| ... | ... |
@@ -1556,6 +1560,7 @@ Get the default username and email |
| 1556 | 1556 |
|
| 1557 | 1557 |
POST /v1.18/auth HTTP/1.1 |
| 1558 | 1558 |
Content-Type: application/json |
| 1559 |
+ Content-Length: 12345 |
|
| 1559 | 1560 |
|
| 1560 | 1561 |
{
|
| 1561 | 1562 |
"username": "hannibal", |
| ... | ... |
@@ -1701,6 +1706,7 @@ Create a new image from a container's changes |
| 1701 | 1701 |
|
| 1702 | 1702 |
POST /v1.18/commit?container=44c004db4b17&comment=message&repo=myrepo HTTP/1.1 |
| 1703 | 1703 |
Content-Type: application/json |
| 1704 |
+ Content-Length: 12345 |
|
| 1704 | 1705 |
|
| 1705 | 1706 |
{
|
| 1706 | 1707 |
"Hostname": "", |
| ... | ... |
@@ -1865,6 +1871,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 1865 | 1865 |
|
| 1866 | 1866 |
POST /v1.18/images/load |
| 1867 | 1867 |
Content-Type: application/x-tar |
| 1868 |
+ Content-Length: 12345 |
|
| 1868 | 1869 |
|
| 1869 | 1870 |
Tarball in body |
| 1870 | 1871 |
|
| ... | ... |
@@ -1908,6 +1915,7 @@ Sets up an exec instance in a running container `id` |
| 1908 | 1908 |
|
| 1909 | 1909 |
POST /v1.18/containers/e90e34656806/exec HTTP/1.1 |
| 1910 | 1910 |
Content-Type: application/json |
| 1911 |
+ Content-Length: 12345 |
|
| 1911 | 1912 |
|
| 1912 | 1913 |
{
|
| 1913 | 1914 |
"AttachStdin": true, |
| ... | ... |
@@ -1953,6 +1961,7 @@ interactive session with the `exec` command. |
| 1953 | 1953 |
|
| 1954 | 1954 |
POST /v1.18/exec/e90e34656806/start HTTP/1.1 |
| 1955 | 1955 |
Content-Type: application/json |
| 1956 |
+ Content-Length: 12345 |
|
| 1956 | 1957 |
|
| 1957 | 1958 |
{
|
| 1958 | 1959 |
"Detach": false, |
| ... | ... |
@@ -25,6 +25,8 @@ redirect_from: |
| 25 | 25 |
`stdin` and `stderr`. |
| 26 | 26 |
- When the client API version is newer than the daemon's, these calls return an HTTP |
| 27 | 27 |
`400 Bad Request` error message. |
| 28 |
+ - A `Content-Length` header should be present in `POST` requests to endpoints |
|
| 29 |
+ that expect a body. |
|
| 28 | 30 |
|
| 29 | 31 |
## 2. Endpoints |
| 30 | 32 |
|
| ... | ... |
@@ -133,6 +135,7 @@ Create a container |
| 133 | 133 |
|
| 134 | 134 |
POST /v1.19/containers/create HTTP/1.1 |
| 135 | 135 |
Content-Type: application/json |
| 136 |
+ Content-Length: 12345 |
|
| 136 | 137 |
|
| 137 | 138 |
{
|
| 138 | 139 |
"Hostname": "", |
| ... | ... |
@@ -1116,6 +1119,7 @@ Copy files or folders of container `id` |
| 1116 | 1116 |
|
| 1117 | 1117 |
POST /v1.19/containers/4fa6e0f0c678/copy HTTP/1.1 |
| 1118 | 1118 |
Content-Type: application/json |
| 1119 |
+ Content-Length: 12345 |
|
| 1119 | 1120 |
|
| 1120 | 1121 |
{
|
| 1121 | 1122 |
"Resource": "test.txt" |
| ... | ... |
@@ -1628,6 +1632,7 @@ Get the default username and email |
| 1628 | 1628 |
|
| 1629 | 1629 |
POST /v1.19/auth HTTP/1.1 |
| 1630 | 1630 |
Content-Type: application/json |
| 1631 |
+ Content-Length: 12345 |
|
| 1631 | 1632 |
|
| 1632 | 1633 |
{
|
| 1633 | 1634 |
"username": "hannibal", |
| ... | ... |
@@ -1777,6 +1782,7 @@ Create a new image from a container's changes |
| 1777 | 1777 |
|
| 1778 | 1778 |
POST /v1.19/commit?container=44c004db4b17&comment=message&repo=myrepo HTTP/1.1 |
| 1779 | 1779 |
Content-Type: application/json |
| 1780 |
+ Content-Length: 12345 |
|
| 1780 | 1781 |
|
| 1781 | 1782 |
{
|
| 1782 | 1783 |
"Hostname": "", |
| ... | ... |
@@ -1945,6 +1951,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 1945 | 1945 |
|
| 1946 | 1946 |
POST /v1.19/images/load |
| 1947 | 1947 |
Content-Type: application/x-tar |
| 1948 |
+ Content-Length: 12345 |
|
| 1948 | 1949 |
|
| 1949 | 1950 |
Tarball in body |
| 1950 | 1951 |
|
| ... | ... |
@@ -1988,6 +1995,7 @@ Sets up an exec instance in a running container `id` |
| 1988 | 1988 |
|
| 1989 | 1989 |
POST /v1.19/containers/e90e34656806/exec HTTP/1.1 |
| 1990 | 1990 |
Content-Type: application/json |
| 1991 |
+ Content-Length: 12345 |
|
| 1991 | 1992 |
|
| 1992 | 1993 |
{
|
| 1993 | 1994 |
"AttachStdin": true, |
| ... | ... |
@@ -2036,6 +2044,7 @@ interactive session with the `exec` command. |
| 2036 | 2036 |
|
| 2037 | 2037 |
POST /v1.19/exec/e90e34656806/start HTTP/1.1 |
| 2038 | 2038 |
Content-Type: application/json |
| 2039 |
+ Content-Length: 12345 |
|
| 2039 | 2040 |
|
| 2040 | 2041 |
{
|
| 2041 | 2042 |
"Detach": false, |
| ... | ... |
@@ -23,6 +23,10 @@ redirect_from: |
| 23 | 23 |
- The API tends to be REST. However, for some complex commands, like `attach` |
| 24 | 24 |
or `pull`, the HTTP connection is hijacked to transport `stdout`, |
| 25 | 25 |
`stdin` and `stderr`. |
| 26 |
+ - When the client API version is newer than the daemon's, these calls return an HTTP |
|
| 27 |
+ `400 Bad Request` error message. |
|
| 28 |
+ - A `Content-Length` header should be present in `POST` requests to endpoints |
|
| 29 |
+ that expect a body. |
|
| 26 | 30 |
|
| 27 | 31 |
## 2. Endpoints |
| 28 | 32 |
|
| ... | ... |
@@ -131,6 +135,7 @@ Create a container |
| 131 | 131 |
|
| 132 | 132 |
POST /v1.20/containers/create HTTP/1.1 |
| 133 | 133 |
Content-Type: application/json |
| 134 |
+ Content-Length: 12345 |
|
| 134 | 135 |
|
| 135 | 136 |
{
|
| 136 | 137 |
"Hostname": "", |
| ... | ... |
@@ -1125,6 +1130,7 @@ Copy files or folders of container `id` |
| 1125 | 1125 |
|
| 1126 | 1126 |
POST /v1.20/containers/4fa6e0f0c678/copy HTTP/1.1 |
| 1127 | 1127 |
Content-Type: application/json |
| 1128 |
+ Content-Length: 12345 |
|
| 1128 | 1129 |
|
| 1129 | 1130 |
{
|
| 1130 | 1131 |
"Resource": "test.txt" |
| ... | ... |
@@ -1776,6 +1782,7 @@ Get the default username and email |
| 1776 | 1776 |
|
| 1777 | 1777 |
POST /v1.20/auth HTTP/1.1 |
| 1778 | 1778 |
Content-Type: application/json |
| 1779 |
+ Content-Length: 12345 |
|
| 1779 | 1780 |
|
| 1780 | 1781 |
{
|
| 1781 | 1782 |
"username": "hannibal", |
| ... | ... |
@@ -1926,6 +1933,7 @@ Create a new image from a container's changes |
| 1926 | 1926 |
|
| 1927 | 1927 |
POST /v1.20/commit?container=44c004db4b17&comment=message&repo=myrepo HTTP/1.1 |
| 1928 | 1928 |
Content-Type: application/json |
| 1929 |
+ Content-Length: 12345 |
|
| 1929 | 1930 |
|
| 1930 | 1931 |
{
|
| 1931 | 1932 |
"Hostname": "", |
| ... | ... |
@@ -2100,6 +2108,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 2100 | 2100 |
|
| 2101 | 2101 |
POST /v1.20/images/load |
| 2102 | 2102 |
Content-Type: application/x-tar |
| 2103 |
+ Content-Length: 12345 |
|
| 2103 | 2104 |
|
| 2104 | 2105 |
Tarball in body |
| 2105 | 2106 |
|
| ... | ... |
@@ -2143,6 +2152,7 @@ Sets up an exec instance in a running container `id` |
| 2143 | 2143 |
|
| 2144 | 2144 |
POST /v1.20/containers/e90e34656806/exec HTTP/1.1 |
| 2145 | 2145 |
Content-Type: application/json |
| 2146 |
+ Content-Length: 12345 |
|
| 2146 | 2147 |
|
| 2147 | 2148 |
{
|
| 2148 | 2149 |
"AttachStdin": true, |
| ... | ... |
@@ -2191,6 +2201,7 @@ interactive session with the `exec` command. |
| 2191 | 2191 |
|
| 2192 | 2192 |
POST /v1.20/exec/e90e34656806/start HTTP/1.1 |
| 2193 | 2193 |
Content-Type: application/json |
| 2194 |
+ Content-Length: 12345 |
|
| 2194 | 2195 |
|
| 2195 | 2196 |
{
|
| 2196 | 2197 |
"Detach": false, |
| ... | ... |
@@ -25,6 +25,8 @@ redirect_from: |
| 25 | 25 |
`stdin` and `stderr`. |
| 26 | 26 |
- When the client API version is newer than the daemon's, these calls return an HTTP |
| 27 | 27 |
`400 Bad Request` error message. |
| 28 |
+ - A `Content-Length` header should be present in `POST` requests to endpoints |
|
| 29 |
+ that expect a body. |
|
| 28 | 30 |
|
| 29 | 31 |
## 2. Endpoints |
| 30 | 32 |
|
| ... | ... |
@@ -137,6 +139,7 @@ Create a container |
| 137 | 137 |
|
| 138 | 138 |
POST /v1.21/containers/create HTTP/1.1 |
| 139 | 139 |
Content-Type: application/json |
| 140 |
+ Content-Length: 12345 |
|
| 140 | 141 |
|
| 141 | 142 |
{
|
| 142 | 143 |
"Hostname": "", |
| ... | ... |
@@ -1208,6 +1211,7 @@ Copy files or folders of container `id` |
| 1208 | 1208 |
|
| 1209 | 1209 |
POST /v1.21/containers/4fa6e0f0c678/copy HTTP/1.1 |
| 1210 | 1210 |
Content-Type: application/json |
| 1211 |
+ Content-Length: 12345 |
|
| 1211 | 1212 |
|
| 1212 | 1213 |
{
|
| 1213 | 1214 |
"Resource": "test.txt" |
| ... | ... |
@@ -1929,6 +1933,7 @@ Get the default username and email |
| 1929 | 1929 |
|
| 1930 | 1930 |
POST /v1.21/auth HTTP/1.1 |
| 1931 | 1931 |
Content-Type: application/json |
| 1932 |
+ Content-Length: 12345 |
|
| 1932 | 1933 |
|
| 1933 | 1934 |
{
|
| 1934 | 1935 |
"username": "hannibal", |
| ... | ... |
@@ -2081,6 +2086,7 @@ Create a new image from a container's changes |
| 2081 | 2081 |
|
| 2082 | 2082 |
POST /v1.21/commit?container=44c004db4b17&comment=message&repo=myrepo HTTP/1.1 |
| 2083 | 2083 |
Content-Type: application/json |
| 2084 |
+ Content-Length: 12345 |
|
| 2084 | 2085 |
|
| 2085 | 2086 |
{
|
| 2086 | 2087 |
"Hostname": "", |
| ... | ... |
@@ -2256,6 +2262,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 2256 | 2256 |
|
| 2257 | 2257 |
POST /v1.21/images/load |
| 2258 | 2258 |
Content-Type: application/x-tar |
| 2259 |
+ Content-Length: 12345 |
|
| 2259 | 2260 |
|
| 2260 | 2261 |
Tarball in body |
| 2261 | 2262 |
|
| ... | ... |
@@ -2299,6 +2306,7 @@ Sets up an exec instance in a running container `id` |
| 2299 | 2299 |
|
| 2300 | 2300 |
POST /v1.21/containers/e90e34656806/exec HTTP/1.1 |
| 2301 | 2301 |
Content-Type: application/json |
| 2302 |
+ Content-Length: 12345 |
|
| 2302 | 2303 |
|
| 2303 | 2304 |
{
|
| 2304 | 2305 |
"AttachStdin": true, |
| ... | ... |
@@ -2351,6 +2359,7 @@ interactive session with the `exec` command. |
| 2351 | 2351 |
|
| 2352 | 2352 |
POST /v1.21/exec/e90e34656806/start HTTP/1.1 |
| 2353 | 2353 |
Content-Type: application/json |
| 2354 |
+ Content-Length: 12345 |
|
| 2354 | 2355 |
|
| 2355 | 2356 |
{
|
| 2356 | 2357 |
"Detach": false, |
| ... | ... |
@@ -2578,6 +2587,7 @@ Create a volume |
| 2578 | 2578 |
|
| 2579 | 2579 |
POST /v1.21/volumes/create HTTP/1.1 |
| 2580 | 2580 |
Content-Type: application/json |
| 2581 |
+ Content-Length: 12345 |
|
| 2581 | 2582 |
|
| 2582 | 2583 |
{
|
| 2583 | 2584 |
"Name": "tardis" |
| ... | ... |
@@ -2802,6 +2812,7 @@ Create a network |
| 2802 | 2802 |
``` |
| 2803 | 2803 |
POST /v1.21/networks/create HTTP/1.1 |
| 2804 | 2804 |
Content-Type: application/json |
| 2805 |
+Content-Length: 12345 |
|
| 2805 | 2806 |
|
| 2806 | 2807 |
{
|
| 2807 | 2808 |
"Name":"isolated_nw", |
| ... | ... |
@@ -2865,6 +2876,7 @@ Connect a container to a network |
| 2865 | 2865 |
``` |
| 2866 | 2866 |
POST /v1.21/networks/22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30/connect HTTP/1.1 |
| 2867 | 2867 |
Content-Type: application/json |
| 2868 |
+Content-Length: 12345 |
|
| 2868 | 2869 |
|
| 2869 | 2870 |
{
|
| 2870 | 2871 |
"Container":"3613f73ba0e4" |
| ... | ... |
@@ -2896,6 +2908,7 @@ Disconnect a container from a network |
| 2896 | 2896 |
``` |
| 2897 | 2897 |
POST /v1.21/networks/22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30/disconnect HTTP/1.1 |
| 2898 | 2898 |
Content-Type: application/json |
| 2899 |
+Content-Length: 12345 |
|
| 2899 | 2900 |
|
| 2900 | 2901 |
{
|
| 2901 | 2902 |
"Container":"3613f73ba0e4" |
| ... | ... |
@@ -23,6 +23,10 @@ redirect_from: |
| 23 | 23 |
- The API tends to be REST. However, for some complex commands, like `attach` |
| 24 | 24 |
or `pull`, the HTTP connection is hijacked to transport `stdout`, |
| 25 | 25 |
`stdin` and `stderr`. |
| 26 |
+ - When the client API version is newer than the daemon's, these calls return an HTTP |
|
| 27 |
+ `400 Bad Request` error message. |
|
| 28 |
+ - A `Content-Length` header should be present in `POST` requests to endpoints |
|
| 29 |
+ that expect a body. |
|
| 26 | 30 |
|
| 27 | 31 |
## 2. Endpoints |
| 28 | 32 |
|
| ... | ... |
@@ -220,6 +224,7 @@ Create a container |
| 220 | 220 |
|
| 221 | 221 |
POST /v1.22/containers/create HTTP/1.1 |
| 222 | 222 |
Content-Type: application/json |
| 223 |
+ Content-Length: 12345 |
|
| 223 | 224 |
|
| 224 | 225 |
{
|
| 225 | 226 |
"Hostname": "", |
| ... | ... |
@@ -1387,6 +1392,7 @@ Copy files or folders of container `id` |
| 1387 | 1387 |
|
| 1388 | 1388 |
POST /v1.22/containers/4fa6e0f0c678/copy HTTP/1.1 |
| 1389 | 1389 |
Content-Type: application/json |
| 1390 |
+ Content-Length: 12345 |
|
| 1390 | 1391 |
|
| 1391 | 1392 |
{
|
| 1392 | 1393 |
"Resource": "test.txt" |
| ... | ... |
@@ -2146,6 +2152,7 @@ Get the default username and email |
| 2146 | 2146 |
|
| 2147 | 2147 |
POST /v1.22/auth HTTP/1.1 |
| 2148 | 2148 |
Content-Type: application/json |
| 2149 |
+ Content-Length: 12345 |
|
| 2149 | 2150 |
|
| 2150 | 2151 |
{
|
| 2151 | 2152 |
"username": "hannibal", |
| ... | ... |
@@ -2315,6 +2322,7 @@ Create a new image from a container's changes |
| 2315 | 2315 |
|
| 2316 | 2316 |
POST /v1.22/commit?container=44c004db4b17&comment=message&repo=myrepo HTTP/1.1 |
| 2317 | 2317 |
Content-Type: application/json |
| 2318 |
+ Content-Length: 12345 |
|
| 2318 | 2319 |
|
| 2319 | 2320 |
{
|
| 2320 | 2321 |
"Hostname": "", |
| ... | ... |
@@ -2647,6 +2655,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 2647 | 2647 |
|
| 2648 | 2648 |
POST /v1.22/images/load |
| 2649 | 2649 |
Content-Type: application/x-tar |
| 2650 |
+ Content-Length: 12345 |
|
| 2650 | 2651 |
|
| 2651 | 2652 |
Tarball in body |
| 2652 | 2653 |
|
| ... | ... |
@@ -2690,6 +2699,7 @@ Sets up an exec instance in a running container `id` |
| 2690 | 2690 |
|
| 2691 | 2691 |
POST /v1.22/containers/e90e34656806/exec HTTP/1.1 |
| 2692 | 2692 |
Content-Type: application/json |
| 2693 |
+ Content-Length: 12345 |
|
| 2693 | 2694 |
|
| 2694 | 2695 |
{
|
| 2695 | 2696 |
"AttachStdin": true, |
| ... | ... |
@@ -2746,6 +2756,7 @@ interactive session with the `exec` command. |
| 2746 | 2746 |
|
| 2747 | 2747 |
POST /v1.22/exec/e90e34656806/start HTTP/1.1 |
| 2748 | 2748 |
Content-Type: application/json |
| 2749 |
+ Content-Length: 12345 |
|
| 2749 | 2750 |
|
| 2750 | 2751 |
{
|
| 2751 | 2752 |
"Detach": false, |
| ... | ... |
@@ -2891,6 +2902,7 @@ Create a volume |
| 2891 | 2891 |
|
| 2892 | 2892 |
POST /v1.22/volumes/create HTTP/1.1 |
| 2893 | 2893 |
Content-Type: application/json |
| 2894 |
+ Content-Length: 12345 |
|
| 2894 | 2895 |
|
| 2895 | 2896 |
{
|
| 2896 | 2897 |
"Name": "tardis" |
| ... | ... |
@@ -3123,6 +3135,7 @@ Create a network |
| 3123 | 3123 |
``` |
| 3124 | 3124 |
POST /v1.22/networks/create HTTP/1.1 |
| 3125 | 3125 |
Content-Type: application/json |
| 3126 |
+Content-Length: 12345 |
|
| 3126 | 3127 |
|
| 3127 | 3128 |
{
|
| 3128 | 3129 |
"Name":"isolated_nw", |
| ... | ... |
@@ -3195,6 +3208,7 @@ Connect a container to a network |
| 3195 | 3195 |
``` |
| 3196 | 3196 |
POST /v1.22/networks/22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30/connect HTTP/1.1 |
| 3197 | 3197 |
Content-Type: application/json |
| 3198 |
+Content-Length: 12345 |
|
| 3198 | 3199 |
|
| 3199 | 3200 |
{
|
| 3200 | 3201 |
"Container":"3613f73ba0e4", |
| ... | ... |
@@ -3232,6 +3246,7 @@ Disconnect a container from a network |
| 3232 | 3232 |
``` |
| 3233 | 3233 |
POST /v1.22/networks/22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30/disconnect HTTP/1.1 |
| 3234 | 3234 |
Content-Type: application/json |
| 3235 |
+Content-Length: 12345 |
|
| 3235 | 3236 |
|
| 3236 | 3237 |
{
|
| 3237 | 3238 |
"Container":"3613f73ba0e4", |
| ... | ... |
@@ -25,6 +25,8 @@ redirect_from: |
| 25 | 25 |
`stdin` and `stderr`. |
| 26 | 26 |
- When the client API version is newer than the daemon's, these calls return an HTTP |
| 27 | 27 |
`400 Bad Request` error message. |
| 28 |
+ - A `Content-Length` header should be present in `POST` requests to endpoints |
|
| 29 |
+ that expect a body. |
|
| 28 | 30 |
|
| 29 | 31 |
## 2. Endpoints |
| 30 | 32 |
|
| ... | ... |
@@ -244,6 +246,7 @@ Create a container |
| 244 | 244 |
|
| 245 | 245 |
POST /v1.23/containers/create HTTP/1.1 |
| 246 | 246 |
Content-Type: application/json |
| 247 |
+ Content-Length: 12345 |
|
| 247 | 248 |
|
| 248 | 249 |
{
|
| 249 | 250 |
"Hostname": "", |
| ... | ... |
@@ -1128,6 +1131,7 @@ Update configuration of one or more containers. |
| 1128 | 1128 |
|
| 1129 | 1129 |
POST /v1.23/containers/e90e34656806/update HTTP/1.1 |
| 1130 | 1130 |
Content-Type: application/json |
| 1131 |
+ Content-Length: 12345 |
|
| 1131 | 1132 |
|
| 1132 | 1133 |
{
|
| 1133 | 1134 |
"BlkioWeight": 300, |
| ... | ... |
@@ -1422,6 +1426,7 @@ Copy files or folders of container `id` |
| 1422 | 1422 |
|
| 1423 | 1423 |
POST /v1.23/containers/4fa6e0f0c678/copy HTTP/1.1 |
| 1424 | 1424 |
Content-Type: application/json |
| 1425 |
+ Content-Length: 12345 |
|
| 1425 | 1426 |
|
| 1426 | 1427 |
{
|
| 1427 | 1428 |
"Resource": "test.txt" |
| ... | ... |
@@ -2190,6 +2195,7 @@ if available, for accessing the registry without password. |
| 2190 | 2190 |
|
| 2191 | 2191 |
POST /v1.23/auth HTTP/1.1 |
| 2192 | 2192 |
Content-Type: application/json |
| 2193 |
+ Content-Length: 12345 |
|
| 2193 | 2194 |
|
| 2194 | 2195 |
{
|
| 2195 | 2196 |
"username": "hannibal", |
| ... | ... |
@@ -2365,6 +2371,7 @@ Create a new image from a container's changes |
| 2365 | 2365 |
|
| 2366 | 2366 |
POST /v1.23/commit?container=44c004db4b17&comment=message&repo=myrepo HTTP/1.1 |
| 2367 | 2367 |
Content-Type: application/json |
| 2368 |
+ Content-Length: 12345 |
|
| 2368 | 2369 |
|
| 2369 | 2370 |
{
|
| 2370 | 2371 |
"Hostname": "", |
| ... | ... |
@@ -2697,6 +2704,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 2697 | 2697 |
|
| 2698 | 2698 |
POST /v1.23/images/load |
| 2699 | 2699 |
Content-Type: application/x-tar |
| 2700 |
+ Content-Length: 12345 |
|
| 2700 | 2701 |
|
| 2701 | 2702 |
Tarball in body |
| 2702 | 2703 |
|
| ... | ... |
@@ -2766,6 +2774,7 @@ Sets up an exec instance in a running container `id` |
| 2766 | 2766 |
|
| 2767 | 2767 |
POST /v1.23/containers/e90e34656806/exec HTTP/1.1 |
| 2768 | 2768 |
Content-Type: application/json |
| 2769 |
+ Content-Length: 12345 |
|
| 2769 | 2770 |
|
| 2770 | 2771 |
{
|
| 2771 | 2772 |
"AttachStdin": true, |
| ... | ... |
@@ -2822,6 +2831,7 @@ interactive session with the `exec` command. |
| 2822 | 2822 |
|
| 2823 | 2823 |
POST /v1.23/exec/e90e34656806/start HTTP/1.1 |
| 2824 | 2824 |
Content-Type: application/json |
| 2825 |
+ Content-Length: 12345 |
|
| 2825 | 2826 |
|
| 2826 | 2827 |
{
|
| 2827 | 2828 |
"Detach": false, |
| ... | ... |
@@ -2967,6 +2977,7 @@ Create a volume |
| 2967 | 2967 |
|
| 2968 | 2968 |
POST /v1.23/volumes/create HTTP/1.1 |
| 2969 | 2969 |
Content-Type: application/json |
| 2970 |
+ Content-Length: 12345 |
|
| 2970 | 2971 |
|
| 2971 | 2972 |
{
|
| 2972 | 2973 |
"Name": "tardis", |
| ... | ... |
@@ -3224,6 +3235,7 @@ Create a network |
| 3224 | 3224 |
``` |
| 3225 | 3225 |
POST /v1.23/networks/create HTTP/1.1 |
| 3226 | 3226 |
Content-Type: application/json |
| 3227 |
+Content-Length: 12345 |
|
| 3227 | 3228 |
|
| 3228 | 3229 |
{
|
| 3229 | 3230 |
"Name":"isolated_nw", |
| ... | ... |
@@ -3312,6 +3324,7 @@ Connect a container to a network |
| 3312 | 3312 |
``` |
| 3313 | 3313 |
POST /v1.23/networks/22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30/connect HTTP/1.1 |
| 3314 | 3314 |
Content-Type: application/json |
| 3315 |
+Content-Length: 12345 |
|
| 3315 | 3316 |
|
| 3316 | 3317 |
{
|
| 3317 | 3318 |
"Container":"3613f73ba0e4", |
| ... | ... |
@@ -3349,6 +3362,7 @@ Disconnect a container from a network |
| 3349 | 3349 |
``` |
| 3350 | 3350 |
POST /v1.23/networks/22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30/disconnect HTTP/1.1 |
| 3351 | 3351 |
Content-Type: application/json |
| 3352 |
+Content-Length: 12345 |
|
| 3352 | 3353 |
|
| 3353 | 3354 |
{
|
| 3354 | 3355 |
"Container":"3613f73ba0e4", |
| ... | ... |
@@ -23,6 +23,8 @@ redirect_from: |
| 23 | 23 |
- The API tends to be REST. However, for some complex commands, like `attach` |
| 24 | 24 |
or `pull`, the HTTP connection is hijacked to transport `stdout`, |
| 25 | 25 |
`stdin` and `stderr`. |
| 26 |
+ - A `Content-Length` header should be present in `POST` requests to endpoints |
|
| 27 |
+ that expect a body. |
|
| 26 | 28 |
|
| 27 | 29 |
## 2. Errors |
| 28 | 30 |
|
| ... | ... |
@@ -253,6 +255,7 @@ Create a container |
| 253 | 253 |
|
| 254 | 254 |
POST /v1.24/containers/create HTTP/1.1 |
| 255 | 255 |
Content-Type: application/json |
| 256 |
+ Content-Length: 12345 |
|
| 256 | 257 |
|
| 257 | 258 |
{
|
| 258 | 259 |
"Hostname": "", |
| ... | ... |
@@ -1172,6 +1175,7 @@ Update configuration of one or more containers. |
| 1172 | 1172 |
|
| 1173 | 1173 |
POST /v1.24/containers/e90e34656806/update HTTP/1.1 |
| 1174 | 1174 |
Content-Type: application/json |
| 1175 |
+ Content-Length: 12345 |
|
| 1175 | 1176 |
|
| 1176 | 1177 |
{
|
| 1177 | 1178 |
"BlkioWeight": 300, |
| ... | ... |
@@ -2208,6 +2212,7 @@ if available, for accessing the registry without password. |
| 2208 | 2208 |
|
| 2209 | 2209 |
POST /v1.24/auth HTTP/1.1 |
| 2210 | 2210 |
Content-Type: application/json |
| 2211 |
+ Content-Length: 12345 |
|
| 2211 | 2212 |
|
| 2212 | 2213 |
{
|
| 2213 | 2214 |
"username": "hannibal", |
| ... | ... |
@@ -2387,6 +2392,7 @@ Create a new image from a container's changes |
| 2387 | 2387 |
|
| 2388 | 2388 |
POST /v1.24/commit?container=44c004db4b17&comment=message&repo=myrepo HTTP/1.1 |
| 2389 | 2389 |
Content-Type: application/json |
| 2390 |
+ Content-Length: 12345 |
|
| 2390 | 2391 |
|
| 2391 | 2392 |
{
|
| 2392 | 2393 |
"Hostname": "", |
| ... | ... |
@@ -2725,6 +2731,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 2725 | 2725 |
|
| 2726 | 2726 |
POST /v1.24/images/load |
| 2727 | 2727 |
Content-Type: application/x-tar |
| 2728 |
+ Content-Length: 12345 |
|
| 2728 | 2729 |
|
| 2729 | 2730 |
Tarball in body |
| 2730 | 2731 |
|
| ... | ... |
@@ -2794,6 +2801,7 @@ Sets up an exec instance in a running container `id` |
| 2794 | 2794 |
|
| 2795 | 2795 |
POST /v1.24/containers/e90e34656806/exec HTTP/1.1 |
| 2796 | 2796 |
Content-Type: application/json |
| 2797 |
+ Content-Length: 12345 |
|
| 2797 | 2798 |
|
| 2798 | 2799 |
{
|
| 2799 | 2800 |
"AttachStdin": true, |
| ... | ... |
@@ -2850,6 +2858,7 @@ interactive session with the `exec` command. |
| 2850 | 2850 |
|
| 2851 | 2851 |
POST /v1.24/exec/e90e34656806/start HTTP/1.1 |
| 2852 | 2852 |
Content-Type: application/json |
| 2853 |
+ Content-Length: 12345 |
|
| 2853 | 2854 |
|
| 2854 | 2855 |
{
|
| 2855 | 2856 |
"Detach": false, |
| ... | ... |
@@ -3000,6 +3009,7 @@ Create a volume |
| 3000 | 3000 |
|
| 3001 | 3001 |
POST /v1.24/volumes/create HTTP/1.1 |
| 3002 | 3002 |
Content-Type: application/json |
| 3003 |
+ Content-Length: 12345 |
|
| 3003 | 3004 |
|
| 3004 | 3005 |
{
|
| 3005 | 3006 |
"Name": "tardis", |
| ... | ... |
@@ -3290,6 +3300,7 @@ Create a network |
| 3290 | 3290 |
``` |
| 3291 | 3291 |
POST /v1.24/networks/create HTTP/1.1 |
| 3292 | 3292 |
Content-Type: application/json |
| 3293 |
+Content-Length: 12345 |
|
| 3293 | 3294 |
|
| 3294 | 3295 |
{
|
| 3295 | 3296 |
"Name":"isolated_nw", |
| ... | ... |
@@ -3379,6 +3390,7 @@ Connect a container to a network |
| 3379 | 3379 |
``` |
| 3380 | 3380 |
POST /v1.24/networks/22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30/connect HTTP/1.1 |
| 3381 | 3381 |
Content-Type: application/json |
| 3382 |
+Content-Length: 12345 |
|
| 3382 | 3383 |
|
| 3383 | 3384 |
{
|
| 3384 | 3385 |
"Container":"3613f73ba0e4", |
| ... | ... |
@@ -3417,6 +3429,7 @@ Disconnect a container from a network |
| 3417 | 3417 |
``` |
| 3418 | 3418 |
POST /v1.24/networks/22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30/disconnect HTTP/1.1 |
| 3419 | 3419 |
Content-Type: application/json |
| 3420 |
+Content-Length: 12345 |
|
| 3420 | 3421 |
|
| 3421 | 3422 |
{
|
| 3422 | 3423 |
"Container":"3613f73ba0e4", |
| ... | ... |
@@ -4130,6 +4143,7 @@ an empty value or the default cluster-wide value. |
| 4130 | 4130 |
|
| 4131 | 4131 |
POST /v1.24/nodes/24ifsmvkjbyhk/update?version=8 HTTP/1.1 |
| 4132 | 4132 |
Content-Type: application/json |
| 4133 |
+ Content-Length: 12345 |
|
| 4133 | 4134 |
|
| 4134 | 4135 |
{
|
| 4135 | 4136 |
"Availability": "active", |
| ... | ... |
@@ -4231,6 +4245,7 @@ Initialize a new swarm. The body of the HTTP response includes the node ID. |
| 4231 | 4231 |
|
| 4232 | 4232 |
POST /v1.24/swarm/init HTTP/1.1 |
| 4233 | 4233 |
Content-Type: application/json |
| 4234 |
+ Content-Length: 12345 |
|
| 4234 | 4235 |
|
| 4235 | 4236 |
{
|
| 4236 | 4237 |
"ListenAddr": "0.0.0.0:2377", |
| ... | ... |
@@ -4377,6 +4392,7 @@ Update a swarm |
| 4377 | 4377 |
**Example request**: |
| 4378 | 4378 |
|
| 4379 | 4379 |
POST /v1.24/swarm/update HTTP/1.1 |
| 4380 |
+ Content-Length: 12345 |
|
| 4380 | 4381 |
|
| 4381 | 4382 |
{
|
| 4382 | 4383 |
"Name": "default", |
| ... | ... |
@@ -4576,6 +4592,7 @@ image](#create-an-image) section for more details. |
| 4576 | 4576 |
|
| 4577 | 4577 |
POST /v1.24/services/create HTTP/1.1 |
| 4578 | 4578 |
Content-Type: application/json |
| 4579 |
+ Content-Length: 12345 |
|
| 4579 | 4580 |
|
| 4580 | 4581 |
{
|
| 4581 | 4582 |
"Name": "web", |
| ... | ... |
@@ -4876,6 +4893,7 @@ image](#create-an-image) section for more details. |
| 4876 | 4876 |
|
| 4877 | 4877 |
POST /v1.24/services/1cb4dnqcyx6m66g2t538x3rxha/update?version=23 HTTP/1.1 |
| 4878 | 4878 |
Content-Type: application/json |
| 4879 |
+ Content-Length: 12345 |
|
| 4879 | 4880 |
|
| 4880 | 4881 |
{
|
| 4881 | 4882 |
"Name": "top", |