1# A Swagger 2.0 (a.k.a. OpenAPI) definition of the Engine API.
2#
3# This is used for generating API documentation and the types used by the
4# client/server. See api/README.md for more information.
5#
6# Some style notes:
7# - This file is used by ReDoc, which allows GitHub Flavored Markdown in
8#   descriptions.
9# - There is no maximum line length, for ease of editing and pretty diffs.
10# - operationIds are in the format "NounVerb", with a singular noun.
11
12swagger: "2.0"
13schemes:
14  - "http"
15  - "https"
16produces:
17  - "application/json"
18  - "text/plain"
19consumes:
20  - "application/json"
21  - "text/plain"
22basePath: "/v1.41"
23info:
24  title: "Docker Engine API"
25  version: "1.41"
26  x-logo:
27    url: "https://docs.docker.com/images/logo-docker-main.png"
28  description: |
29    The Engine API is an HTTP API served by Docker Engine. It is the API the
30    Docker client uses to communicate with the Engine, so everything the Docker
31    client can do can be done with the API.
32
33    Most of the client's commands map directly to API endpoints (e.g. `docker ps`
34    is `GET /containers/json`). The notable exception is running containers,
35    which consists of several API calls.
36
37    # Errors
38
39    The API uses standard HTTP status codes to indicate the success or failure
40    of the API call. The body of the response will be JSON in the following
41    format:
42
43    ```
44    {
45      "message": "page not found"
46    }
47    ```
48
49    # Versioning
50
51    The API is usually changed in each release, so API calls are versioned to
52    ensure that clients don't break. To lock to a specific version of the API,
53    you prefix the URL with its version, for example, call `/v1.30/info` to use
54    the v1.30 version of the `/info` endpoint. If the API version specified in
55    the URL is not supported by the daemon, a HTTP `400 Bad Request` error message
56    is returned.
57
58    If you omit the version-prefix, the current version of the API (v1.41) is used.
59    For example, calling `/info` is the same as calling `/v1.41/info`. Using the
60    API without a version-prefix is deprecated and will be removed in a future release.
61
62    Engine releases in the near future should support this version of the API,
63    so your client will continue to work even if it is talking to a newer Engine.
64
65    The API uses an open schema model, which means server may add extra properties
66    to responses. Likewise, the server will ignore any extra query parameters and
67    request body properties. When you write clients, you need to ignore additional
68    properties in responses to ensure they do not break when talking to newer
69    daemons.
70
71
72    # Authentication
73
74    Authentication for registries is handled client side. The client has to send
75    authentication details to various endpoints that need to communicate with
76    registries, such as `POST /images/(name)/push`. These are sent as
77    `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5)
78    (JSON) string with the following structure:
79
80    ```
81    {
82      "username": "string",
83      "password": "string",
84      "email": "string",
85      "serveraddress": "string"
86    }
87    ```
88
89    The `serveraddress` is a domain/IP without a protocol. Throughout this
90    structure, double quotes are required.
91
92    If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth),
93    you can just pass this instead of credentials:
94
95    ```
96    {
97      "identitytoken": "9cbaf023786cd7..."
98    }
99    ```
100
101# The tags on paths define the menu sections in the ReDoc documentation, so
102# the usage of tags must make sense for that:
103# - They should be singular, not plural.
104# - There should not be too many tags, or the menu becomes unwieldy. For
105#   example, it is preferable to add a path to the "System" tag instead of
106#   creating a tag with a single path in it.
107# - The order of tags in this list defines the order in the menu.
108tags:
109  # Primary objects
110  - name: "Container"
111    x-displayName: "Containers"
112    description: |
113      Create and manage containers.
114  - name: "Image"
115    x-displayName: "Images"
116  - name: "Network"
117    x-displayName: "Networks"
118    description: |
119      Networks are user-defined networks that containers can be attached to.
120      See the [networking documentation](https://docs.docker.com/network/)
121      for more information.
122  - name: "Volume"
123    x-displayName: "Volumes"
124    description: |
125      Create and manage persistent storage that can be attached to containers.
126  - name: "Exec"
127    x-displayName: "Exec"
128    description: |
129      Run new commands inside running containers. Refer to the
130      [command-line reference](https://docs.docker.com/engine/reference/commandline/exec/)
131      for more information.
132
133      To exec a command in a container, you first need to create an exec instance,
134      then start it. These two API endpoints are wrapped up in a single command-line
135      command, `docker exec`.
136
137  # Swarm things
138  - name: "Swarm"
139    x-displayName: "Swarm"
140    description: |
141      Engines can be clustered together in a swarm. Refer to the
142      [swarm mode documentation](https://docs.docker.com/engine/swarm/)
143      for more information.
144  - name: "Node"
145    x-displayName: "Nodes"
146    description: |
147      Nodes are instances of the Engine participating in a swarm. Swarm mode
148      must be enabled for these endpoints to work.
149  - name: "Service"
150    x-displayName: "Services"
151    description: |
152      Services are the definitions of tasks to run on a swarm. Swarm mode must
153      be enabled for these endpoints to work.
154  - name: "Task"
155    x-displayName: "Tasks"
156    description: |
157      A task is a container running on a swarm. It is the atomic scheduling unit
158      of swarm. Swarm mode must be enabled for these endpoints to work.
159  - name: "Secret"
160    x-displayName: "Secrets"
161    description: |
162      Secrets are sensitive data that can be used by services. Swarm mode must
163      be enabled for these endpoints to work.
164  - name: "Config"
165    x-displayName: "Configs"
166    description: |
167      Configs are application configurations that can be used by services. Swarm
168      mode must be enabled for these endpoints to work.
169  # System things
170  - name: "Plugin"
171    x-displayName: "Plugins"
172  - name: "System"
173    x-displayName: "System"
174
175definitions:
176  Port:
177    type: "object"
178    description: "An open port on a container"
179    required: [PrivatePort, Type]
180    properties:
181      IP:
182        type: "string"
183        format: "ip-address"
184        description: "Host IP address that the container's port is mapped to"
185      PrivatePort:
186        type: "integer"
187        format: "uint16"
188        x-nullable: false
189        description: "Port on the container"
190      PublicPort:
191        type: "integer"
192        format: "uint16"
193        description: "Port exposed on the host"
194      Type:
195        type: "string"
196        x-nullable: false
197        enum: ["tcp", "udp", "sctp"]
198    example:
199      PrivatePort: 8080
200      PublicPort: 80
201      Type: "tcp"
202
203  MountPoint:
204    type: "object"
205    description: "A mount point inside a container"
206    properties:
207      Type:
208        type: "string"
209      Name:
210        type: "string"
211      Source:
212        type: "string"
213      Destination:
214        type: "string"
215      Driver:
216        type: "string"
217      Mode:
218        type: "string"
219      RW:
220        type: "boolean"
221      Propagation:
222        type: "string"
223
224  DeviceMapping:
225    type: "object"
226    description: "A device mapping between the host and container"
227    properties:
228      PathOnHost:
229        type: "string"
230      PathInContainer:
231        type: "string"
232      CgroupPermissions:
233        type: "string"
234    example:
235      PathOnHost: "/dev/deviceName"
236      PathInContainer: "/dev/deviceName"
237      CgroupPermissions: "mrw"
238
239  DeviceRequest:
240    type: "object"
241    description: "A request for devices to be sent to device drivers"
242    properties:
243      Driver:
244        type: "string"
245        example: "nvidia"
246      Count:
247        type: "integer"
248        example: -1
249      DeviceIDs:
250        type: "array"
251        items:
252          type: "string"
253        example:
254          - "0"
255          - "1"
256          - "GPU-fef8089b-4820-abfc-e83e-94318197576e"
257      Capabilities:
258        description: |
259          A list of capabilities; an OR list of AND lists of capabilities.
260        type: "array"
261        items:
262          type: "array"
263          items:
264            type: "string"
265        example:
266          # gpu AND nvidia AND compute
267          - ["gpu", "nvidia", "compute"]
268      Options:
269        description: |
270          Driver-specific options, specified as a key/value pairs. These options
271          are passed directly to the driver.
272        type: "object"
273        additionalProperties:
274          type: "string"
275
276  ThrottleDevice:
277    type: "object"
278    properties:
279      Path:
280        description: "Device path"
281        type: "string"
282      Rate:
283        description: "Rate"
284        type: "integer"
285        format: "int64"
286        minimum: 0
287
288  Mount:
289    type: "object"
290    properties:
291      Target:
292        description: "Container path."
293        type: "string"
294      Source:
295        description: "Mount source (e.g. a volume name, a host path)."
296        type: "string"
297      Type:
298        description: |
299          The mount type. Available types:
300
301          - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container.
302          - `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.
303          - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs.
304          - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container.
305        type: "string"
306        enum:
307          - "bind"
308          - "volume"
309          - "tmpfs"
310          - "npipe"
311      ReadOnly:
312        description: "Whether the mount should be read-only."
313        type: "boolean"
314      Consistency:
315        description: "The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`."
316        type: "string"
317      BindOptions:
318        description: "Optional configuration for the `bind` type."
319        type: "object"
320        properties:
321          Propagation:
322            description: "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`."
323            type: "string"
324            enum:
325              - "private"
326              - "rprivate"
327              - "shared"
328              - "rshared"
329              - "slave"
330              - "rslave"
331          NonRecursive:
332            description: "Disable recursive bind mount."
333            type: "boolean"
334            default: false
335      VolumeOptions:
336        description: "Optional configuration for the `volume` type."
337        type: "object"
338        properties:
339          NoCopy:
340            description: "Populate volume with data from the target."
341            type: "boolean"
342            default: false
343          Labels:
344            description: "User-defined key/value metadata."
345            type: "object"
346            additionalProperties:
347              type: "string"
348          DriverConfig:
349            description: "Map of driver specific options"
350            type: "object"
351            properties:
352              Name:
353                description: "Name of the driver to use to create the volume."
354                type: "string"
355              Options:
356                description: "key/value map of driver specific options."
357                type: "object"
358                additionalProperties:
359                  type: "string"
360      TmpfsOptions:
361        description: "Optional configuration for the `tmpfs` type."
362        type: "object"
363        properties:
364          SizeBytes:
365            description: "The size for the tmpfs mount in bytes."
366            type: "integer"
367            format: "int64"
368          Mode:
369            description: "The permission mode for the tmpfs mount in an integer."
370            type: "integer"
371
372  RestartPolicy:
373    description: |
374      The behavior to apply when the container exits. The default is not to
375      restart.
376
377      An ever increasing delay (double the previous delay, starting at 100ms) is
378      added before each restart to prevent flooding the server.
379    type: "object"
380    properties:
381      Name:
382        type: "string"
383        description: |
384          - Empty string means not to restart
385          - `always` Always restart
386          - `unless-stopped` Restart always except when the user has manually stopped the container
387          - `on-failure` Restart only when the container exit code is non-zero
388        enum:
389          - ""
390          - "always"
391          - "unless-stopped"
392          - "on-failure"
393      MaximumRetryCount:
394        type: "integer"
395        description: |
396          If `on-failure` is used, the number of times to retry before giving up.
397
398  Resources:
399    description: "A container's resources (cgroups config, ulimits, etc)"
400    type: "object"
401    properties:
402      # Applicable to all platforms
403      CpuShares:
404        description: |
405          An integer value representing this container's relative CPU weight
406          versus other containers.
407        type: "integer"
408      Memory:
409        description: "Memory limit in bytes."
410        type: "integer"
411        format: "int64"
412        default: 0
413      # Applicable to UNIX platforms
414      CgroupParent:
415        description: |
416          Path to `cgroups` under which the container's `cgroup` is created. If
417          the path is not absolute, the path is considered to be relative to the
418          `cgroups` path of the init process. Cgroups are created if they do not
419          already exist.
420        type: "string"
421      BlkioWeight:
422        description: "Block IO weight (relative weight)."
423        type: "integer"
424        minimum: 0
425        maximum: 1000
426      BlkioWeightDevice:
427        description: |
428          Block IO weight (relative device weight) in the form:
429
430          ```
431          [{"Path": "device_path", "Weight": weight}]
432          ```
433        type: "array"
434        items:
435          type: "object"
436          properties:
437            Path:
438              type: "string"
439            Weight:
440              type: "integer"
441              minimum: 0
442      BlkioDeviceReadBps:
443        description: |
444          Limit read rate (bytes per second) from a device, in the form:
445
446          ```
447          [{"Path": "device_path", "Rate": rate}]
448          ```
449        type: "array"
450        items:
451          $ref: "#/definitions/ThrottleDevice"
452      BlkioDeviceWriteBps:
453        description: |
454          Limit write rate (bytes per second) to a device, in the form:
455
456          ```
457          [{"Path": "device_path", "Rate": rate}]
458          ```
459        type: "array"
460        items:
461          $ref: "#/definitions/ThrottleDevice"
462      BlkioDeviceReadIOps:
463        description: |
464          Limit read rate (IO per second) from a device, in the form:
465
466          ```
467          [{"Path": "device_path", "Rate": rate}]
468          ```
469        type: "array"
470        items:
471          $ref: "#/definitions/ThrottleDevice"
472      BlkioDeviceWriteIOps:
473        description: |
474          Limit write rate (IO per second) to a device, in the form:
475
476          ```
477          [{"Path": "device_path", "Rate": rate}]
478          ```
479        type: "array"
480        items:
481          $ref: "#/definitions/ThrottleDevice"
482      CpuPeriod:
483        description: "The length of a CPU period in microseconds."
484        type: "integer"
485        format: "int64"
486      CpuQuota:
487        description: |
488          Microseconds of CPU time that the container can get in a CPU period.
489        type: "integer"
490        format: "int64"
491      CpuRealtimePeriod:
492        description: |
493          The length of a CPU real-time period in microseconds. Set to 0 to
494          allocate no time allocated to real-time tasks.
495        type: "integer"
496        format: "int64"
497      CpuRealtimeRuntime:
498        description: |
499          The length of a CPU real-time runtime in microseconds. Set to 0 to
500          allocate no time allocated to real-time tasks.
501        type: "integer"
502        format: "int64"
503      CpusetCpus:
504        description: |
505          CPUs in which to allow execution (e.g., `0-3`, `0,1`).
506        type: "string"
507        example: "0-3"
508      CpusetMems:
509        description: |
510          Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only
511          effective on NUMA systems.
512        type: "string"
513      Devices:
514        description: "A list of devices to add to the container."
515        type: "array"
516        items:
517          $ref: "#/definitions/DeviceMapping"
518      DeviceCgroupRules:
519        description: "a list of cgroup rules to apply to the container"
520        type: "array"
521        items:
522          type: "string"
523          example: "c 13:* rwm"
524      DeviceRequests:
525        description: |
526          A list of requests for devices to be sent to device drivers.
527        type: "array"
528        items:
529          $ref: "#/definitions/DeviceRequest"
530      KernelMemory:
531        description: |
532          Kernel memory limit in bytes.
533
534          <p><br /></p>
535
536          > **Deprecated**: This field is deprecated as the kernel 5.4 deprecated
537          > `kmem.limit_in_bytes`.
538        type: "integer"
539        format: "int64"
540        example: 209715200
541      KernelMemoryTCP:
542        description: "Hard limit for kernel TCP buffer memory (in bytes)."
543        type: "integer"
544        format: "int64"
545      MemoryReservation:
546        description: "Memory soft limit in bytes."
547        type: "integer"
548        format: "int64"
549      MemorySwap:
550        description: |
551          Total memory limit (memory + swap). Set as `-1` to enable unlimited
552          swap.
553        type: "integer"
554        format: "int64"
555      MemorySwappiness:
556        description: |
557          Tune a container's memory swappiness behavior. Accepts an integer
558          between 0 and 100.
559        type: "integer"
560        format: "int64"
561        minimum: 0
562        maximum: 100
563      NanoCPUs:
564        description: "CPU quota in units of 10<sup>-9</sup> CPUs."
565        type: "integer"
566        format: "int64"
567      OomKillDisable:
568        description: "Disable OOM Killer for the container."
569        type: "boolean"
570      Init:
571        description: |
572          Run an init inside the container that forwards signals and reaps
573          processes. This field is omitted if empty, and the default (as
574          configured on the daemon) is used.
575        type: "boolean"
576        x-nullable: true
577      PidsLimit:
578        description: |
579          Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null`
580          to not change.
581        type: "integer"
582        format: "int64"
583        x-nullable: true
584      Ulimits:
585        description: |
586          A list of resource limits to set in the container. For example:
587
588          ```
589          {"Name": "nofile", "Soft": 1024, "Hard": 2048}
590          ```
591        type: "array"
592        items:
593          type: "object"
594          properties:
595            Name:
596              description: "Name of ulimit"
597              type: "string"
598            Soft:
599              description: "Soft limit"
600              type: "integer"
601            Hard:
602              description: "Hard limit"
603              type: "integer"
604      # Applicable to Windows
605      CpuCount:
606        description: |
607          The number of usable CPUs (Windows only).
608
609          On Windows Server containers, the processor resource controls are
610          mutually exclusive. The order of precedence is `CPUCount` first, then
611          `CPUShares`, and `CPUPercent` last.
612        type: "integer"
613        format: "int64"
614      CpuPercent:
615        description: |
616          The usable percentage of the available CPUs (Windows only).
617
618          On Windows Server containers, the processor resource controls are
619          mutually exclusive. The order of precedence is `CPUCount` first, then
620          `CPUShares`, and `CPUPercent` last.
621        type: "integer"
622        format: "int64"
623      IOMaximumIOps:
624        description: "Maximum IOps for the container system drive (Windows only)"
625        type: "integer"
626        format: "int64"
627      IOMaximumBandwidth:
628        description: |
629          Maximum IO in bytes per second for the container system drive
630          (Windows only).
631        type: "integer"
632        format: "int64"
633
634  Limit:
635    description: |
636      An object describing a limit on resources which can be requested by a task.
637    type: "object"
638    properties:
639      NanoCPUs:
640        type: "integer"
641        format: "int64"
642        example: 4000000000
643      MemoryBytes:
644        type: "integer"
645        format: "int64"
646        example: 8272408576
647      Pids:
648        description: |
649          Limits the maximum number of PIDs in the container. Set `0` for unlimited.
650        type: "integer"
651        format: "int64"
652        default: 0
653        example: 100
654
655  ResourceObject:
656    description: |
657      An object describing the resources which can be advertised by a node and
658      requested by a task.
659    type: "object"
660    properties:
661      NanoCPUs:
662        type: "integer"
663        format: "int64"
664        example: 4000000000
665      MemoryBytes:
666        type: "integer"
667        format: "int64"
668        example: 8272408576
669      GenericResources:
670        $ref: "#/definitions/GenericResources"
671
672  GenericResources:
673    description: |
674      User-defined resources can be either Integer resources (e.g, `SSD=3`) or
675      String resources (e.g, `GPU=UUID1`).
676    type: "array"
677    items:
678      type: "object"
679      properties:
680        NamedResourceSpec:
681          type: "object"
682          properties:
683            Kind:
684              type: "string"
685            Value:
686              type: "string"
687        DiscreteResourceSpec:
688          type: "object"
689          properties:
690            Kind:
691              type: "string"
692            Value:
693              type: "integer"
694              format: "int64"
695    example:
696      - DiscreteResourceSpec:
697          Kind: "SSD"
698          Value: 3
699      - NamedResourceSpec:
700          Kind: "GPU"
701          Value: "UUID1"
702      - NamedResourceSpec:
703          Kind: "GPU"
704          Value: "UUID2"
705
706  HealthConfig:
707    description: "A test to perform to check that the container is healthy."
708    type: "object"
709    properties:
710      Test:
711        description: |
712          The test to perform. Possible values are:
713
714          - `[]` inherit healthcheck from image or parent image
715          - `["NONE"]` disable healthcheck
716          - `["CMD", args...]` exec arguments directly
717          - `["CMD-SHELL", command]` run command with system's default shell
718        type: "array"
719        items:
720          type: "string"
721      Interval:
722        description: |
723          The time to wait between checks in nanoseconds. It should be 0 or at
724          least 1000000 (1 ms). 0 means inherit.
725        type: "integer"
726      Timeout:
727        description: |
728          The time to wait before considering the check to have hung. It should
729          be 0 or at least 1000000 (1 ms). 0 means inherit.
730        type: "integer"
731      Retries:
732        description: |
733          The number of consecutive failures needed to consider a container as
734          unhealthy. 0 means inherit.
735        type: "integer"
736      StartPeriod:
737        description: |
738          Start period for the container to initialize before starting
739          health-retries countdown in nanoseconds. It should be 0 or at least
740          1000000 (1 ms). 0 means inherit.
741        type: "integer"
742
743  Health:
744    description: |
745      Health stores information about the container's healthcheck results.
746    type: "object"
747    properties:
748      Status:
749        description: |
750          Status is one of `none`, `starting`, `healthy` or `unhealthy`
751
752          - "none"      Indicates there is no healthcheck
753          - "starting"  Starting indicates that the container is not yet ready
754          - "healthy"   Healthy indicates that the container is running correctly
755          - "unhealthy" Unhealthy indicates that the container has a problem
756        type: "string"
757        enum:
758          - "none"
759          - "starting"
760          - "healthy"
761          - "unhealthy"
762        example: "healthy"
763      FailingStreak:
764        description: "FailingStreak is the number of consecutive failures"
765        type: "integer"
766        example: 0
767      Log:
768        type: "array"
769        description: |
770          Log contains the last few results (oldest first)
771        items:
772          x-nullable: true
773          $ref: "#/definitions/HealthcheckResult"
774
775  HealthcheckResult:
776    description: |
777      HealthcheckResult stores information about a single run of a healthcheck probe
778    type: "object"
779    properties:
780      Start:
781        description: |
782          Date and time at which this check started in
783          [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
784        type: "string"
785        format: "date-time"
786        example: "2020-01-04T10:44:24.496525531Z"
787      End:
788        description: |
789          Date and time at which this check ended in
790          [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
791        type: "string"
792        format: "dateTime"
793        example: "2020-01-04T10:45:21.364524523Z"
794      ExitCode:
795        description: |
796          ExitCode meanings:
797
798          - `0` healthy
799          - `1` unhealthy
800          - `2` reserved (considered unhealthy)
801          - other values: error running probe
802        type: "integer"
803        example: 0
804      Output:
805        description: "Output from last check"
806        type: "string"
807
808  HostConfig:
809    description: "Container configuration that depends on the host we are running on"
810    allOf:
811      - $ref: "#/definitions/Resources"
812      - type: "object"
813        properties:
814          # Applicable to all platforms
815          Binds:
816            type: "array"
817            description: |
818              A list of volume bindings for this container. Each volume binding
819              is a string in one of these forms:
820
821              - `host-src:container-dest[:options]` to bind-mount a host path
822                into the container. Both `host-src`, and `container-dest` must
823                be an _absolute_ path.
824              - `volume-name:container-dest[:options]` to bind-mount a volume
825                managed by a volume driver into the container. `container-dest`
826                must be an _absolute_ path.
827
828              `options` is an optional, comma-delimited list of:
829
830              - `nocopy` disables automatic copying of data from the container
831                path to the volume. The `nocopy` flag only applies to named volumes.
832              - `[ro|rw]` mounts a volume read-only or read-write, respectively.
833                If omitted or set to `rw`, volumes are mounted read-write.
834              - `[z|Z]` applies SELinux labels to allow or deny multiple containers
835                to read and write to the same volume.
836                  - `z`: a _shared_ content label is applied to the content. This
837                    label indicates that multiple containers can share the volume
838                    content, for both reading and writing.
839                  - `Z`: a _private unshared_ label is applied to the content.
840                    This label indicates that only the current container can use
841                    a private volume. Labeling systems such as SELinux require
842                    proper labels to be placed on volume content that is mounted
843                    into a container. Without a label, the security system can
844                    prevent a container's processes from using the content. By
845                    default, the labels set by the host operating system are not
846                    modified.
847              - `[[r]shared|[r]slave|[r]private]` specifies mount
848                [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt).
849                This only applies to bind-mounted volumes, not internal volumes
850                or named volumes. Mount propagation requires the source mount
851                point (the location where the source directory is mounted in the
852                host operating system) to have the correct propagation properties.
853                For shared volumes, the source mount point must be set to `shared`.
854                For slave volumes, the mount must be set to either `shared` or
855                `slave`.
856            items:
857              type: "string"
858          ContainerIDFile:
859            type: "string"
860            description: "Path to a file where the container ID is written"
861          LogConfig:
862            type: "object"
863            description: "The logging configuration for this container"
864            properties:
865              Type:
866                type: "string"
867                enum:
868                  - "json-file"
869                  - "syslog"
870                  - "journald"
871                  - "gelf"
872                  - "fluentd"
873                  - "awslogs"
874                  - "splunk"
875                  - "etwlogs"
876                  - "none"
877              Config:
878                type: "object"
879                additionalProperties:
880                  type: "string"
881          NetworkMode:
882            type: "string"
883            description: |
884              Network mode to use for this container. Supported standard values
885              are: `bridge`, `host`, `none`, and `container:<name|id>`. Any
886              other value is taken as a custom network's name to which this
887              container should connect to.
888          PortBindings:
889            $ref: "#/definitions/PortMap"
890          RestartPolicy:
891            $ref: "#/definitions/RestartPolicy"
892          AutoRemove:
893            type: "boolean"
894            description: |
895              Automatically remove the container when the container's process
896              exits. This has no effect if `RestartPolicy` is set.
897          VolumeDriver:
898            type: "string"
899            description: "Driver that this container uses to mount volumes."
900          VolumesFrom:
901            type: "array"
902            description: |
903              A list of volumes to inherit from another container, specified in
904              the form `<container name>[:<ro|rw>]`.
905            items:
906              type: "string"
907          Mounts:
908            description: |
909              Specification for mounts to be added to the container.
910            type: "array"
911            items:
912              $ref: "#/definitions/Mount"
913
914          # Applicable to UNIX platforms
915          CapAdd:
916            type: "array"
917            description: |
918              A list of kernel capabilities to add to the container. Conflicts
919              with option 'Capabilities'.
920            items:
921              type: "string"
922          CapDrop:
923            type: "array"
924            description: |
925              A list of kernel capabilities to drop from the container. Conflicts
926              with option 'Capabilities'.
927            items:
928              type: "string"
929          CgroupnsMode:
930            type: "string"
931            enum:
932              - "private"
933              - "host"
934            description: |
935              cgroup namespace mode for the container. Possible values are:
936
937              - `"private"`: the container runs in its own private cgroup namespace
938              - `"host"`: use the host system's cgroup namespace
939
940              If not specified, the daemon default is used, which can either be `"private"`
941              or `"host"`, depending on daemon version, kernel support and configuration.
942          Dns:
943            type: "array"
944            description: "A list of DNS servers for the container to use."
945            items:
946              type: "string"
947          DnsOptions:
948            type: "array"
949            description: "A list of DNS options."
950            items:
951              type: "string"
952          DnsSearch:
953            type: "array"
954            description: "A list of DNS search domains."
955            items:
956              type: "string"
957          ExtraHosts:
958            type: "array"
959            description: |
960              A list of hostnames/IP mappings to add to the container's `/etc/hosts`
961              file. Specified in the form `["hostname:IP"]`.
962            items:
963              type: "string"
964          GroupAdd:
965            type: "array"
966            description: |
967              A list of additional groups that the container process will run as.
968            items:
969              type: "string"
970          IpcMode:
971            type: "string"
972            description: |
973              IPC sharing mode for the container. Possible values are:
974
975              - `"none"`: own private IPC namespace, with /dev/shm not mounted
976              - `"private"`: own private IPC namespace
977              - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers
978              - `"container:<name|id>"`: join another (shareable) container's IPC namespace
979              - `"host"`: use the host system's IPC namespace
980
981              If not specified, daemon default is used, which can either be `"private"`
982              or `"shareable"`, depending on daemon version and configuration.
983          Cgroup:
984            type: "string"
985            description: "Cgroup to use for the container."
986          Links:
987            type: "array"
988            description: |
989              A list of links for the container in the form `container_name:alias`.
990            items:
991              type: "string"
992          OomScoreAdj:
993            type: "integer"
994            description: |
995              An integer value containing the score given to the container in
996              order to tune OOM killer preferences.
997            example: 500
998          PidMode:
999            type: "string"
1000            description: |
1001              Set the PID (Process) Namespace mode for the container. It can be
1002              either:
1003
1004              - `"container:<name|id>"`: joins another container's PID namespace
1005              - `"host"`: use the host's PID namespace inside the container
1006          Privileged:
1007            type: "boolean"
1008            description: "Gives the container full access to the host."
1009          PublishAllPorts:
1010            type: "boolean"
1011            description: |
1012              Allocates an ephemeral host port for all of a container's
1013              exposed ports.
1014
1015              Ports are de-allocated when the container stops and allocated when
1016              the container starts. The allocated port might be changed when
1017              restarting the container.
1018
1019              The port is selected from the ephemeral port range that depends on
1020              the kernel. For example, on Linux the range is defined by
1021              `/proc/sys/net/ipv4/ip_local_port_range`.
1022          ReadonlyRootfs:
1023            type: "boolean"
1024            description: "Mount the container's root filesystem as read only."
1025          SecurityOpt:
1026            type: "array"
1027            description: "A list of string values to customize labels for MLS
1028            systems, such as SELinux."
1029            items:
1030              type: "string"
1031          StorageOpt:
1032            type: "object"
1033            description: |
1034              Storage driver options for this container, in the form `{"size": "120G"}`.
1035            additionalProperties:
1036              type: "string"
1037          Tmpfs:
1038            type: "object"
1039            description: |
1040              A map of container directories which should be replaced by tmpfs
1041              mounts, and their corresponding mount options. For example:
1042
1043              ```
1044              { "/run": "rw,noexec,nosuid,size=65536k" }
1045              ```
1046            additionalProperties:
1047              type: "string"
1048          UTSMode:
1049            type: "string"
1050            description: "UTS namespace to use for the container."
1051          UsernsMode:
1052            type: "string"
1053            description: |
1054              Sets the usernamespace mode for the container when usernamespace
1055              remapping option is enabled.
1056          ShmSize:
1057            type: "integer"
1058            description: |
1059              Size of `/dev/shm` in bytes. If omitted, the system uses 64MB.
1060            minimum: 0
1061          Sysctls:
1062            type: "object"
1063            description: |
1064              A list of kernel parameters (sysctls) to set in the container.
1065              For example:
1066
1067              ```
1068              {"net.ipv4.ip_forward": "1"}
1069              ```
1070            additionalProperties:
1071              type: "string"
1072          Runtime:
1073            type: "string"
1074            description: "Runtime to use with this container."
1075          # Applicable to Windows
1076          ConsoleSize:
1077            type: "array"
1078            description: |
1079              Initial console size, as an `[height, width]` array. (Windows only)
1080            minItems: 2
1081            maxItems: 2
1082            items:
1083              type: "integer"
1084              minimum: 0
1085          Isolation:
1086            type: "string"
1087            description: |
1088              Isolation technology of the container. (Windows only)
1089            enum:
1090              - "default"
1091              - "process"
1092              - "hyperv"
1093          MaskedPaths:
1094            type: "array"
1095            description: |
1096              The list of paths to be masked inside the container (this overrides
1097              the default set of paths).
1098            items:
1099              type: "string"
1100          ReadonlyPaths:
1101            type: "array"
1102            description: |
1103              The list of paths to be set as read-only inside the container
1104              (this overrides the default set of paths).
1105            items:
1106              type: "string"
1107
1108  ContainerConfig:
1109    description: "Configuration for a container that is portable between hosts"
1110    type: "object"
1111    properties:
1112      Hostname:
1113        description: "The hostname to use for the container, as a valid RFC 1123 hostname."
1114        type: "string"
1115      Domainname:
1116        description: "The domain name to use for the container."
1117        type: "string"
1118      User:
1119        description: "The user that commands are run as inside the container."
1120        type: "string"
1121      AttachStdin:
1122        description: "Whether to attach to `stdin`."
1123        type: "boolean"
1124        default: false
1125      AttachStdout:
1126        description: "Whether to attach to `stdout`."
1127        type: "boolean"
1128        default: true
1129      AttachStderr:
1130        description: "Whether to attach to `stderr`."
1131        type: "boolean"
1132        default: true
1133      ExposedPorts:
1134        description: |
1135          An object mapping ports to an empty object in the form:
1136
1137          `{"<port>/<tcp|udp|sctp>": {}}`
1138        type: "object"
1139        additionalProperties:
1140          type: "object"
1141          enum:
1142            - {}
1143          default: {}
1144      Tty:
1145        description: |
1146          Attach standard streams to a TTY, including `stdin` if it is not closed.
1147        type: "boolean"
1148        default: false
1149      OpenStdin:
1150        description: "Open `stdin`"
1151        type: "boolean"
1152        default: false
1153      StdinOnce:
1154        description: "Close `stdin` after one attached client disconnects"
1155        type: "boolean"
1156        default: false
1157      Env:
1158        description: |
1159          A list of environment variables to set inside the container in the
1160          form `["VAR=value", ...]`. A variable without `=` is removed from the
1161          environment, rather than to have an empty value.
1162        type: "array"
1163        items:
1164          type: "string"
1165      Cmd:
1166        description: |
1167          Command to run specified as a string or an array of strings.
1168        type: "array"
1169        items:
1170          type: "string"
1171      Healthcheck:
1172        $ref: "#/definitions/HealthConfig"
1173      ArgsEscaped:
1174        description: "Command is already escaped (Windows only)"
1175        type: "boolean"
1176      Image:
1177        description: |
1178          The name of the image to use when creating the container/
1179        type: "string"
1180      Volumes:
1181        description: |
1182          An object mapping mount point paths inside the container to empty
1183          objects.
1184        type: "object"
1185        additionalProperties:
1186          type: "object"
1187          enum:
1188            - {}
1189          default: {}
1190      WorkingDir:
1191        description: "The working directory for commands to run in."
1192        type: "string"
1193      Entrypoint:
1194        description: |
1195          The entry point for the container as a string or an array of strings.
1196
1197          If the array consists of exactly one empty string (`[""]`) then the
1198          entry point is reset to system default (i.e., the entry point used by
1199          docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`).
1200        type: "array"
1201        items:
1202          type: "string"
1203      NetworkDisabled:
1204        description: "Disable networking for the container."
1205        type: "boolean"
1206      MacAddress:
1207        description: "MAC address of the container."
1208        type: "string"
1209      OnBuild:
1210        description: |
1211          `ONBUILD` metadata that were defined in the image's `Dockerfile`.
1212        type: "array"
1213        items:
1214          type: "string"
1215      Labels:
1216        description: "User-defined key/value metadata."
1217        type: "object"
1218        additionalProperties:
1219          type: "string"
1220      StopSignal:
1221        description: |
1222          Signal to stop a container as a string or unsigned integer.
1223        type: "string"
1224        default: "SIGTERM"
1225      StopTimeout:
1226        description: "Timeout to stop a container in seconds."
1227        type: "integer"
1228        default: 10
1229      Shell:
1230        description: |
1231          Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell.
1232        type: "array"
1233        items:
1234          type: "string"
1235
1236  NetworkingConfig:
1237    description: |
1238      NetworkingConfig represents the container's networking configuration for
1239      each of its interfaces.
1240      It is used for the networking configs specified in the `docker create`
1241      and `docker network connect` commands.
1242    type: "object"
1243    properties:
1244      EndpointsConfig:
1245        description: |
1246          A mapping of network name to endpoint configuration for that network.
1247        type: "object"
1248        additionalProperties:
1249          $ref: "#/definitions/EndpointSettings"
1250    example:
1251      # putting an example here, instead of using the example values from
1252      # /definitions/EndpointSettings, because containers/create currently
1253      # does not support attaching to multiple networks, so the example request
1254      # would be confusing if it showed that multiple networks can be contained
1255      # in the EndpointsConfig.
1256      # TODO remove once we support multiple networks on container create (see https://github.com/moby/moby/blob/07e6b843594e061f82baa5fa23c2ff7d536c2a05/daemon/create.go#L323)
1257      EndpointsConfig:
1258        isolated_nw:
1259          IPAMConfig:
1260            IPv4Address: "172.20.30.33"
1261            IPv6Address: "2001:db8:abcd::3033"
1262            LinkLocalIPs:
1263              - "169.254.34.68"
1264              - "fe80::3468"
1265          Links:
1266            - "container_1"
1267            - "container_2"
1268          Aliases:
1269            - "server_x"
1270            - "server_y"
1271
1272  NetworkSettings:
1273    description: "NetworkSettings exposes the network settings in the API"
1274    type: "object"
1275    properties:
1276      Bridge:
1277        description: Name of the network'a bridge (for example, `docker0`).
1278        type: "string"
1279        example: "docker0"
1280      SandboxID:
1281        description: SandboxID uniquely represents a container's network stack.
1282        type: "string"
1283        example: "9d12daf2c33f5959c8bf90aa513e4f65b561738661003029ec84830cd503a0c3"
1284      HairpinMode:
1285        description: |
1286          Indicates if hairpin NAT should be enabled on the virtual interface.
1287        type: "boolean"
1288        example: false
1289      LinkLocalIPv6Address:
1290        description: IPv6 unicast address using the link-local prefix.
1291        type: "string"
1292        example: "fe80::42:acff:fe11:1"
1293      LinkLocalIPv6PrefixLen:
1294        description: Prefix length of the IPv6 unicast address.
1295        type: "integer"
1296        example: "64"
1297      Ports:
1298        $ref: "#/definitions/PortMap"
1299      SandboxKey:
1300        description: SandboxKey identifies the sandbox
1301        type: "string"
1302        example: "/var/run/docker/netns/8ab54b426c38"
1303
1304      # TODO is SecondaryIPAddresses actually used?
1305      SecondaryIPAddresses:
1306        description: ""
1307        type: "array"
1308        items:
1309          $ref: "#/definitions/Address"
1310        x-nullable: true
1311
1312      # TODO is SecondaryIPv6Addresses actually used?
1313      SecondaryIPv6Addresses:
1314        description: ""
1315        type: "array"
1316        items:
1317          $ref: "#/definitions/Address"
1318        x-nullable: true
1319
1320      # TODO properties below are part of DefaultNetworkSettings, which is
1321      # marked as deprecated since Docker 1.9 and to be removed in Docker v17.12
1322      EndpointID:
1323        description: |
1324          EndpointID uniquely represents a service endpoint in a Sandbox.
1325
1326          <p><br /></p>
1327
1328          > **Deprecated**: This field is only propagated when attached to the
1329          > default "bridge" network. Use the information from the "bridge"
1330          > network inside the `Networks` map instead, which contains the same
1331          > information. This field was deprecated in Docker 1.9 and is scheduled
1332          > to be removed in Docker 17.12.0
1333        type: "string"
1334        example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b"
1335      Gateway:
1336        description: |
1337          Gateway address for the default "bridge" network.
1338
1339          <p><br /></p>
1340
1341          > **Deprecated**: This field is only propagated when attached to the
1342          > default "bridge" network. Use the information from the "bridge"
1343          > network inside the `Networks` map instead, which contains the same
1344          > information. This field was deprecated in Docker 1.9 and is scheduled
1345          > to be removed in Docker 17.12.0
1346        type: "string"
1347        example: "172.17.0.1"
1348      GlobalIPv6Address:
1349        description: |
1350          Global IPv6 address for the default "bridge" network.
1351
1352          <p><br /></p>
1353
1354          > **Deprecated**: This field is only propagated when attached to the
1355          > default "bridge" network. Use the information from the "bridge"
1356          > network inside the `Networks` map instead, which contains the same
1357          > information. This field was deprecated in Docker 1.9 and is scheduled
1358          > to be removed in Docker 17.12.0
1359        type: "string"
1360        example: "2001:db8::5689"
1361      GlobalIPv6PrefixLen:
1362        description: |
1363          Mask length of the global IPv6 address.
1364
1365          <p><br /></p>
1366
1367          > **Deprecated**: This field is only propagated when attached to the
1368          > default "bridge" network. Use the information from the "bridge"
1369          > network inside the `Networks` map instead, which contains the same
1370          > information. This field was deprecated in Docker 1.9 and is scheduled
1371          > to be removed in Docker 17.12.0
1372        type: "integer"
1373        example: 64
1374      IPAddress:
1375        description: |
1376          IPv4 address for the default "bridge" network.
1377
1378          <p><br /></p>
1379
1380          > **Deprecated**: This field is only propagated when attached to the
1381          > default "bridge" network. Use the information from the "bridge"
1382          > network inside the `Networks` map instead, which contains the same
1383          > information. This field was deprecated in Docker 1.9 and is scheduled
1384          > to be removed in Docker 17.12.0
1385        type: "string"
1386        example: "172.17.0.4"
1387      IPPrefixLen:
1388        description: |
1389          Mask length of the IPv4 address.
1390
1391          <p><br /></p>
1392
1393          > **Deprecated**: This field is only propagated when attached to the
1394          > default "bridge" network. Use the information from the "bridge"
1395          > network inside the `Networks` map instead, which contains the same
1396          > information. This field was deprecated in Docker 1.9 and is scheduled
1397          > to be removed in Docker 17.12.0
1398        type: "integer"
1399        example: 16
1400      IPv6Gateway:
1401        description: |
1402          IPv6 gateway address for this network.
1403
1404          <p><br /></p>
1405
1406          > **Deprecated**: This field is only propagated when attached to the
1407          > default "bridge" network. Use the information from the "bridge"
1408          > network inside the `Networks` map instead, which contains the same
1409          > information. This field was deprecated in Docker 1.9 and is scheduled
1410          > to be removed in Docker 17.12.0
1411        type: "string"
1412        example: "2001:db8:2::100"
1413      MacAddress:
1414        description: |
1415          MAC address for the container on the default "bridge" network.
1416
1417          <p><br /></p>
1418
1419          > **Deprecated**: This field is only propagated when attached to the
1420          > default "bridge" network. Use the information from the "bridge"
1421          > network inside the `Networks` map instead, which contains the same
1422          > information. This field was deprecated in Docker 1.9 and is scheduled
1423          > to be removed in Docker 17.12.0
1424        type: "string"
1425        example: "02:42:ac:11:00:04"
1426      Networks:
1427        description: |
1428          Information about all networks that the container is connected to.
1429        type: "object"
1430        additionalProperties:
1431          $ref: "#/definitions/EndpointSettings"
1432
1433  Address:
1434    description: Address represents an IPv4 or IPv6 IP address.
1435    type: "object"
1436    properties:
1437      Addr:
1438        description: IP address.
1439        type: "string"
1440      PrefixLen:
1441        description: Mask length of the IP address.
1442        type: "integer"
1443
1444  PortMap:
1445    description: |
1446      PortMap describes the mapping of container ports to host ports, using the
1447      container's port-number and protocol as key in the format `<port>/<protocol>`,
1448      for example, `80/udp`.
1449
1450      If a container's port is mapped for multiple protocols, separate entries
1451      are added to the mapping table.
1452    type: "object"
1453    additionalProperties:
1454      type: "array"
1455      x-nullable: true
1456      items:
1457        $ref: "#/definitions/PortBinding"
1458    example:
1459      "443/tcp":
1460        - HostIp: "127.0.0.1"
1461          HostPort: "4443"
1462      "80/tcp":
1463        - HostIp: "0.0.0.0"
1464          HostPort: "80"
1465        - HostIp: "0.0.0.0"
1466          HostPort: "8080"
1467      "80/udp":
1468        - HostIp: "0.0.0.0"
1469          HostPort: "80"
1470      "53/udp":
1471        - HostIp: "0.0.0.0"
1472          HostPort: "53"
1473      "2377/tcp": null
1474
1475  PortBinding:
1476    description: |
1477      PortBinding represents a binding between a host IP address and a host
1478      port.
1479    type: "object"
1480    properties:
1481      HostIp:
1482        description: "Host IP address that the container's port is mapped to."
1483        type: "string"
1484        example: "127.0.0.1"
1485      HostPort:
1486        description: "Host port number that the container's port is mapped to."
1487        type: "string"
1488        example: "4443"
1489
1490  GraphDriverData:
1491    description: "Information about a container's graph driver."
1492    type: "object"
1493    required: [Name, Data]
1494    properties:
1495      Name:
1496        type: "string"
1497        x-nullable: false
1498      Data:
1499        type: "object"
1500        x-nullable: false
1501        additionalProperties:
1502          type: "string"
1503
1504  Image:
1505    type: "object"
1506    required:
1507      - Id
1508      - Parent
1509      - Comment
1510      - Created
1511      - Container
1512      - DockerVersion
1513      - Author
1514      - Architecture
1515      - Os
1516      - Size
1517      - VirtualSize
1518      - GraphDriver
1519      - RootFS
1520    properties:
1521      Id:
1522        type: "string"
1523        x-nullable: false
1524      RepoTags:
1525        type: "array"
1526        items:
1527          type: "string"
1528      RepoDigests:
1529        type: "array"
1530        items:
1531          type: "string"
1532      Parent:
1533        type: "string"
1534        x-nullable: false
1535      Comment:
1536        type: "string"
1537        x-nullable: false
1538      Created:
1539        type: "string"
1540        x-nullable: false
1541      Container:
1542        type: "string"
1543        x-nullable: false
1544      ContainerConfig:
1545        $ref: "#/definitions/ContainerConfig"
1546      DockerVersion:
1547        type: "string"
1548        x-nullable: false
1549      Author:
1550        type: "string"
1551        x-nullable: false
1552      Config:
1553        $ref: "#/definitions/ContainerConfig"
1554      Architecture:
1555        type: "string"
1556        x-nullable: false
1557      Os:
1558        type: "string"
1559        x-nullable: false
1560      OsVersion:
1561        type: "string"
1562      Size:
1563        type: "integer"
1564        format: "int64"
1565        x-nullable: false
1566      VirtualSize:
1567        type: "integer"
1568        format: "int64"
1569        x-nullable: false
1570      GraphDriver:
1571        $ref: "#/definitions/GraphDriverData"
1572      RootFS:
1573        type: "object"
1574        required: [Type]
1575        properties:
1576          Type:
1577            type: "string"
1578            x-nullable: false
1579          Layers:
1580            type: "array"
1581            items:
1582              type: "string"
1583          BaseLayer:
1584            type: "string"
1585      Metadata:
1586        type: "object"
1587        properties:
1588          LastTagTime:
1589            type: "string"
1590            format: "dateTime"
1591
1592  ImageSummary:
1593    type: "object"
1594    required:
1595      - Id
1596      - ParentId
1597      - RepoTags
1598      - RepoDigests
1599      - Created
1600      - Size
1601      - SharedSize
1602      - VirtualSize
1603      - Labels
1604      - Containers
1605    properties:
1606      Id:
1607        type: "string"
1608        x-nullable: false
1609      ParentId:
1610        type: "string"
1611        x-nullable: false
1612      RepoTags:
1613        type: "array"
1614        x-nullable: false
1615        items:
1616          type: "string"
1617      RepoDigests:
1618        type: "array"
1619        x-nullable: false
1620        items:
1621          type: "string"
1622      Created:
1623        type: "integer"
1624        x-nullable: false
1625      Size:
1626        type: "integer"
1627        x-nullable: false
1628      SharedSize:
1629        type: "integer"
1630        x-nullable: false
1631      VirtualSize:
1632        type: "integer"
1633        x-nullable: false
1634      Labels:
1635        type: "object"
1636        x-nullable: false
1637        additionalProperties:
1638          type: "string"
1639      Containers:
1640        x-nullable: false
1641        type: "integer"
1642
1643  AuthConfig:
1644    type: "object"
1645    properties:
1646      username:
1647        type: "string"
1648      password:
1649        type: "string"
1650      email:
1651        type: "string"
1652      serveraddress:
1653        type: "string"
1654    example:
1655      username: "hannibal"
1656      password: "xxxx"
1657      serveraddress: "https://index.docker.io/v1/"
1658
1659  ProcessConfig:
1660    type: "object"
1661    properties:
1662      privileged:
1663        type: "boolean"
1664      user:
1665        type: "string"
1666      tty:
1667        type: "boolean"
1668      entrypoint:
1669        type: "string"
1670      arguments:
1671        type: "array"
1672        items:
1673          type: "string"
1674
1675  Volume:
1676    type: "object"
1677    required: [Name, Driver, Mountpoint, Labels, Scope, Options]
1678    properties:
1679      Name:
1680        type: "string"
1681        description: "Name of the volume."
1682        x-nullable: false
1683      Driver:
1684        type: "string"
1685        description: "Name of the volume driver used by the volume."
1686        x-nullable: false
1687      Mountpoint:
1688        type: "string"
1689        description: "Mount path of the volume on the host."
1690        x-nullable: false
1691      CreatedAt:
1692        type: "string"
1693        format: "dateTime"
1694        description: "Date/Time the volume was created."
1695      Status:
1696        type: "object"
1697        description: |
1698          Low-level details about the volume, provided by the volume driver.
1699          Details are returned as a map with key/value pairs:
1700          `{"key":"value","key2":"value2"}`.
1701
1702          The `Status` field is optional, and is omitted if the volume driver
1703          does not support this feature.
1704        additionalProperties:
1705          type: "object"
1706      Labels:
1707        type: "object"
1708        description: "User-defined key/value metadata."
1709        x-nullable: false
1710        additionalProperties:
1711          type: "string"
1712      Scope:
1713        type: "string"
1714        description: |
1715          The level at which the volume exists. Either `global` for cluster-wide,
1716          or `local` for machine level.
1717        default: "local"
1718        x-nullable: false
1719        enum: ["local", "global"]
1720      Options:
1721        type: "object"
1722        description: |
1723          The driver specific options used when creating the volume.
1724        additionalProperties:
1725          type: "string"
1726      UsageData:
1727        type: "object"
1728        x-nullable: true
1729        required: [Size, RefCount]
1730        description: |
1731          Usage details about the volume. This information is used by the
1732          `GET /system/df` endpoint, and omitted in other endpoints.
1733        properties:
1734          Size:
1735            type: "integer"
1736            default: -1
1737            description: |
1738              Amount of disk space used by the volume (in bytes). This information
1739              is only available for volumes created with the `"local"` volume
1740              driver. For volumes created with other volume drivers, this field
1741              is set to `-1` ("not available")
1742            x-nullable: false
1743          RefCount:
1744            type: "integer"
1745            default: -1
1746            description: |
1747              The number of containers referencing this volume. This field
1748              is set to `-1` if the reference-count is not available.
1749            x-nullable: false
1750
1751    example:
1752      Name: "tardis"
1753      Driver: "custom"
1754      Mountpoint: "/var/lib/docker/volumes/tardis"
1755      Status:
1756        hello: "world"
1757      Labels:
1758        com.example.some-label: "some-value"
1759        com.example.some-other-label: "some-other-value"
1760      Scope: "local"
1761      CreatedAt: "2016-06-07T20:31:11.853781916Z"
1762
1763  Network:
1764    type: "object"
1765    properties:
1766      Name:
1767        type: "string"
1768      Id:
1769        type: "string"
1770      Created:
1771        type: "string"
1772        format: "dateTime"
1773      Scope:
1774        type: "string"
1775      Driver:
1776        type: "string"
1777      EnableIPv6:
1778        type: "boolean"
1779      IPAM:
1780        $ref: "#/definitions/IPAM"
1781      Internal:
1782        type: "boolean"
1783      Attachable:
1784        type: "boolean"
1785      Ingress:
1786        type: "boolean"
1787      Containers:
1788        type: "object"
1789        additionalProperties:
1790          $ref: "#/definitions/NetworkContainer"
1791      Options:
1792        type: "object"
1793        additionalProperties:
1794          type: "string"
1795      Labels:
1796        type: "object"
1797        additionalProperties:
1798          type: "string"
1799    example:
1800      Name: "net01"
1801      Id: "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99"
1802      Created: "2016-10-19T04:33:30.360899459Z"
1803      Scope: "local"
1804      Driver: "bridge"
1805      EnableIPv6: false
1806      IPAM:
1807        Driver: "default"
1808        Config:
1809          - Subnet: "172.19.0.0/16"
1810            Gateway: "172.19.0.1"
1811        Options:
1812          foo: "bar"
1813      Internal: false
1814      Attachable: false
1815      Ingress: false
1816      Containers:
1817        19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c:
1818          Name: "test"
1819          EndpointID: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a"
1820          MacAddress: "02:42:ac:13:00:02"
1821          IPv4Address: "172.19.0.2/16"
1822          IPv6Address: ""
1823      Options:
1824        com.docker.network.bridge.default_bridge: "true"
1825        com.docker.network.bridge.enable_icc: "true"
1826        com.docker.network.bridge.enable_ip_masquerade: "true"
1827        com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
1828        com.docker.network.bridge.name: "docker0"
1829        com.docker.network.driver.mtu: "1500"
1830      Labels:
1831        com.example.some-label: "some-value"
1832        com.example.some-other-label: "some-other-value"
1833  IPAM:
1834    type: "object"
1835    properties:
1836      Driver:
1837        description: "Name of the IPAM driver to use."
1838        type: "string"
1839        default: "default"
1840      Config:
1841        description: |
1842          List of IPAM configuration options, specified as a map:
1843
1844          ```
1845          {"Subnet": <CIDR>, "IPRange": <CIDR>, "Gateway": <IP address>, "AuxAddress": <device_name:IP address>}
1846          ```
1847        type: "array"
1848        items:
1849          type: "object"
1850          additionalProperties:
1851            type: "string"
1852      Options:
1853        description: "Driver-specific options, specified as a map."
1854        type: "object"
1855        additionalProperties:
1856          type: "string"
1857
1858  NetworkContainer:
1859    type: "object"
1860    properties:
1861      Name:
1862        type: "string"
1863      EndpointID:
1864        type: "string"
1865      MacAddress:
1866        type: "string"
1867      IPv4Address:
1868        type: "string"
1869      IPv6Address:
1870        type: "string"
1871
1872  BuildInfo:
1873    type: "object"
1874    properties:
1875      id:
1876        type: "string"
1877      stream:
1878        type: "string"
1879      error:
1880        type: "string"
1881      errorDetail:
1882        $ref: "#/definitions/ErrorDetail"
1883      status:
1884        type: "string"
1885      progress:
1886        type: "string"
1887      progressDetail:
1888        $ref: "#/definitions/ProgressDetail"
1889      aux:
1890        $ref: "#/definitions/ImageID"
1891
1892  BuildCache:
1893    type: "object"
1894    properties:
1895      ID:
1896        type: "string"
1897      Parent:
1898        type: "string"
1899      Type:
1900        type: "string"
1901      Description:
1902        type: "string"
1903      InUse:
1904        type: "boolean"
1905      Shared:
1906        type: "boolean"
1907      Size:
1908        description: |
1909          Amount of disk space used by the build cache (in bytes).
1910        type: "integer"
1911      CreatedAt:
1912        description: |
1913          Date and time at which the build cache was created in
1914          [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
1915        type: "string"
1916        format: "dateTime"
1917        example: "2016-08-18T10:44:24.496525531Z"
1918      LastUsedAt:
1919        description: |
1920          Date and time at which the build cache was last used in
1921          [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
1922        type: "string"
1923        format: "dateTime"
1924        x-nullable: true
1925        example: "2017-08-09T07:09:37.632105588Z"
1926      UsageCount:
1927        type: "integer"
1928
1929  ImageID:
1930    type: "object"
1931    description: "Image ID or Digest"
1932    properties:
1933      ID:
1934        type: "string"
1935    example:
1936      ID: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c"
1937
1938  CreateImageInfo:
1939    type: "object"
1940    properties:
1941      id:
1942        type: "string"
1943      error:
1944        type: "string"
1945      status:
1946        type: "string"
1947      progress:
1948        type: "string"
1949      progressDetail:
1950        $ref: "#/definitions/ProgressDetail"
1951
1952  PushImageInfo:
1953    type: "object"
1954    properties:
1955      error:
1956        type: "string"
1957      status:
1958        type: "string"
1959      progress:
1960        type: "string"
1961      progressDetail:
1962        $ref: "#/definitions/ProgressDetail"
1963
1964  ErrorDetail:
1965    type: "object"
1966    properties:
1967      code:
1968        type: "integer"
1969      message:
1970        type: "string"
1971
1972  ProgressDetail:
1973    type: "object"
1974    properties:
1975      current:
1976        type: "integer"
1977      total:
1978        type: "integer"
1979
1980  ErrorResponse:
1981    description: "Represents an error."
1982    type: "object"
1983    required: ["message"]
1984    properties:
1985      message:
1986        description: "The error message."
1987        type: "string"
1988        x-nullable: false
1989    example:
1990      message: "Something went wrong."
1991
1992  IdResponse:
1993    description: "Response to an API call that returns just an Id"
1994    type: "object"
1995    required: ["Id"]
1996    properties:
1997      Id:
1998        description: "The id of the newly created object."
1999        type: "string"
2000        x-nullable: false
2001
2002  EndpointSettings:
2003    description: "Configuration for a network endpoint."
2004    type: "object"
2005    properties:
2006      # Configurations
2007      IPAMConfig:
2008        $ref: "#/definitions/EndpointIPAMConfig"
2009      Links:
2010        type: "array"
2011        items:
2012          type: "string"
2013        example:
2014          - "container_1"
2015          - "container_2"
2016      Aliases:
2017        type: "array"
2018        items:
2019          type: "string"
2020        example:
2021          - "server_x"
2022          - "server_y"
2023
2024      # Operational data
2025      NetworkID:
2026        description: |
2027          Unique ID of the network.
2028        type: "string"
2029        example: "08754567f1f40222263eab4102e1c733ae697e8e354aa9cd6e18d7402835292a"
2030      EndpointID:
2031        description: |
2032          Unique ID for the service endpoint in a Sandbox.
2033        type: "string"
2034        example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b"
2035      Gateway:
2036        description: |
2037          Gateway address for this network.
2038        type: "string"
2039        example: "172.17.0.1"
2040      IPAddress:
2041        description: |
2042          IPv4 address.
2043        type: "string"
2044        example: "172.17.0.4"
2045      IPPrefixLen:
2046        description: |
2047          Mask length of the IPv4 address.
2048        type: "integer"
2049        example: 16
2050      IPv6Gateway:
2051        description: |
2052          IPv6 gateway address.
2053        type: "string"
2054        example: "2001:db8:2::100"
2055      GlobalIPv6Address:
2056        description: |
2057          Global IPv6 address.
2058        type: "string"
2059        example: "2001:db8::5689"
2060      GlobalIPv6PrefixLen:
2061        description: |
2062          Mask length of the global IPv6 address.
2063        type: "integer"
2064        format: "int64"
2065        example: 64
2066      MacAddress:
2067        description: |
2068          MAC address for the endpoint on this network.
2069        type: "string"
2070        example: "02:42:ac:11:00:04"
2071      DriverOpts:
2072        description: |
2073          DriverOpts is a mapping of driver options and values. These options
2074          are passed directly to the driver and are driver specific.
2075        type: "object"
2076        x-nullable: true
2077        additionalProperties:
2078          type: "string"
2079        example:
2080          com.example.some-label: "some-value"
2081          com.example.some-other-label: "some-other-value"
2082
2083  EndpointIPAMConfig:
2084    description: |
2085      EndpointIPAMConfig represents an endpoint's IPAM configuration.
2086    type: "object"
2087    x-nullable: true
2088    properties:
2089      IPv4Address:
2090        type: "string"
2091        example: "172.20.30.33"
2092      IPv6Address:
2093        type: "string"
2094        example: "2001:db8:abcd::3033"
2095      LinkLocalIPs:
2096        type: "array"
2097        items:
2098          type: "string"
2099        example:
2100          - "169.254.34.68"
2101          - "fe80::3468"
2102
2103  PluginMount:
2104    type: "object"
2105    x-nullable: false
2106    required: [Name, Description, Settable, Source, Destination, Type, Options]
2107    properties:
2108      Name:
2109        type: "string"
2110        x-nullable: false
2111        example: "some-mount"
2112      Description:
2113        type: "string"
2114        x-nullable: false
2115        example: "This is a mount that's used by the plugin."
2116      Settable:
2117        type: "array"
2118        items:
2119          type: "string"
2120      Source:
2121        type: "string"
2122        example: "/var/lib/docker/plugins/"
2123      Destination:
2124        type: "string"
2125        x-nullable: false
2126        example: "/mnt/state"
2127      Type:
2128        type: "string"
2129        x-nullable: false
2130        example: "bind"
2131      Options:
2132        type: "array"
2133        items:
2134          type: "string"
2135        example:
2136          - "rbind"
2137          - "rw"
2138
2139  PluginDevice:
2140    type: "object"
2141    required: [Name, Description, Settable, Path]
2142    x-nullable: false
2143    properties:
2144      Name:
2145        type: "string"
2146        x-nullable: false
2147      Description:
2148        type: "string"
2149        x-nullable: false
2150      Settable:
2151        type: "array"
2152        items:
2153          type: "string"
2154      Path:
2155        type: "string"
2156        example: "/dev/fuse"
2157
2158  PluginEnv:
2159    type: "object"
2160    x-nullable: false
2161    required: [Name, Description, Settable, Value]
2162    properties:
2163      Name:
2164        x-nullable: false
2165        type: "string"
2166      Description:
2167        x-nullable: false
2168        type: "string"
2169      Settable:
2170        type: "array"
2171        items:
2172          type: "string"
2173      Value:
2174        type: "string"
2175
2176  PluginInterfaceType:
2177    type: "object"
2178    x-nullable: false
2179    required: [Prefix, Capability, Version]
2180    properties:
2181      Prefix:
2182        type: "string"
2183        x-nullable: false
2184      Capability:
2185        type: "string"
2186        x-nullable: false
2187      Version:
2188        type: "string"
2189        x-nullable: false
2190
2191  Plugin:
2192    description: "A plugin for the Engine API"
2193    type: "object"
2194    required: [Settings, Enabled, Config, Name]
2195    properties:
2196      Id:
2197        type: "string"
2198        example: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078"
2199      Name:
2200        type: "string"
2201        x-nullable: false
2202        example: "tiborvass/sample-volume-plugin"
2203      Enabled:
2204        description:
2205          True if the plugin is running. False if the plugin is not running,
2206          only installed.
2207        type: "boolean"
2208        x-nullable: false
2209        example: true
2210      Settings:
2211        description: "Settings that can be modified by users."
2212        type: "object"
2213        x-nullable: false
2214        required: [Args, Devices, Env, Mounts]
2215        properties:
2216          Mounts:
2217            type: "array"
2218            items:
2219              $ref: "#/definitions/PluginMount"
2220          Env:
2221            type: "array"
2222            items:
2223              type: "string"
2224            example:
2225              - "DEBUG=0"
2226          Args:
2227            type: "array"
2228            items:
2229              type: "string"
2230          Devices:
2231            type: "array"
2232            items:
2233              $ref: "#/definitions/PluginDevice"
2234      PluginReference:
2235        description: "plugin remote reference used to push/pull the plugin"
2236        type: "string"
2237        x-nullable: false
2238        example: "localhost:5000/tiborvass/sample-volume-plugin:latest"
2239      Config:
2240        description: "The config of a plugin."
2241        type: "object"
2242        x-nullable: false
2243        required:
2244          - Description
2245          - Documentation
2246          - Interface
2247          - Entrypoint
2248          - WorkDir
2249          - Network
2250          - Linux
2251          - PidHost
2252          - PropagatedMount
2253          - IpcHost
2254          - Mounts
2255          - Env
2256          - Args
2257        properties:
2258          DockerVersion:
2259            description: "Docker Version used to create the plugin"
2260            type: "string"
2261            x-nullable: false
2262            example: "17.06.0-ce"
2263          Description:
2264            type: "string"
2265            x-nullable: false
2266            example: "A sample volume plugin for Docker"
2267          Documentation:
2268            type: "string"
2269            x-nullable: false
2270            example: "https://docs.docker.com/engine/extend/plugins/"
2271          Interface:
2272            description: "The interface between Docker and the plugin"
2273            x-nullable: false
2274            type: "object"
2275            required: [Types, Socket]
2276            properties:
2277              Types:
2278                type: "array"
2279                items:
2280                  $ref: "#/definitions/PluginInterfaceType"
2281                example:
2282                  - "docker.volumedriver/1.0"
2283              Socket:
2284                type: "string"
2285                x-nullable: false
2286                example: "plugins.sock"
2287              ProtocolScheme:
2288                type: "string"
2289                example: "some.protocol/v1.0"
2290                description: "Protocol to use for clients connecting to the plugin."
2291                enum:
2292                  - ""
2293                  - "moby.plugins.http/v1"
2294          Entrypoint:
2295            type: "array"
2296            items:
2297              type: "string"
2298            example:
2299              - "/usr/bin/sample-volume-plugin"
2300              - "/data"
2301          WorkDir:
2302            type: "string"
2303            x-nullable: false
2304            example: "/bin/"
2305          User:
2306            type: "object"
2307            x-nullable: false
2308            properties:
2309              UID:
2310                type: "integer"
2311                format: "uint32"
2312                example: 1000
2313              GID:
2314                type: "integer"
2315                format: "uint32"
2316                example: 1000
2317          Network:
2318            type: "object"
2319            x-nullable: false
2320            required: [Type]
2321            properties:
2322              Type:
2323                x-nullable: false
2324                type: "string"
2325                example: "host"
2326          Linux:
2327            type: "object"
2328            x-nullable: false
2329            required: [Capabilities, AllowAllDevices, Devices]
2330            properties:
2331              Capabilities:
2332                type: "array"
2333                items:
2334                  type: "string"
2335                example:
2336                  - "CAP_SYS_ADMIN"
2337                  - "CAP_SYSLOG"
2338              AllowAllDevices:
2339                type: "boolean"
2340                x-nullable: false
2341                example: false
2342              Devices:
2343                type: "array"
2344                items:
2345                  $ref: "#/definitions/PluginDevice"
2346          PropagatedMount:
2347            type: "string"
2348            x-nullable: false
2349            example: "/mnt/volumes"
2350          IpcHost:
2351            type: "boolean"
2352            x-nullable: false
2353            example: false
2354          PidHost:
2355            type: "boolean"
2356            x-nullable: false
2357            example: false
2358          Mounts:
2359            type: "array"
2360            items:
2361              $ref: "#/definitions/PluginMount"
2362          Env:
2363            type: "array"
2364            items:
2365              $ref: "#/definitions/PluginEnv"
2366            example:
2367              - Name: "DEBUG"
2368                Description: "If set, prints debug messages"
2369                Settable: null
2370                Value: "0"
2371          Args:
2372            type: "object"
2373            x-nullable: false
2374            required: [Name, Description, Settable, Value]
2375            properties:
2376              Name:
2377                x-nullable: false
2378                type: "string"
2379                example: "args"
2380              Description:
2381                x-nullable: false
2382                type: "string"
2383                example: "command line arguments"
2384              Settable:
2385                type: "array"
2386                items:
2387                  type: "string"
2388              Value:
2389                type: "array"
2390                items:
2391                  type: "string"
2392          rootfs:
2393            type: "object"
2394            properties:
2395              type:
2396                type: "string"
2397                example: "layers"
2398              diff_ids:
2399                type: "array"
2400                items:
2401                  type: "string"
2402                example:
2403                  - "sha256:675532206fbf3030b8458f88d6e26d4eb1577688a25efec97154c94e8b6b4887"
2404                  - "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8"
2405
2406  ObjectVersion:
2407    description: |
2408      The version number of the object such as node, service, etc. This is needed
2409      to avoid conflicting writes. The client must send the version number along
2410      with the modified specification when updating these objects.
2411
2412      This approach ensures safe concurrency and determinism in that the change
2413      on the object may not be applied if the version number has changed from the
2414      last read. In other words, if two update requests specify the same base
2415      version, only one of the requests can succeed. As a result, two separate
2416      update requests that happen at the same time will not unintentionally
2417      overwrite each other.
2418    type: "object"
2419    properties:
2420      Index:
2421        type: "integer"
2422        format: "uint64"
2423        example: 373531
2424
2425  NodeSpec:
2426    type: "object"
2427    properties:
2428      Name:
2429        description: "Name for the node."
2430        type: "string"
2431        example: "my-node"
2432      Labels:
2433        description: "User-defined key/value metadata."
2434        type: "object"
2435        additionalProperties:
2436          type: "string"
2437      Role:
2438        description: "Role of the node."
2439        type: "string"
2440        enum:
2441          - "worker"
2442          - "manager"
2443        example: "manager"
2444      Availability:
2445        description: "Availability of the node."
2446        type: "string"
2447        enum:
2448          - "active"
2449          - "pause"
2450          - "drain"
2451        example: "active"
2452    example:
2453      Availability: "active"
2454      Name: "node-name"
2455      Role: "manager"
2456      Labels:
2457        foo: "bar"
2458
2459  Node:
2460    type: "object"
2461    properties:
2462      ID:
2463        type: "string"
2464        example: "24ifsmvkjbyhk"
2465      Version:
2466        $ref: "#/definitions/ObjectVersion"
2467      CreatedAt:
2468        description: |
2469          Date and time at which the node was added to the swarm in
2470          [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
2471        type: "string"
2472        format: "dateTime"
2473        example: "2016-08-18T10:44:24.496525531Z"
2474      UpdatedAt:
2475        description: |
2476          Date and time at which the node was last updated in
2477          [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
2478        type: "string"
2479        format: "dateTime"
2480        example: "2017-08-09T07:09:37.632105588Z"
2481      Spec:
2482        $ref: "#/definitions/NodeSpec"
2483      Description:
2484        $ref: "#/definitions/NodeDescription"
2485      Status:
2486        $ref: "#/definitions/NodeStatus"
2487      ManagerStatus:
2488        $ref: "#/definitions/ManagerStatus"
2489
2490  NodeDescription:
2491    description: |
2492      NodeDescription encapsulates the properties of the Node as reported by the
2493      agent.
2494    type: "object"
2495    properties:
2496      Hostname:
2497        type: "string"
2498        example: "bf3067039e47"
2499      Platform:
2500        $ref: "#/definitions/Platform"
2501      Resources:
2502        $ref: "#/definitions/ResourceObject"
2503      Engine:
2504        $ref: "#/definitions/EngineDescription"
2505      TLSInfo:
2506        $ref: "#/definitions/TLSInfo"
2507
2508  Platform:
2509    description: |
2510      Platform represents the platform (Arch/OS).
2511    type: "object"
2512    properties:
2513      Architecture:
2514        description: |
2515          Architecture represents the hardware architecture (for example,
2516          `x86_64`).
2517        type: "string"
2518        example: "x86_64"
2519      OS:
2520        description: |
2521          OS represents the Operating System (for example, `linux` or `windows`).
2522        type: "string"
2523        example: "linux"
2524
2525  EngineDescription:
2526    description: "EngineDescription provides information about an engine."
2527    type: "object"
2528    properties:
2529      EngineVersion:
2530        type: "string"
2531        example: "17.06.0"
2532      Labels:
2533        type: "object"
2534        additionalProperties:
2535          type: "string"
2536        example:
2537          foo: "bar"
2538      Plugins:
2539        type: "array"
2540        items:
2541          type: "object"
2542          properties:
2543            Type:
2544              type: "string"
2545            Name:
2546              type: "string"
2547        example:
2548          - Type: "Log"
2549            Name: "awslogs"
2550          - Type: "Log"
2551            Name: "fluentd"
2552          - Type: "Log"
2553            Name: "gcplogs"
2554          - Type: "Log"
2555            Name: "gelf"
2556          - Type: "Log"
2557            Name: "journald"
2558          - Type: "Log"
2559            Name: "json-file"
2560          - Type: "Log"
2561            Name: "logentries"
2562          - Type: "Log"
2563            Name: "splunk"
2564          - Type: "Log"
2565            Name: "syslog"
2566          - Type: "Network"
2567            Name: "bridge"
2568          - Type: "Network"
2569            Name: "host"
2570          - Type: "Network"
2571            Name: "ipvlan"
2572          - Type: "Network"
2573            Name: "macvlan"
2574          - Type: "Network"
2575            Name: "null"
2576          - Type: "Network"
2577            Name: "overlay"
2578          - Type: "Volume"
2579            Name: "local"
2580          - Type: "Volume"
2581            Name: "localhost:5000/vieux/sshfs:latest"
2582          - Type: "Volume"
2583            Name: "vieux/sshfs:latest"
2584
2585  TLSInfo:
2586    description: |
2587      Information about the issuer of leaf TLS certificates and the trusted root
2588      CA certificate.
2589    type: "object"
2590    properties:
2591      TrustRoot:
2592        description: |
2593          The root CA certificate(s) that are used to validate leaf TLS
2594          certificates.
2595        type: "string"
2596      CertIssuerSubject:
2597        description:
2598          The base64-url-safe-encoded raw subject bytes of the issuer.
2599        type: "string"
2600      CertIssuerPublicKey:
2601        description: |
2602          The base64-url-safe-encoded raw public key bytes of the issuer.
2603        type: "string"
2604    example:
2605      TrustRoot: |
2606        -----BEGIN CERTIFICATE-----
2607        MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw
2608        EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0
2609        MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH
2610        A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf
2611        3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB
2612        Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO
2613        PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz
2614        pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H
2615        -----END CERTIFICATE-----
2616      CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh"
2617      CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A=="
2618
2619  NodeStatus:
2620    description: |
2621      NodeStatus represents the status of a node.
2622
2623      It provides the current status of the node, as seen by the manager.
2624    type: "object"
2625    properties:
2626      State:
2627        $ref: "#/definitions/NodeState"
2628      Message:
2629        type: "string"
2630        example: ""
2631      Addr:
2632        description: "IP address of the node."
2633        type: "string"
2634        example: "172.17.0.2"
2635
2636  NodeState:
2637    description: "NodeState represents the state of a node."
2638    type: "string"
2639    enum:
2640      - "unknown"
2641      - "down"
2642      - "ready"
2643      - "disconnected"
2644    example: "ready"
2645
2646  ManagerStatus:
2647    description: |
2648      ManagerStatus represents the status of a manager.
2649
2650      It provides the current status of a node's manager component, if the node
2651      is a manager.
2652    x-nullable: true
2653    type: "object"
2654    properties:
2655      Leader:
2656        type: "boolean"
2657        default: false
2658        example: true
2659      Reachability:
2660        $ref: "#/definitions/Reachability"
2661      Addr:
2662        description: |
2663          The IP address and port at which the manager is reachable.
2664        type: "string"
2665        example: "10.0.0.46:2377"
2666
2667  Reachability:
2668    description: "Reachability represents the reachability of a node."
2669    type: "string"
2670    enum:
2671      - "unknown"
2672      - "unreachable"
2673      - "reachable"
2674    example: "reachable"
2675
2676  SwarmSpec:
2677    description: "User modifiable swarm configuration."
2678    type: "object"
2679    properties:
2680      Name:
2681        description: "Name of the swarm."
2682        type: "string"
2683        example: "default"
2684      Labels:
2685        description: "User-defined key/value metadata."
2686        type: "object"
2687        additionalProperties:
2688          type: "string"
2689        example:
2690          com.example.corp.type: "production"
2691          com.example.corp.department: "engineering"
2692      Orchestration:
2693        description: "Orchestration configuration."
2694        type: "object"
2695        x-nullable: true
2696        properties:
2697          TaskHistoryRetentionLimit:
2698            description: |
2699              The number of historic tasks to keep per instance or node. If
2700              negative, never remove completed or failed tasks.
2701            type: "integer"
2702            format: "int64"
2703            example: 10
2704      Raft:
2705        description: "Raft configuration."
2706        type: "object"
2707        properties:
2708          SnapshotInterval:
2709            description: "The number of log entries between snapshots."
2710            type: "integer"
2711            format: "uint64"
2712            example: 10000
2713          KeepOldSnapshots:
2714            description: |
2715              The number of snapshots to keep beyond the current snapshot.
2716            type: "integer"
2717            format: "uint64"
2718          LogEntriesForSlowFollowers:
2719            description: |
2720              The number of log entries to keep around to sync up slow followers
2721              after a snapshot is created.
2722            type: "integer"
2723            format: "uint64"
2724            example: 500
2725          ElectionTick:
2726            description: |
2727              The number of ticks that a follower will wait for a message from
2728              the leader before becoming a candidate and starting an election.
2729              `ElectionTick` must be greater than `HeartbeatTick`.
2730
2731              A tick currently defaults to one second, so these translate
2732              directly to seconds currently, but this is NOT guaranteed.
2733            type: "integer"
2734            example: 3
2735          HeartbeatTick:
2736            description: |
2737              The number of ticks between heartbeats. Every HeartbeatTick ticks,
2738              the leader will send a heartbeat to the followers.
2739
2740              A tick currently defaults to one second, so these translate
2741              directly to seconds currently, but this is NOT guaranteed.
2742            type: "integer"
2743            example: 1
2744      Dispatcher:
2745        description: "Dispatcher configuration."
2746        type: "object"
2747        x-nullable: true
2748        properties:
2749          HeartbeatPeriod:
2750            description: |
2751              The delay for an agent to send a heartbeat to the dispatcher.
2752            type: "integer"
2753            format: "int64"
2754            example: 5000000000
2755      CAConfig:
2756        description: "CA configuration."
2757        type: "object"
2758        x-nullable: true
2759        properties:
2760          NodeCertExpiry:
2761            description: "The duration node certificates are issued for."
2762            type: "integer"
2763            format: "int64"
2764            example: 7776000000000000
2765          ExternalCAs:
2766            description: |
2767              Configuration for forwarding signing requests to an external
2768              certificate authority.
2769            type: "array"
2770            items:
2771              type: "object"
2772              properties:
2773                Protocol:
2774                  description: |
2775                    Protocol for communication with the external CA (currently
2776                    only `cfssl` is supported).
2777                  type: "string"
2778                  enum:
2779                    - "cfssl"
2780                  default: "cfssl"
2781                URL:
2782                  description: |
2783                    URL where certificate signing requests should be sent.
2784                  type: "string"
2785                Options:
2786                  description: |
2787                    An object with key/value pairs that are interpreted as
2788                    protocol-specific options for the external CA driver.
2789                  type: "object"
2790                  additionalProperties:
2791                    type: "string"
2792                CACert:
2793                  description: |
2794                    The root CA certificate (in PEM format) this external CA uses
2795                    to issue TLS certificates (assumed to be to the current swarm
2796                    root CA certificate if not provided).
2797                  type: "string"
2798          SigningCACert:
2799            description: |
2800              The desired signing CA certificate for all swarm node TLS leaf
2801              certificates, in PEM format.
2802            type: "string"
2803          SigningCAKey:
2804            description: |
2805              The desired signing CA key for all swarm node TLS leaf certificates,
2806              in PEM format.
2807            type: "string"
2808          ForceRotate:
2809            description: |
2810              An integer whose purpose is to force swarm to generate a new
2811              signing CA certificate and key, if none have been specified in
2812              `SigningCACert` and `SigningCAKey`
2813            format: "uint64"
2814            type: "integer"
2815      EncryptionConfig:
2816        description: "Parameters related to encryption-at-rest."
2817        type: "object"
2818        properties:
2819          AutoLockManagers:
2820            description: |
2821              If set, generate a key and use it to lock data stored on the
2822              managers.
2823            type: "boolean"
2824            example: false
2825      TaskDefaults:
2826        description: "Defaults for creating tasks in this cluster."
2827        type: "object"
2828        properties:
2829          LogDriver:
2830            description: |
2831              The log driver to use for tasks created in the orchestrator if
2832              unspecified by a service.
2833
2834              Updating this value only affects new tasks. Existing tasks continue
2835              to use their previously configured log driver until recreated.
2836            type: "object"
2837            properties:
2838              Name:
2839                description: |
2840                  The log driver to use as a default for new tasks.
2841                type: "string"
2842                example: "json-file"
2843              Options:
2844                description: |
2845                  Driver-specific options for the selectd log driver, specified
2846                  as key/value pairs.
2847                type: "object"
2848                additionalProperties:
2849                  type: "string"
2850                example:
2851                  "max-file": "10"
2852                  "max-size": "100m"
2853
2854  # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but
2855  # without `JoinTokens`.
2856  ClusterInfo:
2857    description: |
2858      ClusterInfo represents information about the swarm as is returned by the
2859      "/info" endpoint. Join-tokens are not included.
2860    x-nullable: true
2861    type: "object"
2862    properties:
2863      ID:
2864        description: "The ID of the swarm."
2865        type: "string"
2866        example: "abajmipo7b4xz5ip2nrla6b11"
2867      Version:
2868        $ref: "#/definitions/ObjectVersion"
2869      CreatedAt:
2870        description: |
2871          Date and time at which the swarm was initialised in
2872          [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
2873        type: "string"
2874        format: "dateTime"
2875        example: "2016-08-18T10:44:24.496525531Z"
2876      UpdatedAt:
2877        description: |
2878          Date and time at which the swarm was last updated in
2879          [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
2880        type: "string"
2881        format: "dateTime"
2882        example: "2017-08-09T07:09:37.632105588Z"
2883      Spec:
2884        $ref: "#/definitions/SwarmSpec"
2885      TLSInfo:
2886        $ref: "#/definitions/TLSInfo"
2887      RootRotationInProgress:
2888        description: |
2889          Whether there is currently a root CA rotation in progress for the swarm
2890        type: "boolean"
2891        example: false
2892      DataPathPort:
2893        description: |
2894          DataPathPort specifies the data path port number for data traffic.
2895          Acceptable port range is 1024 to 49151.
2896          If no port is set or is set to 0, the default port (4789) is used.
2897        type: "integer"
2898        format: "uint32"
2899        default: 4789
2900        example: 4789
2901      DefaultAddrPool:
2902        description: |
2903          Default Address Pool specifies default subnet pools for global scope
2904          networks.
2905        type: "array"
2906        items:
2907          type: "string"
2908          format: "CIDR"
2909          example: ["10.10.0.0/16", "20.20.0.0/16"]
2910      SubnetSize:
2911        description: |
2912          SubnetSize specifies the subnet size of the networks created from the
2913          default subnet pool.
2914        type: "integer"
2915        format: "uint32"
2916        maximum: 29
2917        default: 24
2918        example: 24
2919
2920  JoinTokens:
2921    description: |
2922      JoinTokens contains the tokens workers and managers need to join the swarm.
2923    type: "object"
2924    properties:
2925      Worker:
2926        description: |
2927          The token workers can use to join the swarm.
2928        type: "string"
2929        example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx"
2930      Manager:
2931        description: |
2932          The token managers can use to join the swarm.
2933        type: "string"
2934        example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2"
2935
2936  Swarm:
2937    type: "object"
2938    allOf:
2939      - $ref: "#/definitions/ClusterInfo"
2940      - type: "object"
2941        properties:
2942          JoinTokens:
2943            $ref: "#/definitions/JoinTokens"
2944
2945  TaskSpec:
2946    description: "User modifiable task configuration."
2947    type: "object"
2948    properties:
2949      PluginSpec:
2950        type: "object"
2951        description: |
2952          Plugin spec for the service.  *(Experimental release only.)*
2953
2954          <p><br /></p>
2955
2956          > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
2957          > mutually exclusive. PluginSpec is only used when the Runtime field
2958          > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime
2959          > field is set to `attachment`.
2960        properties:
2961          Name:
2962            description: "The name or 'alias' to use for the plugin."
2963            type: "string"
2964          Remote:
2965            description: "The plugin image reference to use."
2966            type: "string"
2967          Disabled:
2968            description: "Disable the plugin once scheduled."
2969            type: "boolean"
2970          PluginPrivilege:
2971            type: "array"
2972            items:
2973              description: |
2974                Describes a permission accepted by the user upon installing the
2975                plugin.
2976              type: "object"
2977              properties:
2978                Name:
2979                  type: "string"
2980                Description:
2981                  type: "string"
2982                Value:
2983                  type: "array"
2984                  items:
2985                    type: "string"
2986      ContainerSpec:
2987        type: "object"
2988        description: |
2989          Container spec for the service.
2990
2991          <p><br /></p>
2992
2993          > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
2994          > mutually exclusive. PluginSpec is only used when the Runtime field
2995          > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime
2996          > field is set to `attachment`.
2997        properties:
2998          Image:
2999            description: "The image name to use for the container"
3000            type: "string"
3001          Labels:
3002            description: "User-defined key/value data."
3003            type: "object"
3004            additionalProperties:
3005              type: "string"
3006          Command:
3007            description: "The command to be run in the image."
3008            type: "array"
3009            items:
3010              type: "string"
3011          Args:
3012            description: "Arguments to the command."
3013            type: "array"
3014            items:
3015              type: "string"
3016          Hostname:
3017            description: |
3018              The hostname to use for the container, as a valid
3019              [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname.
3020            type: "string"
3021          Env:
3022            description: |
3023              A list of environment variables in the form `VAR=value`.
3024            type: "array"
3025            items:
3026              type: "string"
3027          Dir:
3028            description: "The working directory for commands to run in."
3029            type: "string"
3030          User:
3031            description: "The user inside the container."
3032            type: "string"
3033          Groups:
3034            type: "array"
3035            description: |
3036              A list of additional groups that the container process will run as.
3037            items:
3038              type: "string"
3039          Privileges:
3040            type: "object"
3041            description: "Security options for the container"
3042            properties:
3043              CredentialSpec:
3044                type: "object"
3045                description: "CredentialSpec for managed service account (Windows only)"
3046                properties:
3047                  Config:
3048                    type: "string"
3049                    example: "0bt9dmxjvjiqermk6xrop3ekq"
3050                    description: |
3051                      Load credential spec from a Swarm Config with the given ID.
3052                      The specified config must also be present in the Configs
3053                      field with the Runtime property set.
3054
3055                      <p><br /></p>
3056
3057
3058                      > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`,
3059                      > and `CredentialSpec.Config` are mutually exclusive.
3060                  File:
3061                    type: "string"
3062                    example: "spec.json"
3063                    description: |
3064                      Load credential spec from this file. The file is read by
3065                      the daemon, and must be present in the `CredentialSpecs`
3066                      subdirectory in the docker data directory, which defaults
3067                      to `C:\ProgramData\Docker\` on Windows.
3068
3069                      For example, specifying `spec.json` loads
3070                      `C:\ProgramData\Docker\CredentialSpecs\spec.json`.
3071
3072                      <p><br /></p>
3073
3074                      > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`,
3075                      > and `CredentialSpec.Config` are mutually exclusive.
3076                  Registry:
3077                    type: "string"
3078                    description: |
3079                      Load credential spec from this value in the Windows
3080                      registry. The specified registry value must be located in:
3081
3082                      `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs`
3083
3084                      <p><br /></p>
3085
3086
3087                      > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`,
3088                      > and `CredentialSpec.Config` are mutually exclusive.
3089              SELinuxContext:
3090                type: "object"
3091                description: "SELinux labels of the container"
3092                properties:
3093                  Disable:
3094                    type: "boolean"
3095                    description: "Disable SELinux"
3096                  User:
3097                    type: "string"
3098                    description: "SELinux user label"
3099                  Role:
3100                    type: "string"
3101                    description: "SELinux role label"
3102                  Type:
3103                    type: "string"
3104                    description: "SELinux type label"
3105                  Level:
3106                    type: "string"
3107                    description: "SELinux level label"
3108          TTY:
3109            description: "Whether a pseudo-TTY should be allocated."
3110            type: "boolean"
3111          OpenStdin:
3112            description: "Open `stdin`"
3113            type: "boolean"
3114          ReadOnly:
3115            description: "Mount the container's root filesystem as read only."
3116            type: "boolean"
3117          Mounts:
3118            description: |
3119              Specification for mounts to be added to containers created as part
3120              of the service.
3121            type: "array"
3122            items:
3123              $ref: "#/definitions/Mount"
3124          StopSignal:
3125            description: "Signal to stop the container."
3126            type: "string"
3127          StopGracePeriod:
3128            description: |
3129              Amount of time to wait for the container to terminate before
3130              forcefully killing it.
3131            type: "integer"
3132            format: "int64"
3133          HealthCheck:
3134            $ref: "#/definitions/HealthConfig"
3135          Hosts:
3136            type: "array"
3137            description: |
3138              A list of hostname/IP mappings to add to the container's `hosts`
3139              file. The format of extra hosts is specified in the
3140              [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html)
3141              man page:
3142
3143                  IP_address canonical_hostname [aliases...]
3144            items:
3145              type: "string"
3146          DNSConfig:
3147            description: |
3148              Specification for DNS related configurations in resolver configuration
3149              file (`resolv.conf`).
3150            type: "object"
3151            properties:
3152              Nameservers:
3153                description: "The IP addresses of the name servers."
3154                type: "array"
3155                items:
3156                  type: "string"
3157              Search:
3158                description: "A search list for host-name lookup."
3159                type: "array"
3160                items:
3161                  type: "string"
3162              Options:
3163                description: |
3164                  A list of internal resolver variables to be modified (e.g.,
3165                  `debug`, `ndots:3`, etc.).
3166                type: "array"
3167                items:
3168                  type: "string"
3169          Secrets:
3170            description: |
3171              Secrets contains references to zero or more secrets that will be
3172              exposed to the service.
3173            type: "array"
3174            items:
3175              type: "object"
3176              properties:
3177                File:
3178                  description: |
3179                    File represents a specific target that is backed by a file.
3180                  type: "object"
3181                  properties:
3182                    Name:
3183                      description: |
3184                        Name represents the final filename in the filesystem.
3185                      type: "string"
3186                    UID:
3187                      description: "UID represents the file UID."
3188                      type: "string"
3189                    GID:
3190                      description: "GID represents the file GID."
3191                      type: "string"
3192                    Mode:
3193                      description: "Mode represents the FileMode of the file."
3194                      type: "integer"
3195                      format: "uint32"
3196                SecretID:
3197                  description: |
3198                    SecretID represents the ID of the specific secret that we're
3199                    referencing.
3200                  type: "string"
3201                SecretName:
3202                  description: |
3203                    SecretName is the name of the secret that this references,
3204                    but this is just provided for lookup/display purposes. The
3205                    secret in the reference will be identified by its ID.
3206                  type: "string"
3207          Configs:
3208            description: |
3209              Configs contains references to zero or more configs that will be
3210              exposed to the service.
3211            type: "array"
3212            items:
3213              type: "object"
3214              properties:
3215                File:
3216                  description: |
3217                    File represents a specific target that is backed by a file.
3218
3219                    <p><br /><p>
3220
3221                    > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive
3222                  type: "object"
3223                  properties:
3224                    Name:
3225                      description: |
3226                        Name represents the final filename in the filesystem.
3227                      type: "string"
3228                    UID:
3229                      description: "UID represents the file UID."
3230                      type: "string"
3231                    GID:
3232                      description: "GID represents the file GID."
3233                      type: "string"
3234                    Mode:
3235                      description: "Mode represents the FileMode of the file."
3236                      type: "integer"
3237                      format: "uint32"
3238                Runtime:
3239                  description: |
3240                    Runtime represents a target that is not mounted into the
3241                    container but is used by the task
3242
3243                    <p><br /><p>
3244
3245                    > **Note**: `Configs.File` and `Configs.Runtime` are mutually
3246                    > exclusive
3247                  type: "object"
3248                ConfigID:
3249                  description: |
3250                    ConfigID represents the ID of the specific config that we're
3251                    referencing.
3252                  type: "string"
3253                ConfigName:
3254                  description: |
3255                    ConfigName is the name of the config that this references,
3256                    but this is just provided for lookup/display purposes. The
3257                    config in the reference will be identified by its ID.
3258                  type: "string"
3259          Isolation:
3260            type: "string"
3261            description: |
3262              Isolation technology of the containers running the service.
3263              (Windows only)
3264            enum:
3265              - "default"
3266              - "process"
3267              - "hyperv"
3268          Init:
3269            description: |
3270              Run an init inside the container that forwards signals and reaps
3271              processes. This field is omitted if empty, and the default (as
3272              configured on the daemon) is used.
3273            type: "boolean"
3274            x-nullable: true
3275          Sysctls:
3276            description: |
3277              Set kernel namedspaced parameters (sysctls) in the container.
3278              The Sysctls option on services accepts the same sysctls as the
3279              are supported on containers. Note that while the same sysctls are
3280              supported, no guarantees or checks are made about their
3281              suitability for a clustered environment, and it's up to the user
3282              to determine whether a given sysctl will work properly in a
3283              Service.
3284            type: "object"
3285            additionalProperties:
3286              type: "string"
3287          # This option is not used by Windows containers
3288          CapabilityAdd:
3289            type: "array"
3290            description: |
3291              A list of kernel capabilities to add to the default set
3292              for the container.
3293            items:
3294              type: "string"
3295            example:
3296              - "CAP_NET_RAW"
3297              - "CAP_SYS_ADMIN"
3298              - "CAP_SYS_CHROOT"
3299              - "CAP_SYSLOG"
3300          CapabilityDrop:
3301            type: "array"
3302            description: |
3303              A list of kernel capabilities to drop from the default set
3304              for the container.
3305            items:
3306              type: "string"
3307            example:
3308              - "CAP_NET_RAW"
3309          Ulimits:
3310            description: |
3311              A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`"
3312            type: "array"
3313            items:
3314              type: "object"
3315              properties:
3316                Name:
3317                  description: "Name of ulimit"
3318                  type: "string"
3319                Soft:
3320                  description: "Soft limit"
3321                  type: "integer"
3322                Hard:
3323                  description: "Hard limit"
3324                  type: "integer"
3325      NetworkAttachmentSpec:
3326        description: |
3327          Read-only spec type for non-swarm containers attached to swarm overlay
3328          networks.
3329
3330          <p><br /></p>
3331
3332          > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
3333          > mutually exclusive. PluginSpec is only used when the Runtime field
3334          > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime
3335          > field is set to `attachment`.
3336        type: "object"
3337        properties:
3338          ContainerID:
3339            description: "ID of the container represented by this task"
3340            type: "string"
3341      Resources:
3342        description: |
3343          Resource requirements which apply to each individual container created
3344          as part of the service.
3345        type: "object"
3346        properties:
3347          Limits:
3348            description: "Define resources limits."
3349            $ref: "#/definitions/Limit"
3350          Reservation:
3351            description: "Define resources reservation."
3352            $ref: "#/definitions/ResourceObject"
3353      RestartPolicy:
3354        description: |
3355          Specification for the restart policy which applies to containers
3356          created as part of this service.
3357        type: "object"
3358        properties:
3359          Condition:
3360            description: "Condition for restart."
3361            type: "string"
3362            enum:
3363              - "none"
3364              - "on-failure"
3365              - "any"
3366          Delay:
3367            description: "Delay between restart attempts."
3368            type: "integer"
3369            format: "int64"
3370          MaxAttempts:
3371            description: |
3372              Maximum attempts to restart a given container before giving up
3373              (default value is 0, which is ignored).
3374            type: "integer"
3375            format: "int64"
3376            default: 0
3377          Window:
3378            description: |
3379              Windows is the time window used to evaluate the restart policy
3380              (default value is 0, which is unbounded).
3381            type: "integer"
3382            format: "int64"
3383            default: 0
3384      Placement:
3385        type: "object"
3386        properties:
3387          Constraints:
3388            description: |
3389              An array of constraint expressions to limit the set of nodes where
3390              a task can be scheduled. Constraint expressions can either use a
3391              _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find
3392              nodes that satisfy every expression (AND match). Constraints can
3393              match node or Docker Engine labels as follows:
3394
3395              node attribute       | matches                        | example
3396              ---------------------|--------------------------------|-----------------------------------------------
3397              `node.id`            | Node ID                        | `node.id==2ivku8v2gvtg4`
3398              `node.hostname`      | Node hostname                  | `node.hostname!=node-2`
3399              `node.role`          | Node role (`manager`/`worker`) | `node.role==manager`
3400              `node.platform.os`   | Node operating system          | `node.platform.os==windows`
3401              `node.platform.arch` | Node architecture              | `node.platform.arch==x86_64`
3402              `node.labels`        | User-defined node labels       | `node.labels.security==high`
3403              `engine.labels`      | Docker Engine's labels         | `engine.labels.operatingsystem==ubuntu-14.04`
3404
3405              `engine.labels` apply to Docker Engine labels like operating system,
3406              drivers, etc. Swarm administrators add `node.labels` for operational
3407              purposes by using the [`node update endpoint`](#operation/NodeUpdate).
3408
3409            type: "array"
3410            items:
3411              type: "string"
3412            example:
3413              - "node.hostname!=node3.corp.example.com"
3414              - "node.role!=manager"
3415              - "node.labels.type==production"
3416              - "node.platform.os==linux"
3417              - "node.platform.arch==x86_64"
3418          Preferences:
3419            description: |
3420              Preferences provide a way to make the scheduler aware of factors
3421              such as topology. They are provided in order from highest to
3422              lowest precedence.
3423            type: "array"
3424            items:
3425              type: "object"
3426              properties:
3427                Spread:
3428                  type: "object"
3429                  properties:
3430                    SpreadDescriptor:
3431                      description: |
3432                        label descriptor, such as `engine.labels.az`.
3433                      type: "string"
3434            example:
3435              - Spread:
3436                  SpreadDescriptor: "node.labels.datacenter"
3437              - Spread:
3438                  SpreadDescriptor: "node.labels.rack"
3439          MaxReplicas:
3440            description: |
3441              Maximum number of replicas for per node (default value is 0, which
3442              is unlimited)
3443            type: "integer"
3444            format: "int64"
3445            default: 0
3446          Platforms:
3447            description: |
3448              Platforms stores all the platforms that the service's image can
3449              run on. This field is used in the platform filter for scheduling.
3450              If empty, then the platform filter is off, meaning there are no
3451              scheduling restrictions.
3452            type: "array"
3453            items:
3454              $ref: "#/definitions/Platform"
3455      ForceUpdate:
3456        description: |
3457          A counter that triggers an update even if no relevant parameters have
3458          been changed.
3459        type: "integer"
3460      Runtime:
3461        description: |
3462          Runtime is the type of runtime specified for the task executor.
3463        type: "string"
3464      Networks:
3465        description: "Specifies which networks the service should attach to."
3466        type: "array"
3467        items:
3468          $ref: "#/definitions/NetworkAttachmentConfig"
3469      LogDriver:
3470        description: |
3471          Specifies the log driver to use for tasks created from this spec. If
3472          not present, the default one for the swarm will be used, finally
3473          falling back to the engine default if not specified.
3474        type: "object"
3475        properties:
3476          Name:
3477            type: "string"
3478          Options:
3479            type: "object"
3480            additionalProperties:
3481              type: "string"
3482
3483  TaskState:
3484    type: "string"
3485    enum:
3486      - "new"
3487      - "allocated"
3488      - "pending"
3489      - "assigned"
3490      - "accepted"
3491      - "preparing"
3492      - "ready"
3493      - "starting"
3494      - "running"
3495      - "complete"
3496      - "shutdown"
3497      - "failed"
3498      - "rejected"
3499      - "remove"
3500      - "orphaned"
3501
3502  Task:
3503    type: "object"
3504    properties:
3505      ID:
3506        description: "The ID of the task."
3507        type: "string"
3508      Version:
3509        $ref: "#/definitions/ObjectVersion"
3510      CreatedAt:
3511        type: "string"
3512        format: "dateTime"
3513      UpdatedAt:
3514        type: "string"
3515        format: "dateTime"
3516      Name:
3517        description: "Name of the task."
3518        type: "string"
3519      Labels:
3520        description: "User-defined key/value metadata."
3521        type: "object"
3522        additionalProperties:
3523          type: "string"
3524      Spec:
3525        $ref: "#/definitions/TaskSpec"
3526      ServiceID:
3527        description: "The ID of the service this task is part of."
3528        type: "string"
3529      Slot:
3530        type: "integer"
3531      NodeID:
3532        description: "The ID of the node that this task is on."
3533        type: "string"
3534      AssignedGenericResources:
3535        $ref: "#/definitions/GenericResources"
3536      Status:
3537        type: "object"
3538        properties:
3539          Timestamp:
3540            type: "string"
3541            format: "dateTime"
3542          State:
3543            $ref: "#/definitions/TaskState"
3544          Message:
3545            type: "string"
3546          Err:
3547            type: "string"
3548          ContainerStatus:
3549            type: "object"
3550            properties:
3551              ContainerID:
3552                type: "string"
3553              PID:
3554                type: "integer"
3555              ExitCode:
3556                type: "integer"
3557      DesiredState:
3558        $ref: "#/definitions/TaskState"
3559      JobIteration:
3560        description: |
3561          If the Service this Task belongs to is a job-mode service, contains
3562          the JobIteration of the Service this Task was created for. Absent if
3563          the Task was created for a Replicated or Global Service.
3564        $ref: "#/definitions/ObjectVersion"
3565    example:
3566      ID: "0kzzo1i0y4jz6027t0k7aezc7"
3567      Version:
3568        Index: 71
3569      CreatedAt: "2016-06-07T21:07:31.171892745Z"
3570      UpdatedAt: "2016-06-07T21:07:31.376370513Z"
3571      Spec:
3572        ContainerSpec:
3573          Image: "redis"
3574        Resources:
3575          Limits: {}
3576          Reservations: {}
3577        RestartPolicy:
3578          Condition: "any"
3579          MaxAttempts: 0
3580        Placement: {}
3581      ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
3582      Slot: 1
3583      NodeID: "60gvrl6tm78dmak4yl7srz94v"
3584      Status:
3585        Timestamp: "2016-06-07T21:07:31.290032978Z"
3586        State: "running"
3587        Message: "started"
3588        ContainerStatus:
3589          ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035"
3590          PID: 677
3591      DesiredState: "running"
3592      NetworksAttachments:
3593        - Network:
3594            ID: "4qvuz4ko70xaltuqbt8956gd1"
3595            Version:
3596              Index: 18
3597            CreatedAt: "2016-06-07T20:31:11.912919752Z"
3598            UpdatedAt: "2016-06-07T21:07:29.955277358Z"
3599            Spec:
3600              Name: "ingress"
3601              Labels:
3602                com.docker.swarm.internal: "true"
3603              DriverConfiguration: {}
3604              IPAMOptions:
3605                Driver: {}
3606                Configs:
3607                  - Subnet: "10.255.0.0/16"
3608                    Gateway: "10.255.0.1"
3609            DriverState:
3610              Name: "overlay"
3611              Options:
3612                com.docker.network.driver.overlay.vxlanid_list: "256"
3613            IPAMOptions:
3614              Driver:
3615                Name: "default"
3616              Configs:
3617                - Subnet: "10.255.0.0/16"
3618                  Gateway: "10.255.0.1"
3619          Addresses:
3620            - "10.255.0.10/16"
3621      AssignedGenericResources:
3622        - DiscreteResourceSpec:
3623            Kind: "SSD"
3624            Value: 3
3625        - NamedResourceSpec:
3626            Kind: "GPU"
3627            Value: "UUID1"
3628        - NamedResourceSpec:
3629            Kind: "GPU"
3630            Value: "UUID2"
3631
3632  ServiceSpec:
3633    description: "User modifiable configuration for a service."
3634    properties:
3635      Name:
3636        description: "Name of the service."
3637        type: "string"
3638      Labels:
3639        description: "User-defined key/value metadata."
3640        type: "object"
3641        additionalProperties:
3642          type: "string"
3643      TaskTemplate:
3644        $ref: "#/definitions/TaskSpec"
3645      Mode:
3646        description: "Scheduling mode for the service."
3647        type: "object"
3648        properties:
3649          Replicated:
3650            type: "object"
3651            properties:
3652              Replicas:
3653                type: "integer"
3654                format: "int64"
3655          Global:
3656            type: "object"
3657          ReplicatedJob:
3658            description: |
3659              The mode used for services with a finite number of tasks that run
3660              to a completed state.
3661            type: "object"
3662            properties:
3663              MaxConcurrent:
3664                description: |
3665                  The maximum number of replicas to run simultaneously.
3666                type: "integer"
3667                format: "int64"
3668                default: 1
3669              TotalCompletions:
3670                description: |
3671                  The total number of replicas desired to reach the Completed
3672                  state. If unset, will default to the value of `MaxConcurrent`
3673                type: "integer"
3674                format: "int64"
3675          GlobalJob:
3676            description: |
3677              The mode used for services which run a task to the completed state
3678              on each valid node.
3679            type: "object"
3680      UpdateConfig:
3681        description: "Specification for the update strategy of the service."
3682        type: "object"
3683        properties:
3684          Parallelism:
3685            description: |
3686              Maximum number of tasks to be updated in one iteration (0 means
3687              unlimited parallelism).
3688            type: "integer"
3689            format: "int64"
3690          Delay:
3691            description: "Amount of time between updates, in nanoseconds."
3692            type: "integer"
3693            format: "int64"
3694          FailureAction:
3695            description: |
3696              Action to take if an updated task fails to run, or stops running
3697              during the update.
3698            type: "string"
3699            enum:
3700              - "continue"
3701              - "pause"
3702              - "rollback"
3703          Monitor:
3704            description: |
3705              Amount of time to monitor each updated task for failures, in
3706              nanoseconds.
3707            type: "integer"
3708            format: "int64"
3709          MaxFailureRatio:
3710            description: |
3711              The fraction of tasks that may fail during an update before the
3712              failure action is invoked, specified as a floating point number
3713              between 0 and 1.
3714            type: "number"
3715            default: 0
3716          Order:
3717            description: |
3718              The order of operations when rolling out an updated task. Either
3719              the old task is shut down before the new task is started, or the
3720              new task is started before the old task is shut down.
3721            type: "string"
3722            enum:
3723              - "stop-first"
3724              - "start-first"
3725      RollbackConfig:
3726        description: "Specification for the rollback strategy of the service."
3727        type: "object"
3728        properties:
3729          Parallelism:
3730            description: |
3731              Maximum number of tasks to be rolled back in one iteration (0 means
3732              unlimited parallelism).
3733            type: "integer"
3734            format: "int64"
3735          Delay:
3736            description: |
3737              Amount of time between rollback iterations, in nanoseconds.
3738            type: "integer"
3739            format: "int64"
3740          FailureAction:
3741            description: |
3742              Action to take if an rolled back task fails to run, or stops
3743              running during the rollback.
3744            type: "string"
3745            enum:
3746              - "continue"
3747              - "pause"
3748          Monitor:
3749            description: |
3750              Amount of time to monitor each rolled back task for failures, in
3751              nanoseconds.
3752            type: "integer"
3753            format: "int64"
3754          MaxFailureRatio:
3755            description: |
3756              The fraction of tasks that may fail during a rollback before the
3757              failure action is invoked, specified as a floating point number
3758              between 0 and 1.
3759            type: "number"
3760            default: 0
3761          Order:
3762            description: |
3763              The order of operations when rolling back a task. Either the old
3764              task is shut down before the new task is started, or the new task
3765              is started before the old task is shut down.
3766            type: "string"
3767            enum:
3768              - "stop-first"
3769              - "start-first"
3770      Networks:
3771        description: "Specifies which networks the service should attach to."
3772        type: "array"
3773        items:
3774          $ref: "#/definitions/NetworkAttachmentConfig"
3775
3776      EndpointSpec:
3777        $ref: "#/definitions/EndpointSpec"
3778
3779  EndpointPortConfig:
3780    type: "object"
3781    properties:
3782      Name:
3783        type: "string"
3784      Protocol:
3785        type: "string"
3786        enum:
3787          - "tcp"
3788          - "udp"
3789          - "sctp"
3790      TargetPort:
3791        description: "The port inside the container."
3792        type: "integer"
3793      PublishedPort:
3794        description: "The port on the swarm hosts."
3795        type: "integer"
3796      PublishMode:
3797        description: |
3798          The mode in which port is published.
3799
3800          <p><br /></p>
3801
3802          - "ingress" makes the target port accessible on every node,
3803            regardless of whether there is a task for the service running on
3804            that node or not.
3805          - "host" bypasses the routing mesh and publish the port directly on
3806            the swarm node where that service is running.
3807
3808        type: "string"
3809        enum:
3810          - "ingress"
3811          - "host"
3812        default: "ingress"
3813        example: "ingress"
3814
3815  EndpointSpec:
3816    description: "Properties that can be configured to access and load balance a service."
3817    type: "object"
3818    properties:
3819      Mode:
3820        description: |
3821          The mode of resolution to use for internal load balancing between tasks.
3822        type: "string"
3823        enum:
3824          - "vip"
3825          - "dnsrr"
3826        default: "vip"
3827      Ports:
3828        description: |
3829          List of exposed ports that this service is accessible on from the
3830          outside. Ports can only be provided if `vip` resolution mode is used.
3831        type: "array"
3832        items:
3833          $ref: "#/definitions/EndpointPortConfig"
3834
3835  Service:
3836    type: "object"
3837    properties:
3838      ID:
3839        type: "string"
3840      Version:
3841        $ref: "#/definitions/ObjectVersion"
3842      CreatedAt:
3843        type: "string"
3844        format: "dateTime"
3845      UpdatedAt:
3846        type: "string"
3847        format: "dateTime"
3848      Spec:
3849        $ref: "#/definitions/ServiceSpec"
3850      Endpoint:
3851        type: "object"
3852        properties:
3853          Spec:
3854            $ref: "#/definitions/EndpointSpec"
3855          Ports:
3856            type: "array"
3857            items:
3858              $ref: "#/definitions/EndpointPortConfig"
3859          VirtualIPs:
3860            type: "array"
3861            items:
3862              type: "object"
3863              properties:
3864                NetworkID:
3865                  type: "string"
3866                Addr:
3867                  type: "string"
3868      UpdateStatus:
3869        description: "The status of a service update."
3870        type: "object"
3871        properties:
3872          State:
3873            type: "string"
3874            enum:
3875              - "updating"
3876              - "paused"
3877              - "completed"
3878          StartedAt:
3879            type: "string"
3880            format: "dateTime"
3881          CompletedAt:
3882            type: "string"
3883            format: "dateTime"
3884          Message:
3885            type: "string"
3886      ServiceStatus:
3887        description: |
3888          The status of the service's tasks. Provided only when requested as
3889          part of a ServiceList operation.
3890        type: "object"
3891        properties:
3892          RunningTasks:
3893            description: |
3894              The number of tasks for the service currently in the Running state.
3895            type: "integer"
3896            format: "uint64"
3897            example: 7
3898          DesiredTasks:
3899            description: |
3900              The number of tasks for the service desired to be running.
3901              For replicated services, this is the replica count from the
3902              service spec. For global services, this is computed by taking
3903              count of all tasks for the service with a Desired State other
3904              than Shutdown.
3905            type: "integer"
3906            format: "uint64"
3907            example: 10
3908          CompletedTasks:
3909            description: |
3910              The number of tasks for a job that are in the Completed state.
3911              This field must be cross-referenced with the service type, as the
3912              value of 0 may mean the service is not in a job mode, or it may
3913              mean the job-mode service has no tasks yet Completed.
3914            type: "integer"
3915            format: "uint64"
3916      JobStatus:
3917        description: |
3918          The status of the service when it is in one of ReplicatedJob or
3919          GlobalJob modes. Absent on Replicated and Global mode services. The
3920          JobIteration is an ObjectVersion, but unlike the Service's version,
3921          does not need to be sent with an update request.
3922        type: "object"
3923        properties:
3924          JobIteration:
3925            description: |
3926              JobIteration is a value increased each time a Job is executed,
3927              successfully or otherwise. "Executed", in this case, means the
3928              job as a whole has been started, not that an individual Task has
3929              been launched. A job is "Executed" when its ServiceSpec is
3930              updated. JobIteration can be used to disambiguate Tasks belonging
3931              to different executions of a job.  Though JobIteration will
3932              increase with each subsequent execution, it may not necessarily
3933              increase by 1, and so JobIteration should not be used to
3934            $ref: "#/definitions/ObjectVersion"
3935          LastExecution:
3936            description: |
3937              The last time, as observed by the server, that this job was
3938              started.
3939            type: "string"
3940            format: "dateTime"
3941    example:
3942      ID: "9mnpnzenvg8p8tdbtq4wvbkcz"
3943      Version:
3944        Index: 19
3945      CreatedAt: "2016-06-07T21:05:51.880065305Z"
3946      UpdatedAt: "2016-06-07T21:07:29.962229872Z"
3947      Spec:
3948        Name: "hopeful_cori"
3949        TaskTemplate:
3950          ContainerSpec:
3951            Image: "redis"
3952          Resources:
3953            Limits: {}
3954            Reservations: {}
3955          RestartPolicy:
3956            Condition: "any"
3957            MaxAttempts: 0
3958          Placement: {}
3959          ForceUpdate: 0
3960        Mode:
3961          Replicated:
3962            Replicas: 1
3963        UpdateConfig:
3964          Parallelism: 1
3965          Delay: 1000000000
3966          FailureAction: "pause"
3967          Monitor: 15000000000
3968          MaxFailureRatio: 0.15
3969        RollbackConfig:
3970          Parallelism: 1
3971          Delay: 1000000000
3972          FailureAction: "pause"
3973          Monitor: 15000000000
3974          MaxFailureRatio: 0.15
3975        EndpointSpec:
3976          Mode: "vip"
3977          Ports:
3978            -
3979              Protocol: "tcp"
3980              TargetPort: 6379
3981              PublishedPort: 30001
3982      Endpoint:
3983        Spec:
3984          Mode: "vip"
3985          Ports:
3986            -
3987              Protocol: "tcp"
3988              TargetPort: 6379
3989              PublishedPort: 30001
3990        Ports:
3991          -
3992            Protocol: "tcp"
3993            TargetPort: 6379
3994            PublishedPort: 30001
3995        VirtualIPs:
3996          -
3997            NetworkID: "4qvuz4ko70xaltuqbt8956gd1"
3998            Addr: "10.255.0.2/16"
3999          -
4000            NetworkID: "4qvuz4ko70xaltuqbt8956gd1"
4001            Addr: "10.255.0.3/16"
4002
4003  ImageDeleteResponseItem:
4004    type: "object"
4005    properties:
4006      Untagged:
4007        description: "The image ID of an image that was untagged"
4008        type: "string"
4009      Deleted:
4010        description: "The image ID of an image that was deleted"
4011        type: "string"
4012
4013  ServiceUpdateResponse:
4014    type: "object"
4015    properties:
4016      Warnings:
4017        description: "Optional warning messages"
4018        type: "array"
4019        items:
4020          type: "string"
4021    example:
4022      Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found"
4023
4024  ContainerSummary:
4025    type: "array"
4026    items:
4027      type: "object"
4028      properties:
4029        Id:
4030          description: "The ID of this container"
4031          type: "string"
4032          x-go-name: "ID"
4033        Names:
4034          description: "The names that this container has been given"
4035          type: "array"
4036          items:
4037            type: "string"
4038        Image:
4039          description: "The name of the image used when creating this container"
4040          type: "string"
4041        ImageID:
4042          description: "The ID of the image that this container was created from"
4043          type: "string"
4044        Command:
4045          description: "Command to run when starting the container"
4046          type: "string"
4047        Created:
4048          description: "When the container was created"
4049          type: "integer"
4050          format: "int64"
4051        Ports:
4052          description: "The ports exposed by this container"
4053          type: "array"
4054          items:
4055            $ref: "#/definitions/Port"
4056        SizeRw:
4057          description: "The size of files that have been created or changed by this container"
4058          type: "integer"
4059          format: "int64"
4060        SizeRootFs:
4061          description: "The total size of all the files in this container"
4062          type: "integer"
4063          format: "int64"
4064        Labels:
4065          description: "User-defined key/value metadata."
4066          type: "object"
4067          additionalProperties:
4068            type: "string"
4069        State:
4070          description: "The state of this container (e.g. `Exited`)"
4071          type: "string"
4072        Status:
4073          description: "Additional human-readable status of this container (e.g. `Exit 0`)"
4074          type: "string"
4075        HostConfig:
4076          type: "object"
4077          properties:
4078            NetworkMode:
4079              type: "string"
4080        NetworkSettings:
4081          description: "A summary of the container's network settings"
4082          type: "object"
4083          properties:
4084            Networks:
4085              type: "object"
4086              additionalProperties:
4087                $ref: "#/definitions/EndpointSettings"
4088        Mounts:
4089          type: "array"
4090          items:
4091            $ref: "#/definitions/Mount"
4092
4093  Driver:
4094    description: "Driver represents a driver (network, logging, secrets)."
4095    type: "object"
4096    required: [Name]
4097    properties:
4098      Name:
4099        description: "Name of the driver."
4100        type: "string"
4101        x-nullable: false
4102        example: "some-driver"
4103      Options:
4104        description: "Key/value map of driver-specific options."
4105        type: "object"
4106        x-nullable: false
4107        additionalProperties:
4108          type: "string"
4109        example:
4110          OptionA: "value for driver-specific option A"
4111          OptionB: "value for driver-specific option B"
4112
4113  SecretSpec:
4114    type: "object"
4115    properties:
4116      Name:
4117        description: "User-defined name of the secret."
4118        type: "string"
4119      Labels:
4120        description: "User-defined key/value metadata."
4121        type: "object"
4122        additionalProperties:
4123          type: "string"
4124        example:
4125          com.example.some-label: "some-value"
4126          com.example.some-other-label: "some-other-value"
4127      Data:
4128        description: |
4129          Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5))
4130          data to store as secret.
4131
4132          This field is only used to _create_ a secret, and is not returned by
4133          other endpoints.
4134        type: "string"
4135        example: ""
4136      Driver:
4137        description: |
4138          Name of the secrets driver used to fetch the secret's value from an
4139          external secret store.
4140        $ref: "#/definitions/Driver"
4141      Templating:
4142        description: |
4143          Templating driver, if applicable
4144
4145          Templating controls whether and how to evaluate the config payload as
4146          a template. If no driver is set, no templating is used.
4147        $ref: "#/definitions/Driver"
4148
4149  Secret:
4150    type: "object"
4151    properties:
4152      ID:
4153        type: "string"
4154        example: "blt1owaxmitz71s9v5zh81zun"
4155      Version:
4156        $ref: "#/definitions/ObjectVersion"
4157      CreatedAt:
4158        type: "string"
4159        format: "dateTime"
4160        example: "2017-07-20T13:55:28.678958722Z"
4161      UpdatedAt:
4162        type: "string"
4163        format: "dateTime"
4164        example: "2017-07-20T13:55:28.678958722Z"
4165      Spec:
4166        $ref: "#/definitions/SecretSpec"
4167
4168  ConfigSpec:
4169    type: "object"
4170    properties:
4171      Name:
4172        description: "User-defined name of the config."
4173        type: "string"
4174      Labels:
4175        description: "User-defined key/value metadata."
4176        type: "object"
4177        additionalProperties:
4178          type: "string"
4179      Data:
4180        description: |
4181          Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5))
4182          config data.
4183        type: "string"
4184      Templating:
4185        description: |
4186          Templating driver, if applicable
4187
4188          Templating controls whether and how to evaluate the config payload as
4189          a template. If no driver is set, no templating is used.
4190        $ref: "#/definitions/Driver"
4191
4192  Config:
4193    type: "object"
4194    properties:
4195      ID:
4196        type: "string"
4197      Version:
4198        $ref: "#/definitions/ObjectVersion"
4199      CreatedAt:
4200        type: "string"
4201        format: "dateTime"
4202      UpdatedAt:
4203        type: "string"
4204        format: "dateTime"
4205      Spec:
4206        $ref: "#/definitions/ConfigSpec"
4207
4208  ContainerState:
4209    description: |
4210      ContainerState stores container's running state. It's part of ContainerJSONBase
4211      and will be returned by the "inspect" command.
4212    type: "object"
4213    properties:
4214      Status:
4215        description: |
4216          String representation of the container state. Can be one of "created",
4217          "running", "paused", "restarting", "removing", "exited", or "dead".
4218        type: "string"
4219        enum: ["created", "running", "paused", "restarting", "removing", "exited", "dead"]
4220        example: "running"
4221      Running:
4222        description: |
4223          Whether this container is running.
4224
4225          Note that a running container can be _paused_. The `Running` and `Paused`
4226          booleans are not mutually exclusive:
4227
4228          When pausing a container (on Linux), the freezer cgroup is used to suspend
4229          all processes in the container. Freezing the process requires the process to
4230          be running. As a result, paused containers are both `Running` _and_ `Paused`.
4231
4232          Use the `Status` field instead to determine if a container's state is "running".
4233        type: "boolean"
4234        example: true
4235      Paused:
4236        description: "Whether this container is paused."
4237        type: "boolean"
4238        example: false
4239      Restarting:
4240        description: "Whether this container is restarting."
4241        type: "boolean"
4242        example: false
4243      OOMKilled:
4244        description: |
4245          Whether this container has been killed because it ran out of memory.
4246        type: "boolean"
4247        example: false
4248      Dead:
4249        type: "boolean"
4250        example: false
4251      Pid:
4252        description: "The process ID of this container"
4253        type: "integer"
4254        example: 1234
4255      ExitCode:
4256        description: "The last exit code of this container"
4257        type: "integer"
4258        example: 0
4259      Error:
4260        type: "string"
4261      StartedAt:
4262        description: "The time when this container was last started."
4263        type: "string"
4264        example: "2020-01-06T09:06:59.461876391Z"
4265      FinishedAt:
4266        description: "The time when this container last exited."
4267        type: "string"
4268        example: "2020-01-06T09:07:59.461876391Z"
4269      Health:
4270        x-nullable: true
4271        $ref: "#/definitions/Health"
4272
4273  SystemVersion:
4274    type: "object"
4275    description: |
4276      Response of Engine API: GET "/version"
4277    properties:
4278      Platform:
4279        type: "object"
4280        required: [Name]
4281        properties:
4282          Name:
4283            type: "string"
4284      Components:
4285        type: "array"
4286        description: |
4287          Information about system components
4288        items:
4289          type: "object"
4290          x-go-name: ComponentVersion
4291          required: [Name, Version]
4292          properties:
4293            Name:
4294              description: |
4295                Name of the component
4296              type: "string"
4297              example: "Engine"
4298            Version:
4299              description: |
4300                Version of the component
4301              type: "string"
4302              x-nullable: false
4303              example: "19.03.12"
4304            Details:
4305              description: |
4306                Key/value pairs of strings with additional information about the
4307                component. These values are intended for informational purposes
4308                only, and their content is not defined, and not part of the API
4309                specification.
4310
4311                These messages can be printed by the client as information to the user.
4312              type: "object"
4313              x-nullable: true
4314      Version:
4315        description: "The version of the daemon"
4316        type: "string"
4317        example: "19.03.12"
4318      ApiVersion:
4319        description: |
4320          The default (and highest) API version that is supported by the daemon
4321        type: "string"
4322        example: "1.40"
4323      MinAPIVersion:
4324        description: |
4325          The minimum API version that is supported by the daemon
4326        type: "string"
4327        example: "1.12"
4328      GitCommit:
4329        description: |
4330          The Git commit of the source code that was used to build the daemon
4331        type: "string"
4332        example: "48a66213fe"
4333      GoVersion:
4334        description: |
4335          The version Go used to compile the daemon, and the version of the Go
4336          runtime in use.
4337        type: "string"
4338        example: "go1.13.14"
4339      Os:
4340        description: |
4341          The operating system that the daemon is running on ("linux" or "windows")
4342        type: "string"
4343        example: "linux"
4344      Arch:
4345        description: |
4346          The architecture that the daemon is running on
4347        type: "string"
4348        example: "amd64"
4349      KernelVersion:
4350        description: |
4351          The kernel version (`uname -r`) that the daemon is running on.
4352
4353          This field is omitted when empty.
4354        type: "string"
4355        example: "4.19.76-linuxkit"
4356      Experimental:
4357        description: |
4358          Indicates if the daemon is started with experimental features enabled.
4359
4360          This field is omitted when empty / false.
4361        type: "boolean"
4362        example: true
4363      BuildTime:
4364        description: |
4365          The date and time that the daemon was compiled.
4366        type: "string"
4367        example: "2020-06-22T15:49:27.000000000+00:00"
4368
4369
4370  SystemInfo:
4371    type: "object"
4372    properties:
4373      ID:
4374        description: |
4375          Unique identifier of the daemon.
4376
4377          <p><br /></p>
4378
4379          > **Note**: The format of the ID itself is not part of the API, and
4380          > should not be considered stable.
4381        type: "string"
4382        example: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS"
4383      Containers:
4384        description: "Total number of containers on the host."
4385        type: "integer"
4386        example: 14
4387      ContainersRunning:
4388        description: |
4389          Number of containers with status `"running"`.
4390        type: "integer"
4391        example: 3
4392      ContainersPaused:
4393        description: |
4394          Number of containers with status `"paused"`.
4395        type: "integer"
4396        example: 1
4397      ContainersStopped:
4398        description: |
4399          Number of containers with status `"stopped"`.
4400        type: "integer"
4401        example: 10
4402      Images:
4403        description: |
4404          Total number of images on the host.
4405
4406          Both _tagged_ and _untagged_ (dangling) images are counted.
4407        type: "integer"
4408        example: 508
4409      Driver:
4410        description: "Name of the storage driver in use."
4411        type: "string"
4412        example: "overlay2"
4413      DriverStatus:
4414        description: |
4415          Information specific to the storage driver, provided as
4416          "label" / "value" pairs.
4417
4418          This information is provided by the storage driver, and formatted
4419          in a way consistent with the output of `docker info` on the command
4420          line.
4421
4422          <p><br /></p>
4423
4424          > **Note**: The information returned in this field, including the
4425          > formatting of values and labels, should not be considered stable,
4426          > and may change without notice.
4427        type: "array"
4428        items:
4429          type: "array"
4430          items:
4431            type: "string"
4432        example:
4433          - ["Backing Filesystem", "extfs"]
4434          - ["Supports d_type", "true"]
4435          - ["Native Overlay Diff", "true"]
4436      DockerRootDir:
4437        description: |
4438          Root directory of persistent Docker state.
4439
4440          Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker`
4441          on Windows.
4442        type: "string"
4443        example: "/var/lib/docker"
4444      Plugins:
4445        $ref: "#/definitions/PluginsInfo"
4446      MemoryLimit:
4447        description: "Indicates if the host has memory limit support enabled."
4448        type: "boolean"
4449        example: true
4450      SwapLimit:
4451        description: "Indicates if the host has memory swap limit support enabled."
4452        type: "boolean"
4453        example: true
4454      KernelMemory:
4455        description: |
4456          Indicates if the host has kernel memory limit support enabled.
4457
4458          <p><br /></p>
4459
4460          > **Deprecated**: This field is deprecated as the kernel 5.4 deprecated
4461          > `kmem.limit_in_bytes`.
4462        type: "boolean"
4463        example: true
4464      CpuCfsPeriod:
4465        description: |
4466          Indicates if CPU CFS(Completely Fair Scheduler) period is supported by
4467          the host.
4468        type: "boolean"
4469        example: true
4470      CpuCfsQuota:
4471        description: |
4472          Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by
4473          the host.
4474        type: "boolean"
4475        example: true
4476      CPUShares:
4477        description: |
4478          Indicates if CPU Shares limiting is supported by the host.
4479        type: "boolean"
4480        example: true
4481      CPUSet:
4482        description: |
4483          Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host.
4484
4485          See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt)
4486        type: "boolean"
4487        example: true
4488      PidsLimit:
4489        description: "Indicates if the host kernel has PID limit support enabled."
4490        type: "boolean"
4491        example: true
4492      OomKillDisable:
4493        description: "Indicates if OOM killer disable is supported on the host."
4494        type: "boolean"
4495      IPv4Forwarding:
4496        description: "Indicates IPv4 forwarding is enabled."
4497        type: "boolean"
4498        example: true
4499      BridgeNfIptables:
4500        description: "Indicates if `bridge-nf-call-iptables` is available on the host."
4501        type: "boolean"
4502        example: true
4503      BridgeNfIp6tables:
4504        description: "Indicates if `bridge-nf-call-ip6tables` is available on the host."
4505        type: "boolean"
4506        example: true
4507      Debug:
4508        description: |
4509          Indicates if the daemon is running in debug-mode / with debug-level
4510          logging enabled.
4511        type: "boolean"
4512        example: true
4513      NFd:
4514        description: |
4515          The total number of file Descriptors in use by the daemon process.
4516
4517          This information is only returned if debug-mode is enabled.
4518        type: "integer"
4519        example: 64
4520      NGoroutines:
4521        description: |
4522          The  number of goroutines that currently exist.
4523
4524          This information is only returned if debug-mode is enabled.
4525        type: "integer"
4526        example: 174
4527      SystemTime:
4528        description: |
4529          Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt)
4530          format with nano-seconds.
4531        type: "string"
4532        example: "2017-08-08T20:28:29.06202363Z"
4533      LoggingDriver:
4534        description: |
4535          The logging driver to use as a default for new containers.
4536        type: "string"
4537      CgroupDriver:
4538        description: |
4539          The driver to use for managing cgroups.
4540        type: "string"
4541        enum: ["cgroupfs", "systemd", "none"]
4542        default: "cgroupfs"
4543        example: "cgroupfs"
4544      CgroupVersion:
4545        description: |
4546          The version of the cgroup.
4547        type: "string"
4548        enum: ["1", "2"]
4549        default: "1"
4550        example: "1"
4551      NEventsListener:
4552        description: "Number of event listeners subscribed."
4553        type: "integer"
4554        example: 30
4555      KernelVersion:
4556        description: |
4557          Kernel version of the host.
4558
4559          On Linux, this information obtained from `uname`. On Windows this
4560          information is queried from the <kbd>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\</kbd>
4561          registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_.
4562        type: "string"
4563        example: "4.9.38-moby"
4564      OperatingSystem:
4565        description: |
4566          Name of the host's operating system, for example: "Ubuntu 16.04.2 LTS"
4567          or "Windows Server 2016 Datacenter"
4568        type: "string"
4569        example: "Alpine Linux v3.5"
4570      OSVersion:
4571        description: |
4572          Version of the host's operating system
4573
4574          <p><br /></p>
4575
4576          > **Note**: The information returned in this field, including its
4577          > very existence, and the formatting of values, should not be considered
4578          > stable, and may change without notice.
4579        type: "string"
4580        example: "16.04"
4581      OSType:
4582        description: |
4583          Generic type of the operating system of the host, as returned by the
4584          Go runtime (`GOOS`).
4585
4586          Currently returned values are "linux" and "windows". A full list of
4587          possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).
4588        type: "string"
4589        example: "linux"
4590      Architecture:
4591        description: |
4592          Hardware architecture of the host, as returned by the Go runtime
4593          (`GOARCH`).
4594
4595          A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).
4596        type: "string"
4597        example: "x86_64"
4598      NCPU:
4599        description: |
4600          The number of logical CPUs usable by the daemon.
4601
4602          The number of available CPUs is checked by querying the operating
4603          system when the daemon starts. Changes to operating system CPU
4604          allocation after the daemon is started are not reflected.
4605        type: "integer"
4606        example: 4
4607      MemTotal:
4608        description: |
4609          Total amount of physical memory available on the host, in bytes.
4610        type: "integer"
4611        format: "int64"
4612        example: 2095882240
4613
4614      IndexServerAddress:
4615        description: |
4616          Address / URL of the index server that is used for image search,
4617          and as a default for user authentication for Docker Hub and Docker Cloud.
4618        default: "https://index.docker.io/v1/"
4619        type: "string"
4620        example: "https://index.docker.io/v1/"
4621      RegistryConfig:
4622        $ref: "#/definitions/RegistryServiceConfig"
4623      GenericResources:
4624        $ref: "#/definitions/GenericResources"
4625      HttpProxy:
4626        description: |
4627          HTTP-proxy configured for the daemon. This value is obtained from the
4628          [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable.
4629          Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL
4630          are masked in the API response.
4631
4632          Containers do not automatically inherit this configuration.
4633        type: "string"
4634        example: "http://xxxxx:xxxxx@proxy.corp.example.com:8080"
4635      HttpsProxy:
4636        description: |
4637          HTTPS-proxy configured for the daemon. This value is obtained from the
4638          [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable.
4639          Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL
4640          are masked in the API response.
4641
4642          Containers do not automatically inherit this configuration.
4643        type: "string"
4644        example: "https://xxxxx:xxxxx@proxy.corp.example.com:4443"
4645      NoProxy:
4646        description: |
4647          Comma-separated list of domain extensions for which no proxy should be
4648          used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html)
4649          environment variable.
4650
4651          Containers do not automatically inherit this configuration.
4652        type: "string"
4653        example: "*.local, 169.254/16"
4654      Name:
4655        description: "Hostname of the host."
4656        type: "string"
4657        example: "node5.corp.example.com"
4658      Labels:
4659        description: |
4660          User-defined labels (key/value metadata) as set on the daemon.
4661
4662          <p><br /></p>
4663
4664          > **Note**: When part of a Swarm, nodes can both have _daemon_ labels,
4665          > set through the daemon configuration, and _node_ labels, set from a
4666          > manager node in the Swarm. Node labels are not included in this
4667          > field. Node labels can be retrieved using the `/nodes/(id)` endpoint
4668          > on a manager node in the Swarm.
4669        type: "array"
4670        items:
4671          type: "string"
4672        example: ["storage=ssd", "production"]
4673      ExperimentalBuild:
4674        description: |
4675          Indicates if experimental features are enabled on the daemon.
4676        type: "boolean"
4677        example: true
4678      ServerVersion:
4679        description: |
4680          Version string of the daemon.
4681
4682          > **Note**: the [standalone Swarm API](https://docs.docker.com/swarm/swarm-api/)
4683          > returns the Swarm version instead of the daemon  version, for example
4684          > `swarm/1.2.8`.
4685        type: "string"
4686        example: "17.06.0-ce"
4687      ClusterStore:
4688        description: |
4689          URL of the distributed storage backend.
4690
4691
4692          The storage backend is used for multihost networking (to store
4693          network and endpoint information) and by the node discovery mechanism.
4694
4695          <p><br /></p>
4696
4697          > **Deprecated**: This field is only propagated when using standalone Swarm
4698          > mode, and overlay networking using an external k/v store. Overlay
4699          > networks with Swarm mode enabled use the built-in raft store, and
4700          > this field will be empty.
4701        type: "string"
4702        example: "consul://consul.corp.example.com:8600/some/path"
4703      ClusterAdvertise:
4704        description: |
4705          The network endpoint that the Engine advertises for the purpose of
4706          node discovery. ClusterAdvertise is a `host:port` combination on which
4707          the daemon is reachable by other hosts.
4708
4709          <p><br /></p>
4710
4711          > **Deprecated**: This field is only propagated when using standalone Swarm
4712          > mode, and overlay networking using an external k/v store. Overlay
4713          > networks with Swarm mode enabled use the built-in raft store, and
4714          > this field will be empty.
4715        type: "string"
4716        example: "node5.corp.example.com:8000"
4717      Runtimes:
4718        description: |
4719          List of [OCI compliant](https://github.com/opencontainers/runtime-spec)
4720          runtimes configured on the daemon. Keys hold the "name" used to
4721          reference the runtime.
4722
4723          The Docker daemon relies on an OCI compliant runtime (invoked via the
4724          `containerd` daemon) as its interface to the Linux kernel namespaces,
4725          cgroups, and SELinux.
4726
4727          The default runtime is `runc`, and automatically configured. Additional
4728          runtimes can be configured by the user and will be listed here.
4729        type: "object"
4730        additionalProperties:
4731          $ref: "#/definitions/Runtime"
4732        default:
4733          runc:
4734            path: "runc"
4735        example:
4736          runc:
4737            path: "runc"
4738          runc-master:
4739            path: "/go/bin/runc"
4740          custom:
4741            path: "/usr/local/bin/my-oci-runtime"
4742            runtimeArgs: ["--debug", "--systemd-cgroup=false"]
4743      DefaultRuntime:
4744        description: |
4745          Name of the default OCI runtime that is used when starting containers.
4746
4747          The default can be overridden per-container at create time.
4748        type: "string"
4749        default: "runc"
4750        example: "runc"
4751      Swarm:
4752        $ref: "#/definitions/SwarmInfo"
4753      LiveRestoreEnabled:
4754        description: |
4755          Indicates if live restore is enabled.
4756
4757          If enabled, containers are kept running when the daemon is shutdown
4758          or upon daemon start if running containers are detected.
4759        type: "boolean"
4760        default: false
4761        example: false
4762      Isolation:
4763        description: |
4764          Represents the isolation technology to use as a default for containers.
4765          The supported values are platform-specific.
4766
4767          If no isolation value is specified on daemon start, on Windows client,
4768          the default is `hyperv`, and on Windows server, the default is `process`.
4769
4770          This option is currently not used on other platforms.
4771        default: "default"
4772        type: "string"
4773        enum:
4774          - "default"
4775          - "hyperv"
4776          - "process"
4777      InitBinary:
4778        description: |
4779          Name and, optional, path of the `docker-init` binary.
4780
4781          If the path is omitted, the daemon searches the host's `$PATH` for the
4782          binary and uses the first result.
4783        type: "string"
4784        example: "docker-init"
4785      ContainerdCommit:
4786        $ref: "#/definitions/Commit"
4787      RuncCommit:
4788        $ref: "#/definitions/Commit"
4789      InitCommit:
4790        $ref: "#/definitions/Commit"
4791      SecurityOptions:
4792        description: |
4793          List of security features that are enabled on the daemon, such as
4794          apparmor, seccomp, SELinux, user-namespaces (userns), and rootless.
4795
4796          Additional configuration options for each security feature may
4797          be present, and are included as a comma-separated list of key/value
4798          pairs.
4799        type: "array"
4800        items:
4801          type: "string"
4802        example:
4803          - "name=apparmor"
4804          - "name=seccomp,profile=default"
4805          - "name=selinux"
4806          - "name=userns"
4807          - "name=rootless"
4808      ProductLicense:
4809        description: |
4810          Reports a summary of the product license on the daemon.
4811
4812          If a commercial license has been applied to the daemon, information
4813          such as number of nodes, and expiration are included.
4814        type: "string"
4815        example: "Community Engine"
4816      DefaultAddressPools:
4817        description: |
4818          List of custom default address pools for local networks, which can be
4819          specified in the daemon.json file or dockerd option.
4820
4821          Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256
4822          10.10.[0-255].0/24 address pools.
4823        type: "array"
4824        items:
4825          type: "object"
4826          properties:
4827            Base:
4828              description: "The network address in CIDR format"
4829              type: "string"
4830              example: "10.10.0.0/16"
4831            Size:
4832              description: "The network pool size"
4833              type: "integer"
4834              example: "24"
4835      Warnings:
4836        description: |
4837          List of warnings / informational messages about missing features, or
4838          issues related to the daemon configuration.
4839
4840          These messages can be printed by the client as information to the user.
4841        type: "array"
4842        items:
4843          type: "string"
4844        example:
4845          - "WARNING: No memory limit support"
4846          - "WARNING: bridge-nf-call-iptables is disabled"
4847          - "WARNING: bridge-nf-call-ip6tables is disabled"
4848
4849
4850  # PluginsInfo is a temp struct holding Plugins name
4851  # registered with docker daemon. It is used by Info struct
4852  PluginsInfo:
4853    description: |
4854      Available plugins per type.
4855
4856      <p><br /></p>
4857
4858      > **Note**: Only unmanaged (V1) plugins are included in this list.
4859      > V1 plugins are "lazily" loaded, and are not returned in this list
4860      > if there is no resource using the plugin.
4861    type: "object"
4862    properties:
4863      Volume:
4864        description: "Names of available volume-drivers, and network-driver plugins."
4865        type: "array"
4866        items:
4867          type: "string"
4868        example: ["local"]
4869      Network:
4870        description: "Names of available network-drivers, and network-driver plugins."
4871        type: "array"
4872        items:
4873          type: "string"
4874        example: ["bridge", "host", "ipvlan", "macvlan", "null", "overlay"]
4875      Authorization:
4876        description: "Names of available authorization plugins."
4877        type: "array"
4878        items:
4879          type: "string"
4880        example: ["img-authz-plugin", "hbm"]
4881      Log:
4882        description: "Names of available logging-drivers, and logging-driver plugins."
4883        type: "array"
4884        items:
4885          type: "string"
4886        example: ["awslogs", "fluentd", "gcplogs", "gelf", "journald", "json-file", "logentries", "splunk", "syslog"]
4887
4888
4889  RegistryServiceConfig:
4890    description: |
4891      RegistryServiceConfig stores daemon registry services configuration.
4892    type: "object"
4893    x-nullable: true
4894    properties:
4895      AllowNondistributableArtifactsCIDRs:
4896        description: |
4897          List of IP ranges to which nondistributable artifacts can be pushed,
4898          using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632).
4899
4900          Some images (for example, Windows base images) contain artifacts
4901          whose distribution is restricted by license. When these images are
4902          pushed to a registry, restricted artifacts are not included.
4903
4904          This configuration override this behavior, and enables the daemon to
4905          push nondistributable artifacts to all registries whose resolved IP
4906          address is within the subnet described by the CIDR syntax.
4907
4908          This option is useful when pushing images containing
4909          nondistributable artifacts to a registry on an air-gapped network so
4910          hosts on that network can pull the images without connecting to
4911          another server.
4912
4913          > **Warning**: Nondistributable artifacts typically have restrictions
4914          > on how and where they can be distributed and shared. Only use this
4915          > feature to push artifacts to private registries and ensure that you
4916          > are in compliance with any terms that cover redistributing
4917          > nondistributable artifacts.
4918
4919        type: "array"
4920        items:
4921          type: "string"
4922        example: ["::1/128", "127.0.0.0/8"]
4923      AllowNondistributableArtifactsHostnames:
4924        description: |
4925          List of registry hostnames to which nondistributable artifacts can be
4926          pushed, using the format `<hostname>[:<port>]` or `<IP address>[:<port>]`.
4927
4928          Some images (for example, Windows base images) contain artifacts
4929          whose distribution is restricted by license. When these images are
4930          pushed to a registry, restricted artifacts are not included.
4931
4932          This configuration override this behavior for the specified
4933          registries.
4934
4935          This option is useful when pushing images containing
4936          nondistributable artifacts to a registry on an air-gapped network so
4937          hosts on that network can pull the images without connecting to
4938          another server.
4939
4940          > **Warning**: Nondistributable artifacts typically have restrictions
4941          > on how and where they can be distributed and shared. Only use this
4942          > feature to push artifacts to private registries and ensure that you
4943          > are in compliance with any terms that cover redistributing
4944          > nondistributable artifacts.
4945        type: "array"
4946        items:
4947          type: "string"
4948        example: ["registry.internal.corp.example.com:3000", "[2001:db8:a0b:12f0::1]:443"]
4949      InsecureRegistryCIDRs:
4950        description: |
4951          List of IP ranges of insecure registries, using the CIDR syntax
4952          ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries
4953          accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates
4954          from unknown CAs) communication.
4955
4956          By default, local registries (`127.0.0.0/8`) are configured as
4957          insecure. All other registries are secure. Communicating with an
4958          insecure registry is not possible if the daemon assumes that registry
4959          is secure.
4960
4961          This configuration override this behavior, insecure communication with
4962          registries whose resolved IP address is within the subnet described by
4963          the CIDR syntax.
4964
4965          Registries can also be marked insecure by hostname. Those registries
4966          are listed under `IndexConfigs` and have their `Secure` field set to
4967          `false`.
4968
4969          > **Warning**: Using this option can be useful when running a local
4970          > registry, but introduces security vulnerabilities. This option
4971          > should therefore ONLY be used for testing purposes. For increased
4972          > security, users should add their CA to their system's list of trusted
4973          > CAs instead of enabling this option.
4974        type: "array"
4975        items:
4976          type: "string"
4977        example: ["::1/128", "127.0.0.0/8"]
4978      IndexConfigs:
4979        type: "object"
4980        additionalProperties:
4981          $ref: "#/definitions/IndexInfo"
4982        example:
4983          "127.0.0.1:5000":
4984            "Name": "127.0.0.1:5000"
4985            "Mirrors": []
4986            "Secure": false
4987            "Official": false
4988          "[2001:db8:a0b:12f0::1]:80":
4989            "Name": "[2001:db8:a0b:12f0::1]:80"
4990            "Mirrors": []
4991            "Secure": false
4992            "Official": false
4993          "docker.io":
4994            Name: "docker.io"
4995            Mirrors: ["https://hub-mirror.corp.example.com:5000/"]
4996            Secure: true
4997            Official: true
4998          "registry.internal.corp.example.com:3000":
4999            Name: "registry.internal.corp.example.com:3000"
5000            Mirrors: []
5001            Secure: false
5002            Official: false
5003      Mirrors:
5004        description: |
5005          List of registry URLs that act as a mirror for the official
5006          (`docker.io`) registry.
5007
5008        type: "array"
5009        items:
5010          type: "string"
5011        example:
5012          - "https://hub-mirror.corp.example.com:5000/"
5013          - "https://[2001:db8:a0b:12f0::1]/"
5014
5015  IndexInfo:
5016    description:
5017      IndexInfo contains information about a registry.
5018    type: "object"
5019    x-nullable: true
5020    properties:
5021      Name:
5022        description: |
5023          Name of the registry, such as "docker.io".
5024        type: "string"
5025        example: "docker.io"
5026      Mirrors:
5027        description: |
5028          List of mirrors, expressed as URIs.
5029        type: "array"
5030        items:
5031          type: "string"
5032        example:
5033          - "https://hub-mirror.corp.example.com:5000/"
5034          - "https://registry-2.docker.io/"
5035          - "https://registry-3.docker.io/"
5036      Secure:
5037        description: |
5038          Indicates if the registry is part of the list of insecure
5039          registries.
5040
5041          If `false`, the registry is insecure. Insecure registries accept
5042          un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from
5043          unknown CAs) communication.
5044
5045          > **Warning**: Insecure registries can be useful when running a local
5046          > registry. However, because its use creates security vulnerabilities
5047          > it should ONLY be enabled for testing purposes. For increased
5048          > security, users should add their CA to their system's list of
5049          > trusted CAs instead of enabling this option.
5050        type: "boolean"
5051        example: true
5052      Official:
5053        description: |
5054          Indicates whether this is an official registry (i.e., Docker Hub / docker.io)
5055        type: "boolean"
5056        example: true
5057
5058  Runtime:
5059    description: |
5060      Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec)
5061      runtime.
5062
5063      The runtime is invoked by the daemon via the `containerd` daemon. OCI
5064      runtimes act as an interface to the Linux kernel namespaces, cgroups,
5065      and SELinux.
5066    type: "object"
5067    properties:
5068      path:
5069        description: |
5070          Name and, optional, path, of the OCI executable binary.
5071
5072          If the path is omitted, the daemon searches the host's `$PATH` for the
5073          binary and uses the first result.
5074        type: "string"
5075        example: "/usr/local/bin/my-oci-runtime"
5076      runtimeArgs:
5077        description: |
5078          List of command-line arguments to pass to the runtime when invoked.
5079        type: "array"
5080        x-nullable: true
5081        items:
5082          type: "string"
5083        example: ["--debug", "--systemd-cgroup=false"]
5084
5085  Commit:
5086    description: |
5087      Commit holds the Git-commit (SHA1) that a binary was built from, as
5088      reported in the version-string of external tools, such as `containerd`,
5089      or `runC`.
5090    type: "object"
5091    properties:
5092      ID:
5093        description: "Actual commit ID of external tool."
5094        type: "string"
5095        example: "cfb82a876ecc11b5ca0977d1733adbe58599088a"
5096      Expected:
5097        description: |
5098          Commit ID of external tool expected by dockerd as set at build time.
5099        type: "string"
5100        example: "2d41c047c83e09a6d61d464906feb2a2f3c52aa4"
5101
5102  SwarmInfo:
5103    description: |
5104      Represents generic information about swarm.
5105    type: "object"
5106    properties:
5107      NodeID:
5108        description: "Unique identifier of for this node in the swarm."
5109        type: "string"
5110        default: ""
5111        example: "k67qz4598weg5unwwffg6z1m1"
5112      NodeAddr:
5113        description: |
5114          IP address at which this node can be reached by other nodes in the
5115          swarm.
5116        type: "string"
5117        default: ""
5118        example: "10.0.0.46"
5119      LocalNodeState:
5120        $ref: "#/definitions/LocalNodeState"
5121      ControlAvailable:
5122        type: "boolean"
5123        default: false
5124        example: true
5125      Error:
5126        type: "string"
5127        default: ""
5128      RemoteManagers:
5129        description: |
5130          List of ID's and addresses of other managers in the swarm.
5131        type: "array"
5132        default: null
5133        x-nullable: true
5134        items:
5135          $ref: "#/definitions/PeerNode"
5136        example:
5137          - NodeID: "71izy0goik036k48jg985xnds"
5138            Addr: "10.0.0.158:2377"
5139          - NodeID: "79y6h1o4gv8n120drcprv5nmc"
5140            Addr: "10.0.0.159:2377"
5141          - NodeID: "k67qz4598weg5unwwffg6z1m1"
5142            Addr: "10.0.0.46:2377"
5143      Nodes:
5144        description: "Total number of nodes in the swarm."
5145        type: "integer"
5146        x-nullable: true
5147        example: 4
5148      Managers:
5149        description: "Total number of managers in the swarm."
5150        type: "integer"
5151        x-nullable: true
5152        example: 3
5153      Cluster:
5154        $ref: "#/definitions/ClusterInfo"
5155
5156  LocalNodeState:
5157    description: "Current local status of this node."
5158    type: "string"
5159    default: ""
5160    enum:
5161      - ""
5162      - "inactive"
5163      - "pending"
5164      - "active"
5165      - "error"
5166      - "locked"
5167    example: "active"
5168
5169  PeerNode:
5170    description: "Represents a peer-node in the swarm"
5171    properties:
5172      NodeID:
5173        description: "Unique identifier of for this node in the swarm."
5174        type: "string"
5175      Addr:
5176        description: |
5177          IP address and ports at which this node can be reached.
5178        type: "string"
5179
5180  NetworkAttachmentConfig:
5181    description: |
5182      Specifies how a service should be attached to a particular network.
5183    type: "object"
5184    properties:
5185      Target:
5186        description: |
5187          The target network for attachment. Must be a network name or ID.
5188        type: "string"
5189      Aliases:
5190        description: |
5191          Discoverable alternate names for the service on this network.
5192        type: "array"
5193        items:
5194          type: "string"
5195      DriverOpts:
5196        description: |
5197          Driver attachment options for the network target.
5198        type: "object"
5199        additionalProperties:
5200          type: "string"
5201
5202paths:
5203  /containers/json:
5204    get:
5205      summary: "List containers"
5206      description: |
5207        Returns a list of containers. For details on the format, see the
5208        [inspect endpoint](#operation/ContainerInspect).
5209
5210        Note that it uses a different, smaller representation of a container
5211        than inspecting a single container. For example, the list of linked
5212        containers is not propagated .
5213      operationId: "ContainerList"
5214      produces:
5215        - "application/json"
5216      parameters:
5217        - name: "all"
5218          in: "query"
5219          description: |
5220            Return all containers. By default, only running containers are shown.
5221          type: "boolean"
5222          default: false
5223        - name: "limit"
5224          in: "query"
5225          description: |
5226            Return this number of most recently created containers, including
5227            non-running ones.
5228          type: "integer"
5229        - name: "size"
5230          in: "query"
5231          description: |
5232            Return the size of container as fields `SizeRw` and `SizeRootFs`.
5233          type: "boolean"
5234          default: false
5235        - name: "filters"
5236          in: "query"
5237          description: |
5238            Filters to process on the container list, encoded as JSON (a
5239            `map[string][]string`). For example, `{"status": ["paused"]}` will
5240            only return paused containers.
5241
5242            Available filters:
5243
5244            - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`)
5245            - `before`=(`<container id>` or `<container name>`)
5246            - `expose`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`)
5247            - `exited=<int>` containers with exit code of `<int>`
5248            - `health`=(`starting`|`healthy`|`unhealthy`|`none`)
5249            - `id=<ID>` a container's ID
5250            - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only)
5251            - `is-task=`(`true`|`false`)
5252            - `label=key` or `label="key=value"` of a container label
5253            - `name=<name>` a container's name
5254            - `network`=(`<network id>` or `<network name>`)
5255            - `publish`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`)
5256            - `since`=(`<container id>` or `<container name>`)
5257            - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`)
5258            - `volume`=(`<volume name>` or `<mount point destination>`)
5259          type: "string"
5260      responses:
5261        200:
5262          description: "no error"
5263          schema:
5264            $ref: "#/definitions/ContainerSummary"
5265          examples:
5266            application/json:
5267              - Id: "8dfafdbc3a40"
5268                Names:
5269                  - "/boring_feynman"
5270                Image: "ubuntu:latest"
5271                ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
5272                Command: "echo 1"
5273                Created: 1367854155
5274                State: "Exited"
5275                Status: "Exit 0"
5276                Ports:
5277                  - PrivatePort: 2222
5278                    PublicPort: 3333
5279                    Type: "tcp"
5280                Labels:
5281                  com.example.vendor: "Acme"
5282                  com.example.license: "GPL"
5283                  com.example.version: "1.0"
5284                SizeRw: 12288
5285                SizeRootFs: 0
5286                HostConfig:
5287                  NetworkMode: "default"
5288                NetworkSettings:
5289                  Networks:
5290                    bridge:
5291                      NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
5292                      EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f"
5293                      Gateway: "172.17.0.1"
5294                      IPAddress: "172.17.0.2"
5295                      IPPrefixLen: 16
5296                      IPv6Gateway: ""
5297                      GlobalIPv6Address: ""
5298                      GlobalIPv6PrefixLen: 0
5299                      MacAddress: "02:42:ac:11:00:02"
5300                Mounts:
5301                  - Name: "fac362...80535"
5302                    Source: "/data"
5303                    Destination: "/data"
5304                    Driver: "local"
5305                    Mode: "ro,Z"
5306                    RW: false
5307                    Propagation: ""
5308              - Id: "9cd87474be90"
5309                Names:
5310                  - "/coolName"
5311                Image: "ubuntu:latest"
5312                ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
5313                Command: "echo 222222"
5314                Created: 1367854155
5315                State: "Exited"
5316                Status: "Exit 0"
5317                Ports: []
5318                Labels: {}
5319                SizeRw: 12288
5320                SizeRootFs: 0
5321                HostConfig:
5322                  NetworkMode: "default"
5323                NetworkSettings:
5324                  Networks:
5325                    bridge:
5326                      NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
5327                      EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a"
5328                      Gateway: "172.17.0.1"
5329                      IPAddress: "172.17.0.8"
5330                      IPPrefixLen: 16
5331                      IPv6Gateway: ""
5332                      GlobalIPv6Address: ""
5333                      GlobalIPv6PrefixLen: 0
5334                      MacAddress: "02:42:ac:11:00:08"
5335                Mounts: []
5336              - Id: "3176a2479c92"
5337                Names:
5338                  - "/sleepy_dog"
5339                Image: "ubuntu:latest"
5340                ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
5341                Command: "echo 3333333333333333"
5342                Created: 1367854154
5343                State: "Exited"
5344                Status: "Exit 0"
5345                Ports: []
5346                Labels: {}
5347                SizeRw: 12288
5348                SizeRootFs: 0
5349                HostConfig:
5350                  NetworkMode: "default"
5351                NetworkSettings:
5352                  Networks:
5353                    bridge:
5354                      NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
5355                      EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d"
5356                      Gateway: "172.17.0.1"
5357                      IPAddress: "172.17.0.6"
5358                      IPPrefixLen: 16
5359                      IPv6Gateway: ""
5360                      GlobalIPv6Address: ""
5361                      GlobalIPv6PrefixLen: 0
5362                      MacAddress: "02:42:ac:11:00:06"
5363                Mounts: []
5364              - Id: "4cb07b47f9fb"
5365                Names:
5366                  - "/running_cat"
5367                Image: "ubuntu:latest"
5368                ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
5369                Command: "echo 444444444444444444444444444444444"
5370                Created: 1367854152
5371                State: "Exited"
5372                Status: "Exit 0"
5373                Ports: []
5374                Labels: {}
5375                SizeRw: 12288
5376                SizeRootFs: 0
5377                HostConfig:
5378                  NetworkMode: "default"
5379                NetworkSettings:
5380                  Networks:
5381                    bridge:
5382                      NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
5383                      EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9"
5384                      Gateway: "172.17.0.1"
5385                      IPAddress: "172.17.0.5"
5386                      IPPrefixLen: 16
5387                      IPv6Gateway: ""
5388                      GlobalIPv6Address: ""
5389                      GlobalIPv6PrefixLen: 0
5390                      MacAddress: "02:42:ac:11:00:05"
5391                Mounts: []
5392        400:
5393          description: "bad parameter"
5394          schema:
5395            $ref: "#/definitions/ErrorResponse"
5396        500:
5397          description: "server error"
5398          schema:
5399            $ref: "#/definitions/ErrorResponse"
5400      tags: ["Container"]
5401  /containers/create:
5402    post:
5403      summary: "Create a container"
5404      operationId: "ContainerCreate"
5405      consumes:
5406        - "application/json"
5407        - "application/octet-stream"
5408      produces:
5409        - "application/json"
5410      parameters:
5411        - name: "name"
5412          in: "query"
5413          description: |
5414            Assign the specified name to the container. Must match
5415            `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`.
5416          type: "string"
5417          pattern: "^/?[a-zA-Z0-9][a-zA-Z0-9_.-]+$"
5418        - name: "body"
5419          in: "body"
5420          description: "Container to create"
5421          schema:
5422            allOf:
5423              - $ref: "#/definitions/ContainerConfig"
5424              - type: "object"
5425                properties:
5426                  HostConfig:
5427                    $ref: "#/definitions/HostConfig"
5428                  NetworkingConfig:
5429                    $ref: "#/definitions/NetworkingConfig"
5430            example:
5431              Hostname: ""
5432              Domainname: ""
5433              User: ""
5434              AttachStdin: false
5435              AttachStdout: true
5436              AttachStderr: true
5437              Tty: false
5438              OpenStdin: false
5439              StdinOnce: false
5440              Env:
5441                - "FOO=bar"
5442                - "BAZ=quux"
5443              Cmd:
5444                - "date"
5445              Entrypoint: ""
5446              Image: "ubuntu"
5447              Labels:
5448                com.example.vendor: "Acme"
5449                com.example.license: "GPL"
5450                com.example.version: "1.0"
5451              Volumes:
5452                /volumes/data: {}
5453              WorkingDir: ""
5454              NetworkDisabled: false
5455              MacAddress: "12:34:56:78:9a:bc"
5456              ExposedPorts:
5457                22/tcp: {}
5458              StopSignal: "SIGTERM"
5459              StopTimeout: 10
5460              HostConfig:
5461                Binds:
5462                  - "/tmp:/tmp"
5463                Links:
5464                  - "redis3:redis"
5465                Memory: 0
5466                MemorySwap: 0
5467                MemoryReservation: 0
5468                KernelMemory: 0
5469                NanoCPUs: 500000
5470                CpuPercent: 80
5471                CpuShares: 512
5472                CpuPeriod: 100000
5473                CpuRealtimePeriod: 1000000
5474                CpuRealtimeRuntime: 10000
5475                CpuQuota: 50000
5476                CpusetCpus: "0,1"
5477                CpusetMems: "0,1"
5478                MaximumIOps: 0
5479                MaximumIOBps: 0
5480                BlkioWeight: 300
5481                BlkioWeightDevice:
5482                  - {}
5483                BlkioDeviceReadBps:
5484                  - {}
5485                BlkioDeviceReadIOps:
5486                  - {}
5487                BlkioDeviceWriteBps:
5488                  - {}
5489                BlkioDeviceWriteIOps:
5490                  - {}
5491                DeviceRequests:
5492                  - Driver: "nvidia"
5493                    Count: -1
5494                    DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"]
5495                    Capabilities: [["gpu", "nvidia", "compute"]]
5496                    Options:
5497                      property1: "string"
5498                      property2: "string"
5499                MemorySwappiness: 60
5500                OomKillDisable: false
5501                OomScoreAdj: 500
5502                PidMode: ""
5503                PidsLimit: 0
5504                PortBindings:
5505                  22/tcp:
5506                    - HostPort: "11022"
5507                PublishAllPorts: false
5508                Privileged: false
5509                ReadonlyRootfs: false
5510                Dns:
5511                  - "8.8.8.8"
5512                DnsOptions:
5513                  - ""
5514                DnsSearch:
5515                  - ""
5516                VolumesFrom:
5517                  - "parent"
5518                  - "other:ro"
5519                CapAdd:
5520                  - "NET_ADMIN"
5521                CapDrop:
5522                  - "MKNOD"
5523                GroupAdd:
5524                  - "newgroup"
5525                RestartPolicy:
5526                  Name: ""
5527                  MaximumRetryCount: 0
5528                AutoRemove: true
5529                NetworkMode: "bridge"
5530                Devices: []
5531                Ulimits:
5532                  - {}
5533                LogConfig:
5534                  Type: "json-file"
5535                  Config: {}
5536                SecurityOpt: []
5537                StorageOpt: {}
5538                CgroupParent: ""
5539                VolumeDriver: ""
5540                ShmSize: 67108864
5541              NetworkingConfig:
5542                EndpointsConfig:
5543                  isolated_nw:
5544                    IPAMConfig:
5545                      IPv4Address: "172.20.30.33"
5546                      IPv6Address: "2001:db8:abcd::3033"
5547                      LinkLocalIPs:
5548                        - "169.254.34.68"
5549                        - "fe80::3468"
5550                    Links:
5551                      - "container_1"
5552                      - "container_2"
5553                    Aliases:
5554                      - "server_x"
5555                      - "server_y"
5556
5557          required: true
5558      responses:
5559        201:
5560          description: "Container created successfully"
5561          schema:
5562            type: "object"
5563            title: "ContainerCreateResponse"
5564            description: "OK response to ContainerCreate operation"
5565            required: [Id, Warnings]
5566            properties:
5567              Id:
5568                description: "The ID of the created container"
5569                type: "string"
5570                x-nullable: false
5571              Warnings:
5572                description: "Warnings encountered when creating the container"
5573                type: "array"
5574                x-nullable: false
5575                items:
5576                  type: "string"
5577          examples:
5578            application/json:
5579              Id: "e90e34656806"
5580              Warnings: []
5581        400:
5582          description: "bad parameter"
5583          schema:
5584            $ref: "#/definitions/ErrorResponse"
5585        404:
5586          description: "no such container"
5587          schema:
5588            $ref: "#/definitions/ErrorResponse"
5589          examples:
5590            application/json:
5591              message: "No such container: c2ada9df5af8"
5592        409:
5593          description: "conflict"
5594          schema:
5595            $ref: "#/definitions/ErrorResponse"
5596        500:
5597          description: "server error"
5598          schema:
5599            $ref: "#/definitions/ErrorResponse"
5600      tags: ["Container"]
5601  /containers/{id}/json:
5602    get:
5603      summary: "Inspect a container"
5604      description: "Return low-level information about a container."
5605      operationId: "ContainerInspect"
5606      produces:
5607        - "application/json"
5608      responses:
5609        200:
5610          description: "no error"
5611          schema:
5612            type: "object"
5613            title: "ContainerInspectResponse"
5614            properties:
5615              Id:
5616                description: "The ID of the container"
5617                type: "string"
5618              Created:
5619                description: "The time the container was created"
5620                type: "string"
5621              Path:
5622                description: "The path to the command being run"
5623                type: "string"
5624              Args:
5625                description: "The arguments to the command being run"
5626                type: "array"
5627                items:
5628                  type: "string"
5629              State:
5630                x-nullable: true
5631                $ref: "#/definitions/ContainerState"
5632              Image:
5633                description: "The container's image ID"
5634                type: "string"
5635              ResolvConfPath:
5636                type: "string"
5637              HostnamePath:
5638                type: "string"
5639              HostsPath:
5640                type: "string"
5641              LogPath:
5642                type: "string"
5643              Name:
5644                type: "string"
5645              RestartCount:
5646                type: "integer"
5647              Driver:
5648                type: "string"
5649              Platform:
5650                type: "string"
5651              MountLabel:
5652                type: "string"
5653              ProcessLabel:
5654                type: "string"
5655              AppArmorProfile:
5656                type: "string"
5657              ExecIDs:
5658                description: "IDs of exec instances that are running in the container."
5659                type: "array"
5660                items:
5661                  type: "string"
5662                x-nullable: true
5663              HostConfig:
5664                $ref: "#/definitions/HostConfig"
5665              GraphDriver:
5666                $ref: "#/definitions/GraphDriverData"
5667              SizeRw:
5668                description: |
5669                  The size of files that have been created or changed by this
5670                  container.
5671                type: "integer"
5672                format: "int64"
5673              SizeRootFs:
5674                description: "The total size of all the files in this container."
5675                type: "integer"
5676                format: "int64"
5677              Mounts:
5678                type: "array"
5679                items:
5680                  $ref: "#/definitions/MountPoint"
5681              Config:
5682                $ref: "#/definitions/ContainerConfig"
5683              NetworkSettings:
5684                $ref: "#/definitions/NetworkSettings"
5685          examples:
5686            application/json:
5687              AppArmorProfile: ""
5688              Args:
5689                - "-c"
5690                - "exit 9"
5691              Config:
5692                AttachStderr: true
5693                AttachStdin: false
5694                AttachStdout: true
5695                Cmd:
5696                  - "/bin/sh"
5697                  - "-c"
5698                  - "exit 9"
5699                Domainname: ""
5700                Env:
5701                  - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
5702                Healthcheck:
5703                  Test: ["CMD-SHELL", "exit 0"]
5704                Hostname: "ba033ac44011"
5705                Image: "ubuntu"
5706                Labels:
5707                  com.example.vendor: "Acme"
5708                  com.example.license: "GPL"
5709                  com.example.version: "1.0"
5710                MacAddress: ""
5711                NetworkDisabled: false
5712                OpenStdin: false
5713                StdinOnce: false
5714                Tty: false
5715                User: ""
5716                Volumes:
5717                  /volumes/data: {}
5718                WorkingDir: ""
5719                StopSignal: "SIGTERM"
5720                StopTimeout: 10
5721              Created: "2015-01-06T15:47:31.485331387Z"
5722              Driver: "devicemapper"
5723              ExecIDs:
5724                - "b35395de42bc8abd327f9dd65d913b9ba28c74d2f0734eeeae84fa1c616a0fca"
5725                - "3fc1232e5cd20c8de182ed81178503dc6437f4e7ef12b52cc5e8de020652f1c4"
5726              HostConfig:
5727                MaximumIOps: 0
5728                MaximumIOBps: 0
5729                BlkioWeight: 0
5730                BlkioWeightDevice:
5731                  - {}
5732                BlkioDeviceReadBps:
5733                  - {}
5734                BlkioDeviceWriteBps:
5735                  - {}
5736                BlkioDeviceReadIOps:
5737                  - {}
5738                BlkioDeviceWriteIOps:
5739                  - {}
5740                ContainerIDFile: ""
5741                CpusetCpus: ""
5742                CpusetMems: ""
5743                CpuPercent: 80
5744                CpuShares: 0
5745                CpuPeriod: 100000
5746                CpuRealtimePeriod: 1000000
5747                CpuRealtimeRuntime: 10000
5748                Devices: []
5749                DeviceRequests:
5750                  - Driver: "nvidia"
5751                    Count: -1
5752                    DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"]
5753                    Capabilities: [["gpu", "nvidia", "compute"]]
5754                    Options:
5755                      property1: "string"
5756                      property2: "string"
5757                IpcMode: ""
5758                LxcConf: []
5759                Memory: 0
5760                MemorySwap: 0
5761                MemoryReservation: 0
5762                KernelMemory: 0
5763                OomKillDisable: false
5764                OomScoreAdj: 500
5765                NetworkMode: "bridge"
5766                PidMode: ""
5767                PortBindings: {}
5768                Privileged: false
5769                ReadonlyRootfs: false
5770                PublishAllPorts: false
5771                RestartPolicy:
5772                  MaximumRetryCount: 2
5773                  Name: "on-failure"
5774                LogConfig:
5775                  Type: "json-file"
5776                Sysctls:
5777                  net.ipv4.ip_forward: "1"
5778                Ulimits:
5779                  - {}
5780                VolumeDriver: ""
5781                ShmSize: 67108864
5782              HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname"
5783              HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts"
5784              LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log"
5785              Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39"
5786              Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2"
5787              MountLabel: ""
5788              Name: "/boring_euclid"
5789              NetworkSettings:
5790                Bridge: ""
5791                SandboxID: ""
5792                HairpinMode: false
5793                LinkLocalIPv6Address: ""
5794                LinkLocalIPv6PrefixLen: 0
5795                SandboxKey: ""
5796                EndpointID: ""
5797                Gateway: ""
5798                GlobalIPv6Address: ""
5799                GlobalIPv6PrefixLen: 0
5800                IPAddress: ""
5801                IPPrefixLen: 0
5802                IPv6Gateway: ""
5803                MacAddress: ""
5804                Networks:
5805                  bridge:
5806                    NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
5807                    EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d"
5808                    Gateway: "172.17.0.1"
5809                    IPAddress: "172.17.0.2"
5810                    IPPrefixLen: 16
5811                    IPv6Gateway: ""
5812                    GlobalIPv6Address: ""
5813                    GlobalIPv6PrefixLen: 0
5814                    MacAddress: "02:42:ac:12:00:02"
5815              Path: "/bin/sh"
5816              ProcessLabel: ""
5817              ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf"
5818              RestartCount: 1
5819              State:
5820                Error: ""
5821                ExitCode: 9
5822                FinishedAt: "2015-01-06T15:47:32.080254511Z"
5823                Health:
5824                  Status: "healthy"
5825                  FailingStreak: 0
5826                  Log:
5827                    - Start: "2019-12-22T10:59:05.6385933Z"
5828                      End: "2019-12-22T10:59:05.8078452Z"
5829                      ExitCode: 0
5830                      Output: ""
5831                OOMKilled: false
5832                Dead: false
5833                Paused: false
5834                Pid: 0
5835                Restarting: false
5836                Running: true
5837                StartedAt: "2015-01-06T15:47:32.072697474Z"
5838                Status: "running"
5839              Mounts:
5840                - Name: "fac362...80535"
5841                  Source: "/data"
5842                  Destination: "/data"
5843                  Driver: "local"
5844                  Mode: "ro,Z"
5845                  RW: false
5846                  Propagation: ""
5847        404:
5848          description: "no such container"
5849          schema:
5850            $ref: "#/definitions/ErrorResponse"
5851          examples:
5852            application/json:
5853              message: "No such container: c2ada9df5af8"
5854        500:
5855          description: "server error"
5856          schema:
5857            $ref: "#/definitions/ErrorResponse"
5858      parameters:
5859        - name: "id"
5860          in: "path"
5861          required: true
5862          description: "ID or name of the container"
5863          type: "string"
5864        - name: "size"
5865          in: "query"
5866          type: "boolean"
5867          default: false
5868          description: "Return the size of container as fields `SizeRw` and `SizeRootFs`"
5869      tags: ["Container"]
5870  /containers/{id}/top:
5871    get:
5872      summary: "List processes running inside a container"
5873      description: |
5874        On Unix systems, this is done by running the `ps` command. This endpoint
5875        is not supported on Windows.
5876      operationId: "ContainerTop"
5877      responses:
5878        200:
5879          description: "no error"
5880          schema:
5881            type: "object"
5882            title: "ContainerTopResponse"
5883            description: "OK response to ContainerTop operation"
5884            properties:
5885              Titles:
5886                description: "The ps column titles"
5887                type: "array"
5888                items:
5889                  type: "string"
5890              Processes:
5891                description: |
5892                  Each process running in the container, where each is process
5893                  is an array of values corresponding to the titles.
5894                type: "array"
5895                items:
5896                  type: "array"
5897                  items:
5898                    type: "string"
5899          examples:
5900            application/json:
5901              Titles:
5902                - "UID"
5903                - "PID"
5904                - "PPID"
5905                - "C"
5906                - "STIME"
5907                - "TTY"
5908                - "TIME"
5909                - "CMD"
5910              Processes:
5911                -
5912                  - "root"
5913                  - "13642"
5914                  - "882"
5915                  - "0"
5916                  - "17:03"
5917                  - "pts/0"
5918                  - "00:00:00"
5919                  - "/bin/bash"
5920                -
5921                  - "root"
5922                  - "13735"
5923                  - "13642"
5924                  - "0"
5925                  - "17:06"
5926                  - "pts/0"
5927                  - "00:00:00"
5928                  - "sleep 10"
5929        404:
5930          description: "no such container"
5931          schema:
5932            $ref: "#/definitions/ErrorResponse"
5933          examples:
5934            application/json:
5935              message: "No such container: c2ada9df5af8"
5936        500:
5937          description: "server error"
5938          schema:
5939            $ref: "#/definitions/ErrorResponse"
5940      parameters:
5941        - name: "id"
5942          in: "path"
5943          required: true
5944          description: "ID or name of the container"
5945          type: "string"
5946        - name: "ps_args"
5947          in: "query"
5948          description: "The arguments to pass to `ps`. For example, `aux`"
5949          type: "string"
5950          default: "-ef"
5951      tags: ["Container"]
5952  /containers/{id}/logs:
5953    get:
5954      summary: "Get container logs"
5955      description: |
5956        Get `stdout` and `stderr` logs from a container.
5957
5958        Note: This endpoint works only for containers with the `json-file` or
5959        `journald` logging driver.
5960      operationId: "ContainerLogs"
5961      responses:
5962        200:
5963          description: |
5964            logs returned as a stream in response body.
5965            For the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach).
5966            Note that unlike the attach endpoint, the logs endpoint does not
5967            upgrade the connection and does not set Content-Type.
5968          schema:
5969            type: "string"
5970            format: "binary"
5971        404:
5972          description: "no such container"
5973          schema:
5974            $ref: "#/definitions/ErrorResponse"
5975          examples:
5976            application/json:
5977              message: "No such container: c2ada9df5af8"
5978        500:
5979          description: "server error"
5980          schema:
5981            $ref: "#/definitions/ErrorResponse"
5982      parameters:
5983        - name: "id"
5984          in: "path"
5985          required: true
5986          description: "ID or name of the container"
5987          type: "string"
5988        - name: "follow"
5989          in: "query"
5990          description: "Keep connection after returning logs."
5991          type: "boolean"
5992          default: false
5993        - name: "stdout"
5994          in: "query"
5995          description: "Return logs from `stdout`"
5996          type: "boolean"
5997          default: false
5998        - name: "stderr"
5999          in: "query"
6000          description: "Return logs from `stderr`"
6001          type: "boolean"
6002          default: false
6003        - name: "since"
6004          in: "query"
6005          description: "Only return logs since this time, as a UNIX timestamp"
6006          type: "integer"
6007          default: 0
6008        - name: "until"
6009          in: "query"
6010          description: "Only return logs before this time, as a UNIX timestamp"
6011          type: "integer"
6012          default: 0
6013        - name: "timestamps"
6014          in: "query"
6015          description: "Add timestamps to every log line"
6016          type: "boolean"
6017          default: false
6018        - name: "tail"
6019          in: "query"
6020          description: |
6021            Only return this number of log lines from the end of the logs.
6022            Specify as an integer or `all` to output all log lines.
6023          type: "string"
6024          default: "all"
6025      tags: ["Container"]
6026  /containers/{id}/changes:
6027    get:
6028      summary: "Get changes on a container’s filesystem"
6029      description: |
6030        Returns which files in a container's filesystem have been added, deleted,
6031        or modified. The `Kind` of modification can be one of:
6032
6033        - `0`: Modified
6034        - `1`: Added
6035        - `2`: Deleted
6036      operationId: "ContainerChanges"
6037      produces: ["application/json"]
6038      responses:
6039        200:
6040          description: "The list of changes"
6041          schema:
6042            type: "array"
6043            items:
6044              type: "object"
6045              x-go-name: "ContainerChangeResponseItem"
6046              title: "ContainerChangeResponseItem"
6047              description: "change item in response to ContainerChanges operation"
6048              required: [Path, Kind]
6049              properties:
6050                Path:
6051                  description: "Path to file that has changed"
6052                  type: "string"
6053                  x-nullable: false
6054                Kind:
6055                  description: "Kind of change"
6056                  type: "integer"
6057                  format: "uint8"
6058                  enum: [0, 1, 2]
6059                  x-nullable: false
6060          examples:
6061            application/json:
6062              - Path: "/dev"
6063                Kind: 0
6064              - Path: "/dev/kmsg"
6065                Kind: 1
6066              - Path: "/test"
6067                Kind: 1
6068        404:
6069          description: "no such container"
6070          schema:
6071            $ref: "#/definitions/ErrorResponse"
6072          examples:
6073            application/json:
6074              message: "No such container: c2ada9df5af8"
6075        500:
6076          description: "server error"
6077          schema:
6078            $ref: "#/definitions/ErrorResponse"
6079      parameters:
6080        - name: "id"
6081          in: "path"
6082          required: true
6083          description: "ID or name of the container"
6084          type: "string"
6085      tags: ["Container"]
6086  /containers/{id}/export:
6087    get:
6088      summary: "Export a container"
6089      description: "Export the contents of a container as a tarball."
6090      operationId: "ContainerExport"
6091      produces:
6092        - "application/octet-stream"
6093      responses:
6094        200:
6095          description: "no error"
6096        404:
6097          description: "no such container"
6098          schema:
6099            $ref: "#/definitions/ErrorResponse"
6100          examples:
6101            application/json:
6102              message: "No such container: c2ada9df5af8"
6103        500:
6104          description: "server error"
6105          schema:
6106            $ref: "#/definitions/ErrorResponse"
6107      parameters:
6108        - name: "id"
6109          in: "path"
6110          required: true
6111          description: "ID or name of the container"
6112          type: "string"
6113      tags: ["Container"]
6114  /containers/{id}/stats:
6115    get:
6116      summary: "Get container stats based on resource usage"
6117      description: |
6118        This endpoint returns a live stream of a container’s resource usage
6119        statistics.
6120
6121        The `precpu_stats` is the CPU statistic of the *previous* read, and is
6122        used to calculate the CPU usage percentage. It is not an exact copy
6123        of the `cpu_stats` field.
6124
6125        If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is
6126        nil then for compatibility with older daemons the length of the
6127        corresponding `cpu_usage.percpu_usage` array should be used.
6128
6129        On a cgroup v2 host, the following fields are not set
6130        * `blkio_stats`: all fields other than `io_service_bytes_recursive`
6131        * `cpu_stats`: `cpu_usage.percpu_usage`
6132        * `memory_stats`: `max_usage` and `failcnt`
6133        Also, `memory_stats.stats` fields are incompatible with cgroup v1.
6134
6135        To calculate the values shown by the `stats` command of the docker cli tool
6136        the following formulas can be used:
6137        * used_memory = `memory_stats.usage - memory_stats.stats.cache`
6138        * available_memory = `memory_stats.limit`
6139        * Memory usage % = `(used_memory / available_memory) * 100.0`
6140        * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
6141        * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
6142        * number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
6143        * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
6144      operationId: "ContainerStats"
6145      produces: ["application/json"]
6146      responses:
6147        200:
6148          description: "no error"
6149          schema:
6150            type: "object"
6151          examples:
6152            application/json:
6153              read: "2015-01-08T22:57:31.547920715Z"
6154              pids_stats:
6155                current: 3
6156              networks:
6157                eth0:
6158                  rx_bytes: 5338
6159                  rx_dropped: 0
6160                  rx_errors: 0
6161                  rx_packets: 36
6162                  tx_bytes: 648
6163                  tx_dropped: 0
6164                  tx_errors: 0
6165                  tx_packets: 8
6166                eth5:
6167                  rx_bytes: 4641
6168                  rx_dropped: 0
6169                  rx_errors: 0
6170                  rx_packets: 26
6171                  tx_bytes: 690
6172                  tx_dropped: 0
6173                  tx_errors: 0
6174                  tx_packets: 9
6175              memory_stats:
6176                stats:
6177                  total_pgmajfault: 0
6178                  cache: 0
6179                  mapped_file: 0
6180                  total_inactive_file: 0
6181                  pgpgout: 414
6182                  rss: 6537216
6183                  total_mapped_file: 0
6184                  writeback: 0
6185                  unevictable: 0
6186                  pgpgin: 477
6187                  total_unevictable: 0
6188                  pgmajfault: 0
6189                  total_rss: 6537216
6190                  total_rss_huge: 6291456
6191                  total_writeback: 0
6192                  total_inactive_anon: 0
6193                  rss_huge: 6291456
6194                  hierarchical_memory_limit: 67108864
6195                  total_pgfault: 964
6196                  total_active_file: 0
6197                  active_anon: 6537216
6198                  total_active_anon: 6537216
6199                  total_pgpgout: 414
6200                  total_cache: 0
6201                  inactive_anon: 0
6202                  active_file: 0
6203                  pgfault: 964
6204                  inactive_file: 0
6205                  total_pgpgin: 477
6206                max_usage: 6651904
6207                usage: 6537216
6208                failcnt: 0
6209                limit: 67108864
6210              blkio_stats: {}
6211              cpu_stats:
6212                cpu_usage:
6213                  percpu_usage:
6214                    - 8646879
6215                    - 24472255
6216                    - 36438778
6217                    - 30657443
6218                  usage_in_usermode: 50000000
6219                  total_usage: 100215355
6220                  usage_in_kernelmode: 30000000
6221                system_cpu_usage: 739306590000000
6222                online_cpus: 4
6223                throttling_data:
6224                  periods: 0
6225                  throttled_periods: 0
6226                  throttled_time: 0
6227              precpu_stats:
6228                cpu_usage:
6229                  percpu_usage:
6230                    - 8646879
6231                    - 24350896
6232                    - 36438778
6233                    - 30657443
6234                  usage_in_usermode: 50000000
6235                  total_usage: 100093996
6236                  usage_in_kernelmode: 30000000
6237                system_cpu_usage: 9492140000000
6238                online_cpus: 4
6239                throttling_data:
6240                  periods: 0
6241                  throttled_periods: 0
6242                  throttled_time: 0
6243        404:
6244          description: "no such container"
6245          schema:
6246            $ref: "#/definitions/ErrorResponse"
6247          examples:
6248            application/json:
6249              message: "No such container: c2ada9df5af8"
6250        500:
6251          description: "server error"
6252          schema:
6253            $ref: "#/definitions/ErrorResponse"
6254      parameters:
6255        - name: "id"
6256          in: "path"
6257          required: true
6258          description: "ID or name of the container"
6259          type: "string"
6260        - name: "stream"
6261          in: "query"
6262          description: |
6263            Stream the output. If false, the stats will be output once and then
6264            it will disconnect.
6265          type: "boolean"
6266          default: true
6267        - name: "one-shot"
6268          in: "query"
6269          description: |
6270            Only get a single stat instead of waiting for 2 cycles. Must be used
6271            with `stream=false`.
6272          type: "boolean"
6273          default: false
6274      tags: ["Container"]
6275  /containers/{id}/resize:
6276    post:
6277      summary: "Resize a container TTY"
6278      description: "Resize the TTY for a container."
6279      operationId: "ContainerResize"
6280      consumes:
6281        - "application/octet-stream"
6282      produces:
6283        - "text/plain"
6284      responses:
6285        200:
6286          description: "no error"
6287        404:
6288          description: "no such container"
6289          schema:
6290            $ref: "#/definitions/ErrorResponse"
6291          examples:
6292            application/json:
6293              message: "No such container: c2ada9df5af8"
6294        500:
6295          description: "cannot resize container"
6296          schema:
6297            $ref: "#/definitions/ErrorResponse"
6298      parameters:
6299        - name: "id"
6300          in: "path"
6301          required: true
6302          description: "ID or name of the container"
6303          type: "string"
6304        - name: "h"
6305          in: "query"
6306          description: "Height of the TTY session in characters"
6307          type: "integer"
6308        - name: "w"
6309          in: "query"
6310          description: "Width of the TTY session in characters"
6311          type: "integer"
6312      tags: ["Container"]
6313  /containers/{id}/start:
6314    post:
6315      summary: "Start a container"
6316      operationId: "ContainerStart"
6317      responses:
6318        204:
6319          description: "no error"
6320        304:
6321          description: "container already started"
6322        404:
6323          description: "no such container"
6324          schema:
6325            $ref: "#/definitions/ErrorResponse"
6326          examples:
6327            application/json:
6328              message: "No such container: c2ada9df5af8"
6329        500:
6330          description: "server error"
6331          schema:
6332            $ref: "#/definitions/ErrorResponse"
6333      parameters:
6334        - name: "id"
6335          in: "path"
6336          required: true
6337          description: "ID or name of the container"
6338          type: "string"
6339        - name: "detachKeys"
6340          in: "query"
6341          description: |
6342            Override the key sequence for detaching a container. Format is a
6343            single character `[a-Z]` or `ctrl-<value>` where `<value>` is one
6344            of: `a-z`, `@`, `^`, `[`, `,` or `_`.
6345          type: "string"
6346      tags: ["Container"]
6347  /containers/{id}/stop:
6348    post:
6349      summary: "Stop a container"
6350      operationId: "ContainerStop"
6351      responses:
6352        204:
6353          description: "no error"
6354        304:
6355          description: "container already stopped"
6356        404:
6357          description: "no such container"
6358          schema:
6359            $ref: "#/definitions/ErrorResponse"
6360          examples:
6361            application/json:
6362              message: "No such container: c2ada9df5af8"
6363        500:
6364          description: "server error"
6365          schema:
6366            $ref: "#/definitions/ErrorResponse"
6367      parameters:
6368        - name: "id"
6369          in: "path"
6370          required: true
6371          description: "ID or name of the container"
6372          type: "string"
6373        - name: "t"
6374          in: "query"
6375          description: "Number of seconds to wait before killing the container"
6376          type: "integer"
6377      tags: ["Container"]
6378  /containers/{id}/restart:
6379    post:
6380      summary: "Restart a container"
6381      operationId: "ContainerRestart"
6382      responses:
6383        204:
6384          description: "no error"
6385        404:
6386          description: "no such container"
6387          schema:
6388            $ref: "#/definitions/ErrorResponse"
6389          examples:
6390            application/json:
6391              message: "No such container: c2ada9df5af8"
6392        500:
6393          description: "server error"
6394          schema:
6395            $ref: "#/definitions/ErrorResponse"
6396      parameters:
6397        - name: "id"
6398          in: "path"
6399          required: true
6400          description: "ID or name of the container"
6401          type: "string"
6402        - name: "t"
6403          in: "query"
6404          description: "Number of seconds to wait before killing the container"
6405          type: "integer"
6406      tags: ["Container"]
6407  /containers/{id}/kill:
6408    post:
6409      summary: "Kill a container"
6410      description: |
6411        Send a POSIX signal to a container, defaulting to killing to the
6412        container.
6413      operationId: "ContainerKill"
6414      responses:
6415        204:
6416          description: "no error"
6417        404:
6418          description: "no such container"
6419          schema:
6420            $ref: "#/definitions/ErrorResponse"
6421          examples:
6422            application/json:
6423              message: "No such container: c2ada9df5af8"
6424        409:
6425          description: "container is not running"
6426          schema:
6427            $ref: "#/definitions/ErrorResponse"
6428          examples:
6429            application/json:
6430              message: "Container d37cde0fe4ad63c3a7252023b2f9800282894247d145cb5933ddf6e52cc03a28 is not running"
6431        500:
6432          description: "server error"
6433          schema:
6434            $ref: "#/definitions/ErrorResponse"
6435      parameters:
6436        - name: "id"
6437          in: "path"
6438          required: true
6439          description: "ID or name of the container"
6440          type: "string"
6441        - name: "signal"
6442          in: "query"
6443          description: "Signal to send to the container as an integer or string (e.g. `SIGINT`)"
6444          type: "string"
6445          default: "SIGKILL"
6446      tags: ["Container"]
6447  /containers/{id}/update:
6448    post:
6449      summary: "Update a container"
6450      description: |
6451        Change various configuration options of a container without having to
6452        recreate it.
6453      operationId: "ContainerUpdate"
6454      consumes: ["application/json"]
6455      produces: ["application/json"]
6456      responses:
6457        200:
6458          description: "The container has been updated."
6459          schema:
6460            type: "object"
6461            title: "ContainerUpdateResponse"
6462            description: "OK response to ContainerUpdate operation"
6463            properties:
6464              Warnings:
6465                type: "array"
6466                items:
6467                  type: "string"
6468        404:
6469          description: "no such container"
6470          schema:
6471            $ref: "#/definitions/ErrorResponse"
6472          examples:
6473            application/json:
6474              message: "No such container: c2ada9df5af8"
6475        500:
6476          description: "server error"
6477          schema:
6478            $ref: "#/definitions/ErrorResponse"
6479      parameters:
6480        - name: "id"
6481          in: "path"
6482          required: true
6483          description: "ID or name of the container"
6484          type: "string"
6485        - name: "update"
6486          in: "body"
6487          required: true
6488          schema:
6489            allOf:
6490              - $ref: "#/definitions/Resources"
6491              - type: "object"
6492                properties:
6493                  RestartPolicy:
6494                    $ref: "#/definitions/RestartPolicy"
6495            example:
6496              BlkioWeight: 300
6497              CpuShares: 512
6498              CpuPeriod: 100000
6499              CpuQuota: 50000
6500              CpuRealtimePeriod: 1000000
6501              CpuRealtimeRuntime: 10000
6502              CpusetCpus: "0,1"
6503              CpusetMems: "0"
6504              Memory: 314572800
6505              MemorySwap: 514288000
6506              MemoryReservation: 209715200
6507              KernelMemory: 52428800
6508              RestartPolicy:
6509                MaximumRetryCount: 4
6510                Name: "on-failure"
6511      tags: ["Container"]
6512  /containers/{id}/rename:
6513    post:
6514      summary: "Rename a container"
6515      operationId: "ContainerRename"
6516      responses:
6517        204:
6518          description: "no error"
6519        404:
6520          description: "no such container"
6521          schema:
6522            $ref: "#/definitions/ErrorResponse"
6523          examples:
6524            application/json:
6525              message: "No such container: c2ada9df5af8"
6526        409:
6527          description: "name already in use"
6528          schema:
6529            $ref: "#/definitions/ErrorResponse"
6530        500:
6531          description: "server error"
6532          schema:
6533            $ref: "#/definitions/ErrorResponse"
6534      parameters:
6535        - name: "id"
6536          in: "path"
6537          required: true
6538          description: "ID or name of the container"
6539          type: "string"
6540        - name: "name"
6541          in: "query"
6542          required: true
6543          description: "New name for the container"
6544          type: "string"
6545      tags: ["Container"]
6546  /containers/{id}/pause:
6547    post:
6548      summary: "Pause a container"
6549      description: |
6550        Use the freezer cgroup to suspend all processes in a container.
6551
6552        Traditionally, when suspending a process the `SIGSTOP` signal is used,
6553        which is observable by the process being suspended. With the freezer
6554        cgroup the process is unaware, and unable to capture, that it is being
6555        suspended, and subsequently resumed.
6556      operationId: "ContainerPause"
6557      responses:
6558        204:
6559          description: "no error"
6560        404:
6561          description: "no such container"
6562          schema:
6563            $ref: "#/definitions/ErrorResponse"
6564          examples:
6565            application/json:
6566              message: "No such container: c2ada9df5af8"
6567        500:
6568          description: "server error"
6569          schema:
6570            $ref: "#/definitions/ErrorResponse"
6571      parameters:
6572        - name: "id"
6573          in: "path"
6574          required: true
6575          description: "ID or name of the container"
6576          type: "string"
6577      tags: ["Container"]
6578  /containers/{id}/unpause:
6579    post:
6580      summary: "Unpause a container"
6581      description: "Resume a container which has been paused."
6582      operationId: "ContainerUnpause"
6583      responses:
6584        204:
6585          description: "no error"
6586        404:
6587          description: "no such container"
6588          schema:
6589            $ref: "#/definitions/ErrorResponse"
6590          examples:
6591            application/json:
6592              message: "No such container: c2ada9df5af8"
6593        500:
6594          description: "server error"
6595          schema:
6596            $ref: "#/definitions/ErrorResponse"
6597      parameters:
6598        - name: "id"
6599          in: "path"
6600          required: true
6601          description: "ID or name of the container"
6602          type: "string"
6603      tags: ["Container"]
6604  /containers/{id}/attach:
6605    post:
6606      summary: "Attach to a container"
6607      description: |
6608        Attach to a container to read its output or send it input. You can attach
6609        to the same container multiple times and you can reattach to containers
6610        that have been detached.
6611
6612        Either the `stream` or `logs` parameter must be `true` for this endpoint
6613        to do anything.
6614
6615        See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/)
6616        for more details.
6617
6618        ### Hijacking
6619
6620        This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`,
6621        and `stderr` on the same socket.
6622
6623        This is the response from the daemon for an attach request:
6624
6625        ```
6626        HTTP/1.1 200 OK
6627        Content-Type: application/vnd.docker.raw-stream
6628
6629        [STREAM]
6630        ```
6631
6632        After the headers and two new lines, the TCP connection can now be used
6633        for raw, bidirectional communication between the client and server.
6634
6635        To hint potential proxies about connection hijacking, the Docker client
6636        can also optionally send connection upgrade headers.
6637
6638        For example, the client sends this request to upgrade the connection:
6639
6640        ```
6641        POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1
6642        Upgrade: tcp
6643        Connection: Upgrade
6644        ```
6645
6646        The Docker daemon will respond with a `101 UPGRADED` response, and will
6647        similarly follow with the raw stream:
6648
6649        ```
6650        HTTP/1.1 101 UPGRADED
6651        Content-Type: application/vnd.docker.raw-stream
6652        Connection: Upgrade
6653        Upgrade: tcp
6654
6655        [STREAM]
6656        ```
6657
6658        ### Stream format
6659
6660        When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate),
6661        the stream over the hijacked connected is multiplexed to separate out
6662        `stdout` and `stderr`. The stream consists of a series of frames, each
6663        containing a header and a payload.
6664
6665        The header contains the information which the stream writes (`stdout` or
6666        `stderr`). It also contains the size of the associated frame encoded in
6667        the last four bytes (`uint32`).
6668
6669        It is encoded on the first eight bytes like this:
6670
6671        ```go
6672        header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}
6673        ```
6674
6675        `STREAM_TYPE` can be:
6676
6677        - 0: `stdin` (is written on `stdout`)
6678        - 1: `stdout`
6679        - 2: `stderr`
6680
6681        `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size
6682        encoded as big endian.
6683
6684        Following the header is the payload, which is the specified number of
6685        bytes of `STREAM_TYPE`.
6686
6687        The simplest way to implement this protocol is the following:
6688
6689        1. Read 8 bytes.
6690        2. Choose `stdout` or `stderr` depending on the first byte.
6691        3. Extract the frame size from the last four bytes.
6692        4. Read the extracted size and output it on the correct output.
6693        5. Goto 1.
6694
6695        ### Stream format when using a TTY
6696
6697        When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate),
6698        the stream is not multiplexed. The data exchanged over the hijacked
6699        connection is simply the raw data from the process PTY and client's
6700        `stdin`.
6701
6702      operationId: "ContainerAttach"
6703      produces:
6704        - "application/vnd.docker.raw-stream"
6705      responses:
6706        101:
6707          description: "no error, hints proxy about hijacking"
6708        200:
6709          description: "no error, no upgrade header found"
6710        400:
6711          description: "bad parameter"
6712          schema:
6713            $ref: "#/definitions/ErrorResponse"
6714        404:
6715          description: "no such container"
6716          schema:
6717            $ref: "#/definitions/ErrorResponse"
6718          examples:
6719            application/json:
6720              message: "No such container: c2ada9df5af8"
6721        500:
6722          description: "server error"
6723          schema:
6724            $ref: "#/definitions/ErrorResponse"
6725      parameters:
6726        - name: "id"
6727          in: "path"
6728          required: true
6729          description: "ID or name of the container"
6730          type: "string"
6731        - name: "detachKeys"
6732          in: "query"
6733          description: |
6734            Override the key sequence for detaching a container.Format is a single
6735            character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`,
6736            `@`, `^`, `[`, `,` or `_`.
6737          type: "string"
6738        - name: "logs"
6739          in: "query"
6740          description: |
6741            Replay previous logs from the container.
6742
6743            This is useful for attaching to a container that has started and you
6744            want to output everything since the container started.
6745
6746            If `stream` is also enabled, once all the previous output has been
6747            returned, it will seamlessly transition into streaming current
6748            output.
6749          type: "boolean"
6750          default: false
6751        - name: "stream"
6752          in: "query"
6753          description: |
6754            Stream attached streams from the time the request was made onwards.
6755          type: "boolean"
6756          default: false
6757        - name: "stdin"
6758          in: "query"
6759          description: "Attach to `stdin`"
6760          type: "boolean"
6761          default: false
6762        - name: "stdout"
6763          in: "query"
6764          description: "Attach to `stdout`"
6765          type: "boolean"
6766          default: false
6767        - name: "stderr"
6768          in: "query"
6769          description: "Attach to `stderr`"
6770          type: "boolean"
6771          default: false
6772      tags: ["Container"]
6773  /containers/{id}/attach/ws:
6774    get:
6775      summary: "Attach to a container via a websocket"
6776      operationId: "ContainerAttachWebsocket"
6777      responses:
6778        101:
6779          description: "no error, hints proxy about hijacking"
6780        200:
6781          description: "no error, no upgrade header found"
6782        400:
6783          description: "bad parameter"
6784          schema:
6785            $ref: "#/definitions/ErrorResponse"
6786        404:
6787          description: "no such container"
6788          schema:
6789            $ref: "#/definitions/ErrorResponse"
6790          examples:
6791            application/json:
6792              message: "No such container: c2ada9df5af8"
6793        500:
6794          description: "server error"
6795          schema:
6796            $ref: "#/definitions/ErrorResponse"
6797      parameters:
6798        - name: "id"
6799          in: "path"
6800          required: true
6801          description: "ID or name of the container"
6802          type: "string"
6803        - name: "detachKeys"
6804          in: "query"
6805          description: |
6806            Override the key sequence for detaching a container.Format is a single
6807            character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`,
6808            `@`, `^`, `[`, `,`, or `_`.
6809          type: "string"
6810        - name: "logs"
6811          in: "query"
6812          description: "Return logs"
6813          type: "boolean"
6814          default: false
6815        - name: "stream"
6816          in: "query"
6817          description: "Return stream"
6818          type: "boolean"
6819          default: false
6820        - name: "stdin"
6821          in: "query"
6822          description: "Attach to `stdin`"
6823          type: "boolean"
6824          default: false
6825        - name: "stdout"
6826          in: "query"
6827          description: "Attach to `stdout`"
6828          type: "boolean"
6829          default: false
6830        - name: "stderr"
6831          in: "query"
6832          description: "Attach to `stderr`"
6833          type: "boolean"
6834          default: false
6835      tags: ["Container"]
6836  /containers/{id}/wait:
6837    post:
6838      summary: "Wait for a container"
6839      description: "Block until a container stops, then returns the exit code."
6840      operationId: "ContainerWait"
6841      produces: ["application/json"]
6842      responses:
6843        200:
6844          description: "The container has exit."
6845          schema:
6846            type: "object"
6847            title: "ContainerWaitResponse"
6848            description: "OK response to ContainerWait operation"
6849            required: [StatusCode]
6850            properties:
6851              StatusCode:
6852                description: "Exit code of the container"
6853                type: "integer"
6854                x-nullable: false
6855              Error:
6856                description: "container waiting error, if any"
6857                type: "object"
6858                properties:
6859                  Message:
6860                    description: "Details of an error"
6861                    type: "string"
6862        404:
6863          description: "no such container"
6864          schema:
6865            $ref: "#/definitions/ErrorResponse"
6866          examples:
6867            application/json:
6868              message: "No such container: c2ada9df5af8"
6869        500:
6870          description: "server error"
6871          schema:
6872            $ref: "#/definitions/ErrorResponse"
6873      parameters:
6874        - name: "id"
6875          in: "path"
6876          required: true
6877          description: "ID or name of the container"
6878          type: "string"
6879        - name: "condition"
6880          in: "query"
6881          description: |
6882            Wait until a container state reaches the given condition, either
6883            'not-running' (default), 'next-exit', or 'removed'.
6884          type: "string"
6885          default: "not-running"
6886      tags: ["Container"]
6887  /containers/{id}:
6888    delete:
6889      summary: "Remove a container"
6890      operationId: "ContainerDelete"
6891      responses:
6892        204:
6893          description: "no error"
6894        400:
6895          description: "bad parameter"
6896          schema:
6897            $ref: "#/definitions/ErrorResponse"
6898        404:
6899          description: "no such container"
6900          schema:
6901            $ref: "#/definitions/ErrorResponse"
6902          examples:
6903            application/json:
6904              message: "No such container: c2ada9df5af8"
6905        409:
6906          description: "conflict"
6907          schema:
6908            $ref: "#/definitions/ErrorResponse"
6909          examples:
6910            application/json:
6911              message: |
6912                You cannot remove a running container: c2ada9df5af8. Stop the
6913                container before attempting removal or force remove
6914        500:
6915          description: "server error"
6916          schema:
6917            $ref: "#/definitions/ErrorResponse"
6918      parameters:
6919        - name: "id"
6920          in: "path"
6921          required: true
6922          description: "ID or name of the container"
6923          type: "string"
6924        - name: "v"
6925          in: "query"
6926          description: "Remove anonymous volumes associated with the container."
6927          type: "boolean"
6928          default: false
6929        - name: "force"
6930          in: "query"
6931          description: "If the container is running, kill it before removing it."
6932          type: "boolean"
6933          default: false
6934        - name: "link"
6935          in: "query"
6936          description: "Remove the specified link associated with the container."
6937          type: "boolean"
6938          default: false
6939      tags: ["Container"]
6940  /containers/{id}/archive:
6941    head:
6942      summary: "Get information about files in a container"
6943      description: |
6944        A response header `X-Docker-Container-Path-Stat` is returned, containing
6945        a base64 - encoded JSON object with some filesystem header information
6946        about the path.
6947      operationId: "ContainerArchiveInfo"
6948      responses:
6949        200:
6950          description: "no error"
6951          headers:
6952            X-Docker-Container-Path-Stat:
6953              type: "string"
6954              description: |
6955                A base64 - encoded JSON object with some filesystem header
6956                information about the path
6957        400:
6958          description: "Bad parameter"
6959          schema:
6960            allOf:
6961              - $ref: "#/definitions/ErrorResponse"
6962              - type: "object"
6963                properties:
6964                  message:
6965                    description: |
6966                      The error message. Either "must specify path parameter"
6967                      (path cannot be empty) or "not a directory" (path was
6968                      asserted to be a directory but exists as a file).
6969                    type: "string"
6970                    x-nullable: false
6971        404:
6972          description: "Container or path does not exist"
6973          schema:
6974            $ref: "#/definitions/ErrorResponse"
6975          examples:
6976            application/json:
6977              message: "No such container: c2ada9df5af8"
6978        500:
6979          description: "Server error"
6980          schema:
6981            $ref: "#/definitions/ErrorResponse"
6982      parameters:
6983        - name: "id"
6984          in: "path"
6985          required: true
6986          description: "ID or name of the container"
6987          type: "string"
6988        - name: "path"
6989          in: "query"
6990          required: true
6991          description: "Resource in the container’s filesystem to archive."
6992          type: "string"
6993      tags: ["Container"]
6994    get:
6995      summary: "Get an archive of a filesystem resource in a container"
6996      description: "Get a tar archive of a resource in the filesystem of container id."
6997      operationId: "ContainerArchive"
6998      produces: ["application/x-tar"]
6999      responses:
7000        200:
7001          description: "no error"
7002        400:
7003          description: "Bad parameter"
7004          schema:
7005            allOf:
7006              - $ref: "#/definitions/ErrorResponse"
7007              - type: "object"
7008                properties:
7009                  message:
7010                    description: |
7011                      The error message. Either "must specify path parameter"
7012                      (path cannot be empty) or "not a directory" (path was
7013                      asserted to be a directory but exists as a file).
7014                    type: "string"
7015                    x-nullable: false
7016        404:
7017          description: "Container or path does not exist"
7018          schema:
7019            $ref: "#/definitions/ErrorResponse"
7020          examples:
7021            application/json:
7022              message: "No such container: c2ada9df5af8"
7023        500:
7024          description: "server error"
7025          schema:
7026            $ref: "#/definitions/ErrorResponse"
7027      parameters:
7028        - name: "id"
7029          in: "path"
7030          required: true
7031          description: "ID or name of the container"
7032          type: "string"
7033        - name: "path"
7034          in: "query"
7035          required: true
7036          description: "Resource in the container’s filesystem to archive."
7037          type: "string"
7038      tags: ["Container"]
7039    put:
7040      summary: "Extract an archive of files or folders to a directory in a container"
7041      description: "Upload a tar archive to be extracted to a path in the filesystem of container id."
7042      operationId: "PutContainerArchive"
7043      consumes: ["application/x-tar", "application/octet-stream"]
7044      responses:
7045        200:
7046          description: "The content was extracted successfully"
7047        400:
7048          description: "Bad parameter"
7049          schema:
7050            $ref: "#/definitions/ErrorResponse"
7051        403:
7052          description: "Permission denied, the volume or container rootfs is marked as read-only."
7053          schema:
7054            $ref: "#/definitions/ErrorResponse"
7055        404:
7056          description: "No such container or path does not exist inside the container"
7057          schema:
7058            $ref: "#/definitions/ErrorResponse"
7059          examples:
7060            application/json:
7061              message: "No such container: c2ada9df5af8"
7062        500:
7063          description: "Server error"
7064          schema:
7065            $ref: "#/definitions/ErrorResponse"
7066      parameters:
7067        - name: "id"
7068          in: "path"
7069          required: true
7070          description: "ID or name of the container"
7071          type: "string"
7072        - name: "path"
7073          in: "query"
7074          required: true
7075          description: "Path to a directory in the container to extract the archive’s contents into. "
7076          type: "string"
7077        - name: "noOverwriteDirNonDir"
7078          in: "query"
7079          description: |
7080            If `1`, `true`, or `True` then it will be an error if unpacking the
7081            given content would cause an existing directory to be replaced with
7082            a non-directory and vice versa.
7083          type: "string"
7084        - name: "copyUIDGID"
7085          in: "query"
7086          description: |
7087            If `1`, `true`, then it will copy UID/GID maps to the dest file or
7088            dir
7089          type: "string"
7090        - name: "inputStream"
7091          in: "body"
7092          required: true
7093          description: |
7094            The input stream must be a tar archive compressed with one of the
7095            following algorithms: `identity` (no compression), `gzip`, `bzip2`,
7096            or `xz`.
7097          schema:
7098            type: "string"
7099            format: "binary"
7100      tags: ["Container"]
7101  /containers/prune:
7102    post:
7103      summary: "Delete stopped containers"
7104      produces:
7105        - "application/json"
7106      operationId: "ContainerPrune"
7107      parameters:
7108        - name: "filters"
7109          in: "query"
7110          description: |
7111            Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
7112
7113            Available filters:
7114            - `until=<timestamp>` Prune containers created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time.
7115            - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune containers with (or without, in case `label!=...` is used) the specified labels.
7116          type: "string"
7117      responses:
7118        200:
7119          description: "No error"
7120          schema:
7121            type: "object"
7122            title: "ContainerPruneResponse"
7123            properties:
7124              ContainersDeleted:
7125                description: "Container IDs that were deleted"
7126                type: "array"
7127                items:
7128                  type: "string"
7129              SpaceReclaimed:
7130                description: "Disk space reclaimed in bytes"
7131                type: "integer"
7132                format: "int64"
7133        500:
7134          description: "Server error"
7135          schema:
7136            $ref: "#/definitions/ErrorResponse"
7137      tags: ["Container"]
7138  /images/json:
7139    get:
7140      summary: "List Images"
7141      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."
7142      operationId: "ImageList"
7143      produces:
7144        - "application/json"
7145      responses:
7146        200:
7147          description: "Summary image data for the images matching the query"
7148          schema:
7149            type: "array"
7150            items:
7151              $ref: "#/definitions/ImageSummary"
7152          examples:
7153            application/json:
7154              - Id: "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8"
7155                ParentId: ""
7156                RepoTags:
7157                  - "ubuntu:12.04"
7158                  - "ubuntu:precise"
7159                RepoDigests:
7160                  - "ubuntu@sha256:992069aee4016783df6345315302fa59681aae51a8eeb2f889dea59290f21787"
7161                Created: 1474925151
7162                Size: 103579269
7163                VirtualSize: 103579269
7164                SharedSize: 0
7165                Labels: {}
7166                Containers: 2
7167              - Id: "sha256:3e314f95dcace0f5e4fd37b10862fe8398e3c60ed36600bc0ca5fda78b087175"
7168                ParentId: ""
7169                RepoTags:
7170                  - "ubuntu:12.10"
7171                  - "ubuntu:quantal"
7172                RepoDigests:
7173                  - "ubuntu@sha256:002fba3e3255af10be97ea26e476692a7ebed0bb074a9ab960b2e7a1526b15d7"
7174                  - "ubuntu@sha256:68ea0200f0b90df725d99d823905b04cf844f6039ef60c60bf3e019915017bd3"
7175                Created: 1403128455
7176                Size: 172064416
7177                VirtualSize: 172064416
7178                SharedSize: 0
7179                Labels: {}
7180                Containers: 5
7181        500:
7182          description: "server error"
7183          schema:
7184            $ref: "#/definitions/ErrorResponse"
7185      parameters:
7186        - name: "all"
7187          in: "query"
7188          description: "Show all images. Only images from a final layer (no children) are shown by default."
7189          type: "boolean"
7190          default: false
7191        - name: "filters"
7192          in: "query"
7193          description: |
7194            A JSON encoded value of the filters (a `map[string][]string`) to
7195            process on the images list.
7196
7197            Available filters:
7198
7199            - `before`=(`<image-name>[:<tag>]`,  `<image id>` or `<image@digest>`)
7200            - `dangling=true`
7201            - `label=key` or `label="key=value"` of an image label
7202            - `reference`=(`<image-name>[:<tag>]`)
7203            - `since`=(`<image-name>[:<tag>]`,  `<image id>` or `<image@digest>`)
7204          type: "string"
7205        - name: "digests"
7206          in: "query"
7207          description: "Show digest information as a `RepoDigests` field on each image."
7208          type: "boolean"
7209          default: false
7210      tags: ["Image"]
7211  /build:
7212    post:
7213      summary: "Build an image"
7214      description: |
7215        Build an image from a tar archive with a `Dockerfile` in it.
7216
7217        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/).
7218
7219        The Docker daemon performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. After that, each instruction is run one-by-one until the ID of the new image is output.
7220
7221        The build is canceled if the client drops the connection by quitting or being killed.
7222      operationId: "ImageBuild"
7223      consumes:
7224        - "application/octet-stream"
7225      produces:
7226        - "application/json"
7227      parameters:
7228        - name: "inputStream"
7229          in: "body"
7230          description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz."
7231          schema:
7232            type: "string"
7233            format: "binary"
7234        - name: "dockerfile"
7235          in: "query"
7236          description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`."
7237          type: "string"
7238          default: "Dockerfile"
7239        - name: "t"
7240          in: "query"
7241          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."
7242          type: "string"
7243        - name: "extrahosts"
7244          in: "query"
7245          description: "Extra hosts to add to /etc/hosts"
7246          type: "string"
7247        - name: "remote"
7248          in: "query"
7249          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."
7250          type: "string"
7251        - name: "q"
7252          in: "query"
7253          description: "Suppress verbose build output."
7254          type: "boolean"
7255          default: false
7256        - name: "nocache"
7257          in: "query"
7258          description: "Do not use the cache when building the image."
7259          type: "boolean"
7260          default: false
7261        - name: "cachefrom"
7262          in: "query"
7263          description: "JSON array of images used for build cache resolution."
7264          type: "string"
7265        - name: "pull"
7266          in: "query"
7267          description: "Attempt to pull the image even if an older image exists locally."
7268          type: "string"
7269        - name: "rm"
7270          in: "query"
7271          description: "Remove intermediate containers after a successful build."
7272          type: "boolean"
7273          default: true
7274        - name: "forcerm"
7275          in: "query"
7276          description: "Always remove intermediate containers, even upon failure."
7277          type: "boolean"
7278          default: false
7279        - name: "memory"
7280          in: "query"
7281          description: "Set memory limit for build."
7282          type: "integer"
7283        - name: "memswap"
7284          in: "query"
7285          description: "Total memory (memory + swap). Set as `-1` to disable swap."
7286          type: "integer"
7287        - name: "cpushares"
7288          in: "query"
7289          description: "CPU shares (relative weight)."
7290          type: "integer"
7291        - name: "cpusetcpus"
7292          in: "query"
7293          description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)."
7294          type: "string"
7295        - name: "cpuperiod"
7296          in: "query"
7297          description: "The length of a CPU period in microseconds."
7298          type: "integer"
7299        - name: "cpuquota"
7300          in: "query"
7301          description: "Microseconds of CPU time that the container can get in a CPU period."
7302          type: "integer"
7303        - name: "buildargs"
7304          in: "query"
7305          description: >
7306            JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker
7307            uses the buildargs as the environment context for commands run via the `Dockerfile` RUN
7308            instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for
7309            passing secret values.
7310
7311
7312            For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the
7313            the query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded.
7314
7315
7316            [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)
7317          type: "string"
7318        - name: "shmsize"
7319          in: "query"
7320          description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB."
7321          type: "integer"
7322        - name: "squash"
7323          in: "query"
7324          description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*"
7325          type: "boolean"
7326        - name: "labels"
7327          in: "query"
7328          description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs."
7329          type: "string"
7330        - name: "networkmode"
7331          in: "query"
7332          description: |
7333            Sets the networking mode for the run commands during build. Supported
7334            standard values are: `bridge`, `host`, `none`, and `container:<name|id>`.
7335            Any other value is taken as a custom network's name or ID to which this
7336            container should connect to.
7337          type: "string"
7338        - name: "Content-type"
7339          in: "header"
7340          type: "string"
7341          enum:
7342            - "application/x-tar"
7343          default: "application/x-tar"
7344        - name: "X-Registry-Config"
7345          in: "header"
7346          description: |
7347            This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to.
7348
7349            The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example:
7350
7351            ```
7352            {
7353              "docker.example.com": {
7354                "username": "janedoe",
7355                "password": "hunter2"
7356              },
7357              "https://index.docker.io/v1/": {
7358                "username": "mobydock",
7359                "password": "conta1n3rize14"
7360              }
7361            }
7362            ```
7363
7364            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.
7365          type: "string"
7366        - name: "platform"
7367          in: "query"
7368          description: "Platform in the format os[/arch[/variant]]"
7369          type: "string"
7370          default: ""
7371        - name: "target"
7372          in: "query"
7373          description: "Target build stage"
7374          type: "string"
7375          default: ""
7376        - name: "outputs"
7377          in: "query"
7378          description: "BuildKit output configuration"
7379          type: "string"
7380          default: ""
7381      responses:
7382        200:
7383          description: "no error"
7384        400:
7385          description: "Bad parameter"
7386          schema:
7387            $ref: "#/definitions/ErrorResponse"
7388        500:
7389          description: "server error"
7390          schema:
7391            $ref: "#/definitions/ErrorResponse"
7392      tags: ["Image"]
7393  /build/prune:
7394    post:
7395      summary: "Delete builder cache"
7396      produces:
7397        - "application/json"
7398      operationId: "BuildPrune"
7399      parameters:
7400        - name: "keep-storage"
7401          in: "query"
7402          description: "Amount of disk space in bytes to keep for cache"
7403          type: "integer"
7404          format: "int64"
7405        - name: "all"
7406          in: "query"
7407          type: "boolean"
7408          description: "Remove all types of build cache"
7409        - name: "filters"
7410          in: "query"
7411          type: "string"
7412          description: |
7413            A JSON encoded value of the filters (a `map[string][]string`) to
7414            process on the list of build cache objects.
7415
7416            Available filters:
7417
7418            - `until=<duration>`: duration relative to daemon's time, during which build cache was not used, in Go's duration format (e.g., '24h')
7419            - `id=<id>`
7420            - `parent=<id>`
7421            - `type=<string>`
7422            - `description=<string>`
7423            - `inuse`
7424            - `shared`
7425            - `private`
7426      responses:
7427        200:
7428          description: "No error"
7429          schema:
7430            type: "object"
7431            title: "BuildPruneResponse"
7432            properties:
7433              CachesDeleted:
7434                type: "array"
7435                items:
7436                  description: "ID of build cache object"
7437                  type: "string"
7438              SpaceReclaimed:
7439                description: "Disk space reclaimed in bytes"
7440                type: "integer"
7441                format: "int64"
7442        500:
7443          description: "Server error"
7444          schema:
7445            $ref: "#/definitions/ErrorResponse"
7446      tags: ["Image"]
7447  /images/create:
7448    post:
7449      summary: "Create an image"
7450      description: "Create an image by either pulling it from a registry or importing it."
7451      operationId: "ImageCreate"
7452      consumes:
7453        - "text/plain"
7454        - "application/octet-stream"
7455      produces:
7456        - "application/json"
7457      responses:
7458        200:
7459          description: "no error"
7460        404:
7461          description: "repository does not exist or no read access"
7462          schema:
7463            $ref: "#/definitions/ErrorResponse"
7464        500:
7465          description: "server error"
7466          schema:
7467            $ref: "#/definitions/ErrorResponse"
7468      parameters:
7469        - name: "fromImage"
7470          in: "query"
7471          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."
7472          type: "string"
7473        - name: "fromSrc"
7474          in: "query"
7475          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."
7476          type: "string"
7477        - name: "repo"
7478          in: "query"
7479          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."
7480          type: "string"
7481        - name: "tag"
7482          in: "query"
7483          description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled."
7484          type: "string"
7485        - name: "message"
7486          in: "query"
7487          description: "Set commit message for imported image."
7488          type: "string"
7489        - name: "inputImage"
7490          in: "body"
7491          description: "Image content if the value `-` has been specified in fromSrc query parameter"
7492          schema:
7493            type: "string"
7494          required: false
7495        - name: "X-Registry-Auth"
7496          in: "header"
7497          description: |
7498            A base64url-encoded auth configuration.
7499
7500            Refer to the [authentication section](#section/Authentication) for
7501            details.
7502          type: "string"
7503        - name: "platform"
7504          in: "query"
7505          description: "Platform in the format os[/arch[/variant]]"
7506          type: "string"
7507          default: ""
7508      tags: ["Image"]
7509  /images/{name}/json:
7510    get:
7511      summary: "Inspect an image"
7512      description: "Return low-level information about an image."
7513      operationId: "ImageInspect"
7514      produces:
7515        - "application/json"
7516      responses:
7517        200:
7518          description: "No error"
7519          schema:
7520            $ref: "#/definitions/Image"
7521          examples:
7522            application/json:
7523              Id: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c"
7524              Container: "cb91e48a60d01f1e27028b4fc6819f4f290b3cf12496c8176ec714d0d390984a"
7525              Comment: ""
7526              Os: "linux"
7527              Architecture: "amd64"
7528              Parent: "sha256:91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c"
7529              ContainerConfig:
7530                Tty: false
7531                Hostname: "e611e15f9c9d"
7532                Domainname: ""
7533                AttachStdout: false
7534                PublishService: ""
7535                AttachStdin: false
7536                OpenStdin: false
7537                StdinOnce: false
7538                NetworkDisabled: false
7539                OnBuild: []
7540                Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c"
7541                User: ""
7542                WorkingDir: ""
7543                MacAddress: ""
7544                AttachStderr: false
7545                Labels:
7546                  com.example.license: "GPL"
7547                  com.example.version: "1.0"
7548                  com.example.vendor: "Acme"
7549                Env:
7550                  - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
7551                Cmd:
7552                  - "/bin/sh"
7553                  - "-c"
7554                  - "#(nop) LABEL com.example.vendor=Acme com.example.license=GPL com.example.version=1.0"
7555              DockerVersion: "1.9.0-dev"
7556              VirtualSize: 188359297
7557              Size: 0
7558              Author: ""
7559              Created: "2015-09-10T08:30:53.26995814Z"
7560              GraphDriver:
7561                Name: "aufs"
7562                Data: {}
7563              RepoDigests:
7564                - "localhost:5000/test/busybox/example@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf"
7565              RepoTags:
7566                - "example:1.0"
7567                - "example:latest"
7568                - "example:stable"
7569              Config:
7570                Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c"
7571                NetworkDisabled: false
7572                OnBuild: []
7573                StdinOnce: false
7574                PublishService: ""
7575                AttachStdin: false
7576                OpenStdin: false
7577                Domainname: ""
7578                AttachStdout: false
7579                Tty: false
7580                Hostname: "e611e15f9c9d"
7581                Cmd:
7582                  - "/bin/bash"
7583                Env:
7584                  - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
7585                Labels:
7586                  com.example.vendor: "Acme"
7587                  com.example.version: "1.0"
7588                  com.example.license: "GPL"
7589                MacAddress: ""
7590                AttachStderr: false
7591                WorkingDir: ""
7592                User: ""
7593              RootFS:
7594                Type: "layers"
7595                Layers:
7596                  - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6"
7597                  - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"
7598        404:
7599          description: "No such image"
7600          schema:
7601            $ref: "#/definitions/ErrorResponse"
7602          examples:
7603            application/json:
7604              message: "No such image: someimage (tag: latest)"
7605        500:
7606          description: "Server error"
7607          schema:
7608            $ref: "#/definitions/ErrorResponse"
7609      parameters:
7610        - name: "name"
7611          in: "path"
7612          description: "Image name or id"
7613          type: "string"
7614          required: true
7615      tags: ["Image"]
7616  /images/{name}/history:
7617    get:
7618      summary: "Get the history of an image"
7619      description: "Return parent layers of an image."
7620      operationId: "ImageHistory"
7621      produces: ["application/json"]
7622      responses:
7623        200:
7624          description: "List of image layers"
7625          schema:
7626            type: "array"
7627            items:
7628              type: "object"
7629              x-go-name: HistoryResponseItem
7630              title: "HistoryResponseItem"
7631              description: "individual image layer information in response to ImageHistory operation"
7632              required: [Id, Created, CreatedBy, Tags, Size, Comment]
7633              properties:
7634                Id:
7635                  type: "string"
7636                  x-nullable: false
7637                Created:
7638                  type: "integer"
7639                  format: "int64"
7640                  x-nullable: false
7641                CreatedBy:
7642                  type: "string"
7643                  x-nullable: false
7644                Tags:
7645                  type: "array"
7646                  items:
7647                    type: "string"
7648                Size:
7649                  type: "integer"
7650                  format: "int64"
7651                  x-nullable: false
7652                Comment:
7653                  type: "string"
7654                  x-nullable: false
7655          examples:
7656            application/json:
7657              - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710"
7658                Created: 1398108230
7659                CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /"
7660                Tags:
7661                  - "ubuntu:lucid"
7662                  - "ubuntu:10.04"
7663                Size: 182964289
7664                Comment: ""
7665              - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8"
7666                Created: 1398108222
7667                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/"
7668                Tags: []
7669                Size: 0
7670                Comment: ""
7671              - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158"
7672                Created: 1371157430
7673                CreatedBy: ""
7674                Tags:
7675                  - "scratch12:latest"
7676                  - "scratch:latest"
7677                Size: 0
7678                Comment: "Imported from -"
7679        404:
7680          description: "No such image"
7681          schema:
7682            $ref: "#/definitions/ErrorResponse"
7683        500:
7684          description: "Server error"
7685          schema:
7686            $ref: "#/definitions/ErrorResponse"
7687      parameters:
7688        - name: "name"
7689          in: "path"
7690          description: "Image name or ID"
7691          type: "string"
7692          required: true
7693      tags: ["Image"]
7694  /images/{name}/push:
7695    post:
7696      summary: "Push an image"
7697      description: |
7698        Push an image to a registry.
7699
7700        If you wish to push an image on to a private registry, that image must
7701        already have a tag which references the registry. For example,
7702        `registry.example.com/myimage:latest`.
7703
7704        The push is cancelled if the HTTP connection is closed.
7705      operationId: "ImagePush"
7706      consumes:
7707        - "application/octet-stream"
7708      responses:
7709        200:
7710          description: "No error"
7711        404:
7712          description: "No such image"
7713          schema:
7714            $ref: "#/definitions/ErrorResponse"
7715        500:
7716          description: "Server error"
7717          schema:
7718            $ref: "#/definitions/ErrorResponse"
7719      parameters:
7720        - name: "name"
7721          in: "path"
7722          description: "Image name or ID."
7723          type: "string"
7724          required: true
7725        - name: "tag"
7726          in: "query"
7727          description: "The tag to associate with the image on the registry."
7728          type: "string"
7729        - name: "X-Registry-Auth"
7730          in: "header"
7731          description: |
7732            A base64url-encoded auth configuration.
7733
7734            Refer to the [authentication section](#section/Authentication) for
7735            details.
7736          type: "string"
7737          required: true
7738      tags: ["Image"]
7739  /images/{name}/tag:
7740    post:
7741      summary: "Tag an image"
7742      description: "Tag an image so that it becomes part of a repository."
7743      operationId: "ImageTag"
7744      responses:
7745        201:
7746          description: "No error"
7747        400:
7748          description: "Bad parameter"
7749          schema:
7750            $ref: "#/definitions/ErrorResponse"
7751        404:
7752          description: "No such image"
7753          schema:
7754            $ref: "#/definitions/ErrorResponse"
7755        409:
7756          description: "Conflict"
7757          schema:
7758            $ref: "#/definitions/ErrorResponse"
7759        500:
7760          description: "Server error"
7761          schema:
7762            $ref: "#/definitions/ErrorResponse"
7763      parameters:
7764        - name: "name"
7765          in: "path"
7766          description: "Image name or ID to tag."
7767          type: "string"
7768          required: true
7769        - name: "repo"
7770          in: "query"
7771          description: "The repository to tag in. For example, `someuser/someimage`."
7772          type: "string"
7773        - name: "tag"
7774          in: "query"
7775          description: "The name of the new tag."
7776          type: "string"
7777      tags: ["Image"]
7778  /images/{name}:
7779    delete:
7780      summary: "Remove an image"
7781      description: |
7782        Remove an image, along with any untagged parent images that were
7783        referenced by that image.
7784
7785        Images can't be removed if they have descendant images, are being
7786        used by a running container or are being used by a build.
7787      operationId: "ImageDelete"
7788      produces: ["application/json"]
7789      responses:
7790        200:
7791          description: "The image was deleted successfully"
7792          schema:
7793            type: "array"
7794            items:
7795              $ref: "#/definitions/ImageDeleteResponseItem"
7796          examples:
7797            application/json:
7798              - Untagged: "3e2f21a89f"
7799              - Deleted: "3e2f21a89f"
7800              - Deleted: "53b4f83ac9"
7801        404:
7802          description: "No such image"
7803          schema:
7804            $ref: "#/definitions/ErrorResponse"
7805        409:
7806          description: "Conflict"
7807          schema:
7808            $ref: "#/definitions/ErrorResponse"
7809        500:
7810          description: "Server error"
7811          schema:
7812            $ref: "#/definitions/ErrorResponse"
7813      parameters:
7814        - name: "name"
7815          in: "path"
7816          description: "Image name or ID"
7817          type: "string"
7818          required: true
7819        - name: "force"
7820          in: "query"
7821          description: "Remove the image even if it is being used by stopped containers or has other tags"
7822          type: "boolean"
7823          default: false
7824        - name: "noprune"
7825          in: "query"
7826          description: "Do not delete untagged parent images"
7827          type: "boolean"
7828          default: false
7829      tags: ["Image"]
7830  /images/search:
7831    get:
7832      summary: "Search images"
7833      description: "Search for an image on Docker Hub."
7834      operationId: "ImageSearch"
7835      produces:
7836        - "application/json"
7837      responses:
7838        200:
7839          description: "No error"
7840          schema:
7841            type: "array"
7842            items:
7843              type: "object"
7844              title: "ImageSearchResponseItem"
7845              properties:
7846                description:
7847                  type: "string"
7848                is_official:
7849                  type: "boolean"
7850                is_automated:
7851                  type: "boolean"
7852                name:
7853                  type: "string"
7854                star_count:
7855                  type: "integer"
7856          examples:
7857            application/json:
7858              - description: ""
7859                is_official: false
7860                is_automated: false
7861                name: "wma55/u1210sshd"
7862                star_count: 0
7863              - description: ""
7864                is_official: false
7865                is_automated: false
7866                name: "jdswinbank/sshd"
7867                star_count: 0
7868              - description: ""
7869                is_official: false
7870                is_automated: false
7871                name: "vgauthier/sshd"
7872                star_count: 0
7873        500:
7874          description: "Server error"
7875          schema:
7876            $ref: "#/definitions/ErrorResponse"
7877      parameters:
7878        - name: "term"
7879          in: "query"
7880          description: "Term to search"
7881          type: "string"
7882          required: true
7883        - name: "limit"
7884          in: "query"
7885          description: "Maximum number of results to return"
7886          type: "integer"
7887        - name: "filters"
7888          in: "query"
7889          description: |
7890            A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:
7891
7892            - `is-automated=(true|false)`
7893            - `is-official=(true|false)`
7894            - `stars=<number>` Matches images that has at least 'number' stars.
7895          type: "string"
7896      tags: ["Image"]
7897  /images/prune:
7898    post:
7899      summary: "Delete unused images"
7900      produces:
7901        - "application/json"
7902      operationId: "ImagePrune"
7903      parameters:
7904        - name: "filters"
7905          in: "query"
7906          description: |
7907            Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters:
7908
7909            - `dangling=<boolean>` When set to `true` (or `1`), prune only
7910               unused *and* untagged images. When set to `false`
7911               (or `0`), all unused images are pruned.
7912            - `until=<string>` Prune images created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time.
7913            - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune images with (or without, in case `label!=...` is used) the specified labels.
7914          type: "string"
7915      responses:
7916        200:
7917          description: "No error"
7918          schema:
7919            type: "object"
7920            title: "ImagePruneResponse"
7921            properties:
7922              ImagesDeleted:
7923                description: "Images that were deleted"
7924                type: "array"
7925                items:
7926                  $ref: "#/definitions/ImageDeleteResponseItem"
7927              SpaceReclaimed:
7928                description: "Disk space reclaimed in bytes"
7929                type: "integer"
7930                format: "int64"
7931        500:
7932          description: "Server error"
7933          schema:
7934            $ref: "#/definitions/ErrorResponse"
7935      tags: ["Image"]
7936  /auth:
7937    post:
7938      summary: "Check auth configuration"
7939      description: |
7940        Validate credentials for a registry and, if available, get an identity
7941        token for accessing the registry without password.
7942      operationId: "SystemAuth"
7943      consumes: ["application/json"]
7944      produces: ["application/json"]
7945      responses:
7946        200:
7947          description: "An identity token was generated successfully."
7948          schema:
7949            type: "object"
7950            title: "SystemAuthResponse"
7951            required: [Status]
7952            properties:
7953              Status:
7954                description: "The status of the authentication"
7955                type: "string"
7956                x-nullable: false
7957              IdentityToken:
7958                description: "An opaque token used to authenticate a user after a successful login"
7959                type: "string"
7960                x-nullable: false
7961          examples:
7962            application/json:
7963              Status: "Login Succeeded"
7964              IdentityToken: "9cbaf023786cd7..."
7965        204:
7966          description: "No error"
7967        500:
7968          description: "Server error"
7969          schema:
7970            $ref: "#/definitions/ErrorResponse"
7971      parameters:
7972        - name: "authConfig"
7973          in: "body"
7974          description: "Authentication to check"
7975          schema:
7976            $ref: "#/definitions/AuthConfig"
7977      tags: ["System"]
7978  /info:
7979    get:
7980      summary: "Get system information"
7981      operationId: "SystemInfo"
7982      produces:
7983        - "application/json"
7984      responses:
7985        200:
7986          description: "No error"
7987          schema:
7988            $ref: "#/definitions/SystemInfo"
7989        500:
7990          description: "Server error"
7991          schema:
7992            $ref: "#/definitions/ErrorResponse"
7993      tags: ["System"]
7994  /version:
7995    get:
7996      summary: "Get version"
7997      description: "Returns the version of Docker that is running and various information about the system that Docker is running on."
7998      operationId: "SystemVersion"
7999      produces: ["application/json"]
8000      responses:
8001        200:
8002          description: "no error"
8003          schema:
8004            $ref: "#/definitions/SystemVersion"
8005        500:
8006          description: "server error"
8007          schema:
8008            $ref: "#/definitions/ErrorResponse"
8009      tags: ["System"]
8010  /_ping:
8011    get:
8012      summary: "Ping"
8013      description: "This is a dummy endpoint you can use to test if the server is accessible."
8014      operationId: "SystemPing"
8015      produces: ["text/plain"]
8016      responses:
8017        200:
8018          description: "no error"
8019          schema:
8020            type: "string"
8021            example: "OK"
8022          headers:
8023            API-Version:
8024              type: "string"
8025              description: "Max API Version the server supports"
8026            Builder-Version:
8027              type: "string"
8028              description: "Default version of docker image builder"
8029            Docker-Experimental:
8030              type: "boolean"
8031              description: "If the server is running with experimental mode enabled"
8032            Cache-Control:
8033              type: "string"
8034              default: "no-cache, no-store, must-revalidate"
8035            Pragma:
8036              type: "string"
8037              default: "no-cache"
8038        500:
8039          description: "server error"
8040          schema:
8041            $ref: "#/definitions/ErrorResponse"
8042          headers:
8043            Cache-Control:
8044              type: "string"
8045              default: "no-cache, no-store, must-revalidate"
8046            Pragma:
8047              type: "string"
8048              default: "no-cache"
8049      tags: ["System"]
8050    head:
8051      summary: "Ping"
8052      description: "This is a dummy endpoint you can use to test if the server is accessible."
8053      operationId: "SystemPingHead"
8054      produces: ["text/plain"]
8055      responses:
8056        200:
8057          description: "no error"
8058          schema:
8059            type: "string"
8060            example: "(empty)"
8061          headers:
8062            API-Version:
8063              type: "string"
8064              description: "Max API Version the server supports"
8065            Builder-Version:
8066              type: "string"
8067              description: "Default version of docker image builder"
8068            Docker-Experimental:
8069              type: "boolean"
8070              description: "If the server is running with experimental mode enabled"
8071            Cache-Control:
8072              type: "string"
8073              default: "no-cache, no-store, must-revalidate"
8074            Pragma:
8075              type: "string"
8076              default: "no-cache"
8077        500:
8078          description: "server error"
8079          schema:
8080            $ref: "#/definitions/ErrorResponse"
8081      tags: ["System"]
8082  /commit:
8083    post:
8084      summary: "Create a new image from a container"
8085      operationId: "ImageCommit"
8086      consumes:
8087        - "application/json"
8088      produces:
8089        - "application/json"
8090      responses:
8091        201:
8092          description: "no error"
8093          schema:
8094            $ref: "#/definitions/IdResponse"
8095        404:
8096          description: "no such container"
8097          schema:
8098            $ref: "#/definitions/ErrorResponse"
8099          examples:
8100            application/json:
8101              message: "No such container: c2ada9df5af8"
8102        500:
8103          description: "server error"
8104          schema:
8105            $ref: "#/definitions/ErrorResponse"
8106      parameters:
8107        - name: "containerConfig"
8108          in: "body"
8109          description: "The container configuration"
8110          schema:
8111            $ref: "#/definitions/ContainerConfig"
8112        - name: "container"
8113          in: "query"
8114          description: "The ID or name of the container to commit"
8115          type: "string"
8116        - name: "repo"
8117          in: "query"
8118          description: "Repository name for the created image"
8119          type: "string"
8120        - name: "tag"
8121          in: "query"
8122          description: "Tag name for the create image"
8123          type: "string"
8124        - name: "comment"
8125          in: "query"
8126          description: "Commit message"
8127          type: "string"
8128        - name: "author"
8129          in: "query"
8130          description: "Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`)"
8131          type: "string"
8132        - name: "pause"
8133          in: "query"
8134          description: "Whether to pause the container before committing"
8135          type: "boolean"
8136          default: true
8137        - name: "changes"
8138          in: "query"
8139          description: "`Dockerfile` instructions to apply while committing"
8140          type: "string"
8141      tags: ["Image"]
8142  /events:
8143    get:
8144      summary: "Monitor events"
8145      description: |
8146        Stream real-time events from the server.
8147
8148        Various objects within Docker report events when something happens to them.
8149
8150        Containers report these events: `attach`, `commit`, `copy`, `create`, `destroy`, `detach`, `die`, `exec_create`, `exec_detach`, `exec_start`, `exec_die`, `export`, `health_status`, `kill`, `oom`, `pause`, `rename`, `resize`, `restart`, `start`, `stop`, `top`, `unpause`, `update`, and `prune`
8151
8152        Images report these events: `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune`
8153
8154        Volumes report these events: `create`, `mount`, `unmount`, `destroy`, and `prune`
8155
8156        Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, `remove`, and `prune`
8157
8158        The Docker daemon reports these events: `reload`
8159
8160        Services report these events: `create`, `update`, and `remove`
8161
8162        Nodes report these events: `create`, `update`, and `remove`
8163
8164        Secrets report these events: `create`, `update`, and `remove`
8165
8166        Configs report these events: `create`, `update`, and `remove`
8167
8168        The Builder reports `prune` events
8169
8170      operationId: "SystemEvents"
8171      produces:
8172        - "application/json"
8173      responses:
8174        200:
8175          description: "no error"
8176          schema:
8177            type: "object"
8178            title: "SystemEventsResponse"
8179            properties:
8180              Type:
8181                description: "The type of object emitting the event"
8182                type: "string"
8183              Action:
8184                description: "The type of event"
8185                type: "string"
8186              Actor:
8187                type: "object"
8188                properties:
8189                  ID:
8190                    description: "The ID of the object emitting the event"
8191                    type: "string"
8192                  Attributes:
8193                    description: "Various key/value attributes of the object, depending on its type"
8194                    type: "object"
8195                    additionalProperties:
8196                      type: "string"
8197              time:
8198                description: "Timestamp of event"
8199                type: "integer"
8200              timeNano:
8201                description: "Timestamp of event, with nanosecond accuracy"
8202                type: "integer"
8203                format: "int64"
8204          examples:
8205            application/json:
8206              Type: "container"
8207              Action: "create"
8208              Actor:
8209                ID: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743"
8210                Attributes:
8211                  com.example.some-label: "some-label-value"
8212                  image: "alpine"
8213                  name: "my-container"
8214              time: 1461943101
8215        400:
8216          description: "bad parameter"
8217          schema:
8218            $ref: "#/definitions/ErrorResponse"
8219        500:
8220          description: "server error"
8221          schema:
8222            $ref: "#/definitions/ErrorResponse"
8223      parameters:
8224        - name: "since"
8225          in: "query"
8226          description: "Show events created since this timestamp then stream new events."
8227          type: "string"
8228        - name: "until"
8229          in: "query"
8230          description: "Show events created until this timestamp then stop streaming."
8231          type: "string"
8232        - name: "filters"
8233          in: "query"
8234          description: |
8235            A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters:
8236
8237            - `config=<string>` config name or ID
8238            - `container=<string>` container name or ID
8239            - `daemon=<string>` daemon name or ID
8240            - `event=<string>` event type
8241            - `image=<string>` image name or ID
8242            - `label=<string>` image or container label
8243            - `network=<string>` network name or ID
8244            - `node=<string>` node ID
8245            - `plugin`=<string> plugin name or ID
8246            - `scope`=<string> local or swarm
8247            - `secret=<string>` secret name or ID
8248            - `service=<string>` service name or ID
8249            - `type=<string>` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config`
8250            - `volume=<string>` volume name
8251          type: "string"
8252      tags: ["System"]
8253  /system/df:
8254    get:
8255      summary: "Get data usage information"
8256      operationId: "SystemDataUsage"
8257      responses:
8258        200:
8259          description: "no error"
8260          schema:
8261            type: "object"
8262            title: "SystemDataUsageResponse"
8263            properties:
8264              LayersSize:
8265                type: "integer"
8266                format: "int64"
8267              Images:
8268                type: "array"
8269                items:
8270                  $ref: "#/definitions/ImageSummary"
8271              Containers:
8272                type: "array"
8273                items:
8274                  $ref: "#/definitions/ContainerSummary"
8275              Volumes:
8276                type: "array"
8277                items:
8278                  $ref: "#/definitions/Volume"
8279              BuildCache:
8280                type: "array"
8281                items:
8282                  $ref: "#/definitions/BuildCache"
8283            example:
8284              LayersSize: 1092588
8285              Images:
8286                -
8287                  Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
8288                  ParentId: ""
8289                  RepoTags:
8290                    - "busybox:latest"
8291                  RepoDigests:
8292                    - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6"
8293                  Created: 1466724217
8294                  Size: 1092588
8295                  SharedSize: 0
8296                  VirtualSize: 1092588
8297                  Labels: {}
8298                  Containers: 1
8299              Containers:
8300                -
8301                  Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148"
8302                  Names:
8303                    - "/top"
8304                  Image: "busybox"
8305                  ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
8306                  Command: "top"
8307                  Created: 1472592424
8308                  Ports: []
8309                  SizeRootFs: 1092588
8310                  Labels: {}
8311                  State: "exited"
8312                  Status: "Exited (0) 56 minutes ago"
8313                  HostConfig:
8314                    NetworkMode: "default"
8315                  NetworkSettings:
8316                    Networks:
8317                      bridge:
8318                        IPAMConfig: null
8319                        Links: null
8320                        Aliases: null
8321                        NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92"
8322                        EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a"
8323                        Gateway: "172.18.0.1"
8324                        IPAddress: "172.18.0.2"
8325                        IPPrefixLen: 16
8326                        IPv6Gateway: ""
8327                        GlobalIPv6Address: ""
8328                        GlobalIPv6PrefixLen: 0
8329                        MacAddress: "02:42:ac:12:00:02"
8330                  Mounts: []
8331              Volumes:
8332                -
8333                  Name: "my-volume"
8334                  Driver: "local"
8335                  Mountpoint: "/var/lib/docker/volumes/my-volume/_data"
8336                  Labels: null
8337                  Scope: "local"
8338                  Options: null
8339                  UsageData:
8340                    Size: 10920104
8341                    RefCount: 2
8342        500:
8343          description: "server error"
8344          schema:
8345            $ref: "#/definitions/ErrorResponse"
8346      tags: ["System"]
8347  /images/{name}/get:
8348    get:
8349      summary: "Export an image"
8350      description: |
8351        Get a tarball containing all images and metadata for a repository.
8352
8353        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.
8354
8355        ### Image tarball format
8356
8357        An image tarball contains one directory per image layer (named using its long ID), each containing these files:
8358
8359        - `VERSION`: currently `1.0` - the file format version
8360        - `json`: detailed layer information, similar to `docker inspect layer_id`
8361        - `layer.tar`: A tarfile containing the filesystem changes in this layer
8362
8363        The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions.
8364
8365        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.
8366
8367        ```json
8368        {
8369          "hello-world": {
8370            "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"
8371          }
8372        }
8373        ```
8374      operationId: "ImageGet"
8375      produces:
8376        - "application/x-tar"
8377      responses:
8378        200:
8379          description: "no error"
8380          schema:
8381            type: "string"
8382            format: "binary"
8383        500:
8384          description: "server error"
8385          schema:
8386            $ref: "#/definitions/ErrorResponse"
8387      parameters:
8388        - name: "name"
8389          in: "path"
8390          description: "Image name or ID"
8391          type: "string"
8392          required: true
8393      tags: ["Image"]
8394  /images/get:
8395    get:
8396      summary: "Export several images"
8397      description: |
8398        Get a tarball containing all images and metadata for several image
8399        repositories.
8400
8401        For each value of the `names` parameter: if it is a specific name and
8402        tag (e.g. `ubuntu:latest`), then only that image (and its parents) are
8403        returned; if it is an image ID, similarly only that image (and its parents)
8404        are returned and there would be no names referenced in the 'repositories'
8405        file for this image ID.
8406
8407        For details on the format, see the [export image endpoint](#operation/ImageGet).
8408      operationId: "ImageGetAll"
8409      produces:
8410        - "application/x-tar"
8411      responses:
8412        200:
8413          description: "no error"
8414          schema:
8415            type: "string"
8416            format: "binary"
8417        500:
8418          description: "server error"
8419          schema:
8420            $ref: "#/definitions/ErrorResponse"
8421      parameters:
8422        - name: "names"
8423          in: "query"
8424          description: "Image names to filter by"
8425          type: "array"
8426          items:
8427            type: "string"
8428      tags: ["Image"]
8429  /images/load:
8430    post:
8431      summary: "Import images"
8432      description: |
8433        Load a set of images and tags into a repository.
8434
8435        For details on the format, see the [export image endpoint](#operation/ImageGet).
8436      operationId: "ImageLoad"
8437      consumes:
8438        - "application/x-tar"
8439      produces:
8440        - "application/json"
8441      responses:
8442        200:
8443          description: "no error"
8444        500:
8445          description: "server error"
8446          schema:
8447            $ref: "#/definitions/ErrorResponse"
8448      parameters:
8449        - name: "imagesTarball"
8450          in: "body"
8451          description: "Tar archive containing images"
8452          schema:
8453            type: "string"
8454            format: "binary"
8455        - name: "quiet"
8456          in: "query"
8457          description: "Suppress progress details during load."
8458          type: "boolean"
8459          default: false
8460      tags: ["Image"]
8461  /containers/{id}/exec:
8462    post:
8463      summary: "Create an exec instance"
8464      description: "Run a command inside a running container."
8465      operationId: "ContainerExec"
8466      consumes:
8467        - "application/json"
8468      produces:
8469        - "application/json"
8470      responses:
8471        201:
8472          description: "no error"
8473          schema:
8474            $ref: "#/definitions/IdResponse"
8475        404:
8476          description: "no such container"
8477          schema:
8478            $ref: "#/definitions/ErrorResponse"
8479          examples:
8480            application/json:
8481              message: "No such container: c2ada9df5af8"
8482        409:
8483          description: "container is paused"
8484          schema:
8485            $ref: "#/definitions/ErrorResponse"
8486        500:
8487          description: "Server error"
8488          schema:
8489            $ref: "#/definitions/ErrorResponse"
8490      parameters:
8491        - name: "execConfig"
8492          in: "body"
8493          description: "Exec configuration"
8494          schema:
8495            type: "object"
8496            properties:
8497              AttachStdin:
8498                type: "boolean"
8499                description: "Attach to `stdin` of the exec command."
8500              AttachStdout:
8501                type: "boolean"
8502                description: "Attach to `stdout` of the exec command."
8503              AttachStderr:
8504                type: "boolean"
8505                description: "Attach to `stderr` of the exec command."
8506              DetachKeys:
8507                type: "string"
8508                description: |
8509                  Override the key sequence for detaching a container. Format is
8510                  a single character `[a-Z]` or `ctrl-<value>` where `<value>`
8511                  is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
8512              Tty:
8513                type: "boolean"
8514                description: "Allocate a pseudo-TTY."
8515              Env:
8516                description: |
8517                  A list of environment variables in the form `["VAR=value", ...]`.
8518                type: "array"
8519                items:
8520                  type: "string"
8521              Cmd:
8522                type: "array"
8523                description: "Command to run, as a string or array of strings."
8524                items:
8525                  type: "string"
8526              Privileged:
8527                type: "boolean"
8528                description: "Runs the exec process with extended privileges."
8529                default: false
8530              User:
8531                type: "string"
8532                description: |
8533                  The user, and optionally, group to run the exec process inside
8534                  the container. Format is one of: `user`, `user:group`, `uid`,
8535                  or `uid:gid`.
8536              WorkingDir:
8537                type: "string"
8538                description: |
8539                  The working directory for the exec process inside the container.
8540            example:
8541              AttachStdin: false
8542              AttachStdout: true
8543              AttachStderr: true
8544              DetachKeys: "ctrl-p,ctrl-q"
8545              Tty: false
8546              Cmd:
8547                - "date"
8548              Env:
8549                - "FOO=bar"
8550                - "BAZ=quux"
8551          required: true
8552        - name: "id"
8553          in: "path"
8554          description: "ID or name of container"
8555          type: "string"
8556          required: true
8557      tags: ["Exec"]
8558  /exec/{id}/start:
8559    post:
8560      summary: "Start an exec instance"
8561      description: |
8562        Starts a previously set up exec instance. If detach is true, this endpoint
8563        returns immediately after starting the command. Otherwise, it sets up an
8564        interactive session with the command.
8565      operationId: "ExecStart"
8566      consumes:
8567        - "application/json"
8568      produces:
8569        - "application/vnd.docker.raw-stream"
8570      responses:
8571        200:
8572          description: "No error"
8573        404:
8574          description: "No such exec instance"
8575          schema:
8576            $ref: "#/definitions/ErrorResponse"
8577        409:
8578          description: "Container is stopped or paused"
8579          schema:
8580            $ref: "#/definitions/ErrorResponse"
8581      parameters:
8582        - name: "execStartConfig"
8583          in: "body"
8584          schema:
8585            type: "object"
8586            properties:
8587              Detach:
8588                type: "boolean"
8589                description: "Detach from the command."
8590              Tty:
8591                type: "boolean"
8592                description: "Allocate a pseudo-TTY."
8593            example:
8594              Detach: false
8595              Tty: false
8596        - name: "id"
8597          in: "path"
8598          description: "Exec instance ID"
8599          required: true
8600          type: "string"
8601      tags: ["Exec"]
8602  /exec/{id}/resize:
8603    post:
8604      summary: "Resize an exec instance"
8605      description: |
8606        Resize the TTY session used by an exec instance. This endpoint only works
8607        if `tty` was specified as part of creating and starting the exec instance.
8608      operationId: "ExecResize"
8609      responses:
8610        201:
8611          description: "No error"
8612        404:
8613          description: "No such exec instance"
8614          schema:
8615            $ref: "#/definitions/ErrorResponse"
8616      parameters:
8617        - name: "id"
8618          in: "path"
8619          description: "Exec instance ID"
8620          required: true
8621          type: "string"
8622        - name: "h"
8623          in: "query"
8624          description: "Height of the TTY session in characters"
8625          type: "integer"
8626        - name: "w"
8627          in: "query"
8628          description: "Width of the TTY session in characters"
8629          type: "integer"
8630      tags: ["Exec"]
8631  /exec/{id}/json:
8632    get:
8633      summary: "Inspect an exec instance"
8634      description: "Return low-level information about an exec instance."
8635      operationId: "ExecInspect"
8636      produces:
8637        - "application/json"
8638      responses:
8639        200:
8640          description: "No error"
8641          schema:
8642            type: "object"
8643            title: "ExecInspectResponse"
8644            properties:
8645              CanRemove:
8646                type: "boolean"
8647              DetachKeys:
8648                type: "string"
8649              ID:
8650                type: "string"
8651              Running:
8652                type: "boolean"
8653              ExitCode:
8654                type: "integer"
8655              ProcessConfig:
8656                $ref: "#/definitions/ProcessConfig"
8657              OpenStdin:
8658                type: "boolean"
8659              OpenStderr:
8660                type: "boolean"
8661              OpenStdout:
8662                type: "boolean"
8663              ContainerID:
8664                type: "string"
8665              Pid:
8666                type: "integer"
8667                description: "The system process ID for the exec process."
8668          examples:
8669            application/json:
8670              CanRemove: false
8671              ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126"
8672              DetachKeys: ""
8673              ExitCode: 2
8674              ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b"
8675              OpenStderr: true
8676              OpenStdin: true
8677              OpenStdout: true
8678              ProcessConfig:
8679                arguments:
8680                  - "-c"
8681                  - "exit 2"
8682                entrypoint: "sh"
8683                privileged: false
8684                tty: true
8685                user: "1000"
8686              Running: false
8687              Pid: 42000
8688        404:
8689          description: "No such exec instance"
8690          schema:
8691            $ref: "#/definitions/ErrorResponse"
8692        500:
8693          description: "Server error"
8694          schema:
8695            $ref: "#/definitions/ErrorResponse"
8696      parameters:
8697        - name: "id"
8698          in: "path"
8699          description: "Exec instance ID"
8700          required: true
8701          type: "string"
8702      tags: ["Exec"]
8703
8704  /volumes:
8705    get:
8706      summary: "List volumes"
8707      operationId: "VolumeList"
8708      produces: ["application/json"]
8709      responses:
8710        200:
8711          description: "Summary volume data that matches the query"
8712          schema:
8713            type: "object"
8714            title: "VolumeListResponse"
8715            description: "Volume list response"
8716            required: [Volumes, Warnings]
8717            properties:
8718              Volumes:
8719                type: "array"
8720                x-nullable: false
8721                description: "List of volumes"
8722                items:
8723                  $ref: "#/definitions/Volume"
8724              Warnings:
8725                type: "array"
8726                x-nullable: false
8727                description: |
8728                  Warnings that occurred when fetching the list of volumes.
8729                items:
8730                  type: "string"
8731
8732          examples:
8733            application/json:
8734              Volumes:
8735                - CreatedAt: "2017-07-19T12:00:26Z"
8736                  Name: "tardis"
8737                  Driver: "local"
8738                  Mountpoint: "/var/lib/docker/volumes/tardis"
8739                  Labels:
8740                    com.example.some-label: "some-value"
8741                    com.example.some-other-label: "some-other-value"
8742                  Scope: "local"
8743                  Options:
8744                    device: "tmpfs"
8745                    o: "size=100m,uid=1000"
8746                    type: "tmpfs"
8747              Warnings: []
8748        500:
8749          description: "Server error"
8750          schema:
8751            $ref: "#/definitions/ErrorResponse"
8752      parameters:
8753        - name: "filters"
8754          in: "query"
8755          description: |
8756            JSON encoded value of the filters (a `map[string][]string`) to
8757            process on the volumes list. Available filters:
8758
8759            - `dangling=<boolean>` When set to `true` (or `1`), returns all
8760               volumes that are not in use by a container. When set to `false`
8761               (or `0`), only volumes that are in use by one or more
8762               containers are returned.
8763            - `driver=<volume-driver-name>` Matches volumes based on their driver.
8764            - `label=<key>` or `label=<key>:<value>` Matches volumes based on
8765               the presence of a `label` alone or a `label` and a value.
8766            - `name=<volume-name>` Matches all or part of a volume name.
8767          type: "string"
8768          format: "json"
8769      tags: ["Volume"]
8770
8771  /volumes/create:
8772    post:
8773      summary: "Create a volume"
8774      operationId: "VolumeCreate"
8775      consumes: ["application/json"]
8776      produces: ["application/json"]
8777      responses:
8778        201:
8779          description: "The volume was created successfully"
8780          schema:
8781            $ref: "#/definitions/Volume"
8782        500:
8783          description: "Server error"
8784          schema:
8785            $ref: "#/definitions/ErrorResponse"
8786      parameters:
8787        - name: "volumeConfig"
8788          in: "body"
8789          required: true
8790          description: "Volume configuration"
8791          schema:
8792            type: "object"
8793            description: "Volume configuration"
8794            title: "VolumeConfig"
8795            properties:
8796              Name:
8797                description: |
8798                  The new volume's name. If not specified, Docker generates a name.
8799                type: "string"
8800                x-nullable: false
8801              Driver:
8802                description: "Name of the volume driver to use."
8803                type: "string"
8804                default: "local"
8805                x-nullable: false
8806              DriverOpts:
8807                description: |
8808                  A mapping of driver options and values. These options are
8809                  passed directly to the driver and are driver specific.
8810                type: "object"
8811                additionalProperties:
8812                  type: "string"
8813              Labels:
8814                description: "User-defined key/value metadata."
8815                type: "object"
8816                additionalProperties:
8817                  type: "string"
8818            example:
8819              Name: "tardis"
8820              Labels:
8821                com.example.some-label: "some-value"
8822                com.example.some-other-label: "some-other-value"
8823              Driver: "custom"
8824      tags: ["Volume"]
8825
8826  /volumes/{name}:
8827    get:
8828      summary: "Inspect a volume"
8829      operationId: "VolumeInspect"
8830      produces: ["application/json"]
8831      responses:
8832        200:
8833          description: "No error"
8834          schema:
8835            $ref: "#/definitions/Volume"
8836        404:
8837          description: "No such volume"
8838          schema:
8839            $ref: "#/definitions/ErrorResponse"
8840        500:
8841          description: "Server error"
8842          schema:
8843            $ref: "#/definitions/ErrorResponse"
8844      parameters:
8845        - name: "name"
8846          in: "path"
8847          required: true
8848          description: "Volume name or ID"
8849          type: "string"
8850      tags: ["Volume"]
8851
8852    delete:
8853      summary: "Remove a volume"
8854      description: "Instruct the driver to remove the volume."
8855      operationId: "VolumeDelete"
8856      responses:
8857        204:
8858          description: "The volume was removed"
8859        404:
8860          description: "No such volume or volume driver"
8861          schema:
8862            $ref: "#/definitions/ErrorResponse"
8863        409:
8864          description: "Volume is in use and cannot be removed"
8865          schema:
8866            $ref: "#/definitions/ErrorResponse"
8867        500:
8868          description: "Server error"
8869          schema:
8870            $ref: "#/definitions/ErrorResponse"
8871      parameters:
8872        - name: "name"
8873          in: "path"
8874          required: true
8875          description: "Volume name or ID"
8876          type: "string"
8877        - name: "force"
8878          in: "query"
8879          description: "Force the removal of the volume"
8880          type: "boolean"
8881          default: false
8882      tags: ["Volume"]
8883  /volumes/prune:
8884    post:
8885      summary: "Delete unused volumes"
8886      produces:
8887        - "application/json"
8888      operationId: "VolumePrune"
8889      parameters:
8890        - name: "filters"
8891          in: "query"
8892          description: |
8893            Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
8894
8895            Available filters:
8896            - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune volumes with (or without, in case `label!=...` is used) the specified labels.
8897          type: "string"
8898      responses:
8899        200:
8900          description: "No error"
8901          schema:
8902            type: "object"
8903            title: "VolumePruneResponse"
8904            properties:
8905              VolumesDeleted:
8906                description: "Volumes that were deleted"
8907                type: "array"
8908                items:
8909                  type: "string"
8910              SpaceReclaimed:
8911                description: "Disk space reclaimed in bytes"
8912                type: "integer"
8913                format: "int64"
8914        500:
8915          description: "Server error"
8916          schema:
8917            $ref: "#/definitions/ErrorResponse"
8918      tags: ["Volume"]
8919  /networks:
8920    get:
8921      summary: "List networks"
8922      description: |
8923        Returns a list of networks. For details on the format, see the
8924        [network inspect endpoint](#operation/NetworkInspect).
8925
8926        Note that it uses a different, smaller representation of a network than
8927        inspecting a single network. For example, the list of containers attached
8928        to the network is not propagated in API versions 1.28 and up.
8929      operationId: "NetworkList"
8930      produces:
8931        - "application/json"
8932      responses:
8933        200:
8934          description: "No error"
8935          schema:
8936            type: "array"
8937            items:
8938              $ref: "#/definitions/Network"
8939          examples:
8940            application/json:
8941              - Name: "bridge"
8942                Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566"
8943                Created: "2016-10-19T06:21:00.416543526Z"
8944                Scope: "local"
8945                Driver: "bridge"
8946                EnableIPv6: false
8947                Internal: false
8948                Attachable: false
8949                Ingress: false
8950                IPAM:
8951                  Driver: "default"
8952                  Config:
8953                    -
8954                      Subnet: "172.17.0.0/16"
8955                Options:
8956                  com.docker.network.bridge.default_bridge: "true"
8957                  com.docker.network.bridge.enable_icc: "true"
8958                  com.docker.network.bridge.enable_ip_masquerade: "true"
8959                  com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
8960                  com.docker.network.bridge.name: "docker0"
8961                  com.docker.network.driver.mtu: "1500"
8962              - Name: "none"
8963                Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794"
8964                Created: "0001-01-01T00:00:00Z"
8965                Scope: "local"
8966                Driver: "null"
8967                EnableIPv6: false
8968                Internal: false
8969                Attachable: false
8970                Ingress: false
8971                IPAM:
8972                  Driver: "default"
8973                  Config: []
8974                Containers: {}
8975                Options: {}
8976              - Name: "host"
8977                Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e"
8978                Created: "0001-01-01T00:00:00Z"
8979                Scope: "local"
8980                Driver: "host"
8981                EnableIPv6: false
8982                Internal: false
8983                Attachable: false
8984                Ingress: false
8985                IPAM:
8986                  Driver: "default"
8987                  Config: []
8988                Containers: {}
8989                Options: {}
8990        500:
8991          description: "Server error"
8992          schema:
8993            $ref: "#/definitions/ErrorResponse"
8994      parameters:
8995        - name: "filters"
8996          in: "query"
8997          description: |
8998            JSON encoded value of the filters (a `map[string][]string`) to process
8999            on the networks list.
9000
9001            Available filters:
9002
9003            - `dangling=<boolean>` When set to `true` (or `1`), returns all
9004               networks that are not in use by a container. When set to `false`
9005               (or `0`), only networks that are in use by one or more
9006               containers are returned.
9007            - `driver=<driver-name>` Matches a network's driver.
9008            - `id=<network-id>` Matches all or part of a network ID.
9009            - `label=<key>` or `label=<key>=<value>` of a network label.
9010            - `name=<network-name>` Matches all or part of a network name.
9011            - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`).
9012            - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks.
9013          type: "string"
9014      tags: ["Network"]
9015
9016  /networks/{id}:
9017    get:
9018      summary: "Inspect a network"
9019      operationId: "NetworkInspect"
9020      produces:
9021        - "application/json"
9022      responses:
9023        200:
9024          description: "No error"
9025          schema:
9026            $ref: "#/definitions/Network"
9027        404:
9028          description: "Network not found"
9029          schema:
9030            $ref: "#/definitions/ErrorResponse"
9031        500:
9032          description: "Server error"
9033          schema:
9034            $ref: "#/definitions/ErrorResponse"
9035      parameters:
9036        - name: "id"
9037          in: "path"
9038          description: "Network ID or name"
9039          required: true
9040          type: "string"
9041        - name: "verbose"
9042          in: "query"
9043          description: "Detailed inspect output for troubleshooting"
9044          type: "boolean"
9045          default: false
9046        - name: "scope"
9047          in: "query"
9048          description: "Filter the network by scope (swarm, global, or local)"
9049          type: "string"
9050      tags: ["Network"]
9051
9052    delete:
9053      summary: "Remove a network"
9054      operationId: "NetworkDelete"
9055      responses:
9056        204:
9057          description: "No error"
9058        403:
9059          description: "operation not supported for pre-defined networks"
9060          schema:
9061            $ref: "#/definitions/ErrorResponse"
9062        404:
9063          description: "no such network"
9064          schema:
9065            $ref: "#/definitions/ErrorResponse"
9066        500:
9067          description: "Server error"
9068          schema:
9069            $ref: "#/definitions/ErrorResponse"
9070      parameters:
9071        - name: "id"
9072          in: "path"
9073          description: "Network ID or name"
9074          required: true
9075          type: "string"
9076      tags: ["Network"]
9077
9078  /networks/create:
9079    post:
9080      summary: "Create a network"
9081      operationId: "NetworkCreate"
9082      consumes:
9083        - "application/json"
9084      produces:
9085        - "application/json"
9086      responses:
9087        201:
9088          description: "No error"
9089          schema:
9090            type: "object"
9091            title: "NetworkCreateResponse"
9092            properties:
9093              Id:
9094                description: "The ID of the created network."
9095                type: "string"
9096              Warning:
9097                type: "string"
9098            example:
9099              Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30"
9100              Warning: ""
9101        403:
9102          description: "operation not supported for pre-defined networks"
9103          schema:
9104            $ref: "#/definitions/ErrorResponse"
9105        404:
9106          description: "plugin not found"
9107          schema:
9108            $ref: "#/definitions/ErrorResponse"
9109        500:
9110          description: "Server error"
9111          schema:
9112            $ref: "#/definitions/ErrorResponse"
9113      parameters:
9114        - name: "networkConfig"
9115          in: "body"
9116          description: "Network configuration"
9117          required: true
9118          schema:
9119            type: "object"
9120            required: ["Name"]
9121            properties:
9122              Name:
9123                description: "The network's name."
9124                type: "string"
9125              CheckDuplicate:
9126                description: |
9127                  Check for networks with duplicate names. Since Network is
9128                  primarily keyed based on a random ID and not on the name, and
9129                  network name is strictly a user-friendly alias to the network
9130                  which is uniquely identified using ID, there is no guaranteed
9131                  way to check for duplicates. CheckDuplicate is there to provide
9132                  a best effort checking of any networks which has the same name
9133                  but it is not guaranteed to catch all name collisions.
9134                type: "boolean"
9135              Driver:
9136                description: "Name of the network driver plugin to use."
9137                type: "string"
9138                default: "bridge"
9139              Internal:
9140                description: "Restrict external access to the network."
9141                type: "boolean"
9142              Attachable:
9143                description: |
9144                  Globally scoped network is manually attachable by regular
9145                  containers from workers in swarm mode.
9146                type: "boolean"
9147              Ingress:
9148                description: |
9149                  Ingress network is the network which provides the routing-mesh
9150                  in swarm mode.
9151                type: "boolean"
9152              IPAM:
9153                description: "Optional custom IP scheme for the network."
9154                $ref: "#/definitions/IPAM"
9155              EnableIPv6:
9156                description: "Enable IPv6 on the network."
9157                type: "boolean"
9158              Options:
9159                description: "Network specific options to be used by the drivers."
9160                type: "object"
9161                additionalProperties:
9162                  type: "string"
9163              Labels:
9164                description: "User-defined key/value metadata."
9165                type: "object"
9166                additionalProperties:
9167                  type: "string"
9168            example:
9169              Name: "isolated_nw"
9170              CheckDuplicate: false
9171              Driver: "bridge"
9172              EnableIPv6: true
9173              IPAM:
9174                Driver: "default"
9175                Config:
9176                  - Subnet: "172.20.0.0/16"
9177                    IPRange: "172.20.10.0/24"
9178                    Gateway: "172.20.10.11"
9179                  - Subnet: "2001:db8:abcd::/64"
9180                    Gateway: "2001:db8:abcd::1011"
9181                Options:
9182                  foo: "bar"
9183              Internal: true
9184              Attachable: false
9185              Ingress: false
9186              Options:
9187                com.docker.network.bridge.default_bridge: "true"
9188                com.docker.network.bridge.enable_icc: "true"
9189                com.docker.network.bridge.enable_ip_masquerade: "true"
9190                com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
9191                com.docker.network.bridge.name: "docker0"
9192                com.docker.network.driver.mtu: "1500"
9193              Labels:
9194                com.example.some-label: "some-value"
9195                com.example.some-other-label: "some-other-value"
9196      tags: ["Network"]
9197
9198  /networks/{id}/connect:
9199    post:
9200      summary: "Connect a container to a network"
9201      operationId: "NetworkConnect"
9202      consumes:
9203        - "application/json"
9204      responses:
9205        200:
9206          description: "No error"
9207        403:
9208          description: "Operation not supported for swarm scoped networks"
9209          schema:
9210            $ref: "#/definitions/ErrorResponse"
9211        404:
9212          description: "Network or container not found"
9213          schema:
9214            $ref: "#/definitions/ErrorResponse"
9215        500:
9216          description: "Server error"
9217          schema:
9218            $ref: "#/definitions/ErrorResponse"
9219      parameters:
9220        - name: "id"
9221          in: "path"
9222          description: "Network ID or name"
9223          required: true
9224          type: "string"
9225        - name: "container"
9226          in: "body"
9227          required: true
9228          schema:
9229            type: "object"
9230            properties:
9231              Container:
9232                type: "string"
9233                description: "The ID or name of the container to connect to the network."
9234              EndpointConfig:
9235                $ref: "#/definitions/EndpointSettings"
9236            example:
9237              Container: "3613f73ba0e4"
9238              EndpointConfig:
9239                IPAMConfig:
9240                  IPv4Address: "172.24.56.89"
9241                  IPv6Address: "2001:db8::5689"
9242      tags: ["Network"]
9243
9244  /networks/{id}/disconnect:
9245    post:
9246      summary: "Disconnect a container from a network"
9247      operationId: "NetworkDisconnect"
9248      consumes:
9249        - "application/json"
9250      responses:
9251        200:
9252          description: "No error"
9253        403:
9254          description: "Operation not supported for swarm scoped networks"
9255          schema:
9256            $ref: "#/definitions/ErrorResponse"
9257        404:
9258          description: "Network or container not found"
9259          schema:
9260            $ref: "#/definitions/ErrorResponse"
9261        500:
9262          description: "Server error"
9263          schema:
9264            $ref: "#/definitions/ErrorResponse"
9265      parameters:
9266        - name: "id"
9267          in: "path"
9268          description: "Network ID or name"
9269          required: true
9270          type: "string"
9271        - name: "container"
9272          in: "body"
9273          required: true
9274          schema:
9275            type: "object"
9276            properties:
9277              Container:
9278                type: "string"
9279                description: |
9280                  The ID or name of the container to disconnect from the network.
9281              Force:
9282                type: "boolean"
9283                description: |
9284                  Force the container to disconnect from the network.
9285      tags: ["Network"]
9286  /networks/prune:
9287    post:
9288      summary: "Delete unused networks"
9289      produces:
9290        - "application/json"
9291      operationId: "NetworkPrune"
9292      parameters:
9293        - name: "filters"
9294          in: "query"
9295          description: |
9296            Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
9297
9298            Available filters:
9299            - `until=<timestamp>` Prune networks created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time.
9300            - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune networks with (or without, in case `label!=...` is used) the specified labels.
9301          type: "string"
9302      responses:
9303        200:
9304          description: "No error"
9305          schema:
9306            type: "object"
9307            title: "NetworkPruneResponse"
9308            properties:
9309              NetworksDeleted:
9310                description: "Networks that were deleted"
9311                type: "array"
9312                items:
9313                  type: "string"
9314        500:
9315          description: "Server error"
9316          schema:
9317            $ref: "#/definitions/ErrorResponse"
9318      tags: ["Network"]
9319  /plugins:
9320    get:
9321      summary: "List plugins"
9322      operationId: "PluginList"
9323      description: "Returns information about installed plugins."
9324      produces: ["application/json"]
9325      responses:
9326        200:
9327          description: "No error"
9328          schema:
9329            type: "array"
9330            items:
9331              $ref: "#/definitions/Plugin"
9332        500:
9333          description: "Server error"
9334          schema:
9335            $ref: "#/definitions/ErrorResponse"
9336      parameters:
9337        - name: "filters"
9338          in: "query"
9339          type: "string"
9340          description: |
9341            A JSON encoded value of the filters (a `map[string][]string`) to
9342            process on the plugin list.
9343
9344            Available filters:
9345
9346            - `capability=<capability name>`
9347            - `enable=<true>|<false>`
9348      tags: ["Plugin"]
9349
9350  /plugins/privileges:
9351    get:
9352      summary: "Get plugin privileges"
9353      operationId: "GetPluginPrivileges"
9354      responses:
9355        200:
9356          description: "no error"
9357          schema:
9358            type: "array"
9359            items:
9360              description: |
9361                Describes a permission the user has to accept upon installing
9362                the plugin.
9363              type: "object"
9364              title: "PluginPrivilegeItem"
9365              properties:
9366                Name:
9367                  type: "string"
9368                Description:
9369                  type: "string"
9370                Value:
9371                  type: "array"
9372                  items:
9373                    type: "string"
9374            example:
9375              - Name: "network"
9376                Description: ""
9377                Value:
9378                  - "host"
9379              - Name: "mount"
9380                Description: ""
9381                Value:
9382                  - "/data"
9383              - Name: "device"
9384                Description: ""
9385                Value:
9386                  - "/dev/cpu_dma_latency"
9387        500:
9388          description: "server error"
9389          schema:
9390            $ref: "#/definitions/ErrorResponse"
9391      parameters:
9392        - name: "remote"
9393          in: "query"
9394          description: |
9395            The name of the plugin. The `:latest` tag is optional, and is the
9396            default if omitted.
9397          required: true
9398          type: "string"
9399      tags:
9400        - "Plugin"
9401
9402  /plugins/pull:
9403    post:
9404      summary: "Install a plugin"
9405      operationId: "PluginPull"
9406      description: |
9407        Pulls and installs a plugin. After the plugin is installed, it can be
9408        enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable).
9409      produces:
9410        - "application/json"
9411      responses:
9412        204:
9413          description: "no error"
9414        500:
9415          description: "server error"
9416          schema:
9417            $ref: "#/definitions/ErrorResponse"
9418      parameters:
9419        - name: "remote"
9420          in: "query"
9421          description: |
9422            Remote reference for plugin to install.
9423
9424            The `:latest` tag is optional, and is used as the default if omitted.
9425          required: true
9426          type: "string"
9427        - name: "name"
9428          in: "query"
9429          description: |
9430            Local name for the pulled plugin.
9431
9432            The `:latest` tag is optional, and is used as the default if omitted.
9433          required: false
9434          type: "string"
9435        - name: "X-Registry-Auth"
9436          in: "header"
9437          description: |
9438            A base64url-encoded auth configuration to use when pulling a plugin
9439            from a registry.
9440
9441            Refer to the [authentication section](#section/Authentication) for
9442            details.
9443          type: "string"
9444        - name: "body"
9445          in: "body"
9446          schema:
9447            type: "array"
9448            items:
9449              description: |
9450                Describes a permission accepted by the user upon installing the
9451                plugin.
9452              type: "object"
9453              properties:
9454                Name:
9455                  type: "string"
9456                Description:
9457                  type: "string"
9458                Value:
9459                  type: "array"
9460                  items:
9461                    type: "string"
9462            example:
9463              - Name: "network"
9464                Description: ""
9465                Value:
9466                  - "host"
9467              - Name: "mount"
9468                Description: ""
9469                Value:
9470                  - "/data"
9471              - Name: "device"
9472                Description: ""
9473                Value:
9474                  - "/dev/cpu_dma_latency"
9475      tags: ["Plugin"]
9476  /plugins/{name}/json:
9477    get:
9478      summary: "Inspect a plugin"
9479      operationId: "PluginInspect"
9480      responses:
9481        200:
9482          description: "no error"
9483          schema:
9484            $ref: "#/definitions/Plugin"
9485        404:
9486          description: "plugin is not installed"
9487          schema:
9488            $ref: "#/definitions/ErrorResponse"
9489        500:
9490          description: "server error"
9491          schema:
9492            $ref: "#/definitions/ErrorResponse"
9493      parameters:
9494        - name: "name"
9495          in: "path"
9496          description: |
9497            The name of the plugin. The `:latest` tag is optional, and is the
9498            default if omitted.
9499          required: true
9500          type: "string"
9501      tags: ["Plugin"]
9502  /plugins/{name}:
9503    delete:
9504      summary: "Remove a plugin"
9505      operationId: "PluginDelete"
9506      responses:
9507        200:
9508          description: "no error"
9509          schema:
9510            $ref: "#/definitions/Plugin"
9511        404:
9512          description: "plugin is not installed"
9513          schema:
9514            $ref: "#/definitions/ErrorResponse"
9515        500:
9516          description: "server error"
9517          schema:
9518            $ref: "#/definitions/ErrorResponse"
9519      parameters:
9520        - name: "name"
9521          in: "path"
9522          description: |
9523            The name of the plugin. The `:latest` tag is optional, and is the
9524            default if omitted.
9525          required: true
9526          type: "string"
9527        - name: "force"
9528          in: "query"
9529          description: |
9530            Disable the plugin before removing. This may result in issues if the
9531            plugin is in use by a container.
9532          type: "boolean"
9533          default: false
9534      tags: ["Plugin"]
9535  /plugins/{name}/enable:
9536    post:
9537      summary: "Enable a plugin"
9538      operationId: "PluginEnable"
9539      responses:
9540        200:
9541          description: "no error"
9542        404:
9543          description: "plugin is not installed"
9544          schema:
9545            $ref: "#/definitions/ErrorResponse"
9546        500:
9547          description: "server error"
9548          schema:
9549            $ref: "#/definitions/ErrorResponse"
9550      parameters:
9551        - name: "name"
9552          in: "path"
9553          description: |
9554            The name of the plugin. The `:latest` tag is optional, and is the
9555            default if omitted.
9556          required: true
9557          type: "string"
9558        - name: "timeout"
9559          in: "query"
9560          description: "Set the HTTP client timeout (in seconds)"
9561          type: "integer"
9562          default: 0
9563      tags: ["Plugin"]
9564  /plugins/{name}/disable:
9565    post:
9566      summary: "Disable a plugin"
9567      operationId: "PluginDisable"
9568      responses:
9569        200:
9570          description: "no error"
9571        404:
9572          description: "plugin is not installed"
9573          schema:
9574            $ref: "#/definitions/ErrorResponse"
9575        500:
9576          description: "server error"
9577          schema:
9578            $ref: "#/definitions/ErrorResponse"
9579      parameters:
9580        - name: "name"
9581          in: "path"
9582          description: |
9583            The name of the plugin. The `:latest` tag is optional, and is the
9584            default if omitted.
9585          required: true
9586          type: "string"
9587      tags: ["Plugin"]
9588  /plugins/{name}/upgrade:
9589    post:
9590      summary: "Upgrade a plugin"
9591      operationId: "PluginUpgrade"
9592      responses:
9593        204:
9594          description: "no error"
9595        404:
9596          description: "plugin not installed"
9597          schema:
9598            $ref: "#/definitions/ErrorResponse"
9599        500:
9600          description: "server error"
9601          schema:
9602            $ref: "#/definitions/ErrorResponse"
9603      parameters:
9604        - name: "name"
9605          in: "path"
9606          description: |
9607            The name of the plugin. The `:latest` tag is optional, and is the
9608            default if omitted.
9609          required: true
9610          type: "string"
9611        - name: "remote"
9612          in: "query"
9613          description: |
9614            Remote reference to upgrade to.
9615
9616            The `:latest` tag is optional, and is used as the default if omitted.
9617          required: true
9618          type: "string"
9619        - name: "X-Registry-Auth"
9620          in: "header"
9621          description: |
9622            A base64url-encoded auth configuration to use when pulling a plugin
9623            from a registry.
9624
9625            Refer to the [authentication section](#section/Authentication) for
9626            details.
9627          type: "string"
9628        - name: "body"
9629          in: "body"
9630          schema:
9631            type: "array"
9632            items:
9633              description: |
9634                Describes a permission accepted by the user upon installing the
9635                plugin.
9636              type: "object"
9637              properties:
9638                Name:
9639                  type: "string"
9640                Description:
9641                  type: "string"
9642                Value:
9643                  type: "array"
9644                  items:
9645                    type: "string"
9646            example:
9647              - Name: "network"
9648                Description: ""
9649                Value:
9650                  - "host"
9651              - Name: "mount"
9652                Description: ""
9653                Value:
9654                  - "/data"
9655              - Name: "device"
9656                Description: ""
9657                Value:
9658                  - "/dev/cpu_dma_latency"
9659      tags: ["Plugin"]
9660  /plugins/create:
9661    post:
9662      summary: "Create a plugin"
9663      operationId: "PluginCreate"
9664      consumes:
9665        - "application/x-tar"
9666      responses:
9667        204:
9668          description: "no error"
9669        500:
9670          description: "server error"
9671          schema:
9672            $ref: "#/definitions/ErrorResponse"
9673      parameters:
9674        - name: "name"
9675          in: "query"
9676          description: |
9677            The name of the plugin. The `:latest` tag is optional, and is the
9678            default if omitted.
9679          required: true
9680          type: "string"
9681        - name: "tarContext"
9682          in: "body"
9683          description: "Path to tar containing plugin rootfs and manifest"
9684          schema:
9685            type: "string"
9686            format: "binary"
9687      tags: ["Plugin"]
9688  /plugins/{name}/push:
9689    post:
9690      summary: "Push a plugin"
9691      operationId: "PluginPush"
9692      description: |
9693        Push a plugin to the registry.
9694      parameters:
9695        - name: "name"
9696          in: "path"
9697          description: |
9698            The name of the plugin. The `:latest` tag is optional, and is the
9699            default if omitted.
9700          required: true
9701          type: "string"
9702      responses:
9703        200:
9704          description: "no error"
9705        404:
9706          description: "plugin not installed"
9707          schema:
9708            $ref: "#/definitions/ErrorResponse"
9709        500:
9710          description: "server error"
9711          schema:
9712            $ref: "#/definitions/ErrorResponse"
9713      tags: ["Plugin"]
9714  /plugins/{name}/set:
9715    post:
9716      summary: "Configure a plugin"
9717      operationId: "PluginSet"
9718      consumes:
9719        - "application/json"
9720      parameters:
9721        - name: "name"
9722          in: "path"
9723          description: |
9724            The name of the plugin. The `:latest` tag is optional, and is the
9725            default if omitted.
9726          required: true
9727          type: "string"
9728        - name: "body"
9729          in: "body"
9730          schema:
9731            type: "array"
9732            items:
9733              type: "string"
9734            example: ["DEBUG=1"]
9735      responses:
9736        204:
9737          description: "No error"
9738        404:
9739          description: "Plugin not installed"
9740          schema:
9741            $ref: "#/definitions/ErrorResponse"
9742        500:
9743          description: "Server error"
9744          schema:
9745            $ref: "#/definitions/ErrorResponse"
9746      tags: ["Plugin"]
9747  /nodes:
9748    get:
9749      summary: "List nodes"
9750      operationId: "NodeList"
9751      responses:
9752        200:
9753          description: "no error"
9754          schema:
9755            type: "array"
9756            items:
9757              $ref: "#/definitions/Node"
9758        500:
9759          description: "server error"
9760          schema:
9761            $ref: "#/definitions/ErrorResponse"
9762        503:
9763          description: "node is not part of a swarm"
9764          schema:
9765            $ref: "#/definitions/ErrorResponse"
9766      parameters:
9767        - name: "filters"
9768          in: "query"
9769          description: |
9770            Filters to process on the nodes list, encoded as JSON (a `map[string][]string`).
9771
9772            Available filters:
9773            - `id=<node id>`
9774            - `label=<engine label>`
9775            - `membership=`(`accepted`|`pending`)`
9776            - `name=<node name>`
9777            - `node.label=<node label>`
9778            - `role=`(`manager`|`worker`)`
9779          type: "string"
9780      tags: ["Node"]
9781  /nodes/{id}:
9782    get:
9783      summary: "Inspect a node"
9784      operationId: "NodeInspect"
9785      responses:
9786        200:
9787          description: "no error"
9788          schema:
9789            $ref: "#/definitions/Node"
9790        404:
9791          description: "no such node"
9792          schema:
9793            $ref: "#/definitions/ErrorResponse"
9794        500:
9795          description: "server error"
9796          schema:
9797            $ref: "#/definitions/ErrorResponse"
9798        503:
9799          description: "node is not part of a swarm"
9800          schema:
9801            $ref: "#/definitions/ErrorResponse"
9802      parameters:
9803        - name: "id"
9804          in: "path"
9805          description: "The ID or name of the node"
9806          type: "string"
9807          required: true
9808      tags: ["Node"]
9809    delete:
9810      summary: "Delete a node"
9811      operationId: "NodeDelete"
9812      responses:
9813        200:
9814          description: "no error"
9815        404:
9816          description: "no such node"
9817          schema:
9818            $ref: "#/definitions/ErrorResponse"
9819        500:
9820          description: "server error"
9821          schema:
9822            $ref: "#/definitions/ErrorResponse"
9823        503:
9824          description: "node is not part of a swarm"
9825          schema:
9826            $ref: "#/definitions/ErrorResponse"
9827      parameters:
9828        - name: "id"
9829          in: "path"
9830          description: "The ID or name of the node"
9831          type: "string"
9832          required: true
9833        - name: "force"
9834          in: "query"
9835          description: "Force remove a node from the swarm"
9836          default: false
9837          type: "boolean"
9838      tags: ["Node"]
9839  /nodes/{id}/update:
9840    post:
9841      summary: "Update a node"
9842      operationId: "NodeUpdate"
9843      responses:
9844        200:
9845          description: "no error"
9846        400:
9847          description: "bad parameter"
9848          schema:
9849            $ref: "#/definitions/ErrorResponse"
9850        404:
9851          description: "no such node"
9852          schema:
9853            $ref: "#/definitions/ErrorResponse"
9854        500:
9855          description: "server error"
9856          schema:
9857            $ref: "#/definitions/ErrorResponse"
9858        503:
9859          description: "node is not part of a swarm"
9860          schema:
9861            $ref: "#/definitions/ErrorResponse"
9862      parameters:
9863        - name: "id"
9864          in: "path"
9865          description: "The ID of the node"
9866          type: "string"
9867          required: true
9868        - name: "body"
9869          in: "body"
9870          schema:
9871            $ref: "#/definitions/NodeSpec"
9872        - name: "version"
9873          in: "query"
9874          description: |
9875            The version number of the node object being updated. This is required
9876            to avoid conflicting writes.
9877          type: "integer"
9878          format: "int64"
9879          required: true
9880      tags: ["Node"]
9881  /swarm:
9882    get:
9883      summary: "Inspect swarm"
9884      operationId: "SwarmInspect"
9885      responses:
9886        200:
9887          description: "no error"
9888          schema:
9889            $ref: "#/definitions/Swarm"
9890        404:
9891          description: "no such swarm"
9892          schema:
9893            $ref: "#/definitions/ErrorResponse"
9894        500:
9895          description: "server error"
9896          schema:
9897            $ref: "#/definitions/ErrorResponse"
9898        503:
9899          description: "node is not part of a swarm"
9900          schema:
9901            $ref: "#/definitions/ErrorResponse"
9902      tags: ["Swarm"]
9903  /swarm/init:
9904    post:
9905      summary: "Initialize a new swarm"
9906      operationId: "SwarmInit"
9907      produces:
9908        - "application/json"
9909        - "text/plain"
9910      responses:
9911        200:
9912          description: "no error"
9913          schema:
9914            description: "The node ID"
9915            type: "string"
9916            example: "7v2t30z9blmxuhnyo6s4cpenp"
9917        400:
9918          description: "bad parameter"
9919          schema:
9920            $ref: "#/definitions/ErrorResponse"
9921        500:
9922          description: "server error"
9923          schema:
9924            $ref: "#/definitions/ErrorResponse"
9925        503:
9926          description: "node is already part of a swarm"
9927          schema:
9928            $ref: "#/definitions/ErrorResponse"
9929      parameters:
9930        - name: "body"
9931          in: "body"
9932          required: true
9933          schema:
9934            type: "object"
9935            properties:
9936              ListenAddr:
9937                description: |
9938                  Listen address used for inter-manager communication, as well
9939                  as determining the networking interface used for the VXLAN
9940                  Tunnel Endpoint (VTEP). This can either be an address/port
9941                  combination in the form `192.168.1.1:4567`, or an interface
9942                  followed by a port number, like `eth0:4567`. If the port number
9943                  is omitted, the default swarm listening port is used.
9944                type: "string"
9945              AdvertiseAddr:
9946                description: |
9947                  Externally reachable address advertised to other nodes. This
9948                  can either be an address/port combination in the form
9949                  `192.168.1.1:4567`, or an interface followed by a port number,
9950                  like `eth0:4567`. If the port number is omitted, the port
9951                  number from the listen address is used. If `AdvertiseAddr` is
9952                  not specified, it will be automatically detected when possible.
9953                type: "string"
9954              DataPathAddr:
9955                description: |
9956                  Address or interface to use for data path traffic (format:
9957                  `<ip|interface>`), for example,  `192.168.1.1`, or an interface,
9958                  like `eth0`. If `DataPathAddr` is unspecified, the same address
9959                  as `AdvertiseAddr` is used.
9960
9961                  The `DataPathAddr` specifies the address that global scope
9962                  network drivers will publish towards other  nodes in order to
9963                  reach the containers running on this node. Using this parameter
9964                  it is possible to separate the container data traffic from the
9965                  management traffic of the cluster.
9966                type: "string"
9967              DataPathPort:
9968                description: |
9969                  DataPathPort specifies the data path port number for data traffic.
9970                  Acceptable port range is 1024 to 49151.
9971                  if no port is set or is set to 0, default port 4789 will be used.
9972                type: "integer"
9973                format: "uint32"
9974              DefaultAddrPool:
9975                description: |
9976                  Default Address Pool specifies default subnet pools for global
9977                  scope networks.
9978                type: "array"
9979                items:
9980                  type: "string"
9981                  example: ["10.10.0.0/16", "20.20.0.0/16"]
9982              ForceNewCluster:
9983                description: "Force creation of a new swarm."
9984                type: "boolean"
9985              SubnetSize:
9986                description: |
9987                  SubnetSize specifies the subnet size of the networks created
9988                  from the default subnet pool.
9989                type: "integer"
9990                format: "uint32"
9991              Spec:
9992                $ref: "#/definitions/SwarmSpec"
9993            example:
9994              ListenAddr: "0.0.0.0:2377"
9995              AdvertiseAddr: "192.168.1.1:2377"
9996              DataPathPort: 4789
9997              DefaultAddrPool: ["10.10.0.0/8", "20.20.0.0/8"]
9998              SubnetSize: 24
9999              ForceNewCluster: false
10000              Spec:
10001                Orchestration: {}
10002                Raft: {}
10003                Dispatcher: {}
10004                CAConfig: {}
10005                EncryptionConfig:
10006                  AutoLockManagers: false
10007      tags: ["Swarm"]
10008  /swarm/join:
10009    post:
10010      summary: "Join an existing swarm"
10011      operationId: "SwarmJoin"
10012      responses:
10013        200:
10014          description: "no error"
10015        400:
10016          description: "bad parameter"
10017          schema:
10018            $ref: "#/definitions/ErrorResponse"
10019        500:
10020          description: "server error"
10021          schema:
10022            $ref: "#/definitions/ErrorResponse"
10023        503:
10024          description: "node is already part of a swarm"
10025          schema:
10026            $ref: "#/definitions/ErrorResponse"
10027      parameters:
10028        - name: "body"
10029          in: "body"
10030          required: true
10031          schema:
10032            type: "object"
10033            properties:
10034              ListenAddr:
10035                description: |
10036                  Listen address used for inter-manager communication if the node
10037                  gets promoted to manager, as well as determining the networking
10038                  interface used for the VXLAN Tunnel Endpoint (VTEP).
10039                type: "string"
10040              AdvertiseAddr:
10041                description: |
10042                  Externally reachable address advertised to other nodes. This
10043                  can either be an address/port combination in the form
10044                  `192.168.1.1:4567`, or an interface followed by a port number,
10045                  like `eth0:4567`. If the port number is omitted, the port
10046                  number from the listen address is used. If `AdvertiseAddr` is
10047                  not specified, it will be automatically detected when possible.
10048                type: "string"
10049              DataPathAddr:
10050                description: |
10051                  Address or interface to use for data path traffic (format:
10052                  `<ip|interface>`), for example,  `192.168.1.1`, or an interface,
10053                  like `eth0`. If `DataPathAddr` is unspecified, the same addres
10054                  as `AdvertiseAddr` is used.
10055
10056                  The `DataPathAddr` specifies the address that global scope
10057                  network drivers will publish towards other nodes in order to
10058                  reach the containers running on this node. Using this parameter
10059                  it is possible to separate the container data traffic from the
10060                  management traffic of the cluster.
10061
10062                type: "string"
10063              RemoteAddrs:
10064                description: |
10065                  Addresses of manager nodes already participating in the swarm.
10066                type: "array"
10067                items:
10068                  type: "string"
10069              JoinToken:
10070                description: "Secret token for joining this swarm."
10071                type: "string"
10072            example:
10073              ListenAddr: "0.0.0.0:2377"
10074              AdvertiseAddr: "192.168.1.1:2377"
10075              RemoteAddrs:
10076                - "node1:2377"
10077              JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2"
10078      tags: ["Swarm"]
10079  /swarm/leave:
10080    post:
10081      summary: "Leave a swarm"
10082      operationId: "SwarmLeave"
10083      responses:
10084        200:
10085          description: "no error"
10086        500:
10087          description: "server error"
10088          schema:
10089            $ref: "#/definitions/ErrorResponse"
10090        503:
10091          description: "node is not part of a swarm"
10092          schema:
10093            $ref: "#/definitions/ErrorResponse"
10094      parameters:
10095        - name: "force"
10096          description: |
10097            Force leave swarm, even if this is the last manager or that it will
10098            break the cluster.
10099          in: "query"
10100          type: "boolean"
10101          default: false
10102      tags: ["Swarm"]
10103  /swarm/update:
10104    post:
10105      summary: "Update a swarm"
10106      operationId: "SwarmUpdate"
10107      responses:
10108        200:
10109          description: "no error"
10110        400:
10111          description: "bad parameter"
10112          schema:
10113            $ref: "#/definitions/ErrorResponse"
10114        500:
10115          description: "server error"
10116          schema:
10117            $ref: "#/definitions/ErrorResponse"
10118        503:
10119          description: "node is not part of a swarm"
10120          schema:
10121            $ref: "#/definitions/ErrorResponse"
10122      parameters:
10123        - name: "body"
10124          in: "body"
10125          required: true
10126          schema:
10127            $ref: "#/definitions/SwarmSpec"
10128        - name: "version"
10129          in: "query"
10130          description: |
10131            The version number of the swarm object being updated. This is
10132            required to avoid conflicting writes.
10133          type: "integer"
10134          format: "int64"
10135          required: true
10136        - name: "rotateWorkerToken"
10137          in: "query"
10138          description: "Rotate the worker join token."
10139          type: "boolean"
10140          default: false
10141        - name: "rotateManagerToken"
10142          in: "query"
10143          description: "Rotate the manager join token."
10144          type: "boolean"
10145          default: false
10146        - name: "rotateManagerUnlockKey"
10147          in: "query"
10148          description: "Rotate the manager unlock key."
10149          type: "boolean"
10150          default: false
10151      tags: ["Swarm"]
10152  /swarm/unlockkey:
10153    get:
10154      summary: "Get the unlock key"
10155      operationId: "SwarmUnlockkey"
10156      consumes:
10157        - "application/json"
10158      responses:
10159        200:
10160          description: "no error"
10161          schema:
10162            type: "object"
10163            title: "UnlockKeyResponse"
10164            properties:
10165              UnlockKey:
10166                description: "The swarm's unlock key."
10167                type: "string"
10168            example:
10169              UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
10170        500:
10171          description: "server error"
10172          schema:
10173            $ref: "#/definitions/ErrorResponse"
10174        503:
10175          description: "node is not part of a swarm"
10176          schema:
10177            $ref: "#/definitions/ErrorResponse"
10178      tags: ["Swarm"]
10179  /swarm/unlock:
10180    post:
10181      summary: "Unlock a locked manager"
10182      operationId: "SwarmUnlock"
10183      consumes:
10184        - "application/json"
10185      produces:
10186        - "application/json"
10187      parameters:
10188        - name: "body"
10189          in: "body"
10190          required: true
10191          schema:
10192            type: "object"
10193            properties:
10194              UnlockKey:
10195                description: "The swarm's unlock key."
10196                type: "string"
10197            example:
10198              UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
10199      responses:
10200        200:
10201          description: "no error"
10202        500:
10203          description: "server error"
10204          schema:
10205            $ref: "#/definitions/ErrorResponse"
10206        503:
10207          description: "node is not part of a swarm"
10208          schema:
10209            $ref: "#/definitions/ErrorResponse"
10210      tags: ["Swarm"]
10211  /services:
10212    get:
10213      summary: "List services"
10214      operationId: "ServiceList"
10215      responses:
10216        200:
10217          description: "no error"
10218          schema:
10219            type: "array"
10220            items:
10221              $ref: "#/definitions/Service"
10222        500:
10223          description: "server error"
10224          schema:
10225            $ref: "#/definitions/ErrorResponse"
10226        503:
10227          description: "node is not part of a swarm"
10228          schema:
10229            $ref: "#/definitions/ErrorResponse"
10230      parameters:
10231        - name: "filters"
10232          in: "query"
10233          type: "string"
10234          description: |
10235            A JSON encoded value of the filters (a `map[string][]string`) to
10236            process on the services list.
10237
10238            Available filters:
10239
10240            - `id=<service id>`
10241            - `label=<service label>`
10242            - `mode=["replicated"|"global"]`
10243            - `name=<service name>`
10244        - name: "status"
10245          in: "query"
10246          type: "boolean"
10247          description: |
10248            Include service status, with count of running and desired tasks.
10249      tags: ["Service"]
10250  /services/create:
10251    post:
10252      summary: "Create a service"
10253      operationId: "ServiceCreate"
10254      consumes:
10255        - "application/json"
10256      produces:
10257        - "application/json"
10258      responses:
10259        201:
10260          description: "no error"
10261          schema:
10262            type: "object"
10263            title: "ServiceCreateResponse"
10264            properties:
10265              ID:
10266                description: "The ID of the created service."
10267                type: "string"
10268              Warning:
10269                description: "Optional warning message"
10270                type: "string"
10271            example:
10272              ID: "ak7w3gjqoa3kuz8xcpnyy0pvl"
10273              Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found"
10274        400:
10275          description: "bad parameter"
10276          schema:
10277            $ref: "#/definitions/ErrorResponse"
10278        403:
10279          description: "network is not eligible for services"
10280          schema:
10281            $ref: "#/definitions/ErrorResponse"
10282        409:
10283          description: "name conflicts with an existing service"
10284          schema:
10285            $ref: "#/definitions/ErrorResponse"
10286        500:
10287          description: "server error"
10288          schema:
10289            $ref: "#/definitions/ErrorResponse"
10290        503:
10291          description: "node is not part of a swarm"
10292          schema:
10293            $ref: "#/definitions/ErrorResponse"
10294      parameters:
10295        - name: "body"
10296          in: "body"
10297          required: true
10298          schema:
10299            allOf:
10300              - $ref: "#/definitions/ServiceSpec"
10301              - type: "object"
10302                example:
10303                  Name: "web"
10304                  TaskTemplate:
10305                    ContainerSpec:
10306                      Image: "nginx:alpine"
10307                      Mounts:
10308                        -
10309                          ReadOnly: true
10310                          Source: "web-data"
10311                          Target: "/usr/share/nginx/html"
10312                          Type: "volume"
10313                          VolumeOptions:
10314                            DriverConfig: {}
10315                            Labels:
10316                              com.example.something: "something-value"
10317                      Hosts: ["10.10.10.10 host1", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2"]
10318                      User: "33"
10319                      DNSConfig:
10320                        Nameservers: ["8.8.8.8"]
10321                        Search: ["example.org"]
10322                        Options: ["timeout:3"]
10323                      Secrets:
10324                        -
10325                          File:
10326                            Name: "www.example.org.key"
10327                            UID: "33"
10328                            GID: "33"
10329                            Mode: 384
10330                          SecretID: "fpjqlhnwb19zds35k8wn80lq9"
10331                          SecretName: "example_org_domain_key"
10332                    LogDriver:
10333                      Name: "json-file"
10334                      Options:
10335                        max-file: "3"
10336                        max-size: "10M"
10337                    Placement: {}
10338                    Resources:
10339                      Limits:
10340                        MemoryBytes: 104857600
10341                      Reservations: {}
10342                    RestartPolicy:
10343                      Condition: "on-failure"
10344                      Delay: 10000000000
10345                      MaxAttempts: 10
10346                  Mode:
10347                    Replicated:
10348                      Replicas: 4
10349                  UpdateConfig:
10350                    Parallelism: 2
10351                    Delay: 1000000000
10352                    FailureAction: "pause"
10353                    Monitor: 15000000000
10354                    MaxFailureRatio: 0.15
10355                  RollbackConfig:
10356                    Parallelism: 1
10357                    Delay: 1000000000
10358                    FailureAction: "pause"
10359                    Monitor: 15000000000
10360                    MaxFailureRatio: 0.15
10361                  EndpointSpec:
10362                    Ports:
10363                      -
10364                        Protocol: "tcp"
10365                        PublishedPort: 8080
10366                        TargetPort: 80
10367                  Labels:
10368                    foo: "bar"
10369        - name: "X-Registry-Auth"
10370          in: "header"
10371          description: |
10372            A base64url-encoded auth configuration for pulling from private
10373            registries.
10374
10375            Refer to the [authentication section](#section/Authentication) for
10376            details.
10377          type: "string"
10378      tags: ["Service"]
10379  /services/{id}:
10380    get:
10381      summary: "Inspect a service"
10382      operationId: "ServiceInspect"
10383      responses:
10384        200:
10385          description: "no error"
10386          schema:
10387            $ref: "#/definitions/Service"
10388        404:
10389          description: "no such service"
10390          schema:
10391            $ref: "#/definitions/ErrorResponse"
10392        500:
10393          description: "server error"
10394          schema:
10395            $ref: "#/definitions/ErrorResponse"
10396        503:
10397          description: "node is not part of a swarm"
10398          schema:
10399            $ref: "#/definitions/ErrorResponse"
10400      parameters:
10401        - name: "id"
10402          in: "path"
10403          description: "ID or name of service."
10404          required: true
10405          type: "string"
10406        - name: "insertDefaults"
10407          in: "query"
10408          description: "Fill empty fields with default values."
10409          type: "boolean"
10410          default: false
10411      tags: ["Service"]
10412    delete:
10413      summary: "Delete a service"
10414      operationId: "ServiceDelete"
10415      responses:
10416        200:
10417          description: "no error"
10418        404:
10419          description: "no such service"
10420          schema:
10421            $ref: "#/definitions/ErrorResponse"
10422        500:
10423          description: "server error"
10424          schema:
10425            $ref: "#/definitions/ErrorResponse"
10426        503:
10427          description: "node is not part of a swarm"
10428          schema:
10429            $ref: "#/definitions/ErrorResponse"
10430      parameters:
10431        - name: "id"
10432          in: "path"
10433          description: "ID or name of service."
10434          required: true
10435          type: "string"
10436      tags: ["Service"]
10437  /services/{id}/update:
10438    post:
10439      summary: "Update a service"
10440      operationId: "ServiceUpdate"
10441      consumes: ["application/json"]
10442      produces: ["application/json"]
10443      responses:
10444        200:
10445          description: "no error"
10446          schema:
10447            $ref: "#/definitions/ServiceUpdateResponse"
10448        400:
10449          description: "bad parameter"
10450          schema:
10451            $ref: "#/definitions/ErrorResponse"
10452        404:
10453          description: "no such service"
10454          schema:
10455            $ref: "#/definitions/ErrorResponse"
10456        500:
10457          description: "server error"
10458          schema:
10459            $ref: "#/definitions/ErrorResponse"
10460        503:
10461          description: "node is not part of a swarm"
10462          schema:
10463            $ref: "#/definitions/ErrorResponse"
10464      parameters:
10465        - name: "id"
10466          in: "path"
10467          description: "ID or name of service."
10468          required: true
10469          type: "string"
10470        - name: "body"
10471          in: "body"
10472          required: true
10473          schema:
10474            allOf:
10475              - $ref: "#/definitions/ServiceSpec"
10476              - type: "object"
10477                example:
10478                  Name: "top"
10479                  TaskTemplate:
10480                    ContainerSpec:
10481                      Image: "busybox"
10482                      Args:
10483                        - "top"
10484                    Resources:
10485                      Limits: {}
10486                      Reservations: {}
10487                    RestartPolicy:
10488                      Condition: "any"
10489                      MaxAttempts: 0
10490                    Placement: {}
10491                    ForceUpdate: 0
10492                  Mode:
10493                    Replicated:
10494                      Replicas: 1
10495                  UpdateConfig:
10496                    Parallelism: 2
10497                    Delay: 1000000000
10498                    FailureAction: "pause"
10499                    Monitor: 15000000000
10500                    MaxFailureRatio: 0.15
10501                  RollbackConfig:
10502                    Parallelism: 1
10503                    Delay: 1000000000
10504                    FailureAction: "pause"
10505                    Monitor: 15000000000
10506                    MaxFailureRatio: 0.15
10507                  EndpointSpec:
10508                    Mode: "vip"
10509
10510        - name: "version"
10511          in: "query"
10512          description: |
10513            The version number of the service object being updated. This is
10514            required to avoid conflicting writes.
10515            This version number should be the value as currently set on the
10516            service *before* the update. You can find the current version by
10517            calling `GET /services/{id}`
10518          required: true
10519          type: "integer"
10520        - name: "registryAuthFrom"
10521          in: "query"
10522          description: |
10523            If the `X-Registry-Auth` header is not specified, this parameter
10524            indicates where to find registry authorization credentials.
10525          type: "string"
10526          enum: ["spec", "previous-spec"]
10527          default: "spec"
10528        - name: "rollback"
10529          in: "query"
10530          description: |
10531            Set to this parameter to `previous` to cause a server-side rollback
10532            to the previous service spec. The supplied spec will be ignored in
10533            this case.
10534          type: "string"
10535        - name: "X-Registry-Auth"
10536          in: "header"
10537          description: |
10538            A base64url-encoded auth configuration for pulling from private
10539            registries.
10540
10541            Refer to the [authentication section](#section/Authentication) for
10542            details.
10543          type: "string"
10544
10545      tags: ["Service"]
10546  /services/{id}/logs:
10547    get:
10548      summary: "Get service logs"
10549      description: |
10550        Get `stdout` and `stderr` logs from a service. See also
10551        [`/containers/{id}/logs`](#operation/ContainerLogs).
10552
10553        **Note**: This endpoint works only for services with the `local`,
10554        `json-file` or `journald` logging drivers.
10555      operationId: "ServiceLogs"
10556      responses:
10557        200:
10558          description: "logs returned as a stream in response body"
10559          schema:
10560            type: "string"
10561            format: "binary"
10562        404:
10563          description: "no such service"
10564          schema:
10565            $ref: "#/definitions/ErrorResponse"
10566          examples:
10567            application/json:
10568              message: "No such service: c2ada9df5af8"
10569        500:
10570          description: "server error"
10571          schema:
10572            $ref: "#/definitions/ErrorResponse"
10573        503:
10574          description: "node is not part of a swarm"
10575          schema:
10576            $ref: "#/definitions/ErrorResponse"
10577      parameters:
10578        - name: "id"
10579          in: "path"
10580          required: true
10581          description: "ID or name of the service"
10582          type: "string"
10583        - name: "details"
10584          in: "query"
10585          description: "Show service context and extra details provided to logs."
10586          type: "boolean"
10587          default: false
10588        - name: "follow"
10589          in: "query"
10590          description: "Keep connection after returning logs."
10591          type: "boolean"
10592          default: false
10593        - name: "stdout"
10594          in: "query"
10595          description: "Return logs from `stdout`"
10596          type: "boolean"
10597          default: false
10598        - name: "stderr"
10599          in: "query"
10600          description: "Return logs from `stderr`"
10601          type: "boolean"
10602          default: false
10603        - name: "since"
10604          in: "query"
10605          description: "Only return logs since this time, as a UNIX timestamp"
10606          type: "integer"
10607          default: 0
10608        - name: "timestamps"
10609          in: "query"
10610          description: "Add timestamps to every log line"
10611          type: "boolean"
10612          default: false
10613        - name: "tail"
10614          in: "query"
10615          description: |
10616            Only return this number of log lines from the end of the logs.
10617            Specify as an integer or `all` to output all log lines.
10618          type: "string"
10619          default: "all"
10620      tags: ["Service"]
10621  /tasks:
10622    get:
10623      summary: "List tasks"
10624      operationId: "TaskList"
10625      produces:
10626        - "application/json"
10627      responses:
10628        200:
10629          description: "no error"
10630          schema:
10631            type: "array"
10632            items:
10633              $ref: "#/definitions/Task"
10634            example:
10635              - ID: "0kzzo1i0y4jz6027t0k7aezc7"
10636                Version:
10637                  Index: 71
10638                CreatedAt: "2016-06-07T21:07:31.171892745Z"
10639                UpdatedAt: "2016-06-07T21:07:31.376370513Z"
10640                Spec:
10641                  ContainerSpec:
10642                    Image: "redis"
10643                  Resources:
10644                    Limits: {}
10645                    Reservations: {}
10646                  RestartPolicy:
10647                    Condition: "any"
10648                    MaxAttempts: 0
10649                  Placement: {}
10650                ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
10651                Slot: 1
10652                NodeID: "60gvrl6tm78dmak4yl7srz94v"
10653                Status:
10654                  Timestamp: "2016-06-07T21:07:31.290032978Z"
10655                  State: "running"
10656                  Message: "started"
10657                  ContainerStatus:
10658                    ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035"
10659                    PID: 677
10660                DesiredState: "running"
10661                NetworksAttachments:
10662                  - Network:
10663                      ID: "4qvuz4ko70xaltuqbt8956gd1"
10664                      Version:
10665                        Index: 18
10666                      CreatedAt: "2016-06-07T20:31:11.912919752Z"
10667                      UpdatedAt: "2016-06-07T21:07:29.955277358Z"
10668                      Spec:
10669                        Name: "ingress"
10670                        Labels:
10671                          com.docker.swarm.internal: "true"
10672                        DriverConfiguration: {}
10673                        IPAMOptions:
10674                          Driver: {}
10675                          Configs:
10676                            - Subnet: "10.255.0.0/16"
10677                              Gateway: "10.255.0.1"
10678                      DriverState:
10679                        Name: "overlay"
10680                        Options:
10681                          com.docker.network.driver.overlay.vxlanid_list: "256"
10682                      IPAMOptions:
10683                        Driver:
10684                          Name: "default"
10685                        Configs:
10686                          - Subnet: "10.255.0.0/16"
10687                            Gateway: "10.255.0.1"
10688                    Addresses:
10689                      - "10.255.0.10/16"
10690              - ID: "1yljwbmlr8er2waf8orvqpwms"
10691                Version:
10692                  Index: 30
10693                CreatedAt: "2016-06-07T21:07:30.019104782Z"
10694                UpdatedAt: "2016-06-07T21:07:30.231958098Z"
10695                Name: "hopeful_cori"
10696                Spec:
10697                  ContainerSpec:
10698                    Image: "redis"
10699                  Resources:
10700                    Limits: {}
10701                    Reservations: {}
10702                  RestartPolicy:
10703                    Condition: "any"
10704                    MaxAttempts: 0
10705                  Placement: {}
10706                ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
10707                Slot: 1
10708                NodeID: "60gvrl6tm78dmak4yl7srz94v"
10709                Status:
10710                  Timestamp: "2016-06-07T21:07:30.202183143Z"
10711                  State: "shutdown"
10712                  Message: "shutdown"
10713                  ContainerStatus:
10714                    ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213"
10715                DesiredState: "shutdown"
10716                NetworksAttachments:
10717                  - Network:
10718                      ID: "4qvuz4ko70xaltuqbt8956gd1"
10719                      Version:
10720                        Index: 18
10721                      CreatedAt: "2016-06-07T20:31:11.912919752Z"
10722                      UpdatedAt: "2016-06-07T21:07:29.955277358Z"
10723                      Spec:
10724                        Name: "ingress"
10725                        Labels:
10726                          com.docker.swarm.internal: "true"
10727                        DriverConfiguration: {}
10728                        IPAMOptions:
10729                          Driver: {}
10730                          Configs:
10731                            - Subnet: "10.255.0.0/16"
10732                              Gateway: "10.255.0.1"
10733                      DriverState:
10734                        Name: "overlay"
10735                        Options:
10736                          com.docker.network.driver.overlay.vxlanid_list: "256"
10737                      IPAMOptions:
10738                        Driver:
10739                          Name: "default"
10740                        Configs:
10741                          - Subnet: "10.255.0.0/16"
10742                            Gateway: "10.255.0.1"
10743                    Addresses:
10744                      - "10.255.0.5/16"
10745        500:
10746          description: "server error"
10747          schema:
10748            $ref: "#/definitions/ErrorResponse"
10749        503:
10750          description: "node is not part of a swarm"
10751          schema:
10752            $ref: "#/definitions/ErrorResponse"
10753      parameters:
10754        - name: "filters"
10755          in: "query"
10756          type: "string"
10757          description: |
10758            A JSON encoded value of the filters (a `map[string][]string`) to
10759            process on the tasks list.
10760
10761            Available filters:
10762
10763            - `desired-state=(running | shutdown | accepted)`
10764            - `id=<task id>`
10765            - `label=key` or `label="key=value"`
10766            - `name=<task name>`
10767            - `node=<node id or name>`
10768            - `service=<service name>`
10769      tags: ["Task"]
10770  /tasks/{id}:
10771    get:
10772      summary: "Inspect a task"
10773      operationId: "TaskInspect"
10774      produces:
10775        - "application/json"
10776      responses:
10777        200:
10778          description: "no error"
10779          schema:
10780            $ref: "#/definitions/Task"
10781        404:
10782          description: "no such task"
10783          schema:
10784            $ref: "#/definitions/ErrorResponse"
10785        500:
10786          description: "server error"
10787          schema:
10788            $ref: "#/definitions/ErrorResponse"
10789        503:
10790          description: "node is not part of a swarm"
10791          schema:
10792            $ref: "#/definitions/ErrorResponse"
10793      parameters:
10794        - name: "id"
10795          in: "path"
10796          description: "ID of the task"
10797          required: true
10798          type: "string"
10799      tags: ["Task"]
10800  /tasks/{id}/logs:
10801    get:
10802      summary: "Get task logs"
10803      description: |
10804        Get `stdout` and `stderr` logs from a task.
10805        See also [`/containers/{id}/logs`](#operation/ContainerLogs).
10806
10807        **Note**: This endpoint works only for services with the `local`,
10808        `json-file` or `journald` logging drivers.
10809      operationId: "TaskLogs"
10810      responses:
10811        200:
10812          description: "logs returned as a stream in response body"
10813          schema:
10814            type: "string"
10815            format: "binary"
10816        404:
10817          description: "no such task"
10818          schema:
10819            $ref: "#/definitions/ErrorResponse"
10820          examples:
10821            application/json:
10822              message: "No such task: c2ada9df5af8"
10823        500:
10824          description: "server error"
10825          schema:
10826            $ref: "#/definitions/ErrorResponse"
10827        503:
10828          description: "node is not part of a swarm"
10829          schema:
10830            $ref: "#/definitions/ErrorResponse"
10831      parameters:
10832        - name: "id"
10833          in: "path"
10834          required: true
10835          description: "ID of the task"
10836          type: "string"
10837        - name: "details"
10838          in: "query"
10839          description: "Show task context and extra details provided to logs."
10840          type: "boolean"
10841          default: false
10842        - name: "follow"
10843          in: "query"
10844          description: "Keep connection after returning logs."
10845          type: "boolean"
10846          default: false
10847        - name: "stdout"
10848          in: "query"
10849          description: "Return logs from `stdout`"
10850          type: "boolean"
10851          default: false
10852        - name: "stderr"
10853          in: "query"
10854          description: "Return logs from `stderr`"
10855          type: "boolean"
10856          default: false
10857        - name: "since"
10858          in: "query"
10859          description: "Only return logs since this time, as a UNIX timestamp"
10860          type: "integer"
10861          default: 0
10862        - name: "timestamps"
10863          in: "query"
10864          description: "Add timestamps to every log line"
10865          type: "boolean"
10866          default: false
10867        - name: "tail"
10868          in: "query"
10869          description: |
10870            Only return this number of log lines from the end of the logs.
10871            Specify as an integer or `all` to output all log lines.
10872          type: "string"
10873          default: "all"
10874      tags: ["Task"]
10875  /secrets:
10876    get:
10877      summary: "List secrets"
10878      operationId: "SecretList"
10879      produces:
10880        - "application/json"
10881      responses:
10882        200:
10883          description: "no error"
10884          schema:
10885            type: "array"
10886            items:
10887              $ref: "#/definitions/Secret"
10888            example:
10889              - ID: "blt1owaxmitz71s9v5zh81zun"
10890                Version:
10891                  Index: 85
10892                CreatedAt: "2017-07-20T13:55:28.678958722Z"
10893                UpdatedAt: "2017-07-20T13:55:28.678958722Z"
10894                Spec:
10895                  Name: "mysql-passwd"
10896                  Labels:
10897                    some.label: "some.value"
10898                  Driver:
10899                    Name: "secret-bucket"
10900                    Options:
10901                      OptionA: "value for driver option A"
10902                      OptionB: "value for driver option B"
10903              - ID: "ktnbjxoalbkvbvedmg1urrz8h"
10904                Version:
10905                  Index: 11
10906                CreatedAt: "2016-11-05T01:20:17.327670065Z"
10907                UpdatedAt: "2016-11-05T01:20:17.327670065Z"
10908                Spec:
10909                  Name: "app-dev.crt"
10910                  Labels:
10911                    foo: "bar"
10912        500:
10913          description: "server error"
10914          schema:
10915            $ref: "#/definitions/ErrorResponse"
10916        503:
10917          description: "node is not part of a swarm"
10918          schema:
10919            $ref: "#/definitions/ErrorResponse"
10920      parameters:
10921        - name: "filters"
10922          in: "query"
10923          type: "string"
10924          description: |
10925            A JSON encoded value of the filters (a `map[string][]string`) to
10926            process on the secrets list.
10927
10928            Available filters:
10929
10930            - `id=<secret id>`
10931            - `label=<key> or label=<key>=value`
10932            - `name=<secret name>`
10933            - `names=<secret name>`
10934      tags: ["Secret"]
10935  /secrets/create:
10936    post:
10937      summary: "Create a secret"
10938      operationId: "SecretCreate"
10939      consumes:
10940        - "application/json"
10941      produces:
10942        - "application/json"
10943      responses:
10944        201:
10945          description: "no error"
10946          schema:
10947            $ref: "#/definitions/IdResponse"
10948        409:
10949          description: "name conflicts with an existing object"
10950          schema:
10951            $ref: "#/definitions/ErrorResponse"
10952        500:
10953          description: "server error"
10954          schema:
10955            $ref: "#/definitions/ErrorResponse"
10956        503:
10957          description: "node is not part of a swarm"
10958          schema:
10959            $ref: "#/definitions/ErrorResponse"
10960      parameters:
10961        - name: "body"
10962          in: "body"
10963          schema:
10964            allOf:
10965              - $ref: "#/definitions/SecretSpec"
10966              - type: "object"
10967                example:
10968                  Name: "app-key.crt"
10969                  Labels:
10970                    foo: "bar"
10971                  Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg=="
10972                  Driver:
10973                    Name: "secret-bucket"
10974                    Options:
10975                      OptionA: "value for driver option A"
10976                      OptionB: "value for driver option B"
10977      tags: ["Secret"]
10978  /secrets/{id}:
10979    get:
10980      summary: "Inspect a secret"
10981      operationId: "SecretInspect"
10982      produces:
10983        - "application/json"
10984      responses:
10985        200:
10986          description: "no error"
10987          schema:
10988            $ref: "#/definitions/Secret"
10989          examples:
10990            application/json:
10991              ID: "ktnbjxoalbkvbvedmg1urrz8h"
10992              Version:
10993                Index: 11
10994              CreatedAt: "2016-11-05T01:20:17.327670065Z"
10995              UpdatedAt: "2016-11-05T01:20:17.327670065Z"
10996              Spec:
10997                Name: "app-dev.crt"
10998                Labels:
10999                  foo: "bar"
11000                Driver:
11001                  Name: "secret-bucket"
11002                  Options:
11003                    OptionA: "value for driver option A"
11004                    OptionB: "value for driver option B"
11005
11006        404:
11007          description: "secret not found"
11008          schema:
11009            $ref: "#/definitions/ErrorResponse"
11010        500:
11011          description: "server error"
11012          schema:
11013            $ref: "#/definitions/ErrorResponse"
11014        503:
11015          description: "node is not part of a swarm"
11016          schema:
11017            $ref: "#/definitions/ErrorResponse"
11018      parameters:
11019        - name: "id"
11020          in: "path"
11021          required: true
11022          type: "string"
11023          description: "ID of the secret"
11024      tags: ["Secret"]
11025    delete:
11026      summary: "Delete a secret"
11027      operationId: "SecretDelete"
11028      produces:
11029        - "application/json"
11030      responses:
11031        204:
11032          description: "no error"
11033        404:
11034          description: "secret not found"
11035          schema:
11036            $ref: "#/definitions/ErrorResponse"
11037        500:
11038          description: "server error"
11039          schema:
11040            $ref: "#/definitions/ErrorResponse"
11041        503:
11042          description: "node is not part of a swarm"
11043          schema:
11044            $ref: "#/definitions/ErrorResponse"
11045      parameters:
11046        - name: "id"
11047          in: "path"
11048          required: true
11049          type: "string"
11050          description: "ID of the secret"
11051      tags: ["Secret"]
11052  /secrets/{id}/update:
11053    post:
11054      summary: "Update a Secret"
11055      operationId: "SecretUpdate"
11056      responses:
11057        200:
11058          description: "no error"
11059        400:
11060          description: "bad parameter"
11061          schema:
11062            $ref: "#/definitions/ErrorResponse"
11063        404:
11064          description: "no such secret"
11065          schema:
11066            $ref: "#/definitions/ErrorResponse"
11067        500:
11068          description: "server error"
11069          schema:
11070            $ref: "#/definitions/ErrorResponse"
11071        503:
11072          description: "node is not part of a swarm"
11073          schema:
11074            $ref: "#/definitions/ErrorResponse"
11075      parameters:
11076        - name: "id"
11077          in: "path"
11078          description: "The ID or name of the secret"
11079          type: "string"
11080          required: true
11081        - name: "body"
11082          in: "body"
11083          schema:
11084            $ref: "#/definitions/SecretSpec"
11085          description: |
11086            The spec of the secret to update. Currently, only the Labels field
11087            can be updated. All other fields must remain unchanged from the
11088            [SecretInspect endpoint](#operation/SecretInspect) response values.
11089        - name: "version"
11090          in: "query"
11091          description: |
11092            The version number of the secret object being updated. This is
11093            required to avoid conflicting writes.
11094          type: "integer"
11095          format: "int64"
11096          required: true
11097      tags: ["Secret"]
11098  /configs:
11099    get:
11100      summary: "List configs"
11101      operationId: "ConfigList"
11102      produces:
11103        - "application/json"
11104      responses:
11105        200:
11106          description: "no error"
11107          schema:
11108            type: "array"
11109            items:
11110              $ref: "#/definitions/Config"
11111            example:
11112              - ID: "ktnbjxoalbkvbvedmg1urrz8h"
11113                Version:
11114                  Index: 11
11115                CreatedAt: "2016-11-05T01:20:17.327670065Z"
11116                UpdatedAt: "2016-11-05T01:20:17.327670065Z"
11117                Spec:
11118                  Name: "server.conf"
11119        500:
11120          description: "server error"
11121          schema:
11122            $ref: "#/definitions/ErrorResponse"
11123        503:
11124          description: "node is not part of a swarm"
11125          schema:
11126            $ref: "#/definitions/ErrorResponse"
11127      parameters:
11128        - name: "filters"
11129          in: "query"
11130          type: "string"
11131          description: |
11132            A JSON encoded value of the filters (a `map[string][]string`) to
11133            process on the configs list.
11134
11135            Available filters:
11136
11137            - `id=<config id>`
11138            - `label=<key> or label=<key>=value`
11139            - `name=<config name>`
11140            - `names=<config name>`
11141      tags: ["Config"]
11142  /configs/create:
11143    post:
11144      summary: "Create a config"
11145      operationId: "ConfigCreate"
11146      consumes:
11147        - "application/json"
11148      produces:
11149        - "application/json"
11150      responses:
11151        201:
11152          description: "no error"
11153          schema:
11154            $ref: "#/definitions/IdResponse"
11155        409:
11156          description: "name conflicts with an existing object"
11157          schema:
11158            $ref: "#/definitions/ErrorResponse"
11159        500:
11160          description: "server error"
11161          schema:
11162            $ref: "#/definitions/ErrorResponse"
11163        503:
11164          description: "node is not part of a swarm"
11165          schema:
11166            $ref: "#/definitions/ErrorResponse"
11167      parameters:
11168        - name: "body"
11169          in: "body"
11170          schema:
11171            allOf:
11172              - $ref: "#/definitions/ConfigSpec"
11173              - type: "object"
11174                example:
11175                  Name: "server.conf"
11176                  Labels:
11177                    foo: "bar"
11178                  Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg=="
11179      tags: ["Config"]
11180  /configs/{id}:
11181    get:
11182      summary: "Inspect a config"
11183      operationId: "ConfigInspect"
11184      produces:
11185        - "application/json"
11186      responses:
11187        200:
11188          description: "no error"
11189          schema:
11190            $ref: "#/definitions/Config"
11191          examples:
11192            application/json:
11193              ID: "ktnbjxoalbkvbvedmg1urrz8h"
11194              Version:
11195                Index: 11
11196              CreatedAt: "2016-11-05T01:20:17.327670065Z"
11197              UpdatedAt: "2016-11-05T01:20:17.327670065Z"
11198              Spec:
11199                Name: "app-dev.crt"
11200        404:
11201          description: "config not found"
11202          schema:
11203            $ref: "#/definitions/ErrorResponse"
11204        500:
11205          description: "server error"
11206          schema:
11207            $ref: "#/definitions/ErrorResponse"
11208        503:
11209          description: "node is not part of a swarm"
11210          schema:
11211            $ref: "#/definitions/ErrorResponse"
11212      parameters:
11213        - name: "id"
11214          in: "path"
11215          required: true
11216          type: "string"
11217          description: "ID of the config"
11218      tags: ["Config"]
11219    delete:
11220      summary: "Delete a config"
11221      operationId: "ConfigDelete"
11222      produces:
11223        - "application/json"
11224      responses:
11225        204:
11226          description: "no error"
11227        404:
11228          description: "config not found"
11229          schema:
11230            $ref: "#/definitions/ErrorResponse"
11231        500:
11232          description: "server error"
11233          schema:
11234            $ref: "#/definitions/ErrorResponse"
11235        503:
11236          description: "node is not part of a swarm"
11237          schema:
11238            $ref: "#/definitions/ErrorResponse"
11239      parameters:
11240        - name: "id"
11241          in: "path"
11242          required: true
11243          type: "string"
11244          description: "ID of the config"
11245      tags: ["Config"]
11246  /configs/{id}/update:
11247    post:
11248      summary: "Update a Config"
11249      operationId: "ConfigUpdate"
11250      responses:
11251        200:
11252          description: "no error"
11253        400:
11254          description: "bad parameter"
11255          schema:
11256            $ref: "#/definitions/ErrorResponse"
11257        404:
11258          description: "no such config"
11259          schema:
11260            $ref: "#/definitions/ErrorResponse"
11261        500:
11262          description: "server error"
11263          schema:
11264            $ref: "#/definitions/ErrorResponse"
11265        503:
11266          description: "node is not part of a swarm"
11267          schema:
11268            $ref: "#/definitions/ErrorResponse"
11269      parameters:
11270        - name: "id"
11271          in: "path"
11272          description: "The ID or name of the config"
11273          type: "string"
11274          required: true
11275        - name: "body"
11276          in: "body"
11277          schema:
11278            $ref: "#/definitions/ConfigSpec"
11279          description: |
11280            The spec of the config to update. Currently, only the Labels field
11281            can be updated. All other fields must remain unchanged from the
11282            [ConfigInspect endpoint](#operation/ConfigInspect) response values.
11283        - name: "version"
11284          in: "query"
11285          description: |
11286            The version number of the config object being updated. This is
11287            required to avoid conflicting writes.
11288          type: "integer"
11289          format: "int64"
11290          required: true
11291      tags: ["Config"]
11292  /distribution/{name}/json:
11293    get:
11294      summary: "Get image information from the registry"
11295      description: |
11296        Return image digest and platform information by contacting the registry.
11297      operationId: "DistributionInspect"
11298      produces:
11299        - "application/json"
11300      responses:
11301        200:
11302          description: "descriptor and platform information"
11303          schema:
11304            type: "object"
11305            x-go-name: DistributionInspect
11306            title: "DistributionInspectResponse"
11307            required: [Descriptor, Platforms]
11308            properties:
11309              Descriptor:
11310                type: "object"
11311                description: |
11312                  A descriptor struct containing digest, media type, and size.
11313                properties:
11314                  MediaType:
11315                    type: "string"
11316                  Size:
11317                    type: "integer"
11318                    format: "int64"
11319                  Digest:
11320                    type: "string"
11321                  URLs:
11322                    type: "array"
11323                    items:
11324                      type: "string"
11325              Platforms:
11326                type: "array"
11327                description: |
11328                  An array containing all platforms supported by the image.
11329                items:
11330                  type: "object"
11331                  properties:
11332                    Architecture:
11333                      type: "string"
11334                    OS:
11335                      type: "string"
11336                    OSVersion:
11337                      type: "string"
11338                    OSFeatures:
11339                      type: "array"
11340                      items:
11341                        type: "string"
11342                    Variant:
11343                      type: "string"
11344                    Features:
11345                      type: "array"
11346                      items:
11347                        type: "string"
11348          examples:
11349            application/json:
11350              Descriptor:
11351                MediaType: "application/vnd.docker.distribution.manifest.v2+json"
11352                Digest: "sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96"
11353                Size: 3987495
11354                URLs:
11355                  - ""
11356              Platforms:
11357                - Architecture: "amd64"
11358                  OS: "linux"
11359                  OSVersion: ""
11360                  OSFeatures:
11361                    - ""
11362                  Variant: ""
11363                  Features:
11364                    - ""
11365        401:
11366          description: "Failed authentication or no image found"
11367          schema:
11368            $ref: "#/definitions/ErrorResponse"
11369          examples:
11370            application/json:
11371              message: "No such image: someimage (tag: latest)"
11372        500:
11373          description: "Server error"
11374          schema:
11375            $ref: "#/definitions/ErrorResponse"
11376      parameters:
11377        - name: "name"
11378          in: "path"
11379          description: "Image name or id"
11380          type: "string"
11381          required: true
11382      tags: ["Distribution"]
11383  /session:
11384    post:
11385      summary: "Initialize interactive session"
11386      description: |
11387        Start a new interactive session with a server. Session allows server to
11388        call back to the client for advanced capabilities.
11389
11390        ### Hijacking
11391
11392        This endpoint hijacks the HTTP connection to HTTP2 transport that allows
11393        the client to expose gPRC services on that connection.
11394
11395        For example, the client sends this request to upgrade the connection:
11396
11397        ```
11398        POST /session HTTP/1.1
11399        Upgrade: h2c
11400        Connection: Upgrade
11401        ```
11402
11403        The Docker daemon responds with a `101 UPGRADED` response follow with
11404        the raw stream:
11405
11406        ```
11407        HTTP/1.1 101 UPGRADED
11408        Connection: Upgrade
11409        Upgrade: h2c
11410        ```
11411      operationId: "Session"
11412      produces:
11413        - "application/vnd.docker.raw-stream"
11414      responses:
11415        101:
11416          description: "no error, hijacking successful"
11417        400:
11418          description: "bad parameter"
11419          schema:
11420            $ref: "#/definitions/ErrorResponse"
11421        500:
11422          description: "server error"
11423          schema:
11424            $ref: "#/definitions/ErrorResponse"
11425      tags: ["Session"]
11426