Browse code

Add swagger.yaml

Generate Volume type from the swagger.yaml
Add makefile target for generating the models

Signed-off-by: Daniel Nephin <dnephin@docker.com>

Daniel Nephin authored on 2016/10/04 03:14:53
Showing 5 changed files
... ...
@@ -137,3 +137,9 @@ validate: build ## validate DCO, Seccomp profile generation, gofmt,\n./pkg/ isol
137 137
 
138 138
 win: build ## cross build the binary for windows
139 139
 	$(DOCKER_RUN_DOCKER) hack/make.sh win
140
+
141
+.PHONY: swagger-gen
142
+swagger-gen:
143
+	docker run --rm -v $(PWD):/work -w /work quay.io/goswagger/swagger \
144
+		generate model -m "types" -f api/swagger.yaml -t api/ --skip-validator \
145
+			-n Volume
140 146
new file mode 100644
... ...
@@ -0,0 +1,6694 @@
0
+swagger: "2.0"
1
+schemes:
2
+  - "http"
3
+  - "https"
4
+produces:
5
+  - "application/json"
6
+  - "text/plain"
7
+consumes:
8
+  - "application/json"
9
+  - "text/plain"
10
+basePath: "/v1.25"
11
+info:
12
+  title: "Docker Remote API"
13
+  version: "1.25"
14
+  description: |
15
+    The Docker API is an HTTP REST API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API.
16
+
17
+    Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. [There is example of using `curl` to run a container in the SDK documentation.](#TODO)
18
+
19
+    # Errors
20
+
21
+    The Remote API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format:
22
+
23
+    ```
24
+    {
25
+      "message": "page not found"
26
+    }
27
+    ```
28
+
29
+    # Versioning
30
+
31
+    The API is usually changed in each release of Docker. If you want to write a client that doesn't break when connecting to newer Docker releases, you can lock to a specific API version.
32
+
33
+    For Docker 1.13, the API version is 1.25. To lock to this version, you prefix the URL with `/v1.25`. For example, calling `/info` is the same as calling `/v1.25/info`.
34
+
35
+    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.
36
+
37
+    # Authentication
38
+
39
+    Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a Base64 encoded (JSON) string with the following structure:
40
+
41
+    ```
42
+    {
43
+      "username": "string",
44
+      "password": "string",
45
+      "email": "string",
46
+      "serveraddress": "string"
47
+    }
48
+    ```
49
+
50
+    The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required.
51
+
52
+    If you have already got an identity token from the [`/auth` endpoint](#operation/checkAuthentication), you can just pass this instead of credentials:
53
+
54
+    ```
55
+    {
56
+      "identitytoken": "9cbaf023786cd7..."
57
+    }
58
+    ```
59
+
60
+definitions:
61
+  Port:
62
+    type: "object"
63
+    description: "An open port on a container"
64
+    properties:
65
+      IP:
66
+        type: "string"
67
+      PrivatePort:
68
+        type: "integer"
69
+        description: "Port on the container"
70
+      PublicPort:
71
+        type: "integer"
72
+        description: "Port exposed on the host"
73
+      Type:
74
+        type: "string"
75
+        enum:
76
+          - "tcp"
77
+          - "udp"
78
+  MountPoint:
79
+    type: "object"
80
+    description: "A mount point inside a container"
81
+    properties:
82
+      Type:
83
+        type: "string"
84
+      Name:
85
+        type: "string"
86
+      Source:
87
+        type: "string"
88
+      Destination:
89
+        type: "string"
90
+      Driver:
91
+        type: "string"
92
+      Mode:
93
+        type: "string"
94
+      RW:
95
+        type: "boolean"
96
+      Propagation:
97
+        type: "string"
98
+  DeviceMapping:
99
+    type: "object"
100
+    description: "A device mapping between the host and container"
101
+    properties:
102
+      PathOnHost:
103
+        type: "string"
104
+      PathInContainer:
105
+        type: "string"
106
+      CgroupPermissions:
107
+        type: "string"
108
+    example:
109
+      PathOnHost: "/dev/deviceName"
110
+      PathInContainer: "/dev/deviceName"
111
+      CgroupPermissions: "mrw"
112
+  ThrottleDevice:
113
+    type: "object"
114
+    properties:
115
+      Path:
116
+        description: "Device path"
117
+        type: "string"
118
+      Rate:
119
+        description: "Rate"
120
+        type: "integer"
121
+        format: "int64"
122
+        minimum: 0
123
+  Mount:
124
+    type: "object"
125
+    properties:
126
+      Target:
127
+        description: "Container path."
128
+        type: "string"
129
+      Source:
130
+        description: "Mount source (e.g. a volume name, a host path)."
131
+      Type:
132
+        description: |
133
+          The mount type. Available types:
134
+
135
+          - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container.
136
+          - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed.
137
+        type: "string"
138
+        enum:
139
+          - "bind"
140
+          - "volume"
141
+      ReadOnly:
142
+        description: "Whether the mount should be read-only."
143
+        type: "boolean"
144
+      BindOptions:
145
+        description: "Optional configuration for the `bind` type."
146
+        type: "object"
147
+        properties:
148
+          Propagation:
149
+            description: "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`."
150
+            enum:
151
+              - "private"
152
+              - "rprivate"
153
+              - "shared"
154
+              - "rshared"
155
+              - "slave"
156
+              - "rslave"
157
+      VolumeOptions:
158
+        description: "Optional configuration for the `volume` type."
159
+        type: "object"
160
+        properties:
161
+          NoCopy:
162
+            description: "Populate volume with data from the target."
163
+            type: "boolean"
164
+            default: false
165
+          Labels:
166
+            description: "User-defined name and labels for the volume as key/value pairs."
167
+            type: "object"
168
+            additionalProperties:
169
+              type: "string"
170
+          DriverConfig:
171
+            description: "Map of driver specific options"
172
+            type: "object"
173
+            properties:
174
+              Name:
175
+                description: "Name of the driver to use to create the volume."
176
+                type: "string"
177
+              Options:
178
+                description: "key/value map of driver specific options."
179
+                type: "object"
180
+                additionalProperties:
181
+                  type: "string"
182
+  RestartPolicy:
183
+    description: |
184
+      The behavior to apply when the container exits. The default is not to restart.
185
+
186
+      An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server.
187
+    type: "object"
188
+    properties:
189
+      Name:
190
+        type: "string"
191
+        description: |
192
+          - `always` Always restart
193
+          - `unless-stopped` Restart always except when the user has manually stopped the container
194
+          - `on-failure` Restart only when the container exit code is non-zero
195
+        enum:
196
+          - "always"
197
+          - "unless-stopped"
198
+          - "on-failure"
199
+      MaximumRetryCount:
200
+        type: "integer"
201
+        description: "If `on-failure` is used, the number of times to retry before giving up"
202
+    default: {}
203
+  Resources:
204
+    description: "A container's resources (cgroups config, ulimits, etc)"
205
+    type: "object"
206
+    properties:
207
+      # Applicable to all platforms
208
+      CpuShares:
209
+        description: "An integer value representing this container's relative CPU weight versus other containers."
210
+        type: "integer"
211
+      Memory:
212
+        description: "Memory limit in bytes."
213
+        type: "integer"
214
+        default: 0
215
+      # Applicable to UNIX platforms
216
+      CgroupParent:
217
+        description: "Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist."
218
+        type: "string"
219
+      BlkioWeight:
220
+        description: "Block IO weight (relative weight)."
221
+        type: "integer"
222
+        minimum: 10
223
+        maximum: 1000
224
+      BlkioWeightDevice:
225
+        description: |
226
+          Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`.
227
+        type: "array"
228
+        items:
229
+          type: "object"
230
+          properties:
231
+            Path:
232
+              type: "string"
233
+            Weight:
234
+              type: "integer"
235
+              minimum: 0
236
+      BlkioDeviceReadBps:
237
+        description: |
238
+          Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
239
+        type: "array"
240
+        items:
241
+          $ref: "#/definitions/ThrottleDevice"
242
+      BlkioDeviceWriteBps:
243
+        description: |
244
+          Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
245
+        type: "array"
246
+        items:
247
+          $ref: "#/definitions/ThrottleDevice"
248
+      BlkioDeviceReadIOps:
249
+        description: |
250
+          Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
251
+        type: "array"
252
+        items:
253
+          $ref: "#/definitions/ThrottleDevice"
254
+      BlkioDeviceWriteIOps:
255
+        description: |
256
+          Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
257
+        type: "array"
258
+        items:
259
+          $ref: "#/definitions/ThrottleDevice"
260
+      CpuPeriod:
261
+        description: "The length of a CPU period in microseconds."
262
+        type: "integer"
263
+      CpuQuota:
264
+        description: "Microseconds of CPU time that the container can get in a CPU period."
265
+        type: "integer"
266
+      CpusetCpus:
267
+        description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)"
268
+        type: "string"
269
+      CpusetMems:
270
+        description: "Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems."
271
+        type: "string"
272
+      Devices:
273
+        description: "A list of devices to add to the container."
274
+        type: "array"
275
+        items:
276
+          $ref: "#/definitions/DeviceMapping"
277
+      DiskQuota:
278
+        description: "Disk limit (in bytes)."
279
+        type: "integer"
280
+        format: "int64"
281
+      KernelMemory:
282
+        description: "Kernel memory limit in bytes."
283
+        type: "integer"
284
+        format: "int64"
285
+      MemoryReservation:
286
+        description: "Memory soft limit in bytes."
287
+        type: "integer"
288
+        format: "int64"
289
+      MemorySwap:
290
+        description: "Total memory limit (memory + swap). Set as `-1` to enable unlimited swap."
291
+        type: "integer"
292
+        format: "int64"
293
+      MemorySwappiness:
294
+        description: "Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100."
295
+        type: "integer"
296
+        format: "int64"
297
+        minimum: 0
298
+        maximum: 100
299
+      OomKillDisable:
300
+        description: "Disable OOM Killer for the container."
301
+        type: "boolean"
302
+      PidsLimit:
303
+        description: "Tune a container's pids limit. Set -1 for unlimited."
304
+        type: "integer"
305
+        format: "int64"
306
+      Ulimits:
307
+        description: |
308
+          A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`"
309
+        type: "array"
310
+        items:
311
+          type: "object"
312
+          properties:
313
+            Name:
314
+              description: "Name of ulimit"
315
+              type: "string"
316
+            Soft:
317
+              description: "Soft limit"
318
+              type: "integer"
319
+            Hard:
320
+              description: "Hard limit"
321
+              type: "integer"
322
+      # Applicable to Windows
323
+      CpuCount:
324
+        description: "CPU count (Windows only)"
325
+        type: "integer"
326
+        format: "int64"
327
+      CpuPercent:
328
+        description: "CPU percent (Windows only)"
329
+        type: "integer"
330
+        format: "int64"
331
+      IOMaximumIOps:
332
+        description: "Maximum IOps for the container system drive (Windows only)"
333
+        type: "integer"
334
+        format: "int64"
335
+      IOMaximumBandwidth:
336
+        description: "Maximum IO in bytes per second for the container system drive (Windows only)"
337
+        type: "integer"
338
+        format: "int64"
339
+
340
+  HostConfig:
341
+    description: "Container configuration that depends on the host we are running on"
342
+    allOf:
343
+      - $ref: "#/definitions/Resources"
344
+      - type: "object"
345
+        properties:
346
+          # Applicable to all platforms
347
+          Binds:
348
+            type: "array"
349
+            description: |
350
+              A list of volume bindings for this container. Each volume binding is a string in one of these forms:
351
+
352
+              - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path.
353
+              - `host-src:container-dest:ro` to make the bind-mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path.
354
+              - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path.
355
+              - `volume-name:container-dest:ro` to mount the volume read-only inside the container.  `container-dest` must be an _absolute_ path.
356
+            items:
357
+              type: "string"
358
+          ContainerIDFile:
359
+            type: "string"
360
+            description: "Path to a file where the container ID is written"
361
+          LogConfig:
362
+            type: "object"
363
+            description: "The logging configuration for this container"
364
+            properties:
365
+              Type:
366
+                type: "string"
367
+                enum:
368
+                  - "json-file"
369
+                  - "syslog"
370
+                  - "journald"
371
+                  - "gelf"
372
+                  - "fluentd"
373
+                  - "awslogs"
374
+                  - "splunk"
375
+                  - "etwlogs"
376
+                  - "none"
377
+              Config:
378
+                type: "object"
379
+                additionalProperties:
380
+                  type: "string"
381
+          NetworkMode:
382
+            type: "string"
383
+            description: "Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:<name|id>`. Any other value is taken
384
+              as a custom network's name to which this container should connect to."
385
+          PortBindings:
386
+            type: "object"
387
+            description: "A map of exposed container ports and the host port they should map to."
388
+            additionalProperties:
389
+              type: "object"
390
+              properties:
391
+                HostIp:
392
+                  type: "string"
393
+                  description: "The host IP address"
394
+                HostPort:
395
+                  type: "string"
396
+                  description: "The host port number, as a string"
397
+          RestartPolicy:
398
+            $ref: "#/definitions/RestartPolicy"
399
+          AutoRemove:
400
+            type: "boolean"
401
+            description: "Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set."
402
+          VolumeDriver:
403
+            type: "string"
404
+            description: "Driver that this container uses to mount volumes."
405
+          VolumesFrom:
406
+            type: "array"
407
+            description: "A list of volumes to inherit from another container, specified in the form `<container name>[:<ro|rw>]`."
408
+            items:
409
+              type: "string"
410
+          Mounts:
411
+            description: "Specification for mounts to be added to the container."
412
+            type: "array"
413
+            items:
414
+              $ref: "#/definitions/Mount"
415
+
416
+          # Applicable to UNIX platforms
417
+          CapAdd:
418
+            type: "array"
419
+            description: "A list of kernel capabilities to add to the container."
420
+            items:
421
+              type: "string"
422
+          CapDrop:
423
+            type: "array"
424
+            description: "A list of kernel capabilities to drop from the container."
425
+            items:
426
+              type: "string"
427
+          Dns:
428
+            type: "array"
429
+            description: "A list of DNS servers for the container to use."
430
+            items:
431
+              type: "string"
432
+          DnsOptions:
433
+            type: "array"
434
+            description: "A list of DNS options."
435
+            items:
436
+              type: "string"
437
+          DnsSearch:
438
+            type: "array"
439
+            description: "A list of DNS search domains."
440
+            items:
441
+              type: "string"
442
+          ExtraHosts:
443
+            type: "array"
444
+            description: |
445
+              A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`.
446
+            items:
447
+              type: "string"
448
+          GroupAdd:
449
+            type: "array"
450
+            description: "A list of additional groups that the container process will run as."
451
+            items:
452
+              type: "string"
453
+          IpcMode:
454
+            type: "string"
455
+            description: "IPC namespace to use for the container."
456
+          Cgroup:
457
+            type: "string"
458
+            description: "Cgroup to use for the container."
459
+          Links:
460
+            type: "array"
461
+            description: "A list of links for the container in the form `container_name:alias`."
462
+            items:
463
+              type: "string"
464
+          OomScoreAdj:
465
+            type: "integer"
466
+            description: "An integer value containing the score given to the container in order to tune OOM killer preferences."
467
+          PidMode:
468
+            type: "string"
469
+            description: |
470
+              Set the PID (Process) Namespace mode for the container. It can be either:
471
+
472
+              - `"container:<name|id>"`: joins another container's PID namespace
473
+              - `"host"`: use the host's PID namespace inside the container
474
+          Privileged:
475
+            type: "boolean"
476
+            description: "Gives the container full access to the host."
477
+          PublishAllPorts:
478
+            type: "boolean"
479
+            description: "Allocates a random host port for all of a container's exposed ports."
480
+          ReadonlyRootfs:
481
+            type: "boolean"
482
+            description: "Mount the container's root filesystem as read only."
483
+          SecurityOpt:
484
+            type: "array"
485
+            description: "A list of string values to customize labels for MLS
486
+            systems, such as SELinux."
487
+            items:
488
+              type: "string"
489
+          StorageOpt:
490
+            type: "object"
491
+            description: |
492
+              Storage driver options for this container, in the form `{"size": "120G"}`.
493
+            additionalProperties:
494
+              type: "string"
495
+          Tmpfs:
496
+            type: "object"
497
+            description: "List of tmpfs mounts for this container."
498
+            additionalProperties:
499
+              type: "string"
500
+          UTSMode:
501
+            type: "string"
502
+            description: "UTS namespace to use for the container."
503
+          UsernsMode:
504
+            type: "string"
505
+            description: "Sets the usernamespace mode for the container when usernamespace remapping option is enabled."
506
+          ShmSize:
507
+            type: "integer"
508
+            description: "Size of `/dev/shm` in bytes. If omitted, the system uses 64MB."
509
+            minimum: 0
510
+          Sysctls:
511
+            type: "object"
512
+            description: |
513
+              A list of kernel parameters (sysctls) to set in the container. For example: `{ "net.ipv4.ip_forward": "1" }`
514
+            additionalProperties:
515
+              type: "string"
516
+          Runtime:
517
+            type: "string"
518
+            description: "Runtime to use with this container."
519
+          # Applicable to Windows
520
+          ConsoleSize:
521
+            type: "array"
522
+            description: "Initial console size, as an `[height, width]` array. (Windows only)"
523
+            minItems: 2
524
+            maxItems: 2
525
+            items:
526
+              type: "integer"
527
+              minimum: 0
528
+          Isolation:
529
+            type: "string"
530
+            description: "Isolation technology of the container. (Windows only)"
531
+            enum:
532
+              - "default"
533
+              - "process"
534
+              - "hyperv"
535
+
536
+  Config:
537
+    description: "Configuration for a container that is portable between hosts"
538
+    type: "object"
539
+    properties:
540
+      Hostname:
541
+        description: "The hostname to use for the container, as a valid RFC 1123 hostname."
542
+        type: "string"
543
+      Domainname:
544
+        description: "The domain name to use for the container."
545
+        type: "string"
546
+      User:
547
+        description: "The user that commands are run as inside the container."
548
+        type: "string"
549
+      AttachStdin:
550
+        description: "Whether to attach to stdin."
551
+        type: "boolean"
552
+        default: false
553
+      AttachStdout:
554
+        description: "Whether to attach to stdout."
555
+        type: "boolean"
556
+        default: true
557
+      AttachStderr:
558
+        description: "Whether to attach to stderr."
559
+        type: "boolean"
560
+        default: true
561
+      ExposedPorts:
562
+        description: |
563
+          An object mapping ports to an empty object in the form:
564
+
565
+          `{"<port>/<tcp|udp>": {}}`
566
+        type: "object"
567
+        additionalProperties:
568
+          type: "object"
569
+          enum:
570
+            - {}
571
+          default: {}
572
+      Tty:
573
+        description: "Attach standard streams to a TTY, including stdin if it is not closed."
574
+        type: "boolean"
575
+        default: false
576
+      OpenStdin:
577
+        description: "Open stdin"
578
+        type: "boolean"
579
+        default: false
580
+      StdinOnce:
581
+        description: "Close stdin after one attached client disconnects"
582
+        type: "boolean"
583
+        default: false
584
+      Env:
585
+        description: |
586
+          A list of environment variables to set inside the container in the form `["VAR=value"[,"VAR2=value2"]]`
587
+        type: "array"
588
+        items:
589
+          type: "string"
590
+      Cmd:
591
+        description: "Command to run specified as a string or an array of strings."
592
+        type:
593
+          - "array"
594
+          - "string"
595
+        items:
596
+          type: "string"
597
+      Healthcheck:
598
+        description: "A test to perform to check that the container is healthy."
599
+        type: "object"
600
+        properties:
601
+          Test:
602
+            description: |
603
+              The test to perform. Possible values are:
604
+
605
+              - `{}` inherit healthcheck from image or parent image
606
+              - `{"NONE"}` disable healthcheck
607
+              - `{"CMD", args...}` exec arguments directly
608
+              - `{"CMD-SHELL", command}` run command with system's default shell
609
+            type: "array"
610
+            items:
611
+              type: "string"
612
+          Interval:
613
+            description: "The time to wait between checks in nanoseconds. 0 means inherit."
614
+            type: "integer"
615
+          Timeout:
616
+            description: "The time to wait before considering the check to have hung. 0 means inherit."
617
+            type: "integer"
618
+          Retries:
619
+            description: "The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit."
620
+            type: "integer"
621
+      ArgsEscaped:
622
+        description: "Command is already escaped (Windows only)"
623
+        type: "boolean"
624
+      Image:
625
+        description: "The name of the image to use when creating the container"
626
+        type: "string"
627
+      Volumes:
628
+        description: "An object mapping mount point paths inside the container to empty objects."
629
+        type: "object"
630
+        properties:
631
+          additionalProperties:
632
+            type: "object"
633
+            enum:
634
+              - {}
635
+            default: {}
636
+      WorkingDir:
637
+        description: "The working directory for commands to run in."
638
+        type: "string"
639
+      Entrypoint:
640
+        description: |
641
+          The entry point for the container as a string or an array of strings.
642
+
643
+          If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the Dockerfile).
644
+        type:
645
+          - "array"
646
+          - "string"
647
+        items:
648
+          type: "string"
649
+      NetworkDisabled:
650
+        description: "Disable networking for the container."
651
+        type: "boolean"
652
+      MacAddress:
653
+        description: "MAC address of the container."
654
+        type: "string"
655
+      OnBuild:
656
+        description: "`ONBUILD` metadata that were defined in the image's `Dockerfile`."
657
+        type: "array"
658
+        items:
659
+          type: "string"
660
+      Labels:
661
+        description: "User-defined key/value data attached to the container."
662
+        type: "object"
663
+        additionalProperties:
664
+          type: "string"
665
+      StopSignal:
666
+        description: "Signal to stop a container as a string or unsigned integer."
667
+        type: "string"
668
+        default: "SIGTERM"
669
+      Shell:
670
+        description: "Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell."
671
+        type: "array"
672
+        items:
673
+          type: "string"
674
+  NetworkConfig:
675
+    description: "TODO: check is correct"
676
+    type: "object"
677
+    properties:
678
+      Bridge:
679
+        type: "string"
680
+      Gateway:
681
+        type: "string"
682
+      Address:
683
+        type: "string"
684
+      IPPrefixLen:
685
+        type: "integer"
686
+      MacAddress:
687
+        type: "string"
688
+      PortMapping:
689
+        type: "string"
690
+      Ports:
691
+        type: "array"
692
+        items:
693
+          $ref: "#/definitions/Port"
694
+  GraphDriver:
695
+    description: "Information about this container's graph driver."
696
+    type: "object"
697
+    properties:
698
+      Name:
699
+        type: "string"
700
+      Data:
701
+        type: "object"
702
+        additionalProperties:
703
+          type: "string"
704
+  Image:
705
+    type: "object"
706
+    properties:
707
+      Id:
708
+        type: "string"
709
+      RepoTags:
710
+        type: "array"
711
+        items:
712
+          type: "string"
713
+      RepoDigests:
714
+        type: "array"
715
+        items:
716
+          type: "string"
717
+      Parent:
718
+        type: "string"
719
+      Comment:
720
+        type: "string"
721
+      Created:
722
+        type: "string"
723
+      Container:
724
+        type: "string"
725
+      ContainerConfig:
726
+        $ref: "#/definitions/Config"
727
+      DockerVersion:
728
+        type: "string"
729
+      Author:
730
+        type: "string"
731
+      Config:
732
+        $ref: "#/definitions/Config"
733
+      Architecture:
734
+        type: "string"
735
+      Os:
736
+        type: "string"
737
+      Size:
738
+        type: "integer"
739
+        format: "int64"
740
+      VirtualSize:
741
+        type: "integer"
742
+        format: "int64"
743
+      GraphDriver:
744
+        $ref: "#/definitions/GraphDriver"
745
+      RootFS:
746
+        type: "object"
747
+        properties:
748
+          Type:
749
+            type: "string"
750
+          Layers:
751
+            type: "array"
752
+            items:
753
+              type: "string"
754
+          BaseLayer:
755
+            type: "string"
756
+  AuthConfig:
757
+    type: "object"
758
+    properties:
759
+      username:
760
+        type: "string"
761
+      password:
762
+        type: "string"
763
+      email:
764
+        type: "string"
765
+      serveraddress:
766
+        type: "string"
767
+    example:
768
+      username: "hannibal"
769
+      password: "xxxx"
770
+      serveraddress: "https://index.docker.io/v1/"
771
+  ProcessConfig:
772
+    type: "object"
773
+    properties:
774
+      privileged:
775
+        type: "boolean"
776
+      user:
777
+        type: "string"
778
+      tty:
779
+        type: "boolean"
780
+      entrypoint:
781
+        type: "string"
782
+      arguments:
783
+        type: "array"
784
+        items:
785
+          type: "string"
786
+  Volume:
787
+    type: "object"
788
+    required: [Name, Driver, Mountpoint, Labels, Scope]
789
+    properties:
790
+      Name:
791
+        type: "string"
792
+        description: "Name of the volume."
793
+        x-nullable: false
794
+      Driver:
795
+        type: "string"
796
+        description: "Name of the volume driver used by the volume."
797
+        x-nullable: false
798
+      Mountpoint:
799
+        type: "string"
800
+        description: "Mount path of the volume on the host."
801
+        x-nullable: false
802
+      Status:
803
+        type: "object"
804
+        description: |
805
+          Low-level details about the volume, provided by the volume driver.
806
+          Details are returned as a map with key/value pairs:
807
+          `{"key":"value","key2":"value2"}`.
808
+
809
+          The `Status` field is optional, and is omitted if the volume driver
810
+          does not support this feature.
811
+        additionalProperties:
812
+          type: "object"
813
+      Labels:
814
+        type: "object"
815
+        description: "A mapping of abitrary key/value data set on this volume."
816
+        x-nullable: false
817
+        additionalProperties:
818
+          type: "string"
819
+      Scope:
820
+        type: "string"
821
+        description: "The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level."
822
+        default: "local"
823
+        x-nullable: false
824
+        enum: ["local", "global"]
825
+      RefCount:
826
+        type: "integer"
827
+        default: -1
828
+        x-nullable: false
829
+      UsageData:
830
+        type: "object"
831
+        required: [Size, RefCount]
832
+        properties:
833
+          Size:
834
+            type: "integer"
835
+            description: "The disk space used by the volume (local driver only)"
836
+            default: -1
837
+            x-nullable: false
838
+          RefCount:
839
+            type: "integer"
840
+            description: "The number of containers referencing this volume."
841
+            x-nullable: false
842
+
843
+    example:
844
+      Name: "tardis"
845
+      Driver: "custom"
846
+      Mountpoint: "/var/lib/docker/volumes/tardis"
847
+      Status:
848
+        hello: "world"
849
+      Labels:
850
+        com.example.some-label: "some-value"
851
+        com.example.some-other-label: "some-other-value"
852
+      Scope: "local"
853
+  Network:
854
+    type: "object"
855
+    properties:
856
+      Name:
857
+        type: "string"
858
+      Id:
859
+        type: "string"
860
+      Scope:
861
+        type: "string"
862
+      Driver:
863
+        type: "string"
864
+      EnableIPv6:
865
+        type: "boolean"
866
+      IPAM:
867
+        $ref: "#/definitions/IPAM"
868
+      Internal:
869
+        type: "boolean"
870
+      Containers:
871
+        type: "object"
872
+        additionalProperties:
873
+          $ref: "#/definitions/NetworkContainer"
874
+      Options:
875
+        type: "object"
876
+        additionalProperties:
877
+          type: "string"
878
+      Labels:
879
+        type: "object"
880
+        additionalProperties:
881
+          type: "string"
882
+    example:
883
+      Name: "net01"
884
+      Id: "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99"
885
+      Scope: "local"
886
+      Driver: "bridge"
887
+      EnableIPv6: false
888
+      IPAM:
889
+        Driver: "default"
890
+        Config:
891
+          - Subnet: "172.19.0.0/16"
892
+            Gateway: "172.19.0.1"
893
+        Options:
894
+          foo: "bar"
895
+      Internal: false
896
+      Containers:
897
+        19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c:
898
+          Name: "test"
899
+          EndpointID: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a"
900
+          MacAddress: "02:42:ac:13:00:02"
901
+          IPv4Address: "172.19.0.2/16"
902
+          IPv6Address: ""
903
+      Options:
904
+        com.docker.network.bridge.default_bridge: "true"
905
+        com.docker.network.bridge.enable_icc: "true"
906
+        com.docker.network.bridge.enable_ip_masquerade: "true"
907
+        com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
908
+        com.docker.network.bridge.name: "docker0"
909
+        com.docker.network.driver.mtu: "1500"
910
+      Labels:
911
+        com.example.some-label: "some-value"
912
+        com.example.some-other-label: "some-other-value"
913
+  IPAM:
914
+    type: "object"
915
+    properties:
916
+      Config:
917
+        type: "array"
918
+        items:
919
+          type: "object"
920
+          additionalProperties:
921
+            type: "string"
922
+  NetworkContainer:
923
+    type: "object"
924
+    properties:
925
+      EndpointID:
926
+        type: "string"
927
+      MacAddress:
928
+        type: "string"
929
+      IPv4Address:
930
+        type: "string"
931
+      IPv6Address:
932
+        type: "string"
933
+  BuildInfo:
934
+    type: "object"
935
+    properties:
936
+      id:
937
+        type: "string"
938
+      stream:
939
+        type: "string"
940
+      error:
941
+        type: "string"
942
+      errorDetail:
943
+        $ref: "#/definitions/ErrorDetail"
944
+      status:
945
+        type: "string"
946
+      progress:
947
+        type: "string"
948
+      progressDetail:
949
+        $ref: "#/definitions/ProgressDetail"
950
+  CreateImageInfo:
951
+    type: "object"
952
+    properties:
953
+      error:
954
+        type: "string"
955
+      status:
956
+        type: "string"
957
+      progress:
958
+        type: "string"
959
+      progressDetail:
960
+        $ref: "#/definitions/ProgressDetail"
961
+  PushImageInfo:
962
+    type: "object"
963
+    properties:
964
+      error:
965
+        type: "string"
966
+      status:
967
+        type: "string"
968
+      progress:
969
+        type: "string"
970
+      progressDetail:
971
+        $ref: "#/definitions/ProgressDetail"
972
+  ErrorDetail:
973
+    type: "object"
974
+    properties:
975
+      code:
976
+        type: "integer"
977
+      message:
978
+        type: "string"
979
+  ProgressDetail:
980
+    type: "object"
981
+    properties:
982
+      code:
983
+        type: "integer"
984
+      message:
985
+        type: "integer"
986
+  Error:
987
+    description: "Represents an error."
988
+    type: "object"
989
+    required: ["message"]
990
+    properties:
991
+      message:
992
+        description: "The error message."
993
+        type: "string"
994
+    example:
995
+      message: "Something went wrong."
996
+  EndpointSettings:
997
+    description: "Configuration for a network endpoint."
998
+    type: "object"
999
+    properties:
1000
+      IPAMConfig:
1001
+        description: "IPAM configurations for the endpoint"
1002
+        type: "object"
1003
+        properties:
1004
+          IPv4Address:
1005
+            type: "string"
1006
+          IPv6Address:
1007
+            type: "string"
1008
+          LinkLocalIPs:
1009
+            type: "array"
1010
+            items:
1011
+              type: "string"
1012
+      Links:
1013
+        type: "array"
1014
+        items:
1015
+          type: "string"
1016
+      Aliases:
1017
+        type: "array"
1018
+        items:
1019
+          type: "string"
1020
+      NetworkID:
1021
+        type: "string"
1022
+      EndpointID:
1023
+        type: "string"
1024
+      Gateway:
1025
+        type: "string"
1026
+      IPAddress:
1027
+        type: "string"
1028
+      IPPrefixLen:
1029
+        type: "integer"
1030
+      IPv6Gateway:
1031
+        type: "string"
1032
+      GlobalIPv6Address:
1033
+        type: "string"
1034
+      GlobalIPv6PrefixLen:
1035
+        type: "integer"
1036
+        format: "int64"
1037
+      MacAddress:
1038
+        type: "string"
1039
+  PluginMount:
1040
+    type: "object"
1041
+    properties:
1042
+      Name:
1043
+        type: "string"
1044
+      Description:
1045
+        type: "string"
1046
+      Settable:
1047
+        type: "array"
1048
+        items:
1049
+          type: "string"
1050
+      Source:
1051
+        type: "string"
1052
+      Destination:
1053
+        type: "string"
1054
+      Type:
1055
+        type: "string"
1056
+      Options:
1057
+        type: "array"
1058
+        items:
1059
+          type: "string"
1060
+  PluginDevice:
1061
+    type: "object"
1062
+    properties:
1063
+      Name:
1064
+        type: "string"
1065
+      Description:
1066
+        type: "string"
1067
+      Settable:
1068
+        type: "array"
1069
+        items:
1070
+          type: "string"
1071
+      Path:
1072
+        type: "string"
1073
+  Plugin:
1074
+    description: "A plugin for the Remote API"
1075
+    type: "object"
1076
+    properties:
1077
+      Id:
1078
+        type: "string"
1079
+      Name:
1080
+        type: "string"
1081
+      Tag:
1082
+        type: "string"
1083
+      Enabled:
1084
+        description: "True when the plugin is running. False when the plugin is not running, only installed."
1085
+        type: "boolean"
1086
+      Config:
1087
+        description: "Settings that can be modified by users."
1088
+        type: "object"
1089
+        properties:
1090
+          Mounts:
1091
+            type: "array"
1092
+            items:
1093
+              $ref: "#/definitions/PluginMount"
1094
+          Env:
1095
+            type: "array"
1096
+            items:
1097
+              type: "string"
1098
+          Args:
1099
+            type: "array"
1100
+            items:
1101
+              type: "string"
1102
+          Devices:
1103
+            type: "array"
1104
+            items:
1105
+              $ref: "#/definitions/PluginDevice"
1106
+      Manifest:
1107
+        description: "The manifest of a plugin."
1108
+        type: "object"
1109
+        properties:
1110
+          ManifestVersion:
1111
+            type: "string"
1112
+          Description:
1113
+            type: "string"
1114
+          Documentation:
1115
+            type: "string"
1116
+          Interface:
1117
+            description: "The interface between Docker and the plugin"
1118
+            type: "object"
1119
+            properties:
1120
+              Types:
1121
+                type: "array"
1122
+                items:
1123
+                  type: "string"
1124
+              Socket:
1125
+                type: "string"
1126
+          Entrypoint:
1127
+            type: "array"
1128
+            items:
1129
+              type: "string"
1130
+          Workdir:
1131
+            type: "string"
1132
+          User:
1133
+            type: "object"
1134
+            properties:
1135
+              UID:
1136
+                type: "integer"
1137
+              GID:
1138
+                type: "integer"
1139
+          Network:
1140
+            type: "object"
1141
+            properties:
1142
+              Type:
1143
+                type: "string"
1144
+          Capabilities:
1145
+            type: "array"
1146
+            items:
1147
+              type: "string"
1148
+          Mounts:
1149
+            type: "array"
1150
+            items:
1151
+              $ref: "#/definitions/PluginMount"
1152
+          Devices:
1153
+            type: "array"
1154
+            items:
1155
+              $ref: "#/definitions/PluginDevice"
1156
+          Env:
1157
+            type: "object"
1158
+            properties:
1159
+              Name:
1160
+                type: "string"
1161
+              Description:
1162
+                type: "string"
1163
+              Settable:
1164
+                type: "array"
1165
+                items:
1166
+                  type: "string"
1167
+              Value:
1168
+                type: "string"
1169
+          Args:
1170
+            type: "object"
1171
+            properties:
1172
+              Name:
1173
+                type: "string"
1174
+              Description:
1175
+                type: "string"
1176
+              Settable:
1177
+                type: "array"
1178
+                items:
1179
+                  type: "string"
1180
+              Value:
1181
+                type: "array"
1182
+                items:
1183
+                  type: "string"
1184
+    example:
1185
+      Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078"
1186
+      Name: "tiborvass/no-remove"
1187
+      Tag: "latest"
1188
+      Active: true
1189
+      Config:
1190
+        Mounts:
1191
+          - Name: ""
1192
+            Description: ""
1193
+            Settable: null
1194
+            Source: "/data"
1195
+            Destination: "/data"
1196
+            Type: "bind"
1197
+            Options:
1198
+              - "shared"
1199
+              - "rbind"
1200
+          - Name: ""
1201
+            Description: ""
1202
+            Settable: null
1203
+            Source: null
1204
+            Destination: "/foobar"
1205
+            Type: "tmpfs"
1206
+            Options: null
1207
+        Env:
1208
+          - "DEBUG=1"
1209
+        Args: null
1210
+        Devices: null
1211
+      Manifest:
1212
+        ManifestVersion: "v0"
1213
+        Description: "A test plugin for Docker"
1214
+        Documentation: "https://docs.docker.com/engine/extend/plugins/"
1215
+        Interface:
1216
+          Types:
1217
+            - "docker.volumedriver/1.0"
1218
+          Socket: "plugins.sock"
1219
+        Entrypoint:
1220
+          - "plugin-no-remove"
1221
+          - "/data"
1222
+        Workdir: ""
1223
+        User: {}
1224
+        Network:
1225
+          Type: "host"
1226
+        Capabilities: null
1227
+        Mounts:
1228
+          - Name: ""
1229
+            Description: ""
1230
+            Settable: null
1231
+            Source: "/data"
1232
+            Destination: "/data"
1233
+            Type: "bind"
1234
+            Options:
1235
+              - "shared"
1236
+              - "rbind"
1237
+          - Name: ""
1238
+            Description: ""
1239
+            Settable: null
1240
+            Source: null
1241
+            Destination: "/foobar"
1242
+            Type: "tmpfs"
1243
+            Options: null
1244
+        Devices:
1245
+          - Name: "device"
1246
+            Description: "a host device to mount"
1247
+            Settable: null
1248
+            Path: "/dev/cpu_dma_latency"
1249
+        Env:
1250
+          - Name: "DEBUG"
1251
+            Description: "If set, prints debug messages"
1252
+            Settable: null
1253
+            Value: "1"
1254
+        Args:
1255
+          Name: "args"
1256
+          Description: "command line arguments"
1257
+          Settable: null
1258
+          Value: []
1259
+  NodeSpec:
1260
+    type: "object"
1261
+    properties:
1262
+      Name:
1263
+        description: "Name for the node."
1264
+        type: "string"
1265
+      Labels:
1266
+        description: "User-defined key/value metadata."
1267
+        type: "object"
1268
+        additionalProperties:
1269
+          type: "string"
1270
+      Role:
1271
+        description: "Role of the node."
1272
+        type: "string"
1273
+        enum:
1274
+          - "worker"
1275
+          - "manager"
1276
+      Availability:
1277
+        description: "Availability of the node."
1278
+        type: "string"
1279
+        enum:
1280
+          - "active"
1281
+          - "pause"
1282
+          - "drain"
1283
+    example:
1284
+      Availability: "active"
1285
+      Name: "node-name"
1286
+      Role: "manager"
1287
+      Labels:
1288
+        foo: "bar"
1289
+  Node:
1290
+    type: "object"
1291
+    properties:
1292
+      ID:
1293
+        type: "string"
1294
+      Version:
1295
+        type: "object"
1296
+        properties:
1297
+          Index:
1298
+            type: "integer"
1299
+            format: "int64"
1300
+      CreatedAt:
1301
+        type: "string"
1302
+        format: "dateTime"
1303
+      UpdatedAt:
1304
+        type: "string"
1305
+        format: "dateTime"
1306
+      Spec:
1307
+        $ref: "#/definitions/NodeSpec"
1308
+      Description:
1309
+        type: "object"
1310
+        properties:
1311
+          Hostname:
1312
+            type: "string"
1313
+          Platform:
1314
+            type: "object"
1315
+            properties:
1316
+              Architecture:
1317
+                type: "string"
1318
+              OS:
1319
+                type: "string"
1320
+          Resources:
1321
+            type: "object"
1322
+            properties:
1323
+              NanoCPUs:
1324
+                type: "integer"
1325
+                format: "int64"
1326
+              MemoryBytes:
1327
+                type: "integer"
1328
+                format: "int64"
1329
+          Engine:
1330
+            type: "object"
1331
+            properties:
1332
+              EngineVersion:
1333
+                type: "string"
1334
+              Labels:
1335
+                type: "object"
1336
+                additionalProperties:
1337
+                  type: "string"
1338
+              Plugins:
1339
+                type: "array"
1340
+                items:
1341
+                  type: "object"
1342
+                  properties:
1343
+                    Type:
1344
+                      type: "string"
1345
+                    Name:
1346
+                      type: "string"
1347
+    example:
1348
+      ID: "24ifsmvkjbyhk"
1349
+      Version:
1350
+        Index: 8
1351
+      CreatedAt: "2016-06-07T20:31:11.853781916Z"
1352
+      UpdatedAt: "2016-06-07T20:31:11.999868824Z"
1353
+      Spec:
1354
+        Name: "my-node"
1355
+        Role: "manager"
1356
+        Availability: "active"
1357
+        Labels:
1358
+          foo: "bar"
1359
+      Description:
1360
+        Hostname: "bf3067039e47"
1361
+        Platform:
1362
+          Architecture: "x86_64"
1363
+          OS: "linux"
1364
+        Resources:
1365
+          NanoCPUs: 4000000000
1366
+          MemoryBytes: 8272408576
1367
+        Engine:
1368
+          EngineVersion: "1.12.0-dev"
1369
+          Labels:
1370
+            foo: "bar"
1371
+          Plugins:
1372
+            - Type: "Volume"
1373
+              Name: "local"
1374
+            - Type: "Network"
1375
+              Name: "bridge"
1376
+            - Type: "Network"
1377
+              Name: "null"
1378
+            - Type: "Network"
1379
+              Name: "overlay"
1380
+      Status:
1381
+        State: "ready"
1382
+      ManagerStatus:
1383
+        Leader: true
1384
+        Reachability: "reachable"
1385
+        Addr: "172.17.0.2:2377"
1386
+  SwarmSpec:
1387
+    description: "User modifiable swarm configuration."
1388
+    type: "object"
1389
+    properties:
1390
+      Name:
1391
+        description: "Name of the swarm."
1392
+        type: "string"
1393
+      Labels:
1394
+        description: "User-defined key/value metadata."
1395
+        type: "object"
1396
+        additionalProperties:
1397
+          type: "string"
1398
+      Orchestration:
1399
+        description: "Orchestration configuration."
1400
+        type: "object"
1401
+        properties:
1402
+          TaskHistoryRetentionLimit:
1403
+            description: "The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks."
1404
+            type: "integer"
1405
+            format: "int64"
1406
+      Raft:
1407
+        description: "Raft configuration."
1408
+        type: "object"
1409
+        properties:
1410
+          SnapshotInterval:
1411
+            description: "The number of log entries between snapshots."
1412
+            type: "integer"
1413
+            format: "int64"
1414
+          KeepOldSnapshots:
1415
+            description: "The number of snapshots to keep beyond the current snapshot."
1416
+            type: "integer"
1417
+            format: "int64"
1418
+          LogEntriesForSlowFollowers:
1419
+            description: "The number of log entries to keep around to sync up slow followers after a snapshot is created."
1420
+            type: "integer"
1421
+            format: "int64"
1422
+          ElectionTick:
1423
+            description: |
1424
+              The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. `ElectionTick` must be greater than `HeartbeatTick`.
1425
+
1426
+              A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed.
1427
+            type: "integer"
1428
+          HeartbeatTick:
1429
+            description: |
1430
+              The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers.
1431
+
1432
+              A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed.
1433
+            type: "integer"
1434
+      Dispatcher:
1435
+        description: "Dispatcher configuration."
1436
+        type: "object"
1437
+        properties:
1438
+          HeartbeatPeriod:
1439
+            description: "The delay for an agent to send a heartbeat to the dispatcher."
1440
+            type: "integer"
1441
+            format: "int64"
1442
+      CAConfig:
1443
+        description: "CA configuration."
1444
+        type: "object"
1445
+        properties:
1446
+          NodeCertExpiry:
1447
+            description: "The duration node certificates are issued for."
1448
+            type: "integer"
1449
+            format: "int64"
1450
+          ExternalCAs:
1451
+            description: "Configuration for forwarding signing requests to an external certificate authority."
1452
+            type: "array"
1453
+            items:
1454
+              type: "object"
1455
+              properties:
1456
+                Protocol:
1457
+                  description: "Protocol for communication with the external CA
1458
+          (currently only `cfssl` is supported)."
1459
+                  type: "string"
1460
+                  enum:
1461
+                    - "cfssl"
1462
+                  default: "cfssl"
1463
+                URL:
1464
+                  description: "URL where certificate signing requests should be sent."
1465
+                  type: "string"
1466
+                Options:
1467
+                  description: "An object with key/value pairs that are interpreted as protocol-specific options for the external CA driver."
1468
+                  type: "object"
1469
+                  additionalProperties:
1470
+                    type: "string"
1471
+      TaskDefaults:
1472
+        description: "Defaults for creating tasks in this cluster."
1473
+        type: "object"
1474
+        properties:
1475
+          LogDriver:
1476
+            description: |
1477
+              The log driver to use for tasks created in the orchestrator if unspecified by a service.
1478
+
1479
+              Updating this value will only have an affect on new tasks. Old tasks will continue use their previously configured log driver until recreated.
1480
+            type: "object"
1481
+            properties:
1482
+              Name:
1483
+                type: "string"
1484
+              Options:
1485
+                type: "object"
1486
+                additionalProperties:
1487
+                  type: "string"
1488
+    example:
1489
+      Name: "default"
1490
+      Orchestration:
1491
+        TaskHistoryRetentionLimit: 10
1492
+      Raft:
1493
+        SnapshotInterval: 10000
1494
+        LogEntriesForSlowFollowers: 500
1495
+        HeartbeatTick: 1
1496
+        ElectionTick: 3
1497
+      Dispatcher:
1498
+        HeartbeatPeriod: 5000000000
1499
+      CAConfig:
1500
+        NodeCertExpiry: 7776000000000000
1501
+      JoinTokens:
1502
+        Worker: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx"
1503
+        Manager: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2"
1504
+  # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but
1505
+  # without `JoinTokens`.
1506
+  ClusterInfo:
1507
+    type: "object"
1508
+    properties:
1509
+      ID:
1510
+        description: "The ID of the swarm."
1511
+        type: "string"
1512
+      Version:
1513
+        type: "object"
1514
+        properties:
1515
+          Index:
1516
+            type: "integer"
1517
+            format: "int64"
1518
+      CreatedAt:
1519
+        type: "string"
1520
+        format: "dateTime"
1521
+      UpdatedAt:
1522
+        type: "string"
1523
+        format: "dateTime"
1524
+      Spec:
1525
+        $ref: "#/definitions/SwarmSpec"
1526
+  TaskSpec:
1527
+    description: "User modifiable task configuration."
1528
+    properties:
1529
+      ContainerSpec:
1530
+        type: "object"
1531
+        properties:
1532
+          Image:
1533
+            description: "The image name to use for the container."
1534
+            type: "string"
1535
+          Command:
1536
+            description: "The command to be run in the image."
1537
+            type: "array"
1538
+            items:
1539
+              type: "string"
1540
+          Args:
1541
+            description: "Arguments to the command."
1542
+            type: "array"
1543
+            items:
1544
+              type: "string"
1545
+          Env:
1546
+            description: "A list of environment variables in the form `VAR=value`."
1547
+            type: "array"
1548
+            items:
1549
+              type: "string"
1550
+          Dir:
1551
+            description: "The working directory for commands to run in."
1552
+            type: "string"
1553
+          User:
1554
+            description: "The user inside the container."
1555
+            type: "string"
1556
+          Labels:
1557
+            description: "A map of labels to associate with the service."
1558
+            type: "object"
1559
+            additionalProperties:
1560
+              type: "string"
1561
+          Mounts:
1562
+            description: "Specification for mounts to be added to containers created as part of the service."
1563
+            type: "array"
1564
+            items:
1565
+              $ref: "#/definitions/Mount"
1566
+          StopGracePeriod:
1567
+            description: "Amount of time to wait for the container to terminate before forcefully killing it."
1568
+            type: "integer"
1569
+            format: "int64"
1570
+      Resources:
1571
+        description: "Resource requirements which apply to each individual container created as part of the service."
1572
+        type: "object"
1573
+        properties:
1574
+          Limits:
1575
+            description: "Define resources limits."
1576
+            type: "object"
1577
+            properties:
1578
+              NanoCPUs:
1579
+                description: "CPU limit in units of 10<sup>-9</sup> CPU shares."
1580
+                type: "integer"
1581
+                format: "int64"
1582
+              MemoryBytes:
1583
+                description: "Memory limit in Bytes."
1584
+                type: "integer"
1585
+                format: "int64"
1586
+          Reservation:
1587
+            description: "Define resources reservation."
1588
+            properties:
1589
+              NanoCPUs:
1590
+                description: "CPU reservation in units of 10<sup>-9</sup> CPU shares."
1591
+                type: "integer"
1592
+                format: "int64"
1593
+              MemoryBytes:
1594
+                description: "Memory reservation in Bytes."
1595
+                type: "integer"
1596
+                format: "int64"
1597
+      RestartPolicy:
1598
+        description: "Specification for the restart policy which applies to containers created as part of this service."
1599
+        type: "object"
1600
+        properties:
1601
+          Condition:
1602
+            description: "Condition for restart."
1603
+            type: "string"
1604
+            enum:
1605
+              - "none"
1606
+              - "on-failure"
1607
+              - "any"
1608
+          Delay:
1609
+            description: "Delay between restart attempts."
1610
+            type: "integer"
1611
+            format: "int64"
1612
+          MaxAttempts:
1613
+            description: "Maximum attempts to restart a given container before giving up (default value is 0, which is ignored)."
1614
+            type: "integer"
1615
+            format: "int64"
1616
+            default: 0
1617
+          Window:
1618
+            description: "Windows is the time window used to evaluate the restart policy (default value is 0, which is unbounded)."
1619
+            type: "integer"
1620
+            format: "int64"
1621
+            default: 0
1622
+      Placement:
1623
+        type: "object"
1624
+        properties:
1625
+          Constraints:
1626
+            description: "An array of constraints."
1627
+            type: "array"
1628
+            items:
1629
+              type: "string"
1630
+      Networks:
1631
+        type: "array"
1632
+        items:
1633
+          type: "object"
1634
+          properties:
1635
+            Target:
1636
+              type: "string"
1637
+            Aliases:
1638
+              type: "array"
1639
+              items:
1640
+                type: "string"
1641
+      LogDriver:
1642
+        description: "Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified."
1643
+        type: "object"
1644
+        properties:
1645
+          Name:
1646
+            type: "string"
1647
+          Options:
1648
+            type: "object"
1649
+            additionalProperties:
1650
+              type: "string"
1651
+  TaskState:
1652
+    type: "string"
1653
+    enum:
1654
+      - "new"
1655
+      - "allocated"
1656
+      - "pending"
1657
+      - "assigned"
1658
+      - "accepted"
1659
+      - "preparing"
1660
+      - "ready"
1661
+      - "starting"
1662
+      - "running"
1663
+      - "complete"
1664
+      - "shutdown"
1665
+      - "failed"
1666
+      - "rejected"
1667
+  Task:
1668
+    type: "object"
1669
+    properties:
1670
+      ID:
1671
+        description: "The ID of the task."
1672
+        type: "string"
1673
+      Version:
1674
+        type: "object"
1675
+        properties:
1676
+          Index:
1677
+            type: "integer"
1678
+            format: "int64"
1679
+      CreatedAt:
1680
+        type: "string"
1681
+        format: "dateTime"
1682
+      UpdatedAt:
1683
+        type: "string"
1684
+        format: "dateTime"
1685
+      Name:
1686
+        description: "Name of the task."
1687
+        type: "string"
1688
+      Labels:
1689
+        description: "User-defined key/value metadata."
1690
+        type: "object"
1691
+        additionalProperties:
1692
+          type: "string"
1693
+      Spec:
1694
+        $ref: "#/definitions/TaskSpec"
1695
+      ServiceID:
1696
+        description: "The ID of the service this task is part of."
1697
+        type: "string"
1698
+      Slot:
1699
+        type: "integer"
1700
+      NodeID:
1701
+        description: "The ID of the node that this task is on."
1702
+        type: "string"
1703
+      Status:
1704
+        type: "object"
1705
+        properties:
1706
+          Timestamp:
1707
+            type: "string"
1708
+            format: "dateTime"
1709
+          State:
1710
+            $ref: "#/definitions/TaskState"
1711
+          Message:
1712
+            type: "string"
1713
+          Err:
1714
+            type: "string"
1715
+          ContainerStatus:
1716
+            type: "object"
1717
+            properties:
1718
+              ContainerID:
1719
+                type: "string"
1720
+              PID:
1721
+                type: "integer"
1722
+              ExitCode:
1723
+                type: "integer"
1724
+      DesiredState:
1725
+        $ref: "#/definitions/TaskState"
1726
+    example:
1727
+      ID: "0kzzo1i0y4jz6027t0k7aezc7"
1728
+      Version:
1729
+        Index: 71
1730
+      CreatedAt: "2016-06-07T21:07:31.171892745Z"
1731
+      UpdatedAt: "2016-06-07T21:07:31.376370513Z"
1732
+      Spec:
1733
+        ContainerSpec:
1734
+          Image: "redis"
1735
+        Resources:
1736
+          Limits: {}
1737
+          Reservations: {}
1738
+        RestartPolicy:
1739
+          Condition: "any"
1740
+          MaxAttempts: 0
1741
+        Placement: {}
1742
+      ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
1743
+      Slot: 1
1744
+      NodeID: "60gvrl6tm78dmak4yl7srz94v"
1745
+      Status:
1746
+        Timestamp: "2016-06-07T21:07:31.290032978Z"
1747
+        State: "running"
1748
+        Message: "started"
1749
+        ContainerStatus:
1750
+          ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035"
1751
+          PID: 677
1752
+      DesiredState: "running"
1753
+      NetworksAttachments:
1754
+        - Network:
1755
+            ID: "4qvuz4ko70xaltuqbt8956gd1"
1756
+            Version:
1757
+              Index: 18
1758
+            CreatedAt: "2016-06-07T20:31:11.912919752Z"
1759
+            UpdatedAt: "2016-06-07T21:07:29.955277358Z"
1760
+            Spec:
1761
+              Name: "ingress"
1762
+              Labels:
1763
+                com.docker.swarm.internal: "true"
1764
+              DriverConfiguration: {}
1765
+              IPAMOptions:
1766
+                Driver: {}
1767
+                Configs:
1768
+                  - Subnet: "10.255.0.0/16"
1769
+                    Gateway: "10.255.0.1"
1770
+            DriverState:
1771
+              Name: "overlay"
1772
+              Options:
1773
+                com.docker.network.driver.overlay.vxlanid_list: "256"
1774
+            IPAMOptions:
1775
+              Driver:
1776
+                Name: "default"
1777
+              Configs:
1778
+                - Subnet: "10.255.0.0/16"
1779
+                  Gateway: "10.255.0.1"
1780
+          Addresses:
1781
+            - "10.255.0.10/16"
1782
+  ServiceSpec:
1783
+    description: "User modifiable configuration for a service."
1784
+    properties:
1785
+      Name:
1786
+        description: "Name of the service."
1787
+        type: "string"
1788
+      Labels:
1789
+        description: "User-defined key/value metadata."
1790
+        type: "object"
1791
+        additionalProperties:
1792
+          type: "string"
1793
+      TaskTemplate:
1794
+        $ref: "#/definitions/TaskSpec"
1795
+      Mode:
1796
+        description: "Scheduling mode for the service."
1797
+        type: "object"
1798
+        properties:
1799
+          Replicated:
1800
+            type: "object"
1801
+            properties:
1802
+              Replicas:
1803
+                type: "integer"
1804
+                format: "int64"
1805
+          Global:
1806
+            type: "object"
1807
+      UpdateConfig:
1808
+        description: "Specification for the update strategy of the service."
1809
+        type: "object"
1810
+        properties:
1811
+          Parallelism:
1812
+            description: "Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism)."
1813
+            type: "integer"
1814
+            format: "int64"
1815
+          Delay:
1816
+            description: "Amount of time between updates."
1817
+            type: "integer"
1818
+            format: "int64"
1819
+          FailureAction:
1820
+            description: "Action to take if an updated task fails to run, or stops running during the update."
1821
+            type: "string"
1822
+            enum:
1823
+              - "continue"
1824
+              - "pause"
1825
+      Networks:
1826
+        description: "Array of network names or IDs to attach the service to."
1827
+        type: "array"
1828
+        items:
1829
+          type: "object"
1830
+          properties:
1831
+            Target:
1832
+              type: "string"
1833
+            Aliases:
1834
+              type: "array"
1835
+              items:
1836
+                type: "string"
1837
+      EndpointSpec:
1838
+        $ref: "#/definitions/EndpointSpec"
1839
+  EndpointPortConfig:
1840
+    type: "object"
1841
+    properties:
1842
+      Name:
1843
+        type: "string"
1844
+      Protocol:
1845
+        type: "string"
1846
+        enum:
1847
+          - "tcp"
1848
+          - "udp"
1849
+      TargetPort:
1850
+        description: "The port inside the container."
1851
+        type: "integer"
1852
+      PublishedPort:
1853
+        description: "The port on the swarm hosts."
1854
+        type: "integer"
1855
+  EndpointSpec:
1856
+    description: "Properties that can be configured to access and load balance a service."
1857
+    type: "object"
1858
+    properties:
1859
+      Mode:
1860
+        description: "The mode of resolution to use for internal load balancing
1861
+      between tasks."
1862
+        type: "string"
1863
+        enum:
1864
+          - "vip"
1865
+          - "dnsrr"
1866
+        default: "vip"
1867
+      Ports:
1868
+        description: "List of exposed ports that this service is accessible on from the outside. Ports can only be provided if `vip` resolution mode is used."
1869
+        type: "array"
1870
+        items:
1871
+          $ref: "#/definitions/EndpointPortConfig"
1872
+  Service:
1873
+    type: "object"
1874
+    properties:
1875
+      ID:
1876
+        type: "string"
1877
+      Version:
1878
+        type: "object"
1879
+        properties:
1880
+          Index:
1881
+            type: "integer"
1882
+            format: "int64"
1883
+      CreatedAt:
1884
+        type: "string"
1885
+        format: "dateTime"
1886
+      UpdatedAt:
1887
+        type: "string"
1888
+        format: "dateTime"
1889
+      Spec:
1890
+        $ref: "#/definitions/ServiceSpec"
1891
+      Endpoint:
1892
+        type: "object"
1893
+        properties:
1894
+          Spec:
1895
+            $ref: "#/definitions/EndpointSpec"
1896
+          Ports:
1897
+            type: "array"
1898
+            items:
1899
+              $ref: "#/definitions/EndpointPortConfig"
1900
+          VirtualIPs:
1901
+            type: "array"
1902
+            items:
1903
+              type: "object"
1904
+              properties:
1905
+                NetworkID:
1906
+                  type: "string"
1907
+                Addr:
1908
+                  type: "string"
1909
+      UpdateStatus:
1910
+        description: "The status of a service update."
1911
+        type: "object"
1912
+        properties:
1913
+          State:
1914
+            type: "string"
1915
+            enum:
1916
+              - "updating"
1917
+              - "paused"
1918
+              - "completed"
1919
+          StartedAt:
1920
+            type: "string"
1921
+            format: "dateTime"
1922
+          CompletedAt:
1923
+            type: "string"
1924
+            format: "dateTime"
1925
+          Message:
1926
+            type: "string"
1927
+    example:
1928
+      ID: "9mnpnzenvg8p8tdbtq4wvbkcz"
1929
+      Version:
1930
+        Index: 19
1931
+      CreatedAt: "2016-06-07T21:05:51.880065305Z"
1932
+      UpdatedAt: "2016-06-07T21:07:29.962229872Z"
1933
+      Spec:
1934
+        Name: "hopeful_cori"
1935
+        TaskTemplate:
1936
+          ContainerSpec:
1937
+            Image: "redis"
1938
+          Resources:
1939
+            Limits: {}
1940
+            Reservations: {}
1941
+          RestartPolicy:
1942
+            Condition: "any"
1943
+            MaxAttempts: 0
1944
+          Placement: {}
1945
+        Mode:
1946
+          Replicated:
1947
+            Replicas: 1
1948
+        UpdateConfig:
1949
+          Parallelism: 1
1950
+          FailureAction: "pause"
1951
+        EndpointSpec:
1952
+          Mode: "vip"
1953
+          Ports:
1954
+            -
1955
+              Protocol: "tcp"
1956
+              TargetPort: 6379
1957
+              PublishedPort: 30001
1958
+      Endpoint:
1959
+        Spec:
1960
+          Mode: "vip"
1961
+          Ports:
1962
+            -
1963
+              Protocol: "tcp"
1964
+              TargetPort: 6379
1965
+              PublishedPort: 30001
1966
+        Ports:
1967
+          -
1968
+            Protocol: "tcp"
1969
+            TargetPort: 6379
1970
+            PublishedPort: 30001
1971
+        VirtualIPs:
1972
+          -
1973
+            NetworkID: "4qvuz4ko70xaltuqbt8956gd1"
1974
+            Addr: "10.255.0.2/16"
1975
+          -
1976
+            NetworkID: "4qvuz4ko70xaltuqbt8956gd1"
1977
+            Addr: "10.255.0.3/16"
1978
+paths:
1979
+  /containers/json:
1980
+    get:
1981
+      summary: "List containers"
1982
+      operationId: "GetContainerList"
1983
+      produces:
1984
+        - "application/json"
1985
+      parameters:
1986
+        - name: "all"
1987
+          in: "query"
1988
+          description: "Return all containers. By default, only running containers are shown"
1989
+          type: "boolean"
1990
+          default: false
1991
+        - name: "limit"
1992
+          in: "query"
1993
+          description: "Return this number of most recently created containers, including non-running ones."
1994
+          type: "integer"
1995
+        - name: "size"
1996
+          in: "query"
1997
+          description: "Return the size of container as fields `SizeRw` and `SizeRootFs`."
1998
+          type: "boolean"
1999
+          default: false
2000
+        - name: "filters"
2001
+          in: "query"
2002
+          description: |
2003
+            Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{"status": ["paused"]}` will only return paused containers.
2004
+
2005
+            Available filters:
2006
+            - `exited=<int>` containers with exit code of `<int>`
2007
+            - `status=`(`created`|`restarting`|`running`|`paused`|`exited`|`dead`)
2008
+            - `label=key` or `label="key=value"` of a container label
2009
+            - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only)
2010
+            - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`)
2011
+            - `before`=(`<container id>` or `<container name>`)
2012
+            - `since`=(`<container id>` or `<container name>`)
2013
+            - `volume`=(`<volume name>` or `<mount point destination>`)
2014
+            - `network`=(`<network id>` or `<network name>`)
2015
+          type: "string"
2016
+      responses:
2017
+        200:
2018
+          description: "no error"
2019
+          schema:
2020
+            type: "array"
2021
+            items:
2022
+              type: "object"
2023
+              properties:
2024
+                Id:
2025
+                  description: "The ID of this container"
2026
+                  type: "string"
2027
+                  x-go-name: "ID"
2028
+                Names:
2029
+                  description: "The names that this container has been given"
2030
+                  type: "array"
2031
+                  items:
2032
+                    type: "string"
2033
+                Image:
2034
+                  description: "The name of the image used when creating this container"
2035
+                  type: "string"
2036
+                ImageID:
2037
+                  description: "The ID of the image that this container was created from"
2038
+                  type: "string"
2039
+                Command:
2040
+                  description: "Command to run when starting the container"
2041
+                  type: "string"
2042
+                Created:
2043
+                  description: "When the container was created"
2044
+                  type: "integer"
2045
+                  format: "int64"
2046
+                Ports:
2047
+                  description: "The ports exposed by this container"
2048
+                  type: "array"
2049
+                  items:
2050
+                    $ref: "#/definitions/Port"
2051
+                SizeRw:
2052
+                  description: "The size of files that have been created or changed by this container"
2053
+                  type: "integer"
2054
+                  format: "int64"
2055
+                SizeRootFs:
2056
+                  description: "The total size of all the files in this container"
2057
+                  type: "integer"
2058
+                  format: "int64"
2059
+                Labels:
2060
+                  description: "Labels that have been applied to this container"
2061
+                  type: "object"
2062
+                  additionalProperties:
2063
+                    type: "string"
2064
+                State:
2065
+                  description: "The state of this container (e.g. `Exited`)"
2066
+                  type: "string"
2067
+                Status:
2068
+                  description: "Additional human-readable status of this container (e.g. `Exit 0`)"
2069
+                  type: "string"
2070
+                HostConfig:
2071
+                  type: "object"
2072
+                  properties:
2073
+                    NetworkMode:
2074
+                      type: "string"
2075
+                NetworkSettings:
2076
+                  description: "A summary of the container's network settings"
2077
+                  type: "object"
2078
+                  properties:
2079
+                    Networks:
2080
+                      type: "object"
2081
+                      additionalProperties:
2082
+                        $ref: "#/definitions/EndpointSettings"
2083
+                Mounts:
2084
+                  type: "array"
2085
+                  items:
2086
+                    $ref: "#/definitions/Mount"
2087
+          examples:
2088
+            application/json:
2089
+              - Id: "8dfafdbc3a40"
2090
+                Names:
2091
+                  - "/boring_feynman"
2092
+                Image: "ubuntu:latest"
2093
+                ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
2094
+                Command: "echo 1"
2095
+                Created: 1367854155
2096
+                State: "Exited"
2097
+                Status: "Exit 0"
2098
+                Ports:
2099
+                  - PrivatePort: 2222
2100
+                    PublicPort: 3333
2101
+                    Type: "tcp"
2102
+                Labels:
2103
+                  com.example.vendor: "Acme"
2104
+                  com.example.license: "GPL"
2105
+                  com.example.version: "1.0"
2106
+                SizeRw: 12288
2107
+                SizeRootFs: 0
2108
+                HostConfig:
2109
+                  NetworkMode: "default"
2110
+                NetworkSettings:
2111
+                  Networks:
2112
+                    bridge:
2113
+                      IPAMConfig: null
2114
+                      Links: null
2115
+                      Aliases: null
2116
+                      NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
2117
+                      EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f"
2118
+                      Gateway: "172.17.0.1"
2119
+                      IPAddress: "172.17.0.2"
2120
+                      IPPrefixLen: 16
2121
+                      IPv6Gateway: ""
2122
+                      GlobalIPv6Address: ""
2123
+                      GlobalIPv6PrefixLen: 0
2124
+                      MacAddress: "02:42:ac:11:00:02"
2125
+                Mounts:
2126
+                  - Name: "fac362...80535"
2127
+                    Source: "/data"
2128
+                    Destination: "/data"
2129
+                    Driver: "local"
2130
+                    Mode: "ro,Z"
2131
+                    RW: false
2132
+                    Propagation: ""
2133
+              - Id: "9cd87474be90"
2134
+                Names:
2135
+                  - "/coolName"
2136
+                Image: "ubuntu:latest"
2137
+                ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
2138
+                Command: "echo 222222"
2139
+                Created: 1367854155
2140
+                State: "Exited"
2141
+                Status: "Exit 0"
2142
+                Ports: []
2143
+                Labels: {}
2144
+                SizeRw: 12288
2145
+                SizeRootFs: 0
2146
+                HostConfig:
2147
+                  NetworkMode: "default"
2148
+                NetworkSettings:
2149
+                  Networks:
2150
+                    bridge:
2151
+                      IPAMConfig: null
2152
+                      Links: null
2153
+                      Aliases: null
2154
+                      NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
2155
+                      EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a"
2156
+                      Gateway: "172.17.0.1"
2157
+                      IPAddress: "172.17.0.8"
2158
+                      IPPrefixLen: 16
2159
+                      IPv6Gateway: ""
2160
+                      GlobalIPv6Address: ""
2161
+                      GlobalIPv6PrefixLen: 0
2162
+                      MacAddress: "02:42:ac:11:00:08"
2163
+                Mounts: []
2164
+              - Id: "3176a2479c92"
2165
+                Names:
2166
+                  - "/sleepy_dog"
2167
+                Image: "ubuntu:latest"
2168
+                ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
2169
+                Command: "echo 3333333333333333"
2170
+                Created: 1367854154
2171
+                State: "Exited"
2172
+                Status: "Exit 0"
2173
+                Ports: []
2174
+                Labels: {}
2175
+                SizeRw: 12288
2176
+                SizeRootFs: 0
2177
+                HostConfig:
2178
+                  NetworkMode: "default"
2179
+                NetworkSettings:
2180
+                  Networks:
2181
+                    bridge:
2182
+                      IPAMConfig: null
2183
+                      Links: null
2184
+                      Aliases: null
2185
+                      NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
2186
+                      EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d"
2187
+                      Gateway: "172.17.0.1"
2188
+                      IPAddress: "172.17.0.6"
2189
+                      IPPrefixLen: 16
2190
+                      IPv6Gateway: ""
2191
+                      GlobalIPv6Address: ""
2192
+                      GlobalIPv6PrefixLen: 0
2193
+                      MacAddress: "02:42:ac:11:00:06"
2194
+                Mounts: []
2195
+              - Id: "4cb07b47f9fb"
2196
+                Names:
2197
+                  - "/running_cat"
2198
+                Image: "ubuntu:latest"
2199
+                ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
2200
+                Command: "echo 444444444444444444444444444444444"
2201
+                Created: 1367854152
2202
+                State: "Exited"
2203
+                Status: "Exit 0"
2204
+                Ports: []
2205
+                Labels: {}
2206
+                SizeRw: 12288
2207
+                SizeRootFs: 0
2208
+                HostConfig:
2209
+                  NetworkMode: "default"
2210
+                NetworkSettings:
2211
+                  Networks:
2212
+                    bridge:
2213
+                      IPAMConfig: null
2214
+                      Links: null
2215
+                      Aliases: null
2216
+                      NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
2217
+                      EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9"
2218
+                      Gateway: "172.17.0.1"
2219
+                      IPAddress: "172.17.0.5"
2220
+                      IPPrefixLen: 16
2221
+                      IPv6Gateway: ""
2222
+                      GlobalIPv6Address: ""
2223
+                      GlobalIPv6PrefixLen: 0
2224
+                      MacAddress: "02:42:ac:11:00:05"
2225
+                Mounts: []
2226
+        400:
2227
+          description: "bad parameter"
2228
+          schema:
2229
+            $ref: "#/definitions/Error"
2230
+        500:
2231
+          description: "server error"
2232
+          schema:
2233
+            $ref: "#/definitions/Error"
2234
+      tags:
2235
+        - "Container"
2236
+  /containers/create:
2237
+    post:
2238
+      summary: "Create a container"
2239
+      operationId: "PostContainerCreate"
2240
+      consumes:
2241
+        - "application/json"
2242
+        - "application/octet-stream"
2243
+      produces:
2244
+        - "application/json"
2245
+      parameters:
2246
+        - name: "name"
2247
+          in: "query"
2248
+          description: "Assign the specified name to the container. Must match `/?[a-zA-Z0-9_-]+`."
2249
+          type: "string"
2250
+          pattern: "/?[a-zA-Z0-9_-]+"
2251
+        - name: "body"
2252
+          in: "body"
2253
+          description: "Container to create"
2254
+          schema:
2255
+            allOf:
2256
+              - $ref: "#/definitions/Config"
2257
+              - type: "object"
2258
+                properties:
2259
+                  HostConfig:
2260
+                    $ref: "#/definitions/HostConfig"
2261
+                  NetworkingConfig:
2262
+                    description: "This container's networking configuration."
2263
+                    type: "object"
2264
+                    properties:
2265
+                      EndpointsConfig:
2266
+                        description: "A mapping of network name to endpoint configuration for that network."
2267
+                        type: "object"
2268
+                        additionalProperties:
2269
+                          $ref: "#/definitions/EndpointSettings"
2270
+            example:
2271
+              Hostname: ""
2272
+              Domainname: ""
2273
+              User: ""
2274
+              AttachStdin: false
2275
+              AttachStdout: true
2276
+              AttachStderr: true
2277
+              Tty: false
2278
+              OpenStdin: false
2279
+              StdinOnce: false
2280
+              Env:
2281
+                - "FOO=bar"
2282
+                - "BAZ=quux"
2283
+              Cmd:
2284
+                - "date"
2285
+              Entrypoint: ""
2286
+              Image: "ubuntu"
2287
+              Labels:
2288
+                com.example.vendor: "Acme"
2289
+                com.example.license: "GPL"
2290
+                com.example.version: "1.0"
2291
+              Volumes:
2292
+                /volumes/data: {}
2293
+              WorkingDir: ""
2294
+              NetworkDisabled: false
2295
+              MacAddress: "12:34:56:78:9a:bc"
2296
+              ExposedPorts:
2297
+                22/tcp: {}
2298
+              StopSignal: "SIGTERM"
2299
+              HostConfig:
2300
+                Binds:
2301
+                  - "/tmp:/tmp"
2302
+                Links:
2303
+                  - "redis3:redis"
2304
+                Memory: 0
2305
+                MemorySwap: 0
2306
+                MemoryReservation: 0
2307
+                KernelMemory: 0
2308
+                CpuPercent: 80
2309
+                CpuShares: 512
2310
+                CpuPeriod: 100000
2311
+                CpuQuota: 50000
2312
+                CpusetCpus: "0,1"
2313
+                CpusetMems: "0,1"
2314
+                MaximumIOps: 0
2315
+                MaximumIOBps: 0
2316
+                BlkioWeight: 300
2317
+                BlkioWeightDevice:
2318
+                  - {}
2319
+                BlkioDeviceReadBps:
2320
+                  - {}
2321
+                BlkioDeviceReadIOps:
2322
+                  - {}
2323
+                BlkioDeviceWriteBps:
2324
+                  - {}
2325
+                BlkioDeviceWriteIOps:
2326
+                  - {}
2327
+                MemorySwappiness: 60
2328
+                OomKillDisable: false
2329
+                OomScoreAdj: 500
2330
+                PidMode: ""
2331
+                PidsLimit: -1
2332
+                PortBindings:
2333
+                  22/tcp:
2334
+                    - HostPort: "11022"
2335
+                PublishAllPorts: false
2336
+                Privileged: false
2337
+                ReadonlyRootfs: false
2338
+                Dns:
2339
+                  - "8.8.8.8"
2340
+                DnsOptions:
2341
+                  - ""
2342
+                DnsSearch:
2343
+                  - ""
2344
+                VolumesFrom:
2345
+                  - "parent"
2346
+                  - "other:ro"
2347
+                CapAdd:
2348
+                  - "NET_ADMIN"
2349
+                CapDrop:
2350
+                  - "MKNOD"
2351
+                GroupAdd:
2352
+                  - "newgroup"
2353
+                RestartPolicy:
2354
+                  Name: ""
2355
+                  MaximumRetryCount: 0
2356
+                AutoRemove: true
2357
+                NetworkMode: "bridge"
2358
+                Devices: []
2359
+                Ulimits:
2360
+                  - {}
2361
+                LogConfig:
2362
+                  Type: "json-file"
2363
+                  Config: {}
2364
+                SecurityOpt: []
2365
+                StorageOpt: {}
2366
+                CgroupParent: ""
2367
+                VolumeDriver: ""
2368
+                ShmSize: 67108864
2369
+              NetworkingConfig:
2370
+                EndpointsConfig:
2371
+                  isolated_nw:
2372
+                    IPAMConfig:
2373
+                      IPv4Address: "172.20.30.33"
2374
+                      IPv6Address: "2001:db8:abcd::3033"
2375
+                      LinkLocalIPs:
2376
+                        - "169.254.34.68"
2377
+                        - "fe80::3468"
2378
+                    Links:
2379
+                      - "container_1"
2380
+                      - "container_2"
2381
+                    Aliases:
2382
+                      - "server_x"
2383
+                      - "server_y"
2384
+
2385
+          required: true
2386
+      responses:
2387
+        201:
2388
+          description: "no error"
2389
+          schema:
2390
+            type: "object"
2391
+            properties:
2392
+              Id:
2393
+                description: "The ID of the created container"
2394
+                type: "string"
2395
+              Warnings:
2396
+                type: "array"
2397
+                items:
2398
+                  type: "string"
2399
+          examples:
2400
+            application/json:
2401
+              Id: "e90e34656806"
2402
+              Warnings: []
2403
+        400:
2404
+          description: "bad parameter"
2405
+          schema:
2406
+            $ref: "#/definitions/Error"
2407
+        404:
2408
+          description: "no such container"
2409
+          schema:
2410
+            $ref: "#/definitions/Error"
2411
+          examples:
2412
+            application/json:
2413
+              message: "No such container: c2ada9df5af8"
2414
+        406:
2415
+          description: "impossible to attach"
2416
+          schema:
2417
+            $ref: "#/definitions/Error"
2418
+        409:
2419
+          description: "conflict"
2420
+          schema:
2421
+            $ref: "#/definitions/Error"
2422
+        500:
2423
+          description: "server error"
2424
+          schema:
2425
+            $ref: "#/definitions/Error"
2426
+      tags:
2427
+        - "Container"
2428
+  /containers/{id}/json:
2429
+    get:
2430
+      summary: "Inspect a container"
2431
+      description: "Return low-level information about a container."
2432
+      operationId: "GetContainerInspect"
2433
+      produces:
2434
+        - "application/json"
2435
+      responses:
2436
+        200:
2437
+          description: "no error"
2438
+          schema:
2439
+            type: "object"
2440
+            properties:
2441
+              Id:
2442
+                description: "The ID of the container"
2443
+                type: "string"
2444
+              Created:
2445
+                description: "The time the container was created"
2446
+                type: "string"
2447
+              Path:
2448
+                description: "The path to the command being run"
2449
+                type: "string"
2450
+              Args:
2451
+                description: "The arguments to the command being run"
2452
+                type: "array"
2453
+                items:
2454
+                  type: "string"
2455
+              State:
2456
+                description: "The state of the container."
2457
+                type: "object"
2458
+                properties:
2459
+                  Status:
2460
+                    description: "The status of the container. For example, `running` or `exited`."
2461
+                    type: "string"
2462
+                  Running:
2463
+                    description: "Whether this container is running."
2464
+                    type: "boolean"
2465
+                  Paused:
2466
+                    description: "Whether this container is paused."
2467
+                    type: "boolean"
2468
+                  Restarting:
2469
+                    description: "Whether this container is restarting."
2470
+                    type: "boolean"
2471
+                  OOMKilled:
2472
+                    description: "Whether this container has been killed because it ran out of memory."
2473
+                    type: "boolean"
2474
+                  Dead:
2475
+                    type: "boolean"
2476
+                  Pid:
2477
+                    description: "The process ID of this container"
2478
+                    type: "integer"
2479
+                  ExitCode:
2480
+                    description: "The last exit code of this container"
2481
+                    type: "integer"
2482
+                  Error:
2483
+                    type: "string"
2484
+                  StartedAt:
2485
+                    description: "The time when this container was last started."
2486
+                    type: "string"
2487
+                  FinishedAt:
2488
+                    description: "The time when this container last exited."
2489
+                    type: "string"
2490
+              Image:
2491
+                description: "The container's image"
2492
+                type: "string"
2493
+              ResolvConfPath:
2494
+                type: "string"
2495
+              HostnamePath:
2496
+                type: "string"
2497
+              HostsPath:
2498
+                type: "string"
2499
+              LogPath:
2500
+                type: "string"
2501
+              Node:
2502
+                description: "TODO"
2503
+                type: "object"
2504
+              Name:
2505
+                type: "string"
2506
+              RestartCount:
2507
+                type: "integer"
2508
+              Driver:
2509
+                type: "string"
2510
+              MountLabel:
2511
+                type: "string"
2512
+              ProcessLabel:
2513
+                type: "string"
2514
+              AppArmorProfile:
2515
+                type: "string"
2516
+              ExecIDs:
2517
+                type: "string"
2518
+              HostConfig:
2519
+                $ref: "#/definitions/HostConfig"
2520
+              GraphDriver:
2521
+                $ref: "#/definitions/GraphDriver"
2522
+              SizeRw:
2523
+                description: "The size of files that have been created or changed by this container."
2524
+                type: "integer"
2525
+                format: "int64"
2526
+              SizeRootFs:
2527
+                description: "The total size of all the files in this container."
2528
+                type: "integer"
2529
+                format: "int64"
2530
+              Mounts:
2531
+                type: "array"
2532
+                items:
2533
+                  $ref: "#/definitions/MountPoint"
2534
+              Config:
2535
+                $ref: "#/definitions/Config"
2536
+              NetworkSettings:
2537
+                $ref: "#/definitions/NetworkConfig"
2538
+          examples:
2539
+            application/json:
2540
+              AppArmorProfile: ""
2541
+              Args:
2542
+                - "-c"
2543
+                - "exit 9"
2544
+              Config:
2545
+                AttachStderr: true
2546
+                AttachStdin: false
2547
+                AttachStdout: true
2548
+                Cmd:
2549
+                  - "/bin/sh"
2550
+                  - "-c"
2551
+                  - "exit 9"
2552
+                Domainname: ""
2553
+                Entrypoint: null
2554
+                Env:
2555
+                  - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
2556
+                ExposedPorts: null
2557
+                Hostname: "ba033ac44011"
2558
+                Image: "ubuntu"
2559
+                Labels:
2560
+                  com.example.vendor: "Acme"
2561
+                  com.example.license: "GPL"
2562
+                  com.example.version: "1.0"
2563
+                MacAddress: ""
2564
+                NetworkDisabled: false
2565
+                OnBuild: null
2566
+                OpenStdin: false
2567
+                StdinOnce: false
2568
+                Tty: false
2569
+                User: ""
2570
+                Volumes:
2571
+                  /volumes/data: {}
2572
+                WorkingDir: ""
2573
+                StopSignal: "SIGTERM"
2574
+              Created: "2015-01-06T15:47:31.485331387Z"
2575
+              Driver: "devicemapper"
2576
+              ExecIDs: null
2577
+              HostConfig:
2578
+                Binds: null
2579
+                MaximumIOps: 0
2580
+                MaximumIOBps: 0
2581
+                BlkioWeight: 0
2582
+                BlkioWeightDevice:
2583
+                  - {}
2584
+                BlkioDeviceReadBps:
2585
+                  - {}
2586
+                BlkioDeviceWriteBps:
2587
+                  - {}
2588
+                BlkioDeviceReadIOps:
2589
+                  - {}
2590
+                BlkioDeviceWriteIOps:
2591
+                  - {}
2592
+                CapAdd: null
2593
+                CapDrop: null
2594
+                ContainerIDFile: ""
2595
+                CpusetCpus: ""
2596
+                CpusetMems: ""
2597
+                CpuPercent: 80
2598
+                CpuShares: 0
2599
+                CpuPeriod: 100000
2600
+                Devices: []
2601
+                Dns: null
2602
+                DnsOptions: null
2603
+                DnsSearch: null
2604
+                ExtraHosts: null
2605
+                IpcMode: ""
2606
+                Links: null
2607
+                LxcConf: []
2608
+                Memory: 0
2609
+                MemorySwap: 0
2610
+                MemoryReservation: 0
2611
+                KernelMemory: 0
2612
+                OomKillDisable: false
2613
+                OomScoreAdj: 500
2614
+                NetworkMode: "bridge"
2615
+                PidMode: ""
2616
+                PortBindings: {}
2617
+                Privileged: false
2618
+                ReadonlyRootfs: false
2619
+                PublishAllPorts: false
2620
+                RestartPolicy:
2621
+                  MaximumRetryCount: 2
2622
+                  Name: "on-failure"
2623
+                LogConfig:
2624
+                  Config: null
2625
+                  Type: "json-file"
2626
+                SecurityOpt: null
2627
+                Sysctls:
2628
+                  net.ipv4.ip_forward: "1"
2629
+                StorageOpt: null
2630
+                VolumesFrom: null
2631
+                Ulimits:
2632
+                  - {}
2633
+                VolumeDriver: ""
2634
+                ShmSize: 67108864
2635
+              HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname"
2636
+              HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts"
2637
+              LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log"
2638
+              Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39"
2639
+              Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2"
2640
+              MountLabel: ""
2641
+              Name: "/boring_euclid"
2642
+              NetworkSettings:
2643
+                Bridge: ""
2644
+                SandboxID: ""
2645
+                HairpinMode: false
2646
+                LinkLocalIPv6Address: ""
2647
+                LinkLocalIPv6PrefixLen: 0
2648
+                Ports: null
2649
+                SandboxKey: ""
2650
+                SecondaryIPAddresses: null
2651
+                SecondaryIPv6Addresses: null
2652
+                EndpointID: ""
2653
+                Gateway: ""
2654
+                GlobalIPv6Address: ""
2655
+                GlobalIPv6PrefixLen: 0
2656
+                IPAddress: ""
2657
+                IPPrefixLen: 0
2658
+                IPv6Gateway: ""
2659
+                MacAddress: ""
2660
+                Networks:
2661
+                  bridge:
2662
+                    NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
2663
+                    EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d"
2664
+                    Gateway: "172.17.0.1"
2665
+                    IPAddress: "172.17.0.2"
2666
+                    IPPrefixLen: 16
2667
+                    IPv6Gateway: ""
2668
+                    GlobalIPv6Address: ""
2669
+                    GlobalIPv6PrefixLen: 0
2670
+                    MacAddress: "02:42:ac:12:00:02"
2671
+              Path: "/bin/sh"
2672
+              ProcessLabel: ""
2673
+              ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf"
2674
+              RestartCount: 1
2675
+              State:
2676
+                Error: ""
2677
+                ExitCode: 9
2678
+                FinishedAt: "2015-01-06T15:47:32.080254511Z"
2679
+                OOMKilled: false
2680
+                Dead: false
2681
+                Paused: false
2682
+                Pid: 0
2683
+                Restarting: false
2684
+                Running: true
2685
+                StartedAt: "2015-01-06T15:47:32.072697474Z"
2686
+                Status: "running"
2687
+              Mounts:
2688
+                - Name: "fac362...80535"
2689
+                  Source: "/data"
2690
+                  Destination: "/data"
2691
+                  Driver: "local"
2692
+                  Mode: "ro,Z"
2693
+                  RW: false
2694
+                  Propagation: ""
2695
+        404:
2696
+          description: "no such container"
2697
+          schema:
2698
+            $ref: "#/definitions/Error"
2699
+          examples:
2700
+            application/json:
2701
+              message: "No such container: c2ada9df5af8"
2702
+        500:
2703
+          description: "server error"
2704
+          schema:
2705
+            $ref: "#/definitions/Error"
2706
+      parameters:
2707
+        - name: "id"
2708
+          in: "path"
2709
+          required: true
2710
+          description: "ID or name of the container"
2711
+          type: "string"
2712
+        - name: "size"
2713
+          in: "query"
2714
+          type: "boolean"
2715
+          default: false
2716
+          description: "Return the size of container as fields `SizeRw` and `SizeRootFs`"
2717
+      tags:
2718
+        - "Container"
2719
+  /containers/{id}/top:
2720
+    get:
2721
+      summary: "List processes running inside a container"
2722
+      description: "On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows."
2723
+      operationId: "GetContainerTop"
2724
+      responses:
2725
+        200:
2726
+          description: "no error"
2727
+          schema:
2728
+            type: "object"
2729
+            properties:
2730
+              Titles:
2731
+                description: "The ps column titles"
2732
+                type: "array"
2733
+                items:
2734
+                  type: "string"
2735
+              Processes:
2736
+                description: "Each process running in the container, where each is process is an array of values corresponding to the titles"
2737
+                type: "array"
2738
+                items:
2739
+                  type: "array"
2740
+                  items:
2741
+                    type: "string"
2742
+          examples:
2743
+            application/json:
2744
+              Titles:
2745
+                - "UID"
2746
+                - "PID"
2747
+                - "PPID"
2748
+                - "C"
2749
+                - "STIME"
2750
+                - "TTY"
2751
+                - "TIME"
2752
+                - "CMD"
2753
+              Processes:
2754
+                -
2755
+                  - "root"
2756
+                  - "13642"
2757
+                  - "882"
2758
+                  - "0"
2759
+                  - "17:03"
2760
+                  - "pts/0"
2761
+                  - "00:00:00"
2762
+                  - "/bin/bash"
2763
+                -
2764
+                  - "root"
2765
+                  - "13735"
2766
+                  - "13642"
2767
+                  - "0"
2768
+                  - "17:06"
2769
+                  - "pts/0"
2770
+                  - "00:00:00"
2771
+                  - "sleep 10"
2772
+        404:
2773
+          description: "no such container"
2774
+          schema:
2775
+            $ref: "#/definitions/Error"
2776
+          examples:
2777
+            application/json:
2778
+              message: "No such container: c2ada9df5af8"
2779
+        500:
2780
+          description: "server error"
2781
+          schema:
2782
+            $ref: "#/definitions/Error"
2783
+      parameters:
2784
+        - name: "id"
2785
+          in: "path"
2786
+          required: true
2787
+          description: "ID or name of the container"
2788
+          type: "string"
2789
+        - name: "ps_args"
2790
+          in: "query"
2791
+          description: "The arguments to pass to `ps`. For example, `aux`"
2792
+          type: "string"
2793
+          default: "-ef"
2794
+      tags:
2795
+        - "Container"
2796
+  /containers/{id}/logs:
2797
+    get:
2798
+      summary: "Get container logs"
2799
+      description: |
2800
+        Get stdout and stderr logs from a container.
2801
+
2802
+        Note: This endpoint works only for containers with the `json-file` or `journald` logging driver.
2803
+      operationId: "GetContainerLogs"
2804
+      responses:
2805
+        101:
2806
+          description: "logs returned as a stream"
2807
+          schema:
2808
+            type: "string"
2809
+            format: "binary"
2810
+        200:
2811
+          description: "logs returned as a string in response body"
2812
+          schema:
2813
+            type: "string"
2814
+        404:
2815
+          description: "no such container"
2816
+          schema:
2817
+            $ref: "#/definitions/Error"
2818
+          examples:
2819
+            application/json:
2820
+              message: "No such container: c2ada9df5af8"
2821
+        500:
2822
+          description: "server error"
2823
+          schema:
2824
+            $ref: "#/definitions/Error"
2825
+      parameters:
2826
+        - name: "id"
2827
+          in: "path"
2828
+          required: true
2829
+          description: "ID or name of the container"
2830
+          type: "string"
2831
+        - name: "follow"
2832
+          in: "query"
2833
+          description: |
2834
+            Return the logs as a stream.
2835
+
2836
+            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/PostContainerAttach).
2837
+          type: "boolean"
2838
+          default: false
2839
+        - name: "stdout"
2840
+          in: "query"
2841
+          description: "Return logs from stdout"
2842
+          type: "boolean"
2843
+          default: false
2844
+        - name: "stderr"
2845
+          in: "query"
2846
+          description: "Return logs from stderr"
2847
+          type: "boolean"
2848
+          default: false
2849
+        - name: "since"
2850
+          in: "query"
2851
+          description: "Only return logs since this time, as a UNIX timestamp"
2852
+          type: "integer"
2853
+          default: 0
2854
+        - name: "timestamps"
2855
+          in: "query"
2856
+          description: "Add timestamps to every log line"
2857
+          type: "boolean"
2858
+          default: false
2859
+        - name: "tail"
2860
+          in: "query"
2861
+          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."
2862
+          type: "string"
2863
+          default: "all"
2864
+      tags:
2865
+        - "Container"
2866
+  /containers/{id}/changes:
2867
+    get:
2868
+      summary: "Get changes on a container’s filesystem"
2869
+      description: |
2870
+        Returns which files in a container's filesystem have been added, deleted, or modified. The `Kind` of modification can be one of:
2871
+
2872
+        - `0`: Modified
2873
+        - `1`: Added
2874
+        - `2`: Deleted
2875
+      operationId: "GetContainerChanges"
2876
+      produces:
2877
+        - "application/json"
2878
+      responses:
2879
+        200:
2880
+          description: "no error"
2881
+          schema:
2882
+            type: "array"
2883
+            items:
2884
+              type: "object"
2885
+              properties:
2886
+                Path:
2887
+                  description: "Path to file that has changed"
2888
+                  type: "string"
2889
+                Kind:
2890
+                  description: "Kind of change"
2891
+                  type: "integer"
2892
+                  enum:
2893
+                    - 0
2894
+                    - 1
2895
+                    - 2
2896
+          examples:
2897
+            application/json:
2898
+              - Path: "/dev"
2899
+                Kind: 0
2900
+              - Path: "/dev/kmsg"
2901
+                Kind: 1
2902
+              - Path: "/test"
2903
+                Kind: 1
2904
+        404:
2905
+          description: "no such container"
2906
+          schema:
2907
+            $ref: "#/definitions/Error"
2908
+          examples:
2909
+            application/json:
2910
+              message: "No such container: c2ada9df5af8"
2911
+        500:
2912
+          description: "server error"
2913
+          schema:
2914
+            $ref: "#/definitions/Error"
2915
+      parameters:
2916
+        - name: "id"
2917
+          in: "path"
2918
+          required: true
2919
+          description: "ID or name of the container"
2920
+          type: "string"
2921
+      tags:
2922
+        - "Container"
2923
+  /containers/{id}/export:
2924
+    get:
2925
+      summary: "Export a container"
2926
+      description: "Export the contents of a container as a tarball."
2927
+      operationId: "GetContainerExport"
2928
+      produces:
2929
+        - "application/octet-stream"
2930
+      responses:
2931
+        200:
2932
+          description: "no error"
2933
+        404:
2934
+          description: "no such container"
2935
+          schema:
2936
+            $ref: "#/definitions/Error"
2937
+          examples:
2938
+            application/json:
2939
+              message: "No such container: c2ada9df5af8"
2940
+        500:
2941
+          description: "server error"
2942
+          schema:
2943
+            $ref: "#/definitions/Error"
2944
+      parameters:
2945
+        - name: "id"
2946
+          in: "path"
2947
+          required: true
2948
+          description: "ID or name of the container"
2949
+          type: "string"
2950
+      tags:
2951
+        - "Container"
2952
+  /containers/{id}/stats:
2953
+    get:
2954
+      summary: "Get container stats based on resource usage"
2955
+      description: |
2956
+        This endpoint returns a live stream of a container’s resource usage statistics.
2957
+
2958
+        The `precpu_stats` is the CPU statistic of last read, which is used for calculating the CPU usage percentage. It is not the same as the `cpu_stats` field.
2959
+      operationId: "GetContainerStats"
2960
+      produces:
2961
+        - "application/json"
2962
+      responses:
2963
+        200:
2964
+          description: "no error"
2965
+          schema:
2966
+            type: "object"
2967
+          examples:
2968
+            application/json:
2969
+              read: "2015-01-08T22:57:31.547920715Z"
2970
+              pids_stats:
2971
+                current: 3
2972
+              networks:
2973
+                eth0:
2974
+                  rx_bytes: 5338
2975
+                  rx_dropped: 0
2976
+                  rx_errors: 0
2977
+                  rx_packets: 36
2978
+                  tx_bytes: 648
2979
+                  tx_dropped: 0
2980
+                  tx_errors: 0
2981
+                  tx_packets: 8
2982
+                eth5:
2983
+                  rx_bytes: 4641
2984
+                  rx_dropped: 0
2985
+                  rx_errors: 0
2986
+                  rx_packets: 26
2987
+                  tx_bytes: 690
2988
+                  tx_dropped: 0
2989
+                  tx_errors: 0
2990
+                  tx_packets: 9
2991
+              memory_stats:
2992
+                stats:
2993
+                  total_pgmajfault: 0
2994
+                  cache: 0
2995
+                  mapped_file: 0
2996
+                  total_inactive_file: 0
2997
+                  pgpgout: 414
2998
+                  rss: 6537216
2999
+                  total_mapped_file: 0
3000
+                  writeback: 0
3001
+                  unevictable: 0
3002
+                  pgpgin: 477
3003
+                  total_unevictable: 0
3004
+                  pgmajfault: 0
3005
+                  total_rss: 6537216
3006
+                  total_rss_huge: 6291456
3007
+                  total_writeback: 0
3008
+                  total_inactive_anon: 0
3009
+                  rss_huge: 6291456
3010
+                  hierarchical_memory_limit: 67108864
3011
+                  total_pgfault: 964
3012
+                  total_active_file: 0
3013
+                  active_anon: 6537216
3014
+                  total_active_anon: 6537216
3015
+                  total_pgpgout: 414
3016
+                  total_cache: 0
3017
+                  inactive_anon: 0
3018
+                  active_file: 0
3019
+                  pgfault: 964
3020
+                  inactive_file: 0
3021
+                  total_pgpgin: 477
3022
+                max_usage: 6651904
3023
+                usage: 6537216
3024
+                failcnt: 0
3025
+                limit: 67108864
3026
+              blkio_stats: {}
3027
+              cpu_stats:
3028
+                cpu_usage:
3029
+                  percpu_usage:
3030
+                    - 8646879
3031
+                    - 24472255
3032
+                    - 36438778
3033
+                    - 30657443
3034
+                  usage_in_usermode: 50000000
3035
+                  total_usage: 100215355
3036
+                  usage_in_kernelmode: 30000000
3037
+                system_cpu_usage: 739306590000000
3038
+                throttling_data:
3039
+                  periods: 0
3040
+                  throttled_periods: 0
3041
+                  throttled_time: 0
3042
+              precpu_stats:
3043
+                cpu_usage:
3044
+                  percpu_usage:
3045
+                    - 8646879
3046
+                    - 24350896
3047
+                    - 36438778
3048
+                    - 30657443
3049
+                  usage_in_usermode: 50000000
3050
+                  total_usage: 100093996
3051
+                  usage_in_kernelmode: 30000000
3052
+                system_cpu_usage: 9492140000000
3053
+                throttling_data:
3054
+                  periods: 0
3055
+                  throttled_periods: 0
3056
+                  throttled_time: 0
3057
+        404:
3058
+          description: "no such container"
3059
+          schema:
3060
+            $ref: "#/definitions/Error"
3061
+          examples:
3062
+            application/json:
3063
+              message: "No such container: c2ada9df5af8"
3064
+        500:
3065
+          description: "server error"
3066
+          schema:
3067
+            $ref: "#/definitions/Error"
3068
+      parameters:
3069
+        - name: "id"
3070
+          in: "path"
3071
+          required: true
3072
+          description: "ID or name of the container"
3073
+          type: "string"
3074
+        - name: "stream"
3075
+          in: "query"
3076
+          description: "Stream the output. If false, the stats will be output once and then it will disconnect."
3077
+          type: "boolean"
3078
+          default: true
3079
+      tags:
3080
+        - "Container"
3081
+  /containers/{id}/resize:
3082
+    post:
3083
+      summary: "Resize a container TTY"
3084
+      description: "Resize the TTY for a container. You must restart the container for the resize to take effect."
3085
+      operationId: "PostContainerResize"
3086
+      consumes:
3087
+        - "application/octet-stream"
3088
+      produces:
3089
+        - "text/plain"
3090
+      responses:
3091
+        200:
3092
+          description: "no error"
3093
+        404:
3094
+          description: "no such container"
3095
+          schema:
3096
+            $ref: "#/definitions/Error"
3097
+          examples:
3098
+            application/json:
3099
+              message: "No such container: c2ada9df5af8"
3100
+        500:
3101
+          description: "cannot resize container"
3102
+          schema:
3103
+            $ref: "#/definitions/Error"
3104
+      parameters:
3105
+        - name: "id"
3106
+          in: "path"
3107
+          required: true
3108
+          description: "ID or name of the container"
3109
+          type: "string"
3110
+        - name: "h"
3111
+          in: "query"
3112
+          description: "Height of the tty session in characters"
3113
+          type: "integer"
3114
+        - name: "w"
3115
+          in: "query"
3116
+          description: "Width of the tty session in characters"
3117
+          type: "integer"
3118
+      tags:
3119
+        - "Container"
3120
+  /containers/{id}/start:
3121
+    post:
3122
+      summary: "Start a container"
3123
+      operationId: "PostContainerStart"
3124
+      responses:
3125
+        204:
3126
+          description: "no error"
3127
+        304:
3128
+          description: "container already started"
3129
+          schema:
3130
+            $ref: "#/definitions/Error"
3131
+        404:
3132
+          description: "no such container"
3133
+          schema:
3134
+            $ref: "#/definitions/Error"
3135
+          examples:
3136
+            application/json:
3137
+              message: "No such container: c2ada9df5af8"
3138
+        500:
3139
+          description: "server error"
3140
+          schema:
3141
+            $ref: "#/definitions/Error"
3142
+      parameters:
3143
+        - name: "id"
3144
+          in: "path"
3145
+          required: true
3146
+          description: "ID or name of the container"
3147
+          type: "string"
3148
+        - name: "detachKeys"
3149
+          in: "query"
3150
+          description: "Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`."
3151
+          type: "string"
3152
+      tags:
3153
+        - "Container"
3154
+  /containers/{id}/stop:
3155
+    post:
3156
+      summary: "Stop a container"
3157
+      operationId: "PostContainerStop"
3158
+      responses:
3159
+        204:
3160
+          description: "no error"
3161
+        304:
3162
+          description: "container already stopped"
3163
+          schema:
3164
+            $ref: "#/definitions/Error"
3165
+        404:
3166
+          description: "no such container"
3167
+          schema:
3168
+            $ref: "#/definitions/Error"
3169
+          examples:
3170
+            application/json:
3171
+              message: "No such container: c2ada9df5af8"
3172
+        500:
3173
+          description: "server error"
3174
+          schema:
3175
+            $ref: "#/definitions/Error"
3176
+      parameters:
3177
+        - name: "id"
3178
+          in: "path"
3179
+          required: true
3180
+          description: "ID or name of the container"
3181
+          type: "string"
3182
+        - name: "t"
3183
+          in: "query"
3184
+          description: "Number of seconds to wait before killing the container"
3185
+          type: "integer"
3186
+      tags:
3187
+        - "Container"
3188
+  /containers/{id}/restart:
3189
+    post:
3190
+      summary: "Restart a container"
3191
+      operationId: "PostContainerRestart"
3192
+      responses:
3193
+        204:
3194
+          description: "no error"
3195
+        404:
3196
+          description: "no such container"
3197
+          schema:
3198
+            $ref: "#/definitions/Error"
3199
+          examples:
3200
+            application/json:
3201
+              message: "No such container: c2ada9df5af8"
3202
+        500:
3203
+          description: "server error"
3204
+          schema:
3205
+            $ref: "#/definitions/Error"
3206
+      parameters:
3207
+        - name: "id"
3208
+          in: "path"
3209
+          required: true
3210
+          description: "ID or name of the container"
3211
+          type: "string"
3212
+        - name: "t"
3213
+          in: "query"
3214
+          description: "Number of seconds to wait before killing the container"
3215
+          type: "integer"
3216
+      tags:
3217
+        - "Container"
3218
+  /containers/{id}/kill:
3219
+    post:
3220
+      summary: "Kill a container"
3221
+      description: "Send a POSIX signal to a container, defaulting to killing to the container."
3222
+      operationId: "PostContainerKill"
3223
+      responses:
3224
+        204:
3225
+          description: "no error"
3226
+        404:
3227
+          description: "no such container"
3228
+          schema:
3229
+            $ref: "#/definitions/Error"
3230
+          examples:
3231
+            application/json:
3232
+              message: "No such container: c2ada9df5af8"
3233
+        500:
3234
+          description: "server error"
3235
+          schema:
3236
+            $ref: "#/definitions/Error"
3237
+      parameters:
3238
+        - name: "id"
3239
+          in: "path"
3240
+          required: true
3241
+          description: "ID or name of the container"
3242
+          type: "string"
3243
+        - name: "signal"
3244
+          in: "query"
3245
+          description: "Signal to send to the container as an integer or string (e.g. `SIGINT`)"
3246
+          type: "string"
3247
+          default: "SIGKILL"
3248
+      tags:
3249
+        - "Container"
3250
+  /containers/{id}/update:
3251
+    post:
3252
+      summary: "Update a container"
3253
+      description: "Change various configuration options of a container without having to recreate it."
3254
+      operationId: "PostContainerUpdate"
3255
+      consumes:
3256
+        - "application/json"
3257
+      produces:
3258
+        - "application/json"
3259
+      responses:
3260
+        200:
3261
+          description: "no error"
3262
+          schema:
3263
+            type: "object"
3264
+            properties:
3265
+              Warnings:
3266
+                type: "array"
3267
+                items:
3268
+                  type: "string"
3269
+        404:
3270
+          description: "no such container"
3271
+          schema:
3272
+            $ref: "#/definitions/Error"
3273
+          examples:
3274
+            application/json:
3275
+              message: "No such container: c2ada9df5af8"
3276
+        500:
3277
+          description: "server error"
3278
+          schema:
3279
+            $ref: "#/definitions/Error"
3280
+      parameters:
3281
+        - name: "id"
3282
+          in: "path"
3283
+          required: true
3284
+          description: "ID or name of the container"
3285
+          type: "string"
3286
+        - name: "update"
3287
+          in: "body"
3288
+          required: true
3289
+          schema:
3290
+            allOf:
3291
+              - $ref: "#/definitions/Resources"
3292
+              - type: "object"
3293
+                properties:
3294
+                  RestartPolicy:
3295
+                    $ref: "#/definitions/RestartPolicy"
3296
+            example:
3297
+              BlkioWeight: 300
3298
+              CpuShares: 512
3299
+              CpuPeriod: 100000
3300
+              CpuQuota: 50000
3301
+              CpusetCpus: "0,1"
3302
+              CpusetMems: "0"
3303
+              Memory: 314572800
3304
+              MemorySwap: 514288000
3305
+              MemoryReservation: 209715200
3306
+              KernelMemory: 52428800
3307
+              RestartPolicy:
3308
+                MaximumRetryCount: 4
3309
+                Name: "on-failure"
3310
+      tags:
3311
+        - "Container"
3312
+  /containers/{id}/rename:
3313
+    post:
3314
+      summary: "Rename a container"
3315
+      operationId: "PostContainerRename"
3316
+      responses:
3317
+        204:
3318
+          description: "no error"
3319
+        404:
3320
+          description: "no such container"
3321
+          schema:
3322
+            $ref: "#/definitions/Error"
3323
+          examples:
3324
+            application/json:
3325
+              message: "No such container: c2ada9df5af8"
3326
+        409:
3327
+          description: "name already in use"
3328
+          schema:
3329
+            $ref: "#/definitions/Error"
3330
+        500:
3331
+          description: "server error"
3332
+          schema:
3333
+            $ref: "#/definitions/Error"
3334
+      parameters:
3335
+        - name: "id"
3336
+          in: "path"
3337
+          required: true
3338
+          description: "ID or name of the container"
3339
+          type: "string"
3340
+        - name: "name"
3341
+          in: "query"
3342
+          required: true
3343
+          description: "New name for the container"
3344
+          type: "string"
3345
+      tags:
3346
+        - "Container"
3347
+  /containers/{id}/pause:
3348
+    post:
3349
+      summary: "Pause a container"
3350
+      description: |
3351
+        Use the cgroups freezer to suspend all processes in a container.
3352
+
3353
+        Traditionally, when suspending a process the `SIGSTOP` signal is used, which is observable by the process being suspended. With the cgroups freezer the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed.
3354
+      operationId: "PostContainerPause"
3355
+      responses:
3356
+        204:
3357
+          description: "no error"
3358
+        404:
3359
+          description: "no such container"
3360
+          schema:
3361
+            $ref: "#/definitions/Error"
3362
+          examples:
3363
+            application/json:
3364
+              message: "No such container: c2ada9df5af8"
3365
+        500:
3366
+          description: "server error"
3367
+          schema:
3368
+            $ref: "#/definitions/Error"
3369
+      parameters:
3370
+        - name: "id"
3371
+          in: "path"
3372
+          required: true
3373
+          description: "ID or name of the container"
3374
+          type: "string"
3375
+      tags:
3376
+        - "Container"
3377
+  /containers/{id}/unpause:
3378
+    post:
3379
+      summary: "Unpause a container"
3380
+      description: "Resume a container which has been paused."
3381
+      operationId: "PostContainerUnpause"
3382
+      responses:
3383
+        204:
3384
+          description: "no error"
3385
+        404:
3386
+          description: "no such container"
3387
+          schema:
3388
+            $ref: "#/definitions/Error"
3389
+          examples:
3390
+            application/json:
3391
+              message: "No such container: c2ada9df5af8"
3392
+        500:
3393
+          description: "server error"
3394
+          schema:
3395
+            $ref: "#/definitions/Error"
3396
+      parameters:
3397
+        - name: "id"
3398
+          in: "path"
3399
+          required: true
3400
+          description: "ID or name of the container"
3401
+          type: "string"
3402
+      tags:
3403
+        - "Container"
3404
+  /containers/{id}/attach:
3405
+    post:
3406
+      summary: "Attach to a container"
3407
+      description: |
3408
+        Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached.
3409
+
3410
+        Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything.
3411
+
3412
+        See [the documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details.
3413
+
3414
+        ### Hijacking
3415
+
3416
+        This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket.
3417
+
3418
+        This is the response from the daemon for an attach request:
3419
+
3420
+        ```
3421
+        HTTP/1.1 200 OK
3422
+        Content-Type: application/vnd.docker.raw-stream
3423
+
3424
+        [STREAM]
3425
+        ```
3426
+
3427
+        After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server.
3428
+
3429
+        To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers.
3430
+
3431
+        For example, the client sends this request to upgrade the connection:
3432
+
3433
+        ```
3434
+        POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1
3435
+        Upgrade: tcp
3436
+        Connection: Upgrade
3437
+        ```
3438
+
3439
+        The Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream:
3440
+
3441
+        ```
3442
+        HTTP/1.1 101 UPGRADED
3443
+        Content-Type: application/vnd.docker.raw-stream
3444
+        Connection: Upgrade
3445
+        Upgrade: tcp
3446
+
3447
+        [STREAM]
3448
+        ```
3449
+
3450
+        ### Stream format
3451
+
3452
+        When the TTY setting is disabled in [`POST /containers/create`](#operation/PostContainerCreate), the stream over the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The stream consists of a series of frames, each containing a header and a payload.
3453
+
3454
+        The header contains the information which the stream writes (`stdout` or `stderr`). It also contains the size of the associated frame encoded in the last four bytes (`uint32`).
3455
+
3456
+        It is encoded on the first eight bytes like this:
3457
+
3458
+        ```go
3459
+        header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}
3460
+        ```
3461
+
3462
+        `STREAM_TYPE` can be:
3463
+
3464
+        - 0: `stdin` (is written on `stdout`)
3465
+        - 1: `stdout`
3466
+        - 2: `stderr`
3467
+
3468
+        `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian.
3469
+
3470
+        Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`.
3471
+
3472
+        The simplest way to implement this protocol is the following:
3473
+
3474
+        1. Read 8 bytes.
3475
+        2. Choose `stdout` or `stderr` depending on the first byte.
3476
+        3. Extract the frame size from the last four bytes.
3477
+        4. Read the extracted size and output it on the correct output.
3478
+        5. Goto 1.
3479
+
3480
+        ### Stream format when using a TTY
3481
+
3482
+        When the TTY setting is enabled in [`POST /containers/create`](#operation/PostContainerCreate), the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's `stdin`.
3483
+
3484
+      operationId: "PostContainerAttach"
3485
+      produces:
3486
+        - "application/vnd.docker.raw-stream"
3487
+      responses:
3488
+        101:
3489
+          description: "no error, hints proxy about hijacking"
3490
+        200:
3491
+          description: "no error, no upgrade header found"
3492
+        400:
3493
+          description: "bad parameter"
3494
+          schema:
3495
+            $ref: "#/definitions/Error"
3496
+        404:
3497
+          description: "no such container"
3498
+          schema:
3499
+            $ref: "#/definitions/Error"
3500
+          examples:
3501
+            application/json:
3502
+              message: "No such container: c2ada9df5af8"
3503
+        500:
3504
+          description: "server error"
3505
+          schema:
3506
+            $ref: "#/definitions/Error"
3507
+      parameters:
3508
+        - name: "id"
3509
+          in: "path"
3510
+          required: true
3511
+          description: "ID or name of the container"
3512
+          type: "string"
3513
+        - name: "detachKeys"
3514
+          in: "query"
3515
+          description: "Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`."
3516
+          type: "string"
3517
+        - name: "logs"
3518
+          in: "query"
3519
+          description: |
3520
+            Replay previous logs from the container.
3521
+
3522
+            This is useful for attaching to a container that has started and you want to output everything since the container started.
3523
+
3524
+            If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output.
3525
+          type: "boolean"
3526
+          default: false
3527
+        - name: "stream"
3528
+          in: "query"
3529
+          description: "Stream attached streams from the the time the request was made onwards"
3530
+          type: "boolean"
3531
+          default: false
3532
+        - name: "stdin"
3533
+          in: "query"
3534
+          description: "Attach to stdin"
3535
+          type: "boolean"
3536
+          default: false
3537
+        - name: "stdout"
3538
+          in: "query"
3539
+          description: "Attach to stdout"
3540
+          type: "boolean"
3541
+          default: false
3542
+        - name: "stderr"
3543
+          in: "query"
3544
+          description: "Attach to stderr"
3545
+          type: "boolean"
3546
+          default: false
3547
+      tags:
3548
+        - "Container"
3549
+  /containers/{id}/attach/ws:
3550
+    get:
3551
+      summary: "Attach to a container via a websocket"
3552
+      operationId: "PostContainerAttachWebsocket"
3553
+      responses:
3554
+        101:
3555
+          description: "no error, hints proxy about hijacking"
3556
+        200:
3557
+          description: "no error, no upgrade header found"
3558
+        400:
3559
+          description: "bad parameter"
3560
+          schema:
3561
+            $ref: "#/definitions/Error"
3562
+        404:
3563
+          description: "no such container"
3564
+          schema:
3565
+            $ref: "#/definitions/Error"
3566
+          examples:
3567
+            application/json:
3568
+              message: "No such container: c2ada9df5af8"
3569
+        500:
3570
+          description: "server error"
3571
+          schema:
3572
+            $ref: "#/definitions/Error"
3573
+      parameters:
3574
+        - name: "id"
3575
+          in: "path"
3576
+          required: true
3577
+          description: "ID or name of the container"
3578
+          type: "string"
3579
+        - name: "detachKeys"
3580
+          in: "query"
3581
+          description: "Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,`, or `_`."
3582
+          type: "string"
3583
+        - name: "logs"
3584
+          in: "query"
3585
+          description: "Return logs"
3586
+          type: "boolean"
3587
+          default: false
3588
+        - name: "stream"
3589
+          in: "query"
3590
+          description: "Return stream"
3591
+          type: "boolean"
3592
+          default: false
3593
+        - name: "stdin"
3594
+          in: "query"
3595
+          description: "Attach to stdin"
3596
+          type: "boolean"
3597
+          default: false
3598
+        - name: "stdout"
3599
+          in: "query"
3600
+          description: "Attach to stdout"
3601
+          type: "boolean"
3602
+          default: false
3603
+        - name: "stderr"
3604
+          in: "query"
3605
+          description: "Attach to stderr"
3606
+          type: "boolean"
3607
+          default: false
3608
+      tags:
3609
+        - "Container"
3610
+  /containers/{id}/wait:
3611
+    post:
3612
+      summary: "Wait for a container"
3613
+      description: "Block until a container stops, then returns the exit code."
3614
+      operationId: "PostContainerWait"
3615
+      produces:
3616
+        - "application/json"
3617
+      responses:
3618
+        200:
3619
+          description: "no error"
3620
+          schema:
3621
+            type: "object"
3622
+            properties:
3623
+              StatusCode:
3624
+                description: "Exit code of the container"
3625
+                type: "integer"
3626
+        404:
3627
+          description: "no such container"
3628
+          schema:
3629
+            $ref: "#/definitions/Error"
3630
+          examples:
3631
+            application/json:
3632
+              message: "No such container: c2ada9df5af8"
3633
+        500:
3634
+          description: "server error"
3635
+          schema:
3636
+            $ref: "#/definitions/Error"
3637
+      parameters:
3638
+        - name: "id"
3639
+          in: "path"
3640
+          required: true
3641
+          description: "ID or name of the container"
3642
+          type: "string"
3643
+      tags:
3644
+        - "Container"
3645
+  /containers/{id}:
3646
+    delete:
3647
+      summary: "Remove a container"
3648
+      operationId: "DeleteContainer"
3649
+      responses:
3650
+        204:
3651
+          description: "no error"
3652
+        400:
3653
+          description: "bad parameter"
3654
+          schema:
3655
+            $ref: "#/definitions/Error"
3656
+        404:
3657
+          description: "no such container"
3658
+          schema:
3659
+            $ref: "#/definitions/Error"
3660
+          examples:
3661
+            application/json:
3662
+              message: "No such container: c2ada9df5af8"
3663
+        500:
3664
+          description: "server error"
3665
+          schema:
3666
+            $ref: "#/definitions/Error"
3667
+      parameters:
3668
+        - name: "id"
3669
+          in: "path"
3670
+          required: true
3671
+          description: "ID or name of the container"
3672
+          type: "string"
3673
+        - name: "v"
3674
+          in: "query"
3675
+          description: "Remove the volumes associated with the container."
3676
+          type: "boolean"
3677
+          default: false
3678
+        - name: "force"
3679
+          in: "query"
3680
+          description: "If the container is running, kill it before removing it."
3681
+          type: "boolean"
3682
+          default: false
3683
+      tags:
3684
+        - "Container"
3685
+  /containers/{id}/archive:
3686
+    head:
3687
+      summary: "Get information about files in a container"
3688
+      description: "A response header `X-Docker-Container-Path-Stat` is return containing a base64 - encoded JSON object with some filesystem header information about the path."
3689
+      operationId: "HeadContainerArchive"
3690
+      responses:
3691
+        200:
3692
+          description: "no error"
3693
+          headers:
3694
+            X-Docker-Container-Path-Stat:
3695
+              type: "string"
3696
+              description: "TODO"
3697
+        400:
3698
+          description: "client error, bad parameter, details in JSON response body, one of: must specify path parameter (path cannot be empty) not a directory (path was asserted to be a directory but exists as a file)"
3699
+          schema:
3700
+            $ref: "#/definitions/Error"
3701
+        404:
3702
+          description: "client error, resource not found, one of: 1) no such container (container id does not exist) 2) no such file or directory (path resource does not exist)"
3703
+          schema:
3704
+            $ref: "#/definitions/Error"
3705
+          examples:
3706
+            application/json:
3707
+              message: "No such container: c2ada9df5af8"
3708
+        500:
3709
+          description: "server error"
3710
+          schema:
3711
+            $ref: "#/definitions/Error"
3712
+      parameters:
3713
+        - name: "id"
3714
+          in: "path"
3715
+          required: true
3716
+          description: "ID or name of the container"
3717
+          type: "string"
3718
+        - name: "path"
3719
+          in: "query"
3720
+          required: true
3721
+          description: "Resource in the container’s filesystem to archive."
3722
+          type: "string"
3723
+      tags:
3724
+        - "Container"
3725
+    get:
3726
+      summary: "Get an archive of a filesystem resource in a container"
3727
+      description: "Get an tar archive of a resource in the filesystem of container id."
3728
+      operationId: "GetContainerArchive"
3729
+      produces:
3730
+        - "application/x-tar"
3731
+      responses:
3732
+        200:
3733
+          description: "no error"
3734
+        400:
3735
+          description: "client error, bad parameter, details in JSON response body, one of: must specify path parameter (path cannot be empty) not a directory (path was asserted to be a directory but exists as a file)"
3736
+          schema:
3737
+            $ref: "#/definitions/Error"
3738
+        404:
3739
+          description: "client error, resource not found, one of: 1) no such container (container id does not exist) 2) no such file or directory (path resource does not exist)"
3740
+          schema:
3741
+            $ref: "#/definitions/Error"
3742
+          examples:
3743
+            application/json:
3744
+              message: "No such container: c2ada9df5af8"
3745
+        500:
3746
+          description: "server error"
3747
+          schema:
3748
+            $ref: "#/definitions/Error"
3749
+      parameters:
3750
+        - name: "id"
3751
+          in: "path"
3752
+          required: true
3753
+          description: "ID or name of the container"
3754
+          type: "string"
3755
+        - name: "path"
3756
+          in: "query"
3757
+          required: true
3758
+          description: "Resource in the container’s filesystem to archive."
3759
+          type: "string"
3760
+      tags:
3761
+        - "Container"
3762
+    put:
3763
+      summary: "Extract an archive of files or folders to a directory in a container"
3764
+      description: "Upload a tar archive to be extracted to a path in the filesystem of container id."
3765
+      operationId: "PutContainerArchive"
3766
+      consumes:
3767
+        - "application/x-tar"
3768
+        - "application/octet-stream"
3769
+      responses:
3770
+        200:
3771
+          description: "The content was extracted successfully"
3772
+        400:
3773
+          description: "Bad parameter"
3774
+          schema:
3775
+            $ref: "#/definitions/Error"
3776
+        403:
3777
+          description: "Permission denied, the volume or container rootfs is marked as read-only."
3778
+          schema:
3779
+            $ref: "#/definitions/Error"
3780
+        404:
3781
+          description: "No such container or path does not exist inside the container"
3782
+          schema:
3783
+            $ref: "#/definitions/Error"
3784
+          examples:
3785
+            application/json:
3786
+              message: "No such container: c2ada9df5af8"
3787
+        500:
3788
+          description: "Server error"
3789
+          schema:
3790
+            $ref: "#/definitions/Error"
3791
+      parameters:
3792
+        - name: "id"
3793
+          in: "path"
3794
+          required: true
3795
+          description: "ID or name of the container"
3796
+          type: "string"
3797
+        - name: "path"
3798
+          in: "query"
3799
+          required: true
3800
+          description: "Path to a directory in the container to extract the archive’s contents into. "
3801
+          type: "string"
3802
+        - name: "noOverwriteDirNonDir"
3803
+          in: "query"
3804
+          description: "If “1”, “true”, or “True” then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa."
3805
+          type: "string"
3806
+        - name: "inputStream"
3807
+          in: "body"
3808
+          required: true
3809
+          description: "The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz."
3810
+          schema:
3811
+            type: "string"
3812
+      tags:
3813
+        - "Container"
3814
+  /images/json:
3815
+    get:
3816
+      summary: "List Images"
3817
+      description: "Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image."
3818
+      operationId: "GetImageList"
3819
+      produces:
3820
+        - "application/json"
3821
+      responses:
3822
+        200:
3823
+          description: "no error"
3824
+          schema:
3825
+            type: "array"
3826
+            items:
3827
+              type: "object"
3828
+              properties:
3829
+                Id:
3830
+                  type: "string"
3831
+                ParentId:
3832
+                  type: "string"
3833
+                RepoTags:
3834
+                  type: "array"
3835
+                  items:
3836
+                    type: "string"
3837
+                RepoDigests:
3838
+                  type: "array"
3839
+                  items:
3840
+                    type: "string"
3841
+                Created:
3842
+                  type: "integer"
3843
+                  format: "int64"
3844
+                Size:
3845
+                  type: "integer"
3846
+                  format: "int64"
3847
+                VirtualSize:
3848
+                  type: "integer"
3849
+                  format: "int64"
3850
+                Labels:
3851
+                  type: "object"
3852
+                  additionalProperties:
3853
+                    type: "string"
3854
+          examples:
3855
+            application/json:
3856
+              - RepoTags:
3857
+                  - "ubuntu:12.04"
3858
+                  - "ubuntu:precise"
3859
+                  - "ubuntu:latest"
3860
+                Id: "8dbd9e392a964056420e5d58ca5cc376ef18e2de93b5cc90e868a1bbc8318c1c"
3861
+                Created: 1365714795
3862
+                Size: 131506275
3863
+                VirtualSize: 131506275
3864
+                Labels: {}
3865
+              - RepoTags:
3866
+                  - "ubuntu:12.10"
3867
+                  - "ubuntu:quantal"
3868
+                ParentId: "27cf784147099545"
3869
+                Id: "b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc"
3870
+                Created: 1364102658
3871
+                Size: 24653
3872
+                VirtualSize: 180116135
3873
+                Labels:
3874
+                  com.example.version: "v1"
3875
+        500:
3876
+          description: "server error"
3877
+          schema:
3878
+            $ref: "#/definitions/Error"
3879
+      parameters:
3880
+        - name: "all"
3881
+          in: "query"
3882
+          description: "Show all images. Only images from a final layer (no children) are shown by default."
3883
+          type: "boolean"
3884
+          default: false
3885
+        - name: "filters"
3886
+          in: "query"
3887
+          description: "A JSON encoded value of the filters (a `map[string][]string`) to process on the containers list"
3888
+          type: "string"
3889
+        - name: "filter"
3890
+          in: "query"
3891
+          description: "Only return images with the specified name."
3892
+          type: "string"
3893
+        - name: "digests"
3894
+          in: "query"
3895
+          description: "Show digest information as a `RepoDigests` field on each image."
3896
+          type: "boolean"
3897
+          default: false
3898
+      tags:
3899
+        - "Image"
3900
+  /build:
3901
+    post:
3902
+      summary: "Build an image"
3903
+      description: |
3904
+        Build an image from a tar achive with a Dockerfile in it.
3905
+
3906
+        The Dockerfile specifies how the image is built from the tar archive. It is typically in the archive's root, but can be at a different path or have a different name by specifying the `dockerfile` parameter. [See the Dockerfile reference for more information](https://docs.docker.com/engine/reference/builder/).
3907
+
3908
+        The build is canceled if the client drops the connection by quitting or being killed.
3909
+      operationId: "PostImageBuild"
3910
+      consumes:
3911
+        - "application/octet-stream"
3912
+      produces:
3913
+        - "application/json"
3914
+      parameters:
3915
+        - name: "inputStream"
3916
+          in: "body"
3917
+          description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz."
3918
+          schema:
3919
+            type: "string"
3920
+            format: "binary"
3921
+        - name: "dockerfile"
3922
+          in: "query"
3923
+          description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an individual filename."
3924
+          type: "string"
3925
+          default: "Dockerfile"
3926
+        - name: "t"
3927
+          in: "query"
3928
+          description: "A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag the default `latest` value is assumed. You can provide several `t` parameters."
3929
+          type: "string"
3930
+        - name: "remote"
3931
+          in: "query"
3932
+          description: "A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called `Dockerfile` and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the `dockerfile` parameter is also specified, there must be a file with the corresponding path inside the tarball."
3933
+          type: "string"
3934
+        - name: "q"
3935
+          in: "query"
3936
+          description: "Suppress verbose build output."
3937
+          type: "boolean"
3938
+          default: false
3939
+        - name: "nocache"
3940
+          in: "query"
3941
+          description: "Do not use the cache when building the image."
3942
+          type: "boolean"
3943
+          default: false
3944
+        - name: "pull"
3945
+          in: "query"
3946
+          description: "Attempt to pull the image even if an older image exists locally."
3947
+          type: "string"
3948
+        - name: "rm"
3949
+          in: "query"
3950
+          description: "Remove intermediate containers after a successful build."
3951
+          type: "boolean"
3952
+          default: true
3953
+        - name: "forcerm"
3954
+          in: "query"
3955
+          description: "Always remove intermediate containers, even upon failure."
3956
+          type: "boolean"
3957
+          default: false
3958
+        - name: "memory"
3959
+          in: "query"
3960
+          description: "Set memory limit for build."
3961
+          type: "integer"
3962
+        - name: "memswap"
3963
+          in: "query"
3964
+          description: "Total memory (memory + swap). Set as `-1` to disable swap."
3965
+          type: "integer"
3966
+        - name: "cpushares"
3967
+          in: "query"
3968
+          description: "CPU shares (relative weight)."
3969
+          type: "integer"
3970
+        - name: "cpusetcpus"
3971
+          in: "query"
3972
+          description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)."
3973
+          type: "string"
3974
+        - name: "cpuperiod"
3975
+          in: "query"
3976
+          description: "The length of a CPU period in microseconds."
3977
+          type: "integer"
3978
+        - name: "cpuquota"
3979
+          in: "query"
3980
+          description: "Microseconds of CPU time that the container can get in a CPU period."
3981
+          type: "integer"
3982
+        - name: "buildargs"
3983
+          in: "query"
3984
+          description: "JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the Dockerfile’s RUN instruction, or for variable expansion in other Dockerfile instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)"
3985
+          type: "integer"
3986
+        - name: "shmsize"
3987
+          in: "query"
3988
+          description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB."
3989
+          type: "integer"
3990
+        - name: "labels"
3991
+          in: "query"
3992
+          description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs."
3993
+          type: "string"
3994
+        - name: "Content-type"
3995
+          in: "header"
3996
+          type: "string"
3997
+          enum:
3998
+            - "application/tar"
3999
+          default: "application/tar"
4000
+        - name: "X-Registry-Config"
4001
+          in: "header"
4002
+          description: |
4003
+            This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to.
4004
+
4005
+            The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example:
4006
+
4007
+            ```
4008
+            {
4009
+              "docker.example.com": {
4010
+                "username": "janedoe",
4011
+                "password": "hunter2"
4012
+              },
4013
+              "https://index.docker.io/v1/": {
4014
+                "username": "mobydock",
4015
+                "password": "conta1n3rize14"
4016
+              }
4017
+            }
4018
+            ```
4019
+
4020
+            Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a `https://` prefix and a `/v1/` suffix even though Docker will prefer to use the v2 registry API.
4021
+          type: "string"
4022
+      responses:
4023
+        200:
4024
+          description: "no error"
4025
+        500:
4026
+          description: "server error"
4027
+          schema:
4028
+            $ref: "#/definitions/Error"
4029
+      tags:
4030
+        - "Image"
4031
+  /images/create:
4032
+    post:
4033
+      summary: "Create an image"
4034
+      description: "Create an image by either pulling it from a registry or importing it."
4035
+      operationId: "PostImageCreate"
4036
+      consumes:
4037
+        - "text/plain"
4038
+        - "application/octet-stream"
4039
+      produces:
4040
+        - "application/json"
4041
+      responses:
4042
+        200:
4043
+          description: "no error"
4044
+        500:
4045
+          description: "server error"
4046
+          schema:
4047
+            $ref: "#/definitions/Error"
4048
+      parameters:
4049
+        - name: "fromImage"
4050
+          in: "query"
4051
+          description: "Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed."
4052
+          type: "string"
4053
+        - name: "fromSrc"
4054
+          in: "query"
4055
+          description: "Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image."
4056
+          type: "string"
4057
+        - name: "repo"
4058
+          in: "query"
4059
+          description: "Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image."
4060
+          type: "string"
4061
+        - name: "tag"
4062
+          in: "query"
4063
+          description: "Tag or digest."
4064
+          type: "string"
4065
+        - name: "inputImage"
4066
+          in: "body"
4067
+          description: "Image content if the value `-` has been specified in fromSrc query parameter"
4068
+          schema:
4069
+            type: "string"
4070
+          required: false
4071
+        - name: "X-Registry-Auth"
4072
+          in: "header"
4073
+          description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)"
4074
+          type: "string"
4075
+      tags:
4076
+        - "Image"
4077
+  /images/{name}/json:
4078
+    get:
4079
+      summary: "Inspect an image"
4080
+      description: "Return low-level information about an image."
4081
+      operationId: "GetImageInspect"
4082
+      produces:
4083
+        - "application/json"
4084
+      responses:
4085
+        200:
4086
+          description: "No error"
4087
+          schema:
4088
+            $ref: "#/definitions/Image"
4089
+          examples:
4090
+            application/json:
4091
+              Id: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c"
4092
+              Container: "cb91e48a60d01f1e27028b4fc6819f4f290b3cf12496c8176ec714d0d390984a"
4093
+              Comment: ""
4094
+              Os: "linux"
4095
+              Architecture: "amd64"
4096
+              Parent: "sha256:91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c"
4097
+              ContainerConfig:
4098
+                Tty: false
4099
+                Hostname: "e611e15f9c9d"
4100
+                Volumes: null
4101
+                Domainname: ""
4102
+                AttachStdout: false
4103
+                PublishService: ""
4104
+                AttachStdin: false
4105
+                OpenStdin: false
4106
+                StdinOnce: false
4107
+                NetworkDisabled: false
4108
+                OnBuild: []
4109
+                Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c"
4110
+                User: ""
4111
+                WorkingDir: ""
4112
+                Entrypoint: null
4113
+                MacAddress: ""
4114
+                AttachStderr: false
4115
+                Labels:
4116
+                  com.example.license: "GPL"
4117
+                  com.example.version: "1.0"
4118
+                  com.example.vendor: "Acme"
4119
+                Env:
4120
+                  - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
4121
+                ExposedPorts: null
4122
+                Cmd:
4123
+                  - "/bin/sh"
4124
+                  - "-c"
4125
+                  - "#(nop) LABEL com.example.vendor=Acme com.example.license=GPL com.example.version=1.0"
4126
+              DockerVersion: "1.9.0-dev"
4127
+              VirtualSize: 188359297
4128
+              Size: 0
4129
+              Author: ""
4130
+              Created: "2015-09-10T08:30:53.26995814Z"
4131
+              GraphDriver:
4132
+                Name: "aufs"
4133
+                Data: null
4134
+              RepoDigests:
4135
+                - "localhost:5000/test/busybox/example@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf"
4136
+              RepoTags:
4137
+                - "example:1.0"
4138
+                - "example:latest"
4139
+                - "example:stable"
4140
+              Config:
4141
+                Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c"
4142
+                NetworkDisabled: false
4143
+                OnBuild: []
4144
+                StdinOnce: false
4145
+                PublishService: ""
4146
+                AttachStdin: false
4147
+                OpenStdin: false
4148
+                Domainname: ""
4149
+                AttachStdout: false
4150
+                Tty: false
4151
+                Hostname: "e611e15f9c9d"
4152
+                Volumes: null
4153
+                Cmd:
4154
+                  - "/bin/bash"
4155
+                ExposedPorts: null
4156
+                Env:
4157
+                  - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
4158
+                Labels:
4159
+                  com.example.vendor: "Acme"
4160
+                  com.example.version: "1.0"
4161
+                  com.example.license: "GPL"
4162
+                Entrypoint: null
4163
+                MacAddress: ""
4164
+                AttachStderr: false
4165
+                WorkingDir: ""
4166
+                User: ""
4167
+              RootFS:
4168
+                Type: "layers"
4169
+                Layers:
4170
+                  - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6"
4171
+                  - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"
4172
+        404:
4173
+          description: "No such image"
4174
+          schema:
4175
+            $ref: "#/definitions/Error"
4176
+          examples:
4177
+            application/json:
4178
+              message: "No such image: someimage (tag: latest)"
4179
+        500:
4180
+          description: "Server error"
4181
+          schema:
4182
+            $ref: "#/definitions/Error"
4183
+      parameters:
4184
+        - name: "name"
4185
+          in: "path"
4186
+          description: "Image name or id"
4187
+          type: "string"
4188
+          required: true
4189
+      tags:
4190
+        - "Image"
4191
+  /images/{name}/history:
4192
+    get:
4193
+      summary: "Get the history of an image"
4194
+      description: "Return parent layers of an image."
4195
+      operationId: "GetImageHistory"
4196
+      produces:
4197
+        - "application/json"
4198
+      responses:
4199
+        200:
4200
+          description: "No error"
4201
+          schema:
4202
+            type: "array"
4203
+            items:
4204
+              type: "object"
4205
+              properties:
4206
+                Id:
4207
+                  type: "string"
4208
+                Created:
4209
+                  type: "integer"
4210
+                  format: "int64"
4211
+                CreatedBy:
4212
+                  type: "string"
4213
+                Tags:
4214
+                  type: "array"
4215
+                  items:
4216
+                    type: "string"
4217
+                Size:
4218
+                  type: "integer"
4219
+                  format: "int64"
4220
+                Comment:
4221
+                  type: "string"
4222
+          examples:
4223
+            application/json:
4224
+              - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710"
4225
+                Created: 1398108230
4226
+                CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /"
4227
+                Tags:
4228
+                  - "ubuntu:lucid"
4229
+                  - "ubuntu:10.04"
4230
+                Size: 182964289
4231
+                Comment: ""
4232
+              - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8"
4233
+                Created: 1398108222
4234
+                CreatedBy: "/bin/sh -c #(nop) MAINTAINER Tianon Gravi <admwiggin@gmail.com> - mkimage-debootstrap.sh -i iproute,iputils-ping,ubuntu-minimal -t lucid.tar.xz lucid http://archive.ubuntu.com/ubuntu/"
4235
+                Tags: null
4236
+                Size: 0
4237
+                Comment: ""
4238
+              - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158"
4239
+                Created: 1371157430
4240
+                CreatedBy: ""
4241
+                Tags:
4242
+                  - "scratch12:latest"
4243
+                  - "scratch:latest"
4244
+                Size: 0
4245
+                Comment: "Imported from -"
4246
+        404:
4247
+          description: "No such image"
4248
+          schema:
4249
+            $ref: "#/definitions/Error"
4250
+        500:
4251
+          description: "Server error"
4252
+          schema:
4253
+            $ref: "#/definitions/Error"
4254
+      parameters:
4255
+        - name: "name"
4256
+          in: "path"
4257
+          description: "Image name or ID"
4258
+          type: "string"
4259
+          required: true
4260
+      tags:
4261
+        - "Image"
4262
+  /images/{name}/push:
4263
+    post:
4264
+      summary: "Push an image"
4265
+      description: |
4266
+        Push an image to a registry.
4267
+
4268
+        If you wish to push an image on to a private registry, that image must already have a tag which references the registry. For example, `registry.example.com/myimage:latest`.
4269
+
4270
+        The push is cancelled if the HTTP connection is closed.
4271
+      operationId: "PostImagePush"
4272
+      consumes:
4273
+        - "application/octet-stream"
4274
+      responses:
4275
+        200:
4276
+          description: "No error"
4277
+        404:
4278
+          description: "No such image"
4279
+          schema:
4280
+            $ref: "#/definitions/Error"
4281
+        500:
4282
+          description: "Server error"
4283
+          schema:
4284
+            $ref: "#/definitions/Error"
4285
+      parameters:
4286
+        - name: "name"
4287
+          in: "path"
4288
+          description: "Image name or ID."
4289
+          type: "string"
4290
+          required: true
4291
+        - name: "tag"
4292
+          in: "query"
4293
+          description: "The tag to associate with the image on the registry."
4294
+          type: "string"
4295
+        - name: "X-Registry-Auth"
4296
+          in: "header"
4297
+          description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)"
4298
+          type: "string"
4299
+          required: true
4300
+      tags:
4301
+        - "Image"
4302
+  /images/{name}/tag:
4303
+    post:
4304
+      summary: "Tag an image"
4305
+      description: "Tag an image so that it becomes part of a repository."
4306
+      operationId: "PostImageTag"
4307
+      responses:
4308
+        201:
4309
+          description: "No error"
4310
+        400:
4311
+          description: "Bad parameter"
4312
+          schema:
4313
+            $ref: "#/definitions/Error"
4314
+        404:
4315
+          description: "No such image"
4316
+          schema:
4317
+            $ref: "#/definitions/Error"
4318
+        409:
4319
+          description: "Conflict"
4320
+          schema:
4321
+            $ref: "#/definitions/Error"
4322
+        500:
4323
+          description: "Server error"
4324
+          schema:
4325
+            $ref: "#/definitions/Error"
4326
+      parameters:
4327
+        - name: "name"
4328
+          in: "path"
4329
+          description: "Image name or ID to tag."
4330
+          type: "string"
4331
+          required: true
4332
+        - name: "repo"
4333
+          in: "query"
4334
+          description: "The repository to tag in. For example, `someuser/someimage`."
4335
+          type: "string"
4336
+        - name: "tag"
4337
+          in: "query"
4338
+          description: "The name of the new tag."
4339
+          type: "string"
4340
+      tags:
4341
+        - "Image"
4342
+  /images/{name}:
4343
+    delete:
4344
+      summary: "Remove an image"
4345
+      description: |
4346
+        Remove an image, along with any untagged parent images that were referenced by that image.
4347
+
4348
+        Images can't be removed if they have descendant images, are being used by a running container or are being used by a build.
4349
+      operationId: "DeleteImage"
4350
+      produces:
4351
+        - "application/json"
4352
+      responses:
4353
+        200:
4354
+          description: "No error"
4355
+          schema:
4356
+            type: "array"
4357
+            items:
4358
+              type: "object"
4359
+              properties:
4360
+                Untagged:
4361
+                  description: "The image ID of an image that was untagged"
4362
+                  type: "string"
4363
+                Deleted:
4364
+                  description: "The image ID of an image that was deleted"
4365
+                  type: "string"
4366
+          examples:
4367
+            application/json:
4368
+              - Untagged: "3e2f21a89f"
4369
+              - Deleted: "3e2f21a89f"
4370
+              - Deleted: "53b4f83ac9"
4371
+        404:
4372
+          description: "No such image"
4373
+          schema:
4374
+            $ref: "#/definitions/Error"
4375
+        409:
4376
+          description: "Conflict"
4377
+          schema:
4378
+            $ref: "#/definitions/Error"
4379
+        500:
4380
+          description: "Server error"
4381
+          schema:
4382
+            $ref: "#/definitions/Error"
4383
+      parameters:
4384
+        - name: "name"
4385
+          in: "path"
4386
+          description: "Image name or ID"
4387
+          type: "string"
4388
+          required: true
4389
+        - name: "force"
4390
+          in: "query"
4391
+          description: "Remove the image even if it is being used by stopped containers or has other tags"
4392
+          type: "boolean"
4393
+          default: false
4394
+        - name: "noprune"
4395
+          in: "query"
4396
+          description: "Do not delete untagged parent images"
4397
+          type: "boolean"
4398
+          default: false
4399
+      tags:
4400
+        - "Image"
4401
+  /images/search:
4402
+    get:
4403
+      summary: "Search images"
4404
+      description: "Search for an image on Docker Hub."
4405
+      operationId: "GetImageSearch"
4406
+      produces:
4407
+        - "application/json"
4408
+      responses:
4409
+        200:
4410
+          description: "No error"
4411
+          schema:
4412
+            type: "array"
4413
+            items:
4414
+              type: "object"
4415
+              properties:
4416
+                description:
4417
+                  type: "string"
4418
+                is_official:
4419
+                  type: "boolean"
4420
+                is_automated:
4421
+                  type: "boolean"
4422
+                name:
4423
+                  type: "string"
4424
+                star_count:
4425
+                  type: "integer"
4426
+          examples:
4427
+            application/json:
4428
+              - description: ""
4429
+                is_official: false
4430
+                is_automated: false
4431
+                name: "wma55/u1210sshd"
4432
+                star_count: 0
4433
+              - description: ""
4434
+                is_official: false
4435
+                is_automated: false
4436
+                name: "jdswinbank/sshd"
4437
+                star_count: 0
4438
+              - description: ""
4439
+                is_official: false
4440
+                is_automated: false
4441
+                name: "vgauthier/sshd"
4442
+                star_count: 0
4443
+        500:
4444
+          description: "Server error"
4445
+          schema:
4446
+            $ref: "#/definitions/Error"
4447
+      parameters:
4448
+        - name: "term"
4449
+          in: "query"
4450
+          description: "Term to search"
4451
+          type: "string"
4452
+          required: true
4453
+        - name: "limit"
4454
+          in: "query"
4455
+          description: "Maximum number of results to return"
4456
+          type: "integer"
4457
+        - name: "filters"
4458
+          in: "query"
4459
+          description: |
4460
+            A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:
4461
+
4462
+            - `stars=<number>`
4463
+            - `is-automated=(true|false)`
4464
+            - `is-official=(true|false)`
4465
+          type: "string"
4466
+      tags:
4467
+        - "Image"
4468
+  /auth:
4469
+    post:
4470
+      summary: "Check auth configuration"
4471
+      description: "Validate credentials for a registry and, if available, get an identity token for accessing the registry without password."
4472
+      operationId: "checkAuthentication"
4473
+      consumes:
4474
+        - "application/json"
4475
+      produces:
4476
+        - "application/json"
4477
+      responses:
4478
+        200:
4479
+          description: "No error"
4480
+          schema:
4481
+            type: "object"
4482
+            properties:
4483
+              Status:
4484
+                description: "The status of the authentication"
4485
+                type: "string"
4486
+              IdentityToken:
4487
+                description: "An opaque token used to authenticate a user after a successful login"
4488
+                type: "string"
4489
+          examples:
4490
+            application/json:
4491
+              Status: "Login Succeeded"
4492
+              IdentityToken: "9cbaf023786cd7..."
4493
+        204:
4494
+          description: "No error"
4495
+        500:
4496
+          description: "Server error"
4497
+          schema:
4498
+            $ref: "#/definitions/Error"
4499
+      parameters:
4500
+        - name: "authConfig"
4501
+          in: "body"
4502
+          description: "Authentication to check"
4503
+          schema:
4504
+            $ref: "#/definitions/AuthConfig"
4505
+      tags:
4506
+        - "Misc"
4507
+  /info:
4508
+    get:
4509
+      summary: "Get system information"
4510
+      operationId: "getSystemInformation"
4511
+      produces:
4512
+        - "application/json"
4513
+      responses:
4514
+        200:
4515
+          description: "No error"
4516
+          schema:
4517
+            type: "object"
4518
+            properties:
4519
+              Architecture:
4520
+                type: "string"
4521
+              Containers:
4522
+                type: "integer"
4523
+              ContainersRunning:
4524
+                type: "integer"
4525
+              ContainersStopped:
4526
+                type: "integer"
4527
+              ContainersPaused:
4528
+                type: "integer"
4529
+              CpuCfsPeriod:
4530
+                type: "boolean"
4531
+              CpuCfsQuota:
4532
+                type: "boolean"
4533
+              Debug:
4534
+                type: "boolean"
4535
+              DiscoveryBackend:
4536
+                type: "string"
4537
+              DockerRootDir:
4538
+                type: "string"
4539
+              Driver:
4540
+                type: "string"
4541
+              DriverStatus:
4542
+                type: "array"
4543
+                items:
4544
+                  type: "array"
4545
+                  items:
4546
+                    type: "string"
4547
+              SystemStatus:
4548
+                type: "array"
4549
+                items:
4550
+                  type: "array"
4551
+                  items:
4552
+                    type: "string"
4553
+              Plugins:
4554
+                type: "object"
4555
+                properties:
4556
+                  Volume:
4557
+                    type: "array"
4558
+                    items:
4559
+                      type: "string"
4560
+                  Network:
4561
+                    type: "array"
4562
+                    items:
4563
+                      type: "string"
4564
+              ExecutionDriver:
4565
+                type: "string"
4566
+              ExperimentalBuild:
4567
+                type: "boolean"
4568
+              HttpProxy:
4569
+                type: "string"
4570
+              HttpsProxy:
4571
+                type: "string"
4572
+              ID:
4573
+                type: "string"
4574
+              IPv4Forwarding:
4575
+                type: "boolean"
4576
+              Images:
4577
+                type: "integer"
4578
+              IndexServerAddress:
4579
+                type: "string"
4580
+              InitPath:
4581
+                type: "string"
4582
+              InitSha1:
4583
+                type: "string"
4584
+              KernelVersion:
4585
+                type: "string"
4586
+              Labels:
4587
+                type: "array"
4588
+                items:
4589
+                  type: "string"
4590
+              MemTotal:
4591
+                type: "integer"
4592
+              MemoryLimit:
4593
+                type: "boolean"
4594
+              NCPU:
4595
+                type: "integer"
4596
+              NEventsListener:
4597
+                type: "integer"
4598
+              NFd:
4599
+                type: "integer"
4600
+              NGoroutines:
4601
+                type: "integer"
4602
+              Name:
4603
+                type: "string"
4604
+              NoProxy:
4605
+                type: "string"
4606
+              OomKillDisable:
4607
+                type: "boolean"
4608
+              OSType:
4609
+                type: "string"
4610
+              OomScoreAdj:
4611
+                type: "integer"
4612
+              OperatingSystem:
4613
+                type: "string"
4614
+              RegistryConfig:
4615
+                type: "object"
4616
+                properties:
4617
+                  IndexConfigs:
4618
+                    type: "object"
4619
+                    additionalProperties:
4620
+                      type: "object"
4621
+                      properties:
4622
+                        Mirrors:
4623
+                          type: "array"
4624
+                          items:
4625
+                            type: "string"
4626
+                        Name:
4627
+                          type: "string"
4628
+                        Official:
4629
+                          type: "boolean"
4630
+                        Secure:
4631
+                          type: "boolean"
4632
+                  InsecureRegistryCIDRs:
4633
+                    type: "array"
4634
+                    items:
4635
+                      type: "string"
4636
+              SwapLimit:
4637
+                type: "boolean"
4638
+              SystemTime:
4639
+                type: "string"
4640
+              ServerVersion:
4641
+                type: "string"
4642
+          examples:
4643
+            application/json:
4644
+              Architecture: "x86_64"
4645
+              ClusterStore: "etcd://localhost:2379"
4646
+              CgroupDriver: "cgroupfs"
4647
+              Containers: 11
4648
+              ContainersRunning: 7
4649
+              ContainersStopped: 3
4650
+              ContainersPaused: 1
4651
+              CpuCfsPeriod: true
4652
+              CpuCfsQuota: true
4653
+              Debug: false
4654
+              DockerRootDir: "/var/lib/docker"
4655
+              Driver: "btrfs"
4656
+              DriverStatus:
4657
+                -
4658
+                  - ""
4659
+              ExperimentalBuild: false
4660
+              HttpProxy: "http://test:test@localhost:8080"
4661
+              HttpsProxy: "https://test:test@localhost:8080"
4662
+              ID: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS"
4663
+              IPv4Forwarding: true
4664
+              Images: 16
4665
+              IndexServerAddress: "https://index.docker.io/v1/"
4666
+              InitPath: "/usr/bin/docker"
4667
+              InitSha1: ""
4668
+              KernelMemory: true
4669
+              KernelVersion: "3.12.0-1-amd64"
4670
+              Labels:
4671
+                - "storage=ssd"
4672
+              MemTotal: 2099236864
4673
+              MemoryLimit: true
4674
+              NCPU: 1
4675
+              NEventsListener: 0
4676
+              NFd: 11
4677
+              NGoroutines: 21
4678
+              Name: "prod-server-42"
4679
+              NoProxy: "9.81.1.160"
4680
+              OomKillDisable: true
4681
+              OSType: "linux"
4682
+              OperatingSystem: "Boot2Docker"
4683
+              Plugins:
4684
+                Volume:
4685
+                  - "local"
4686
+                Network:
4687
+                  - "null"
4688
+                  - "host"
4689
+                  - "bridge"
4690
+              RegistryConfig:
4691
+                IndexConfigs:
4692
+                  docker.io:
4693
+                    Mirrors: null
4694
+                    Name: "docker.io"
4695
+                    Official: true
4696
+                    Secure: true
4697
+                InsecureRegistryCIDRs:
4698
+                  - "127.0.0.0/8"
4699
+              SecurityOptions:
4700
+                - "apparmor"
4701
+                - "seccomp"
4702
+                - "selinux"
4703
+              ServerVersion: "1.9.0"
4704
+              SwapLimit: false
4705
+              SystemStatus:
4706
+                -
4707
+                  - "State"
4708
+                  - "Healthy"
4709
+              SystemTime: "2015-03-10T11:11:23.730591467-07:00"
4710
+        500:
4711
+          description: "Server error"
4712
+          schema:
4713
+            $ref: "#/definitions/Error"
4714
+      tags:
4715
+        - "Misc"
4716
+  /version:
4717
+    get:
4718
+      summary: "Get version"
4719
+      description: "Returns the version of Docker that is running and various information about the system that Docker is running on."
4720
+      operationId: "getVersion"
4721
+      produces:
4722
+        - "application/json"
4723
+      responses:
4724
+        200:
4725
+          description: "no error"
4726
+          schema:
4727
+            type: "object"
4728
+            properties:
4729
+              Version:
4730
+                type: "string"
4731
+              ApiVersion:
4732
+                type: "string"
4733
+              GitCommit:
4734
+                type: "string"
4735
+              GoVersion:
4736
+                type: "string"
4737
+              Os:
4738
+                type: "string"
4739
+              Arch:
4740
+                type: "string"
4741
+              KernelVersion:
4742
+                type: "string"
4743
+              Experimental:
4744
+                type: "boolean"
4745
+              BuildTime:
4746
+                type: "string"
4747
+          examples:
4748
+            application/json:
4749
+              Version: "1.13.0"
4750
+              Os: "linux"
4751
+              KernelVersion: "3.19.0-23-generic"
4752
+              GoVersion: "go1.6.3"
4753
+              GitCommit: "deadbee"
4754
+              Arch: "amd64"
4755
+              ApiVersion: "1.25"
4756
+              BuildTime: "2016-06-14T07:09:13.444803460+00:00"
4757
+              Experimental: true
4758
+        500:
4759
+          description: "server error"
4760
+          schema:
4761
+            $ref: "#/definitions/Error"
4762
+      tags:
4763
+        - "Misc"
4764
+  /_ping:
4765
+    get:
4766
+      summary: "Ping"
4767
+      description: "This is a dummy endpoint you can use to test if the server is accessible."
4768
+      operationId: "ping"
4769
+      produces:
4770
+        - "text/plain"
4771
+      responses:
4772
+        200:
4773
+          description: "no error"
4774
+          schema:
4775
+            type: "string"
4776
+            example: "OK"
4777
+        500:
4778
+          description: "server error"
4779
+          schema:
4780
+            $ref: "#/definitions/Error"
4781
+      tags:
4782
+        - "Misc"
4783
+  /commit:
4784
+    post:
4785
+      summary: "Create a new image from a container"
4786
+      operationId: "PostImageCommit"
4787
+      consumes:
4788
+        - "application/json"
4789
+      produces:
4790
+        - "application/json"
4791
+      responses:
4792
+        201:
4793
+          description: "no error"
4794
+          schema:
4795
+            type: "object"
4796
+            properties:
4797
+              Id:
4798
+                description: "The ID of the image created"
4799
+                type: "string"
4800
+          examples:
4801
+            application/json:
4802
+              Id: "596069db4bf5"
4803
+        404:
4804
+          description: "no such container"
4805
+          schema:
4806
+            $ref: "#/definitions/Error"
4807
+          examples:
4808
+            application/json:
4809
+              message: "No such container: c2ada9df5af8"
4810
+        500:
4811
+          description: "server error"
4812
+          schema:
4813
+            $ref: "#/definitions/Error"
4814
+      parameters:
4815
+        - name: "containerConfig"
4816
+          in: "body"
4817
+          description: "The container configuration"
4818
+          schema:
4819
+            $ref: "#/definitions/Config"
4820
+        - name: "container"
4821
+          in: "query"
4822
+          description: "The ID or name of the container to commit"
4823
+          type: "string"
4824
+        - name: "repo"
4825
+          in: "query"
4826
+          description: "Repository name for the created image"
4827
+          type: "string"
4828
+        - name: "tag"
4829
+          in: "query"
4830
+          description: "Tag name for the create image"
4831
+          type: "string"
4832
+        - name: "comment"
4833
+          in: "query"
4834
+          description: "Commit message"
4835
+          type: "string"
4836
+        - name: "author"
4837
+          in: "query"
4838
+          description: "Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`)"
4839
+          type: "string"
4840
+        - name: "pause"
4841
+          in: "query"
4842
+          description: "Whether to pause the container before committing"
4843
+          type: "boolean"
4844
+          default: true
4845
+        - name: "changes"
4846
+          in: "query"
4847
+          description: "Dockerfile instructions to apply while committing"
4848
+          type: "string"
4849
+      tags:
4850
+        - "Image"
4851
+  /events:
4852
+    get:
4853
+      summary: "Monitor events"
4854
+      description: |
4855
+        Stream real-time events from the server.
4856
+
4857
+        Various objects within Docker report events when something happens to them.
4858
+
4859
+        Containers report these events: `attach, commit, copy, create, destroy, detach, die, exec_create, exec_detach, exec_start, export, kill, oom, pause, rename, resize, restart, start, stop, top, unpause, update`
4860
+
4861
+        Images report these events: `delete, import, load, pull, push, save, tag, untag`
4862
+
4863
+        Volumes report these events: `create, mount, unmount, destroy`
4864
+
4865
+        Networks report these events: `create, connect, disconnect, destroy`
4866
+
4867
+        The Docker daemon reports these events: `reload`
4868
+
4869
+      operationId: "getEvents"
4870
+      produces:
4871
+        - "application/json"
4872
+      responses:
4873
+        200:
4874
+          description: "no error"
4875
+          schema:
4876
+            type: "object"
4877
+            properties:
4878
+              Type:
4879
+                description: "The type of object emitting the event"
4880
+                type: "string"
4881
+              Action:
4882
+                description: "The type of event"
4883
+                type: "string"
4884
+              Actor:
4885
+                type: "object"
4886
+                properties:
4887
+                  ID:
4888
+                    description: "The ID of the object emitting the event"
4889
+                    type: "string"
4890
+                  Attributes:
4891
+                    description: "Various key/value attributes of the object, depending on its type"
4892
+                    type: "object"
4893
+                    additionalProperties:
4894
+                      type: "string"
4895
+              time:
4896
+                description: "Timestamp of event"
4897
+                type: "integer"
4898
+              timeNano:
4899
+                description: "Timestamp of event, with nanosecond accuracy"
4900
+                type: "integer"
4901
+          examples:
4902
+            application/json:
4903
+              Type: "container"
4904
+              Action: "create"
4905
+              Actor:
4906
+                ID: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743"
4907
+                Attributes:
4908
+                  com.example.some-label: "some-label-value"
4909
+                  image: "alpine"
4910
+                  name: "my-container"
4911
+              time: 1461943101
4912
+              timeNano: 1461943101381709551
4913
+        500:
4914
+          description: "server error"
4915
+          schema:
4916
+            $ref: "#/definitions/Error"
4917
+      parameters:
4918
+        - name: "since"
4919
+          in: "query"
4920
+          description: "Show events created since this timestamp then stream new events"
4921
+          type: "string"
4922
+        - name: "until"
4923
+          in: "query"
4924
+          description: "Show events created until this timestamp then stop streaming"
4925
+          type: "string"
4926
+        - name: "filters"
4927
+          in: "query"
4928
+          description: |
4929
+            A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters:
4930
+
4931
+            - `container=<string>` container name or ID
4932
+            - `event=<string>` event type
4933
+            - `image=<string>` image name or ID
4934
+            - `label=<string>` image or container label
4935
+            - `type=<string>` object to filter by, one of `container`, `image`, `volume`, `network`, or `daemon`
4936
+            - `volume=<string>` volume name or ID
4937
+            - `network=<string>` network name or ID
4938
+            - `daemon=<string>` daemon name or ID
4939
+          type: "string"
4940
+      tags:
4941
+        - "Misc"
4942
+  /images/{name}/get:
4943
+    get:
4944
+      summary: "Export an image"
4945
+      description: |
4946
+        Get a tarball containing all images and metadata for a repository.
4947
+
4948
+        If `name` is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned. If `name` is an image ID, similarly only that image (and its parents) are returned, but with the exclusion of the `repositories` file in the tarball, as there were no image names referenced.
4949
+
4950
+        ### Image tarball format
4951
+
4952
+        An image tarball contains one directory per image layer (named using its long ID), each containing these files:
4953
+
4954
+        - `VERSION`: currently `1.0` - the file format version
4955
+        - `json`: detailed layer information, similar to `docker inspect layer_id`
4956
+        - `layer.tar`: A tarfile containing the filesystem changes in this layer
4957
+
4958
+        The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions.
4959
+
4960
+        If the tarball defines a repository, the tarball should also include a `repositories` file at the root that contains a list of repository and tag names mapped to layer IDs.
4961
+
4962
+        ```json
4963
+        {
4964
+          "hello-world": {
4965
+            "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"
4966
+          }
4967
+        }
4968
+        ```
4969
+      operationId: "GetImage"
4970
+      produces:
4971
+        - "application/x-tar"
4972
+      responses:
4973
+        200:
4974
+          description: "no error"
4975
+          schema:
4976
+            type: "string"
4977
+            format: "binary"
4978
+        500:
4979
+          description: "server error"
4980
+          schema:
4981
+            $ref: "#/definitions/Error"
4982
+      parameters:
4983
+        - name: "name"
4984
+          in: "path"
4985
+          description: "Image name or ID"
4986
+          type: "string"
4987
+          required: true
4988
+      tags:
4989
+        - "Image"
4990
+  /images/get:
4991
+    get:
4992
+      summary: "Export several images"
4993
+      description: |
4994
+        Get a tarball containing all images and metadata for several image repositories.
4995
+
4996
+        For each value of the `names` parameter: if it is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned; if it is an image ID, similarly only that image (and its parents) are returned and there would be no names referenced in the 'repositories' file for this image ID.
4997
+
4998
+        For details on the format, see [the export image endpoint](#operation/GetImage).
4999
+      operationId: "GetImageSaveAll"
5000
+      produces:
5001
+        - "application/x-tar"
5002
+      responses:
5003
+        200:
5004
+          description: "no error"
5005
+          schema:
5006
+            type: "string"
5007
+            format: "binary"
5008
+        500:
5009
+          description: "server error"
5010
+          schema:
5011
+            $ref: "#/definitions/Error"
5012
+      parameters:
5013
+        - name: "names"
5014
+          in: "query"
5015
+          description: "Image names to filter by"
5016
+          type: "array"
5017
+          items:
5018
+            type: "string"
5019
+      tags:
5020
+        - "Image"
5021
+  /images/load:
5022
+    post:
5023
+      summary: "Import images"
5024
+      description: |
5025
+        Load a set of images and tags into a repository.
5026
+
5027
+        For details on the format, see [the export image endpoint](#operation/GetImage).
5028
+      operationId: "PostImageLoad"
5029
+      consumes:
5030
+        - "application/x-tar"
5031
+      produces:
5032
+        - "application/json"
5033
+      responses:
5034
+        200:
5035
+          description: "no error"
5036
+        500:
5037
+          description: "server error"
5038
+          schema:
5039
+            $ref: "#/definitions/Error"
5040
+      parameters:
5041
+        - name: "imagesTarball"
5042
+          in: "body"
5043
+          description: "Tar archive containing images"
5044
+          schema:
5045
+            type: "string"
5046
+            format: "binary"
5047
+      tags:
5048
+        - "Image"
5049
+  /containers/{id}/exec:
5050
+    post:
5051
+      summary: "Create an exec instance"
5052
+      description: "Run a command inside a running container."
5053
+      operationId: "PostContainerExec"
5054
+      consumes:
5055
+        - "application/json"
5056
+      produces:
5057
+        - "application/json"
5058
+      responses:
5059
+        201:
5060
+          description: "no error"
5061
+          schema:
5062
+            type: "object"
5063
+            properties:
5064
+              Id:
5065
+                description: "The ID of the exec instance created."
5066
+                type: "string"
5067
+              Warnings:
5068
+                type: "array"
5069
+                items:
5070
+                  type: "string"
5071
+          examples:
5072
+            application/json:
5073
+              Id: "f90e34656806"
5074
+              Warnings: []
5075
+        404:
5076
+          description: "no such container"
5077
+          schema:
5078
+            $ref: "#/definitions/Error"
5079
+          examples:
5080
+            application/json:
5081
+              message: "No such container: c2ada9df5af8"
5082
+        409:
5083
+          description: "container is paused"
5084
+          schema:
5085
+            $ref: "#/definitions/Error"
5086
+        500:
5087
+          description: "Server error"
5088
+          schema:
5089
+            $ref: "#/definitions/Error"
5090
+      parameters:
5091
+        - name: "execConfig"
5092
+          in: "body"
5093
+          description: "Exec configuration"
5094
+          schema:
5095
+            type: "object"
5096
+            properties:
5097
+              AttachStdin:
5098
+                type: "boolean"
5099
+                description: "Attach to `stdin` of the exec command."
5100
+              AttachStdout:
5101
+                type: "boolean"
5102
+                description: "Attach to `stdout` of the exec command."
5103
+              AttachStderr:
5104
+                type: "boolean"
5105
+                description: "Attach to `stderr` of the exec command."
5106
+              DetachKeys:
5107
+                type: "string"
5108
+                description: "Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`."
5109
+              Tty:
5110
+                type: "boolean"
5111
+                description: "Allocate a pseudo-TTY."
5112
+              Cmd:
5113
+                type: "array"
5114
+                description: "Command to run, as a string or array of strings."
5115
+                items:
5116
+                  type: "string"
5117
+            example:
5118
+              AttachStdin: false
5119
+              AttachStdout: true
5120
+              AttachStderr: true
5121
+              DetachKeys: "ctrl-p,ctrl-q"
5122
+              Tty: false
5123
+              Cmd:
5124
+                - "date"
5125
+          required: true
5126
+        - name: "id"
5127
+          in: "path"
5128
+          description: "ID or name of container"
5129
+          type: "string"
5130
+          required: true
5131
+      tags:
5132
+        - "Exec"
5133
+  /exec/{id}/start:
5134
+    post:
5135
+      summary: "Start an exec instance"
5136
+      description: "Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command."
5137
+      operationId: "PostExecStart"
5138
+      consumes:
5139
+        - "application/json"
5140
+      produces:
5141
+        - "application/vnd.docker.raw-stream"
5142
+      responses:
5143
+        200:
5144
+          description: "No error"
5145
+        404:
5146
+          description: "No such exec instance"
5147
+          schema:
5148
+            $ref: "#/definitions/Error"
5149
+        409:
5150
+          description: "Container is stopped or paused"
5151
+          schema:
5152
+            $ref: "#/definitions/Error"
5153
+      parameters:
5154
+        - name: "execStartConfig"
5155
+          in: "body"
5156
+          schema:
5157
+            type: "object"
5158
+            properties:
5159
+              Detach:
5160
+                type: "boolean"
5161
+                description: "Detach from the command."
5162
+              Tty:
5163
+                type: "boolean"
5164
+                description: "Allocate a pseudo-TTY."
5165
+            example:
5166
+              Detach: false
5167
+              Tty: false
5168
+        - name: "id"
5169
+          in: "path"
5170
+          description: "Exec instance ID"
5171
+          required: true
5172
+          type: "string"
5173
+      tags:
5174
+        - "Exec"
5175
+  /exec/{id}/resize:
5176
+    post:
5177
+      summary: "Resize an exec instance"
5178
+      description: "Resize the TTY session used by an exec instance. This endpoint only works if `tty` was specified as part of creating and starting the exec instance."
5179
+      operationId: "PostExecResize"
5180
+      responses:
5181
+        201:
5182
+          description: "No error"
5183
+        404:
5184
+          description: "No such exec instance"
5185
+          schema:
5186
+            $ref: "#/definitions/Error"
5187
+      parameters:
5188
+        - name: "id"
5189
+          in: "path"
5190
+          description: "Exec instance ID"
5191
+          required: true
5192
+          type: "string"
5193
+        - name: "h"
5194
+          in: "query"
5195
+          description: "Height of the TTY session in characters"
5196
+          type: "integer"
5197
+        - name: "w"
5198
+          in: "query"
5199
+          description: "Width of the TTY session in characters"
5200
+          type: "integer"
5201
+      tags:
5202
+        - "Exec"
5203
+  /exec/{id}/json:
5204
+    get:
5205
+      summary: "Inspect an exec instance"
5206
+      description: "Return low-level information about an exec instance."
5207
+      operationId: "PostExecInspect"
5208
+      produces:
5209
+        - "application/json"
5210
+      responses:
5211
+        200:
5212
+          description: "No error"
5213
+          schema:
5214
+            type: "object"
5215
+            properties:
5216
+              ID:
5217
+                type: "string"
5218
+              Running:
5219
+                type: "boolean"
5220
+              ExitCode:
5221
+                type: "integer"
5222
+              ProcessConfig:
5223
+                $ref: "#/definitions/ProcessConfig"
5224
+              OpenStdin:
5225
+                type: "boolean"
5226
+              OpenStderr:
5227
+                type: "boolean"
5228
+              OpenStdout:
5229
+                type: "boolean"
5230
+              ContainerID:
5231
+                type: "string"
5232
+          examples:
5233
+            application/json:
5234
+              CanRemove: false
5235
+              ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126"
5236
+              DetachKeys: ""
5237
+              ExitCode: 2
5238
+              ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b"
5239
+              OpenStderr: true
5240
+              OpenStdin: true
5241
+              OpenStdout: true
5242
+              ProcessConfig:
5243
+                arguments:
5244
+                  - "-c"
5245
+                  - "exit 2"
5246
+                entrypoint: "sh"
5247
+                privileged: false
5248
+                tty: true
5249
+                user: "1000"
5250
+              Running: false
5251
+        404:
5252
+          description: "No such exec instance"
5253
+          schema:
5254
+            $ref: "#/definitions/Error"
5255
+        500:
5256
+          description: "Server error"
5257
+          schema:
5258
+            $ref: "#/definitions/Error"
5259
+      parameters:
5260
+        - name: "id"
5261
+          in: "path"
5262
+          description: "Exec instance ID"
5263
+          required: true
5264
+          type: "string"
5265
+      tags:
5266
+        - "Exec"
5267
+  /volumes:
5268
+    get:
5269
+      summary: "List volumes"
5270
+      operationId: "GetVolumesList"
5271
+      produces:
5272
+        - "application/json"
5273
+      responses:
5274
+        200:
5275
+          description: "No error"
5276
+          schema:
5277
+            type: "object"
5278
+            properties:
5279
+              Volumes:
5280
+                type: "array"
5281
+                items:
5282
+                  $ref: "#/definitions/Volume"
5283
+              Warnings:
5284
+                type: "array"
5285
+                items:
5286
+                  type: "string"
5287
+          examples:
5288
+            application/json:
5289
+              Volumes:
5290
+                - Name: "tardis"
5291
+                  Driver: "local"
5292
+                  Mountpoint: "/var/lib/docker/volumes/tardis"
5293
+                  Labels:
5294
+                    com.example.some-label: "some-value"
5295
+                    com.example.some-other-label: "some-other-value"
5296
+                  Scope: "local"
5297
+              Warnings: []
5298
+        500:
5299
+          description: "Server error"
5300
+          schema:
5301
+            $ref: "#/definitions/Error"
5302
+      parameters:
5303
+        - name: "filters"
5304
+          in: "query"
5305
+          description: |
5306
+            JSON encoded value of the filters (a `map[string][]string`) to process on the volumes list. Available filters:
5307
+
5308
+            - `name=<volume-name>` Matches all or part of a volume name.
5309
+            - `dangling=<boolean>` When set to `true` (or `1`), returns all volumes that are not in use by a container. When set to `false` (or `0`), only volumes that are in use by one or more containers are returned.
5310
+            - `driver=<volume-driver-name>` Matches all or part of a volume driver name.
5311
+          type: "string"
5312
+      tags:
5313
+        - "Volume"
5314
+  /volumes/create:
5315
+    post:
5316
+      summary: "Create a volume"
5317
+      operationId: "PostVolumesCreate"
5318
+      consumes:
5319
+        - "application/json"
5320
+      produces:
5321
+        - "application/json"
5322
+      responses:
5323
+        201:
5324
+          description: "No error"
5325
+          schema:
5326
+            $ref: "#/definitions/Volume"
5327
+        500:
5328
+          description: "Server error"
5329
+          schema:
5330
+            $ref: "#/definitions/Error"
5331
+      parameters:
5332
+        - name: "volumeConfig"
5333
+          in: "body"
5334
+          required: true
5335
+          description: "Volume configuration"
5336
+          schema:
5337
+            type: "object"
5338
+            properties:
5339
+              Name:
5340
+                description: "The new volume's name. If not specified, Docker generates a name."
5341
+                type: "string"
5342
+              Driver:
5343
+                description: "Name of the volume driver to use."
5344
+                type: "string"
5345
+                default: "local"
5346
+              DriverOpts:
5347
+                description: "A mapping of driver options and values. These options are passed directly to the driver and are driver specific."
5348
+                type: "object"
5349
+                additionalProperties:
5350
+                  type: "string"
5351
+              Labels:
5352
+                description: "A mapping of arbitrary key/value data to set on the volume."
5353
+                type: "object"
5354
+                additionalProperties:
5355
+                  type: "string"
5356
+            example:
5357
+              Name: "tardis"
5358
+              Labels:
5359
+                com.example.some-label: "some-value"
5360
+                com.example.some-other-label: "some-other-value"
5361
+              Driver: "custom"
5362
+      tags:
5363
+        - "Volume"
5364
+  /volumes/{name}:
5365
+    get:
5366
+      summary: "Inspect a volume"
5367
+      operationId: "GetVolumesInspect"
5368
+      produces:
5369
+        - "application/json"
5370
+      responses:
5371
+        200:
5372
+          description: "No error"
5373
+          schema:
5374
+            $ref: "#/definitions/Volume"
5375
+        404:
5376
+          description: "No such volume"
5377
+          schema:
5378
+            $ref: "#/definitions/Error"
5379
+        500:
5380
+          description: "Server error"
5381
+          schema:
5382
+            $ref: "#/definitions/Error"
5383
+      parameters:
5384
+        - name: "name"
5385
+          in: "path"
5386
+          required: true
5387
+          description: "Volume name or ID"
5388
+          type: "string"
5389
+      tags:
5390
+        - "Volume"
5391
+    delete:
5392
+      summary: "Remove a volume"
5393
+      description: "Instruct the driver to remove the volume."
5394
+      operationId: "DeleteVolumes"
5395
+      responses:
5396
+        204:
5397
+          description: "No error"
5398
+        404:
5399
+          description: "No such volume or volume driver"
5400
+          schema:
5401
+            $ref: "#/definitions/Error"
5402
+        409:
5403
+          description: "Volume is in use and cannot be removed"
5404
+          schema:
5405
+            $ref: "#/definitions/Error"
5406
+        500:
5407
+          description: "Server error"
5408
+          schema:
5409
+            $ref: "#/definitions/Error"
5410
+      parameters:
5411
+        - name: "name"
5412
+          in: "path"
5413
+          required: true
5414
+          description: "Volume name or ID"
5415
+          type: "string"
5416
+      tags:
5417
+        - "Volume"
5418
+  /networks:
5419
+    get:
5420
+      summary: "List networks"
5421
+      operationId: "GetNetworksList"
5422
+      produces:
5423
+        - "application/json"
5424
+      responses:
5425
+        200:
5426
+          description: "No error"
5427
+          schema:
5428
+            type: "array"
5429
+            items:
5430
+              $ref: "#/definitions/Network"
5431
+          examples:
5432
+            application/json:
5433
+              - Name: "bridge"
5434
+                Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566"
5435
+                Scope: "local"
5436
+                Driver: "bridge"
5437
+                EnableIPv6: false
5438
+                Internal: false
5439
+                IPAM:
5440
+                  Driver: "default"
5441
+                  Config:
5442
+                    -
5443
+                      Subnet: "172.17.0.0/16"
5444
+                Containers:
5445
+                  39b69226f9d79f5634485fb236a23b2fe4e96a0a94128390a7fbbcc167065867:
5446
+                    EndpointID: "ed2419a97c1d9954d05b46e462e7002ea552f216e9b136b80a7db8d98b442eda"
5447
+                    MacAddress: "02:42:ac:11:00:02"
5448
+                    IPv4Address: "172.17.0.2/16"
5449
+                    IPv6Address: ""
5450
+                Options:
5451
+                  com.docker.network.bridge.default_bridge: "true"
5452
+                  com.docker.network.bridge.enable_icc: "true"
5453
+                  com.docker.network.bridge.enable_ip_masquerade: "true"
5454
+                  com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
5455
+                  com.docker.network.bridge.name: "docker0"
5456
+                  com.docker.network.driver.mtu: "1500"
5457
+              - Name: "none"
5458
+                Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794"
5459
+                Scope: "local"
5460
+                Driver: "null"
5461
+                EnableIPv6: false
5462
+                Internal: false
5463
+                IPAM:
5464
+                  Driver: "default"
5465
+                  Config: []
5466
+                Containers: {}
5467
+                Options: {}
5468
+              - Name: "host"
5469
+                Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e"
5470
+                Scope: "local"
5471
+                Driver: "host"
5472
+                EnableIPv6: false
5473
+                Internal: false
5474
+                IPAM:
5475
+                  Driver: "default"
5476
+                  Config: []
5477
+                Containers: {}
5478
+                Options: {}
5479
+        500:
5480
+          description: "Server error"
5481
+          schema:
5482
+            $ref: "#/definitions/Error"
5483
+      parameters:
5484
+        - name: "filters"
5485
+          in: "query"
5486
+          description: |
5487
+            JSON encoded value of the filters (a `map[string][]string`) to process on the networks list. Available filters:
5488
+
5489
+            - `driver=<driver-name>` Matches a network's driver.
5490
+            - `id=<network-id>` Matches all or part of a network ID.
5491
+            - `label=<key>` or `label=<key>=<value>` of a network label.
5492
+            - `name=<network-name>` Matches all or part of a network name.
5493
+            - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks.
5494
+          type: "string"
5495
+      tags:
5496
+        - "Network"
5497
+  /networks/{id}:
5498
+    get:
5499
+      summary: "Inspect a network"
5500
+      operationId: "GetNetworksInspect"
5501
+      produces:
5502
+        - "application/json"
5503
+      responses:
5504
+        200:
5505
+          description: "No error"
5506
+          schema:
5507
+            $ref: "#/definitions/Network"
5508
+        404:
5509
+          description: "Network not found"
5510
+          schema:
5511
+            $ref: "#/definitions/Error"
5512
+      parameters:
5513
+        - name: "id"
5514
+          in: "path"
5515
+          description: "Network ID or name"
5516
+          required: true
5517
+          type: "string"
5518
+      tags:
5519
+        - "Network"
5520
+    delete:
5521
+      summary: "Remove a network"
5522
+      operationId: "DeleteNetworks"
5523
+      responses:
5524
+        204:
5525
+          description: "No error"
5526
+        404:
5527
+          description: "no such network"
5528
+          schema:
5529
+            $ref: "#/definitions/Error"
5530
+        500:
5531
+          description: "Server error"
5532
+          schema:
5533
+            $ref: "#/definitions/Error"
5534
+      parameters:
5535
+        - name: "id"
5536
+          in: "path"
5537
+          description: "Network ID or name"
5538
+          required: true
5539
+          type: "string"
5540
+      tags:
5541
+        - "Network"
5542
+  /networks/create:
5543
+    post:
5544
+      summary: "Create a network"
5545
+      operationId: "PostNetworksCreate"
5546
+      consumes:
5547
+        - "application/json"
5548
+      produces:
5549
+        - "application/json"
5550
+      responses:
5551
+        201:
5552
+          description: "No error"
5553
+          schema:
5554
+            type: "object"
5555
+            properties:
5556
+              Id:
5557
+                description: "The ID of the created network."
5558
+                type: "string"
5559
+              Warning:
5560
+                type: "string"
5561
+            example:
5562
+              Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30"
5563
+              Warning: ""
5564
+        404:
5565
+          description: "plugin not found"
5566
+          schema:
5567
+            $ref: "#/definitions/Error"
5568
+        500:
5569
+          description: "Server error"
5570
+          schema:
5571
+            $ref: "#/definitions/Error"
5572
+      parameters:
5573
+        - name: "networkConfig"
5574
+          in: "body"
5575
+          description: "Network configuration"
5576
+          required: true
5577
+          schema:
5578
+            type: "object"
5579
+            required: ["Name"]
5580
+            properties:
5581
+              Name:
5582
+                description: "The network's name."
5583
+                type: "string"
5584
+              CheckDuplicate:
5585
+                description: "Check for networks with duplicate names."
5586
+                type: "boolean"
5587
+              Driver:
5588
+                description: "Name of the network driver plugin to use."
5589
+                type: "string"
5590
+                default: "bridge"
5591
+              Internal:
5592
+                description: "Restrict external access to the network."
5593
+                type: "boolean"
5594
+              IPAM:
5595
+                description: "Optional custom IP scheme for the network."
5596
+                $ref: "#/definitions/IPAM"
5597
+              EnableIPv6:
5598
+                description: "Enable IPv6 on the network."
5599
+                type: "boolean"
5600
+              Options:
5601
+                description: "Network specific options to be used by the drivers."
5602
+                type: "object"
5603
+                additionalProperties:
5604
+                  type: "string"
5605
+              Labels:
5606
+                description: "Arbitrary key/value metadata to attach to the network."
5607
+                type: "object"
5608
+                additionalProperties:
5609
+                  type: "string"
5610
+            example:
5611
+              Name: "isolated_nw"
5612
+              CheckDuplicate: false
5613
+              Driver: "bridge"
5614
+              EnableIPv6: true
5615
+              IPAM:
5616
+                Config:
5617
+                  - Subnet: "172.20.0.0/16"
5618
+                    IPRange: "172.20.10.0/24"
5619
+                    Gateway: "172.20.10.11"
5620
+                  - Subnet: "2001:db8:abcd::/64"
5621
+                    Gateway: "2001:db8:abcd::1011"
5622
+                Options:
5623
+                  foo: "bar"
5624
+              Internal: true
5625
+              Options:
5626
+                com.docker.network.bridge.default_bridge: "true"
5627
+                com.docker.network.bridge.enable_icc: "true"
5628
+                com.docker.network.bridge.enable_ip_masquerade: "true"
5629
+                com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
5630
+                com.docker.network.bridge.name: "docker0"
5631
+                com.docker.network.driver.mtu: "1500"
5632
+              Labels:
5633
+                com.example.some-label: "some-value"
5634
+                com.example.some-other-label: "some-other-value"
5635
+      tags:
5636
+        - "Network"
5637
+  /networks/{id}/connect:
5638
+    post:
5639
+      summary: "Connect a container to a network"
5640
+      operationId: "PostNetworksConnect"
5641
+      consumes:
5642
+        - "application/octet-stream"
5643
+      responses:
5644
+        200:
5645
+          description: "No error"
5646
+        403:
5647
+          description: "Operation not supported for swarm scoped networks"
5648
+          schema:
5649
+            $ref: "#/definitions/Error"
5650
+        404:
5651
+          description: "Network or container not found"
5652
+          schema:
5653
+            $ref: "#/definitions/Error"
5654
+        500:
5655
+          description: "Server error"
5656
+          schema:
5657
+            $ref: "#/definitions/Error"
5658
+      parameters:
5659
+        - name: "id"
5660
+          in: "path"
5661
+          description: "Network ID or name"
5662
+          required: true
5663
+          type: "string"
5664
+        - name: "container"
5665
+          in: "body"
5666
+          required: true
5667
+          schema:
5668
+            type: "object"
5669
+            properties:
5670
+              Container:
5671
+                type: "string"
5672
+                description: "The ID or name of the container to connect to the network."
5673
+              EndpointConfig:
5674
+                $ref: "#/definitions/EndpointSettings"
5675
+            example:
5676
+              Container: "3613f73ba0e4"
5677
+              EndpointConfig:
5678
+                IPAMConfig:
5679
+                  IPv4Address: "172.24.56.89"
5680
+                  IPv6Address: "2001:db8::5689"
5681
+      tags:
5682
+        - "Network"
5683
+  /networks/{id}/disconnect:
5684
+    post:
5685
+      summary: "Disconnect a container from a network"
5686
+      operationId: "PostNetworksDisconnect"
5687
+      consumes:
5688
+        - "application/json"
5689
+      responses:
5690
+        200:
5691
+          description: "No error"
5692
+        403:
5693
+          description: "Operation not supported for swarm scoped networks"
5694
+          schema:
5695
+            $ref: "#/definitions/Error"
5696
+        404:
5697
+          description: "Network or container not found"
5698
+          schema:
5699
+            $ref: "#/definitions/Error"
5700
+        500:
5701
+          description: "Server error"
5702
+          schema:
5703
+            $ref: "#/definitions/Error"
5704
+      parameters:
5705
+        - name: "id"
5706
+          in: "path"
5707
+          description: "Network ID or name"
5708
+          required: true
5709
+          type: "string"
5710
+        - name: "container"
5711
+          in: "body"
5712
+          required: true
5713
+          schema:
5714
+            type: "object"
5715
+            properties:
5716
+              Container:
5717
+                type: "string"
5718
+                description: "The ID or name of the container to disconnect from the network."
5719
+              Force:
5720
+                type: "boolean"
5721
+                description: "Force the container to disconnect from the network."
5722
+      tags:
5723
+        - "Network"
5724
+  /plugins:
5725
+    get:
5726
+      summary: "List plugins"
5727
+      operationId: "GetPluginsList"
5728
+      description: "Returns information about installed plugins."
5729
+      produces:
5730
+        - "application/json"
5731
+      responses:
5732
+        200:
5733
+          description: "No error"
5734
+          schema:
5735
+            type: "array"
5736
+            items:
5737
+              $ref: "#/definitions/Plugin"
5738
+            example:
5739
+              - Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078"
5740
+                Name: "tiborvass/no-remove"
5741
+                Tag: "latest"
5742
+                Active: true
5743
+                Config:
5744
+                  Mounts:
5745
+                    - Name: ""
5746
+                      Description: ""
5747
+                      Settable: null
5748
+                      Source: "/data"
5749
+                      Destination: "/data"
5750
+                      Type: "bind"
5751
+                      Options:
5752
+                        - "shared"
5753
+                        - "rbind"
5754
+                    - Name: ""
5755
+                      Description: ""
5756
+                      Settable: null
5757
+                      Source: null
5758
+                      Destination: "/foobar"
5759
+                      Type: "tmpfs"
5760
+                      Options: null
5761
+                  Env:
5762
+                    - "DEBUG=1"
5763
+                  Args: null
5764
+                  Devices: null
5765
+                Manifest:
5766
+                  ManifestVersion: "v0"
5767
+                  Description: "A test plugin for Docker"
5768
+                  Documentation: "https://docs.docker.com/engine/extend/plugins/"
5769
+                  Interface:
5770
+                    Types:
5771
+                      - "docker.volumedriver/1.0"
5772
+                    Socket: "plugins.sock"
5773
+                  Entrypoint:
5774
+                    - "plugin-no-remove"
5775
+                    - "/data"
5776
+                  Workdir: ""
5777
+                  User: {}
5778
+                  Network:
5779
+                    Type: "host"
5780
+                  Capabilities: null
5781
+                  Mounts:
5782
+                    - Name: ""
5783
+                      Description: ""
5784
+                      Settable: null
5785
+                      Source: "/data"
5786
+                      Destination: "/data"
5787
+                      Type: "bind"
5788
+                      Options:
5789
+                        - "shared"
5790
+                        - "rbind"
5791
+                    - Name: ""
5792
+                      Description: ""
5793
+                      Settable: null
5794
+                      Source: null
5795
+                      Destination: "/foobar"
5796
+                      Type: "tmpfs"
5797
+                      Options: null
5798
+                  Devices:
5799
+                    - Name: "device"
5800
+                      Description: "a host device to mount"
5801
+                      Settable: null
5802
+                      Path: "/dev/cpu_dma_latency"
5803
+                  Env:
5804
+                    - Name: "DEBUG"
5805
+                      Description: "If set, prints debug messages"
5806
+                      Settable: null
5807
+                      Value: "1"
5808
+                  Args:
5809
+                    Name: "args"
5810
+                    Description: "command line arguments"
5811
+                    Settable: null
5812
+                    Value: []
5813
+        500:
5814
+          description: "Server error"
5815
+          schema:
5816
+            $ref: "#/definitions/Error"
5817
+      tags:
5818
+        - "Plugins"
5819
+  /plugins/pull:
5820
+    post:
5821
+      summary: "Install a plugin"
5822
+      operationId: "PostPluginsPull"
5823
+      description: |
5824
+        Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginEnable).
5825
+      produces:
5826
+        - "application/json"
5827
+      responses:
5828
+        200:
5829
+          description: "no error"
5830
+          schema:
5831
+            type: "array"
5832
+            items:
5833
+              description: "Describes a permission the user has to accept upon installing the plugin."
5834
+              type: "object"
5835
+              properties:
5836
+                Name:
5837
+                  type: "string"
5838
+                Description:
5839
+                  type: "string"
5840
+                Value:
5841
+                  type: "array"
5842
+                  items:
5843
+                    type: "string"
5844
+            example:
5845
+              - Name: "network"
5846
+                Description: ""
5847
+                Value:
5848
+                  - "host"
5849
+              - Name: "mount"
5850
+                Description: ""
5851
+                Value:
5852
+                  - "/data"
5853
+              - Name: "device"
5854
+                Description: ""
5855
+                Value:
5856
+                  - "/dev/cpu_dma_latency"
5857
+        500:
5858
+          description: "server error"
5859
+          schema:
5860
+            $ref: "#/definitions/Error"
5861
+      parameters:
5862
+        - name: "name"
5863
+          in: "query"
5864
+          description: |
5865
+            The plugin to install.
5866
+
5867
+            The `:latest` tag is optional, and is used as the default if omitted.
5868
+          required: true
5869
+          type: "string"
5870
+        - name: "X-Registry-Auth"
5871
+          in: "header"
5872
+          description: "A base64-encoded auth configuration to use when pulling a plugin from a registry. [See the authentication section for details.](#section/Authentication)"
5873
+          type: "string"
5874
+      tags:
5875
+        - "Plugins"
5876
+  /plugins/{name}:
5877
+    get:
5878
+      summary: "Inspect a plugin"
5879
+      operationId: "GetPluginsInspect"
5880
+      responses:
5881
+        200:
5882
+          description: "no error"
5883
+          schema:
5884
+            $ref: "#/definitions/Plugin"
5885
+        404:
5886
+          description: "plugin is not installed"
5887
+          schema:
5888
+            $ref: "#/definitions/Error"
5889
+        500:
5890
+          description: "server error"
5891
+          schema:
5892
+            $ref: "#/definitions/Error"
5893
+      parameters:
5894
+        - name: "name"
5895
+          in: "path"
5896
+          description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
5897
+          required: true
5898
+          type: "string"
5899
+      tags:
5900
+        - "Plugins"
5901
+    delete:
5902
+      summary: "Remove a plugin"
5903
+      operationId: "DeletePlugins"
5904
+      responses:
5905
+        200:
5906
+          description: "no error"
5907
+          schema:
5908
+            $ref: "#/definitions/Plugin"
5909
+        404:
5910
+          description: "plugin is not installed"
5911
+          schema:
5912
+            $ref: "#/definitions/Error"
5913
+        500:
5914
+          description: "server error"
5915
+          schema:
5916
+            $ref: "#/definitions/Error"
5917
+      parameters:
5918
+        - name: "name"
5919
+          in: "path"
5920
+          description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
5921
+          required: true
5922
+          type: "string"
5923
+        - name: "force"
5924
+          in: "query"
5925
+          description: "Disable the plugin before removing. This may result in issues if the plugin is in use by a container."
5926
+          type: "boolean"
5927
+          default: false
5928
+      tags:
5929
+        - "Plugins"
5930
+  /plugins/{name}/enable:
5931
+    post:
5932
+      summary: "Enable a plugin"
5933
+      operationId: "PostPluginsEnable"
5934
+      responses:
5935
+        200:
5936
+          description: "no error"
5937
+        500:
5938
+          description: "server error"
5939
+          schema:
5940
+            $ref: "#/definitions/Error"
5941
+      parameters:
5942
+        - name: "name"
5943
+          in: "path"
5944
+          description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
5945
+          required: true
5946
+          type: "string"
5947
+      tags:
5948
+        - "Plugins"
5949
+  /plugins/{name}/disable:
5950
+    post:
5951
+      summary: "Disable a plugin"
5952
+      operationId: "PostPluginsDisable"
5953
+      responses:
5954
+        200:
5955
+          description: "no error"
5956
+        500:
5957
+          description: "server error"
5958
+          schema:
5959
+            $ref: "#/definitions/Error"
5960
+      parameters:
5961
+        - name: "name"
5962
+          in: "path"
5963
+          description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
5964
+          required: true
5965
+          type: "string"
5966
+      tags:
5967
+        - "Plugins"
5968
+  /nodes:
5969
+    get:
5970
+      summary: "List nodes"
5971
+      operationId: "GetNodesList"
5972
+      responses:
5973
+        200:
5974
+          description: "no error"
5975
+          schema:
5976
+            type: "array"
5977
+            items:
5978
+              $ref: "#/definitions/Node"
5979
+        500:
5980
+          description: "server error"
5981
+          schema:
5982
+            $ref: "#/definitions/Error"
5983
+      parameters:
5984
+        - name: "filters"
5985
+          in: "query"
5986
+          description: |
5987
+            Filters to process on the nodes list, encoded as JSON (a `map[string][]string`).
5988
+
5989
+            Available filters:
5990
+            - `id=<node id>`
5991
+            - `name=<node name>`
5992
+            - `membership=`(`pending`|`accepted`|`rejected`)`
5993
+            - `role=`(`worker`|`manager`)`
5994
+          type: "string"
5995
+      tags:
5996
+        - "Nodes"
5997
+  /nodes/{id}:
5998
+    get:
5999
+      summary: "Inspect a node"
6000
+      operationId: "GetNodesInspect"
6001
+      responses:
6002
+        200:
6003
+          description: "no error"
6004
+          schema:
6005
+            $ref: "#/definitions/Node"
6006
+        404:
6007
+          description: "no such node"
6008
+          schema:
6009
+            $ref: "#/definitions/Error"
6010
+        500:
6011
+          description: "server error"
6012
+          schema:
6013
+            $ref: "#/definitions/Error"
6014
+      parameters:
6015
+        - name: "id"
6016
+          in: "path"
6017
+          description: "The ID of the node"
6018
+          type: "string"
6019
+          required: true
6020
+      tags:
6021
+        - "Nodes"
6022
+    delete:
6023
+      summary: "Delete a node"
6024
+      operationId: "DeleteNodes"
6025
+      responses:
6026
+        200:
6027
+          description: "no error"
6028
+        404:
6029
+          description: "no such node"
6030
+          schema:
6031
+            $ref: "#/definitions/Error"
6032
+        500:
6033
+          description: "server error"
6034
+          schema:
6035
+            $ref: "#/definitions/Error"
6036
+      parameters:
6037
+        - name: "id"
6038
+          in: "path"
6039
+          description: "The ID of the node"
6040
+          type: "string"
6041
+          required: true
6042
+        - name: "force"
6043
+          in: "query"
6044
+          description: "Force remove an active node"
6045
+          default: false
6046
+          type: "boolean"
6047
+      tags:
6048
+        - "Nodes"
6049
+  /nodes/{id}/update:
6050
+    post:
6051
+      summary: "Update a node"
6052
+      operationId: "PostNodesUpdate"
6053
+      responses:
6054
+        200:
6055
+          description: "no error"
6056
+        404:
6057
+          description: "no such node"
6058
+          schema:
6059
+            $ref: "#/definitions/Error"
6060
+        500:
6061
+          description: "server error"
6062
+          schema:
6063
+            $ref: "#/definitions/Error"
6064
+      parameters:
6065
+        - name: "id"
6066
+          in: "path"
6067
+          description: "The ID of the node"
6068
+          type: "string"
6069
+          required: true
6070
+        - name: "body"
6071
+          in: "body"
6072
+          schema:
6073
+            $ref: "#/definitions/NodeSpec"
6074
+        - name: "version"
6075
+          in: "query"
6076
+          description: "The version number of the node object being updated. This is required to avoid conflicting writes."
6077
+          type: "integer"
6078
+          format: "int64"
6079
+          required: true
6080
+      tags:
6081
+        - "Nodes"
6082
+  /swarm:
6083
+    get:
6084
+      summary: "Inspect swarm"
6085
+      operationId: "GetSwarmInspect"
6086
+      responses:
6087
+        200:
6088
+          description: "no error"
6089
+          schema:
6090
+            allOf:
6091
+              - $ref: "#/definitions/ClusterInfo"
6092
+              - type: "object"
6093
+                properties:
6094
+                  JoinTokens:
6095
+                    description: "The tokens workers and managers need to join the swarm."
6096
+                    type: "object"
6097
+                    properties:
6098
+                      Worker:
6099
+                        description: "The token workers can use to join the swarm."
6100
+                        type: "string"
6101
+                      Manager:
6102
+                        description: "The token managers can use to join the swarm."
6103
+                        type: "string"
6104
+            example:
6105
+              CreatedAt: "2016-08-15T16:00:20.349727406Z"
6106
+              Spec:
6107
+                Dispatcher:
6108
+                  HeartbeatPeriod: 5000000000
6109
+                Orchestration:
6110
+                  TaskHistoryRetentionLimit: 10
6111
+                CAConfig:
6112
+                  NodeCertExpiry: 7776000000000000
6113
+                Raft:
6114
+                  LogEntriesForSlowFollowers: 500
6115
+                  HeartbeatTick: 1
6116
+                  SnapshotInterval: 10000
6117
+                  ElectionTick: 3
6118
+                TaskDefaults: {}
6119
+                Name: "default"
6120
+              JoinTokens:
6121
+                Worker: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-6qmn92w6bu3jdvnglku58u11a"
6122
+                Manager: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-8llk83c4wm9lwioey2s316r9l"
6123
+              ID: "70ilmkj2f6sp2137c753w2nmt"
6124
+              UpdatedAt: "2016-08-15T16:32:09.623207604Z"
6125
+              Version:
6126
+                Index: 51
6127
+        500:
6128
+          description: "server error"
6129
+          schema:
6130
+            $ref: "#/definitions/Error"
6131
+      tags:
6132
+        - "Swarm"
6133
+  /swarm/init:
6134
+    post:
6135
+      summary: "Initialize a new swarm"
6136
+      operationId: "PostSwarmInit"
6137
+      produces:
6138
+        - "application/json"
6139
+        - "text/plain"
6140
+      responses:
6141
+        200:
6142
+          description: "no error"
6143
+          schema:
6144
+            description: "The node ID"
6145
+            type: "string"
6146
+            example: "7v2t30z9blmxuhnyo6s4cpenp"
6147
+        400:
6148
+          description: "bad parameter"
6149
+          schema:
6150
+            $ref: "#/definitions/Error"
6151
+        406:
6152
+          description: "node is already part of a swarm"
6153
+          schema:
6154
+            $ref: "#/definitions/Error"
6155
+        500:
6156
+          description: "server error"
6157
+          schema:
6158
+            $ref: "#/definitions/Error"
6159
+      parameters:
6160
+        - name: "body"
6161
+          in: "body"
6162
+          required: true
6163
+          schema:
6164
+            type: "object"
6165
+            properties:
6166
+              ListenAddr:
6167
+                description: "Listen address used for inter-manager communication, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the default swarm listening port is used."
6168
+                type: "string"
6169
+              AdvertiseAddr:
6170
+                description: "Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible."
6171
+                type: "string"
6172
+              ForceNewCluster:
6173
+                description: "Force creation of a new swarm."
6174
+                type: "boolean"
6175
+              Spec:
6176
+                $ref: "#/definitions/SwarmSpec"
6177
+            example:
6178
+              ListenAddr: "0.0.0.0:2377"
6179
+              AdvertiseAddr: "192.168.1.1:2377"
6180
+              ForceNewCluster: false
6181
+              Spec:
6182
+                Orchestration: {}
6183
+                Raft: {}
6184
+                Dispatcher: {}
6185
+                CAConfig: {}
6186
+      tags:
6187
+        - "Swarm"
6188
+  /swarm/join:
6189
+    post:
6190
+      summary: "Join an existing swarm"
6191
+      operationId: "PostSwarmJoin"
6192
+      responses:
6193
+        200:
6194
+          description: "no error"
6195
+        400:
6196
+          description: "bad parameter"
6197
+          schema:
6198
+            $ref: "#/definitions/Error"
6199
+        406:
6200
+          description: "node is already part of a swarm"
6201
+          schema:
6202
+            $ref: "#/definitions/Error"
6203
+        500:
6204
+          description: "server error"
6205
+          schema:
6206
+            $ref: "#/definitions/Error"
6207
+      parameters:
6208
+        - name: "body"
6209
+          in: "body"
6210
+          required: true
6211
+          schema:
6212
+            type: "object"
6213
+            properties:
6214
+              ListenAddr:
6215
+                description: "Listen address used for inter-manager communication if the node gets promoted to manager, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP)."
6216
+                type: "string"
6217
+              AdvertiseAddr:
6218
+                description: "Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible."
6219
+                type: "string"
6220
+              RemoteAddrs:
6221
+                description: "Addresses of manager nodes already participating in the swarm."
6222
+                type: "string"
6223
+              JoinToken:
6224
+                description: "Secret token for joining this swarm."
6225
+                type: "string"
6226
+            example:
6227
+              ListenAddr: "0.0.0.0:2377"
6228
+              AdvertiseAddr: "192.168.1.1:2377"
6229
+              RemoteAddrs:
6230
+                - "node1:2377"
6231
+              JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2"
6232
+      tags:
6233
+        - "Swarm"
6234
+  /swarm/leave:
6235
+    post:
6236
+      summary: "Leave a swarm"
6237
+      operationId: "PostSwarmLeave"
6238
+      responses:
6239
+        200:
6240
+          description: "no error"
6241
+        406:
6242
+          description: "node is not part of a swarm"
6243
+          schema:
6244
+            $ref: "#/definitions/Error"
6245
+        500:
6246
+          description: "server error"
6247
+          schema:
6248
+            $ref: "#/definitions/Error"
6249
+      parameters:
6250
+        - name: "force"
6251
+          description: "Force leave swarm, even if this is the last manager or that it will break the cluster."
6252
+          in: "query"
6253
+          type: "boolean"
6254
+          default: false
6255
+      tags:
6256
+        - "Swarm"
6257
+  /swarm/update:
6258
+    post:
6259
+      summary: "Update a swarm"
6260
+      operationId: "PostSwarmUpdate"
6261
+      responses:
6262
+        200:
6263
+          description: "no error"
6264
+        400:
6265
+          description: "bad parameter"
6266
+          schema:
6267
+            $ref: "#/definitions/Error"
6268
+        406:
6269
+          description: "node is not part of a swarm"
6270
+          schema:
6271
+            $ref: "#/definitions/Error"
6272
+        500:
6273
+          description: "server error"
6274
+          schema:
6275
+            $ref: "#/definitions/Error"
6276
+      parameters:
6277
+        - name: "body"
6278
+          in: "body"
6279
+          required: true
6280
+          schema:
6281
+            $ref: "#/definitions/SwarmSpec"
6282
+        - name: "version"
6283
+          in: "query"
6284
+          description: "The version number of the swarm object being updated. This is required to avoid conflicting writes."
6285
+          type: "integer"
6286
+          format: "int64"
6287
+          required: true
6288
+        - name: "rotateWorkerToken"
6289
+          in: "query"
6290
+          description: "Rotate the worker join token."
6291
+          type: "boolean"
6292
+          default: false
6293
+        - name: "rotateManagerToken"
6294
+          in: "query"
6295
+          description: "Rotate the manager join token."
6296
+          type: "boolean"
6297
+          default: false
6298
+      tags:
6299
+        - "Swarm"
6300
+  /services:
6301
+    get:
6302
+      summary: "List services"
6303
+      operationId: "GetServicesList"
6304
+      responses:
6305
+        200:
6306
+          description: "no error"
6307
+          schema:
6308
+            type: "array"
6309
+            items:
6310
+              $ref: "#/definitions/Service"
6311
+        500:
6312
+          description: "server error"
6313
+          schema:
6314
+            $ref: "#/definitions/Error"
6315
+      parameters:
6316
+        - name: "filters"
6317
+          in: "query"
6318
+          type: "string"
6319
+          description: |
6320
+            A JSON encoded value of the filters (a `map[string][]string`) to process on the services list. Available filters:
6321
+
6322
+            - `id=<node id>`
6323
+            - `name=<node name>`
6324
+      tags:
6325
+        - "Services"
6326
+  /services/create:
6327
+    post:
6328
+      summary: "Create a service"
6329
+      operationId: "PostServicesCreate"
6330
+      consumes:
6331
+        - "application/json"
6332
+      produces:
6333
+        - "application/json"
6334
+      responses:
6335
+        201:
6336
+          description: "no error"
6337
+          schema:
6338
+            type: "object"
6339
+            properties:
6340
+              ID:
6341
+                description: "The ID of the created service."
6342
+                type: "string"
6343
+            example:
6344
+              ID: "ak7w3gjqoa3kuz8xcpnyy0pvl"
6345
+        406:
6346
+          description: "server error or node is not part of a swarm"
6347
+          schema:
6348
+            $ref: "#/definitions/Error"
6349
+        409:
6350
+          description: "name conflicts with an existing service"
6351
+          schema:
6352
+            $ref: "#/definitions/Error"
6353
+        500:
6354
+          description: "server error"
6355
+          schema:
6356
+            $ref: "#/definitions/Error"
6357
+      parameters:
6358
+        - name: "body"
6359
+          in: "body"
6360
+          required: true
6361
+          schema:
6362
+            allOf:
6363
+              - $ref: "#/definitions/ServiceSpec"
6364
+              - example:
6365
+                  Name: "web"
6366
+                  TaskTemplate:
6367
+                    ContainerSpec:
6368
+                      Image: "nginx:alpine"
6369
+                      Mounts:
6370
+                        -
6371
+                          ReadOnly: true
6372
+                          Source: "web-data"
6373
+                          Target: "/usr/share/nginx/html"
6374
+                          Type: "volume"
6375
+                          VolumeOptions:
6376
+                            DriverConfig: {}
6377
+                            Labels:
6378
+                              com.example.something: "something-value"
6379
+                      User: "33"
6380
+                    LogDriver:
6381
+                      Name: "json-file"
6382
+                      Options:
6383
+                        max-file: "3"
6384
+                        max-size: "10M"
6385
+                    Placement: {}
6386
+                    Resources:
6387
+                      Limits:
6388
+                        MemoryBytes: 104857600
6389
+                      Reservations: {}
6390
+                    RestartPolicy:
6391
+                      Condition: "on-failure"
6392
+                      Delay: 10000000000
6393
+                      MaxAttempts: 10
6394
+                  Mode:
6395
+                    Replicated:
6396
+                      Replicas: 4
6397
+                  UpdateConfig:
6398
+                    Delay: 30000000000
6399
+                    Parallelism: 2
6400
+                    FailureAction: "pause"
6401
+                  EndpointSpec:
6402
+                    Ports:
6403
+                      -
6404
+                        Protocol: "tcp"
6405
+                        PublishedPort: 8080
6406
+                        TargetPort: 80
6407
+                  Labels:
6408
+                    foo: "bar"
6409
+        - name: "X-Registry-Auth"
6410
+          in: "header"
6411
+          description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)"
6412
+          type: "string"
6413
+      tags:
6414
+        - "Services"
6415
+  /services/{id}:
6416
+    get:
6417
+      summary: "Inspect a service"
6418
+      operationId: "GetServicesInspect"
6419
+      responses:
6420
+        200:
6421
+          description: "no error"
6422
+          schema:
6423
+            $ref: "#/definitions/Service"
6424
+        404:
6425
+          description: "no such service"
6426
+          schema:
6427
+            $ref: "#/definitions/Error"
6428
+        500:
6429
+          description: "server error"
6430
+          schema:
6431
+            $ref: "#/definitions/Error"
6432
+      parameters:
6433
+        - name: "id"
6434
+          in: "path"
6435
+          description: "ID or name of service."
6436
+          required: true
6437
+          type: "string"
6438
+      tags:
6439
+        - "Services"
6440
+    delete:
6441
+      summary: "Delete a service"
6442
+      operationId: "DeleteServices"
6443
+      responses:
6444
+        200:
6445
+          description: "no error"
6446
+        404:
6447
+          description: "no such service"
6448
+          schema:
6449
+            $ref: "#/definitions/Error"
6450
+        500:
6451
+          description: "server error"
6452
+          schema:
6453
+            $ref: "#/definitions/Error"
6454
+      parameters:
6455
+        - name: "id"
6456
+          in: "path"
6457
+          description: "ID or name of service."
6458
+          required: true
6459
+          type: "string"
6460
+      tags:
6461
+        - "Services"
6462
+  /services/{id}/update:
6463
+    post:
6464
+      summary: "Update a service"
6465
+      operationId: "PostServicesUpdate"
6466
+      responses:
6467
+        200:
6468
+          description: "no error"
6469
+        404:
6470
+          description: "no such service"
6471
+          schema:
6472
+            $ref: "#/definitions/Error"
6473
+        500:
6474
+          description: "server error"
6475
+          schema:
6476
+            $ref: "#/definitions/Error"
6477
+      parameters:
6478
+        - name: "id"
6479
+          in: "path"
6480
+          description: "ID or name of service."
6481
+          required: true
6482
+          type: "string"
6483
+        - name: "body"
6484
+          in: "body"
6485
+          required: true
6486
+          schema:
6487
+            allOf:
6488
+              - $ref: "#/definitions/ServiceSpec"
6489
+              - example:
6490
+                  Name: "top"
6491
+                  TaskTemplate:
6492
+                    ContainerSpec:
6493
+                      Image: "busybox"
6494
+                      Args:
6495
+                        - "top"
6496
+                    Resources:
6497
+                      Limits: {}
6498
+                      Reservations: {}
6499
+                    RestartPolicy:
6500
+                      Condition: "any"
6501
+                      MaxAttempts: 0
6502
+                    Placement: {}
6503
+                  Mode:
6504
+                    Replicated:
6505
+                      Replicas: 1
6506
+                  UpdateConfig:
6507
+                    Parallelism: 1
6508
+                  EndpointSpec:
6509
+                    Mode: "vip"
6510
+
6511
+        - name: "version"
6512
+          in: "query"
6513
+          description: "The version number of the service object being updated. This is required to avoid conflicting writes."
6514
+          required: true
6515
+          type: "integer"
6516
+        - name: "X-Registry-Auth"
6517
+          in: "header"
6518
+          description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)"
6519
+          type: "string"
6520
+
6521
+      tags:
6522
+        - "Services"
6523
+  /tasks:
6524
+    get:
6525
+      summary: "List tasks"
6526
+      operationId: "GetTasksList"
6527
+      produces:
6528
+        - "application/json"
6529
+      responses:
6530
+        200:
6531
+          description: "no error"
6532
+          schema:
6533
+            type: "array"
6534
+            items:
6535
+              $ref: "#/definitions/Task"
6536
+            example:
6537
+              - ID: "0kzzo1i0y4jz6027t0k7aezc7"
6538
+                Version:
6539
+                  Index: 71
6540
+                CreatedAt: "2016-06-07T21:07:31.171892745Z"
6541
+                UpdatedAt: "2016-06-07T21:07:31.376370513Z"
6542
+                Spec:
6543
+                  ContainerSpec:
6544
+                    Image: "redis"
6545
+                  Resources:
6546
+                    Limits: {}
6547
+                    Reservations: {}
6548
+                  RestartPolicy:
6549
+                    Condition: "any"
6550
+                    MaxAttempts: 0
6551
+                  Placement: {}
6552
+                ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
6553
+                Slot: 1
6554
+                NodeID: "60gvrl6tm78dmak4yl7srz94v"
6555
+                Status:
6556
+                  Timestamp: "2016-06-07T21:07:31.290032978Z"
6557
+                  State: "running"
6558
+                  Message: "started"
6559
+                  ContainerStatus:
6560
+                    ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035"
6561
+                    PID: 677
6562
+                DesiredState: "running"
6563
+                NetworksAttachments:
6564
+                  - Network:
6565
+                      ID: "4qvuz4ko70xaltuqbt8956gd1"
6566
+                      Version:
6567
+                        Index: 18
6568
+                      CreatedAt: "2016-06-07T20:31:11.912919752Z"
6569
+                      UpdatedAt: "2016-06-07T21:07:29.955277358Z"
6570
+                      Spec:
6571
+                        Name: "ingress"
6572
+                        Labels:
6573
+                          com.docker.swarm.internal: "true"
6574
+                        DriverConfiguration: {}
6575
+                        IPAMOptions:
6576
+                          Driver: {}
6577
+                          Configs:
6578
+                            - Subnet: "10.255.0.0/16"
6579
+                              Gateway: "10.255.0.1"
6580
+                      DriverState:
6581
+                        Name: "overlay"
6582
+                        Options:
6583
+                          com.docker.network.driver.overlay.vxlanid_list: "256"
6584
+                      IPAMOptions:
6585
+                        Driver:
6586
+                          Name: "default"
6587
+                        Configs:
6588
+                          - Subnet: "10.255.0.0/16"
6589
+                            Gateway: "10.255.0.1"
6590
+                    Addresses:
6591
+                      - "10.255.0.10/16"
6592
+              - ID: "1yljwbmlr8er2waf8orvqpwms"
6593
+                Version:
6594
+                  Index: 30
6595
+                CreatedAt: "2016-06-07T21:07:30.019104782Z"
6596
+                UpdatedAt: "2016-06-07T21:07:30.231958098Z"
6597
+                Name: "hopeful_cori"
6598
+                Spec:
6599
+                  ContainerSpec:
6600
+                    Image: "redis"
6601
+                  Resources:
6602
+                    Limits: {}
6603
+                    Reservations: {}
6604
+                  RestartPolicy:
6605
+                    Condition: "any"
6606
+                    MaxAttempts: 0
6607
+                  Placement: {}
6608
+                ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
6609
+                Slot: 1
6610
+                NodeID: "60gvrl6tm78dmak4yl7srz94v"
6611
+                Status:
6612
+                  Timestamp: "2016-06-07T21:07:30.202183143Z"
6613
+                  State: "shutdown"
6614
+                  Message: "shutdown"
6615
+                  ContainerStatus:
6616
+                    ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213"
6617
+                DesiredState: "shutdown"
6618
+                NetworksAttachments:
6619
+                  - Network:
6620
+                      ID: "4qvuz4ko70xaltuqbt8956gd1"
6621
+                      Version:
6622
+                        Index: 18
6623
+                      CreatedAt: "2016-06-07T20:31:11.912919752Z"
6624
+                      UpdatedAt: "2016-06-07T21:07:29.955277358Z"
6625
+                      Spec:
6626
+                        Name: "ingress"
6627
+                        Labels:
6628
+                          com.docker.swarm.internal: "true"
6629
+                        DriverConfiguration: {}
6630
+                        IPAMOptions:
6631
+                          Driver: {}
6632
+                          Configs:
6633
+                            - Subnet: "10.255.0.0/16"
6634
+                              Gateway: "10.255.0.1"
6635
+                      DriverState:
6636
+                        Name: "overlay"
6637
+                        Options:
6638
+                          com.docker.network.driver.overlay.vxlanid_list: "256"
6639
+                      IPAMOptions:
6640
+                        Driver:
6641
+                          Name: "default"
6642
+                        Configs:
6643
+                          - Subnet: "10.255.0.0/16"
6644
+                            Gateway: "10.255.0.1"
6645
+                    Addresses:
6646
+                      - "10.255.0.5/16"
6647
+
6648
+        500:
6649
+          description: "server error"
6650
+          schema:
6651
+            $ref: "#/definitions/Error"
6652
+      parameters:
6653
+        - name: "filters"
6654
+          in: "query"
6655
+          type: "string"
6656
+          description: |
6657
+            A JSON encoded value of the filters (a `map[string][]string`) to process on the tasks list. Available filters:
6658
+
6659
+            - `id=<task id>`
6660
+            - `name=<task name>`
6661
+            - `service=<service name>`
6662
+            - `node=<node id>`
6663
+            - `label=key` or `label="key=value"`
6664
+            - `desired-state=(running | shutdown | accepted)`
6665
+      tags:
6666
+        - "Tasks"
6667
+  /tasks/{id}:
6668
+    get:
6669
+      summary: "Inspect a task"
6670
+      operationId: "GetTasksInspect"
6671
+      produces:
6672
+        - "application/json"
6673
+      responses:
6674
+        200:
6675
+          description: "no error"
6676
+          schema:
6677
+            $ref: "#/definitions/Task"
6678
+        404:
6679
+          description: "no such task"
6680
+          schema:
6681
+            $ref: "#/definitions/Error"
6682
+        500:
6683
+          description: "server error"
6684
+          schema:
6685
+            $ref: "#/definitions/Error"
6686
+      parameters:
6687
+        - name: "id"
6688
+          in: "path"
6689
+          description: "ID of the task"
6690
+          required: true
6691
+          type: "string"
6692
+      tags:
6693
+        - "Tasks"
... ...
@@ -433,24 +433,6 @@ type MountPoint struct {
433 433
 	Propagation mount.Propagation
434 434
 }
435 435
 
436
-// VolumeUsageData holds information regarding the volume usage
437
-type VolumeUsageData struct {
438
-	Size     int64 // Size holds how much disk space is used by the (local driver only). Sets to -1 if not provided.
439
-	RefCount int   // RefCount holds the number of containers having this volume attached to them. Sets to -1 if not provided.
440
-}
441
-
442
-// Volume represents the configuration of a volume for the remote API
443
-type Volume struct {
444
-	Name       string                 // Name is the name of the volume
445
-	Driver     string                 // Driver is the Driver name used to create the volume
446
-	Mountpoint string                 // Mountpoint is the location on disk of the volume
447
-	Status     map[string]interface{} `json:",omitempty"` // Status provides low-level status information about the volume
448
-	Labels     map[string]string      // Labels is metadata specific to the volume
449
-	Scope      string                 // Scope describes the level at which the volume exists (e.g. `global` for cluster-wide or `local` for machine level)
450
-	Options    map[string]string      // Options holds the driver specific options to use for when creating the volume.
451
-	UsageData  *VolumeUsageData       `json:",omitempty"`
452
-}
453
-
454 436
 // VolumesListResponse contains the response for the remote API:
455 437
 // GET "/volumes"
456 438
 type VolumesListResponse struct {
457 439
new file mode 100644
... ...
@@ -0,0 +1,57 @@
0
+package types
1
+
2
+// This file was generated by the swagger tool.
3
+// Editing this file might prove futile when you re-run the swagger generate command
4
+
5
+// Volume volume
6
+// swagger:model Volume
7
+type Volume struct {
8
+
9
+	// Name of the volume driver used by the volume.
10
+	// Required: true
11
+	Driver string `json:"Driver"`
12
+
13
+	// A mapping of abitrary key/value data set on this volume.
14
+	// Required: true
15
+	Labels map[string]string `json:"Labels"`
16
+
17
+	// Mount path of the volume on the host.
18
+	// Required: true
19
+	Mountpoint string `json:"Mountpoint"`
20
+
21
+	// Name of the volume.
22
+	// Required: true
23
+	Name string `json:"Name"`
24
+
25
+	// ref count
26
+	RefCount int64 `json:"RefCount,omitempty"`
27
+
28
+	// The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level.
29
+	// Required: true
30
+	Scope string `json:"Scope"`
31
+
32
+	// Low-level details about the volume, provided by the volume driver.
33
+	// Details are returned as a map with key/value pairs:
34
+	// `{"key":"value","key2":"value2"}`.
35
+	//
36
+	// The `Status` field is optional, and is omitted if the volume driver
37
+	// does not support this feature.
38
+	//
39
+	Status map[string]interface{} `json:"Status,omitempty"`
40
+
41
+	// usage data
42
+	UsageData *VolumeUsageData `json:"UsageData,omitempty"`
43
+}
44
+
45
+// VolumeUsageDatavolume usage data
46
+// swagger:model VolumeUsageData
47
+type VolumeUsageData struct {
48
+
49
+	// The number of containers referencing this volume.
50
+	// Required: true
51
+	RefCount int64 `json:"RefCount"`
52
+
53
+	// The disk space used by the volume (local driver only)
54
+	// Required: true
55
+	Size int64 `json:"Size"`
56
+}
... ...
@@ -61,7 +61,7 @@ func (daemon *Daemon) SystemDiskUsage() (*types.DiskUsage, error) {
61 61
 			logrus.Warnf("failed to determine size of volume %v", name)
62 62
 			sz = -1
63 63
 		}
64
-		tv.UsageData = &types.VolumeUsageData{Size: sz, RefCount: len(refs)}
64
+		tv.UsageData = &types.VolumeUsageData{Size: sz, RefCount: int64(len(refs))}
65 65
 		allVolumes = append(allVolumes, tv)
66 66
 
67 67
 		return nil