github.com/docker/docker@v299999999.0.0-20200612211812-aaf470eca7b5+incompatible/docs/api/v1.35.yaml (about)

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