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