You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 26, 2019. It is now read-only.
The API is usually changed in each release of Docker, so API calls are versioned to ensure that clients don't break.
46
46
47
-
For Docker Engine 17.04, the API version is 1.28. To lock to this version, you prefix the URL with `/v1.28`. For example, calling `/info` is the same as calling `/v1.28/info`.
47
+
For Docker Engine 17.05, the API version is 1.29. To lock to this version, you prefix the URL with `/v1.29`. For example, calling `/info` is the same as calling `/v1.29/info`.
48
48
49
49
Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine.
50
50
51
51
In previous versions of Docker, it was possible to access the API without providing a version. This behaviour is now deprecated will be removed in a future version of Docker.
52
52
53
53
The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer Docker daemons.
54
54
55
-
This documentation is for version 1.28 of the API, which was introduced with Docker 17.04. Use this table to find documentation for previous versions of the API:
55
+
This documentation is for version 1.29 of the API, which was introduced with Docker 17.05. Use this table to find documentation for previous versions of the API:
description: "Whether the mount should be read-only."
246
247
type: "boolean"
248
+
Consistency:
249
+
description: "The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`."
250
+
type: "string"
247
251
BindOptions:
248
252
description: "Optional configuration for the `bind` type."
249
253
type: "object"
@@ -502,6 +506,9 @@ definitions:
502
506
Retries:
503
507
description: "The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit."
504
508
type: "integer"
509
+
StartPeriod:
510
+
description: "Start period for the container to initialize before starting health-retries countdown in nanoseconds. 0 means inherit."
511
+
type: "integer"
505
512
506
513
HostConfig:
507
514
description: "Container configuration that depends on the host we are running on"
@@ -750,7 +757,7 @@ definitions:
750
757
default: false
751
758
Env:
752
759
description: |
753
-
A list of environment variables to set inside the container in the form `["VAR=value", ...]`
760
+
A list of environment variables to set inside the container in the form `["VAR=value", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value.
description: "Docker Version used to create the plugin"
1466
+
type: "string"
1467
+
x-nullable: false
1452
1468
Description:
1453
1469
type: "string"
1454
1470
x-nullable: false
@@ -1512,6 +1528,12 @@ definitions:
1512
1528
PropagatedMount:
1513
1529
type: "string"
1514
1530
x-nullable: false
1531
+
IpcHost:
1532
+
type: "boolean"
1533
+
x-nullable: false
1534
+
PidHost:
1535
+
type: "boolean"
1536
+
x-nullable: false
1515
1537
Mounts:
1516
1538
type: "array"
1517
1539
items:
@@ -2274,6 +2296,12 @@ definitions:
2274
2296
description: "The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1."
2275
2297
type: "number"
2276
2298
default: 0
2299
+
Order:
2300
+
description: "The order of operations when rolling out an updated task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down."
2301
+
type: "string"
2302
+
enum:
2303
+
- "stop-first"
2304
+
- "start-first"
2277
2305
RollbackConfig:
2278
2306
description: "Specification for the rollback strategy of the service."
2279
2307
type: "object"
@@ -2300,6 +2328,12 @@ definitions:
2300
2328
description: "The fraction of tasks that may fail during a rollback before the failure action is invoked, specified as a floating point number between 0 and 1."
2301
2329
type: "number"
2302
2330
default: 0
2331
+
Order:
2332
+
description: "The order of operations when rolling back a task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down."
2333
+
type: "string"
2334
+
enum:
2335
+
- "stop-first"
2336
+
- "start-first"
2303
2337
Networks:
2304
2338
description: "Array of network names or IDs to attach the service to."
2305
2339
type: "array"
@@ -6191,6 +6225,7 @@ paths:
6191
6225
EnableIPv6: false
6192
6226
Internal: false
6193
6227
Attachable: false
6228
+
Ingress: false
6194
6229
IPAM:
6195
6230
Driver: "default"
6196
6231
Config:
@@ -6217,6 +6252,7 @@ paths:
6217
6252
EnableIPv6: false
6218
6253
Internal: false
6219
6254
Attachable: false
6255
+
Ingress: false
6220
6256
IPAM:
6221
6257
Driver: "default"
6222
6258
Config: []
@@ -6230,6 +6266,7 @@ paths:
6230
6266
EnableIPv6: false
6231
6267
Internal: false
6232
6268
Attachable: false
6269
+
Ingress: false
6233
6270
IPAM:
6234
6271
Driver: "default"
6235
6272
Config: []
@@ -6249,6 +6286,7 @@ paths:
6249
6286
- `id=<network-id>` Matches all or part of a network ID.
6250
6287
- `label=<key>` or `label=<key>=<value>` of a network label.
6251
6288
- `name=<network-name>` Matches all or part of a network name.
6289
+
- `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`).
6252
6290
- `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks.
6253
6291
type: "string"
6254
6292
tags: ["Network"]
@@ -6362,6 +6400,9 @@ paths:
6362
6400
Attachable:
6363
6401
description: "Globally scoped network is manually attachable by regular containers from workers in swarm mode."
6364
6402
type: "boolean"
6403
+
Ingress:
6404
+
description: "Ingress network is the network which provides the routing-mesh in swarm mode."
6405
+
type: "boolean"
6365
6406
IPAM:
6366
6407
description: "Optional custom IP scheme for the network."
description: "Fill empty fields with default values."
7586
+
type: "boolean"
7587
+
default: false
7539
7588
tags: ["Service"]
7540
7589
delete:
7541
7590
summary: "Delete a service"
@@ -7677,12 +7726,12 @@ paths:
7677
7726
schema:
7678
7727
type: "string"
7679
7728
404:
7680
-
description: "no such container"
7729
+
description: "no such service"
7681
7730
schema:
7682
7731
$ref: "#/definitions/ErrorResponse"
7683
7732
examples:
7684
7733
application/json:
7685
-
message: "No such container: c2ada9df5af8"
7734
+
message: "No such service: c2ada9df5af8"
7686
7735
500:
7687
7736
description: "server error"
7688
7737
schema:
@@ -7695,11 +7744,11 @@ paths:
7695
7744
- name: "id"
7696
7745
in: "path"
7697
7746
required: true
7698
-
description: "ID or name of the container"
7747
+
description: "ID or name of the service"
7699
7748
type: "string"
7700
7749
- name: "details"
7701
7750
in: "query"
7702
-
description: "Show extra details provided to logs."
7751
+
description: "Show service context and extra details provided to logs."
7703
7752
type: "boolean"
7704
7753
default: false
7705
7754
- name: "follow"
@@ -7912,6 +7961,86 @@ paths:
7912
7961
required: true
7913
7962
type: "string"
7914
7963
tags: ["Task"]
7964
+
/tasks/{id}/logs:
7965
+
get:
7966
+
summary: "Get task logs"
7967
+
description: |
7968
+
Get `stdout` and `stderr` logs from a task.
7969
+
7970
+
**Note**: This endpoint works only for services with the `json-file` or `journald` logging drivers.
7971
+
operationId: "TaskLogs"
7972
+
produces:
7973
+
- "application/vnd.docker.raw-stream"
7974
+
- "application/json"
7975
+
responses:
7976
+
101:
7977
+
description: "logs returned as a stream"
7978
+
schema:
7979
+
type: "string"
7980
+
format: "binary"
7981
+
200:
7982
+
description: "logs returned as a string in response body"
7983
+
schema:
7984
+
type: "string"
7985
+
404:
7986
+
description: "no such task"
7987
+
schema:
7988
+
$ref: "#/definitions/ErrorResponse"
7989
+
examples:
7990
+
application/json:
7991
+
message: "No such task: c2ada9df5af8"
7992
+
500:
7993
+
description: "server error"
7994
+
schema:
7995
+
$ref: "#/definitions/ErrorResponse"
7996
+
503:
7997
+
description: "node is not part of a swarm"
7998
+
schema:
7999
+
$ref: "#/definitions/ErrorResponse"
8000
+
parameters:
8001
+
- name: "id"
8002
+
in: "path"
8003
+
required: true
8004
+
description: "ID of the task"
8005
+
type: "string"
8006
+
- name: "details"
8007
+
in: "query"
8008
+
description: "Show task context and extra details provided to logs."
8009
+
type: "boolean"
8010
+
default: false
8011
+
- name: "follow"
8012
+
in: "query"
8013
+
description: |
8014
+
Return the logs as a stream.
8015
+
8016
+
This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach).
8017
+
type: "boolean"
8018
+
default: false
8019
+
- name: "stdout"
8020
+
in: "query"
8021
+
description: "Return logs from `stdout`"
8022
+
type: "boolean"
8023
+
default: false
8024
+
- name: "stderr"
8025
+
in: "query"
8026
+
description: "Return logs from `stderr`"
8027
+
type: "boolean"
8028
+
default: false
8029
+
- name: "since"
8030
+
in: "query"
8031
+
description: "Only return logs since this time, as a UNIX timestamp"
8032
+
type: "integer"
8033
+
default: 0
8034
+
- name: "timestamps"
8035
+
in: "query"
8036
+
description: "Add timestamps to every log line"
8037
+
type: "boolean"
8038
+
default: false
8039
+
- name: "tail"
8040
+
in: "query"
8041
+
description: "Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines."
8042
+
type: "string"
8043
+
default: "all"
7915
8044
/secrets:
7916
8045
get:
7917
8046
summary: "List secrets"
@@ -7948,6 +8077,9 @@ paths:
7948
8077
description: |
7949
8078
A JSON encoded value of the filters (a `map[string][]string`) to process on the secrets list. Available filters:
0 commit comments