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