github.com/rawahars/moby@v24.0.4+incompatible/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://golang.org/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://golang.org/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  
  3726            > **Note**: the [standalone Swarm API](https://docs.docker.com/swarm/swarm-api/)
  3727            > returns the Swarm version instead of the daemon  version, for example
  3728            > `swarm/1.2.8`.
  3729          type: "string"
  3730          example: "17.06.0-ce"
  3731        ClusterStore:
  3732          description: |
  3733            URL of the distributed storage backend.
  3734  
  3735  
  3736            The storage backend is used for multihost networking (to store
  3737            network and endpoint information) and by the node discovery mechanism.
  3738  
  3739            <p><br /></p>
  3740  
  3741            > **Note**: This field is only propagated when using standalone Swarm
  3742            > mode, and overlay networking using an external k/v store. Overlay
  3743            > networks with Swarm mode enabled use the built-in raft store, and
  3744            > this field will be empty.
  3745          type: "string"
  3746          example: "consul://consul.corp.example.com:8600/some/path"
  3747        ClusterAdvertise:
  3748          description: |
  3749            The network endpoint that the Engine advertises for the purpose of
  3750            node discovery. ClusterAdvertise is a `host:port` combination on which
  3751            the daemon is reachable by other hosts.
  3752  
  3753            <p><br /></p>
  3754  
  3755            > **Note**: This field is only propagated when using standalone Swarm
  3756            > mode, and overlay networking using an external k/v store. Overlay
  3757            > networks with Swarm mode enabled use the built-in raft store, and
  3758            > this field will be empty.
  3759          type: "string"
  3760          example: "node5.corp.example.com:8000"
  3761        Runtimes:
  3762          description: |
  3763            List of [OCI compliant](https://github.com/opencontainers/runtime-spec)
  3764            runtimes configured on the daemon. Keys hold the "name" used to
  3765            reference the runtime.
  3766  
  3767            The Docker daemon relies on an OCI compliant runtime (invoked via the
  3768            `containerd` daemon) as its interface to the Linux kernel namespaces,
  3769            cgroups, and SELinux.
  3770  
  3771            The default runtime is `runc`, and automatically configured. Additional
  3772            runtimes can be configured by the user and will be listed here.
  3773          type: "object"
  3774          additionalProperties:
  3775            $ref: "#/definitions/Runtime"
  3776          default:
  3777            runc:
  3778              path: "docker-runc"
  3779          example:
  3780            runc:
  3781              path: "docker-runc"
  3782            runc-master:
  3783              path: "/go/bin/runc"
  3784            custom:
  3785              path: "/usr/local/bin/my-oci-runtime"
  3786              runtimeArgs: ["--debug", "--systemd-cgroup=false"]
  3787        DefaultRuntime:
  3788          description: |
  3789            Name of the default OCI runtime that is used when starting containers.
  3790  
  3791            The default can be overridden per-container at create time.
  3792          type: "string"
  3793          default: "runc"
  3794          example: "runc"
  3795        Swarm:
  3796          $ref: "#/definitions/SwarmInfo"
  3797        LiveRestoreEnabled:
  3798          description: |
  3799            Indicates if live restore is enabled.
  3800  
  3801            If enabled, containers are kept running when the daemon is shutdown
  3802            or upon daemon start if running containers are detected.
  3803          type: "boolean"
  3804          default: false
  3805          example: false
  3806        Isolation:
  3807          description: |
  3808            Represents the isolation technology to use as a default for containers.
  3809            The supported values are platform-specific.
  3810  
  3811            If no isolation value is specified on daemon start, on Windows client,
  3812            the default is `hyperv`, and on Windows server, the default is `process`.
  3813  
  3814            This option is currently not used on other platforms.
  3815          default: "default"
  3816          type: "string"
  3817          enum:
  3818            - "default"
  3819            - "hyperv"
  3820            - "process"
  3821        InitBinary:
  3822          description: |
  3823            Name and, optional, path of the the `docker-init` binary.
  3824  
  3825            If the path is omitted, the daemon searches the host's `$PATH` for the
  3826            binary and uses the first result.
  3827          type: "string"
  3828          example: "docker-init"
  3829        ContainerdCommit:
  3830          $ref: "#/definitions/Commit"
  3831        RuncCommit:
  3832          $ref: "#/definitions/Commit"
  3833        InitCommit:
  3834          $ref: "#/definitions/Commit"
  3835        SecurityOptions:
  3836          description: |
  3837            List of security features that are enabled on the daemon, such as
  3838            apparmor, seccomp, SELinux, and user-namespaces (userns).
  3839  
  3840            Additional configuration options for each security feature may
  3841            be present, and are included as a comma-separated list of key/value
  3842            pairs.
  3843          type: "array"
  3844          items:
  3845            type: "string"
  3846          example:
  3847            - "name=apparmor"
  3848            - "name=seccomp,profile=default"
  3849            - "name=selinux"
  3850            - "name=userns"
  3851  
  3852  
  3853    # PluginsInfo is a temp struct holding Plugins name
  3854    # registered with docker daemon. It is used by Info struct
  3855    PluginsInfo:
  3856      description: |
  3857        Available plugins per type.
  3858  
  3859        <p><br /></p>
  3860  
  3861        > **Note**: Only unmanaged (V1) plugins are included in this list.
  3862        > V1 plugins are "lazily" loaded, and are not returned in this list
  3863        > if there is no resource using the plugin.
  3864      type: "object"
  3865      properties:
  3866        Volume:
  3867          description: "Names of available volume-drivers, and network-driver plugins."
  3868          type: "array"
  3869          items:
  3870            type: "string"
  3871          example: ["local"]
  3872        Network:
  3873          description: "Names of available network-drivers, and network-driver plugins."
  3874          type: "array"
  3875          items:
  3876            type: "string"
  3877          example: ["bridge", "host", "ipvlan", "macvlan", "null", "overlay"]
  3878        Authorization:
  3879          description: "Names of available authorization plugins."
  3880          type: "array"
  3881          items:
  3882            type: "string"
  3883          example: ["img-authz-plugin", "hbm"]
  3884        Log:
  3885          description: "Names of available logging-drivers, and logging-driver plugins."
  3886          type: "array"
  3887          items:
  3888            type: "string"
  3889          example: ["awslogs", "fluentd", "gcplogs", "gelf", "journald", "json-file", "logentries", "splunk", "syslog"]
  3890  
  3891  
  3892    RegistryServiceConfig:
  3893      description: |
  3894        RegistryServiceConfig stores daemon registry services configuration.
  3895      type: "object"
  3896      x-nullable: true
  3897      properties:
  3898        AllowNondistributableArtifactsCIDRs:
  3899          description: |
  3900            List of IP ranges to which nondistributable artifacts can be pushed,
  3901            using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632).
  3902  
  3903            Some images (for example, Windows base images) contain artifacts
  3904            whose distribution is restricted by license. When these images are
  3905            pushed to a registry, restricted artifacts are not included.
  3906  
  3907            This configuration override this behavior, and enables the daemon to
  3908            push nondistributable artifacts to all registries whose resolved IP
  3909            address is within the subnet described by the CIDR syntax.
  3910  
  3911            This option is useful when pushing images containing
  3912            nondistributable artifacts to a registry on an air-gapped network so
  3913            hosts on that network can pull the images without connecting to
  3914            another server.
  3915  
  3916            > **Warning**: Nondistributable artifacts typically have restrictions
  3917            > on how and where they can be distributed and shared. Only use this
  3918            > feature to push artifacts to private registries and ensure that you
  3919            > are in compliance with any terms that cover redistributing
  3920            > nondistributable artifacts.
  3921  
  3922          type: "array"
  3923          items:
  3924            type: "string"
  3925          example: ["::1/128", "127.0.0.0/8"]
  3926        AllowNondistributableArtifactsHostnames:
  3927          description: |
  3928            List of registry hostnames to which nondistributable artifacts can be
  3929            pushed, using the format `<hostname>[:<port>]` or `<IP address>[:<port>]`.
  3930  
  3931            Some images (for example, Windows base images) contain artifacts
  3932            whose distribution is restricted by license. When these images are
  3933            pushed to a registry, restricted artifacts are not included.
  3934  
  3935            This configuration override this behavior for the specified
  3936            registries.
  3937  
  3938            This option is useful when pushing images containing
  3939            nondistributable artifacts to a registry on an air-gapped network so
  3940            hosts on that network can pull the images without connecting to
  3941            another server.
  3942  
  3943            > **Warning**: Nondistributable artifacts typically have restrictions
  3944            > on how and where they can be distributed and shared. Only use this
  3945            > feature to push artifacts to private registries and ensure that you
  3946            > are in compliance with any terms that cover redistributing
  3947            > nondistributable artifacts.
  3948          type: "array"
  3949          items:
  3950            type: "string"
  3951          example: ["registry.internal.corp.example.com:3000", "[2001:db8:a0b:12f0::1]:443"]
  3952        InsecureRegistryCIDRs:
  3953          description: |
  3954            List of IP ranges of insecure registries, using the CIDR syntax
  3955            ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries
  3956            accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates
  3957            from unknown CAs) communication.
  3958  
  3959            By default, local registries (`127.0.0.0/8`) are configured as
  3960            insecure. All other registries are secure. Communicating with an
  3961            insecure registry is not possible if the daemon assumes that registry
  3962            is secure.
  3963  
  3964            This configuration override this behavior, insecure communication with
  3965            registries whose resolved IP address is within the subnet described by
  3966            the CIDR syntax.
  3967  
  3968            Registries can also be marked insecure by hostname. Those registries
  3969            are listed under `IndexConfigs` and have their `Secure` field set to
  3970            `false`.
  3971  
  3972            > **Warning**: Using this option can be useful when running a local
  3973            > registry, but introduces security vulnerabilities. This option
  3974            > should therefore ONLY be used for testing purposes. For increased
  3975            > security, users should add their CA to their system's list of trusted
  3976            > CAs instead of enabling this option.
  3977          type: "array"
  3978          items:
  3979            type: "string"
  3980          example: ["::1/128", "127.0.0.0/8"]
  3981        IndexConfigs:
  3982          type: "object"
  3983          additionalProperties:
  3984            $ref: "#/definitions/IndexInfo"
  3985          example:
  3986            "127.0.0.1:5000":
  3987              "Name": "127.0.0.1:5000"
  3988              "Mirrors": []
  3989              "Secure": false
  3990              "Official": false
  3991            "[2001:db8:a0b:12f0::1]:80":
  3992              "Name": "[2001:db8:a0b:12f0::1]:80"
  3993              "Mirrors": []
  3994              "Secure": false
  3995              "Official": false
  3996            "docker.io":
  3997              Name: "docker.io"
  3998              Mirrors: ["https://hub-mirror.corp.example.com:5000/"]
  3999              Secure: true
  4000              Official: true
  4001            "registry.internal.corp.example.com:3000":
  4002              Name: "registry.internal.corp.example.com:3000"
  4003              Mirrors: []
  4004              Secure: false
  4005              Official: false
  4006        Mirrors:
  4007          description: |
  4008            List of registry URLs that act as a mirror for the official
  4009            (`docker.io`) registry.
  4010  
  4011          type: "array"
  4012          items:
  4013            type: "string"
  4014          example:
  4015            - "https://hub-mirror.corp.example.com:5000/"
  4016            - "https://[2001:db8:a0b:12f0::1]/"
  4017  
  4018    IndexInfo:
  4019      description:
  4020        IndexInfo contains information about a registry.
  4021      type: "object"
  4022      x-nullable: true
  4023      properties:
  4024        Name:
  4025          description: |
  4026            Name of the registry, such as "docker.io".
  4027          type: "string"
  4028          example: "docker.io"
  4029        Mirrors:
  4030          description: |
  4031            List of mirrors, expressed as URIs.
  4032          type: "array"
  4033          items:
  4034            type: "string"
  4035          example:
  4036            - "https://hub-mirror.corp.example.com:5000/"
  4037            - "https://registry-2.docker.io/"
  4038            - "https://registry-3.docker.io/"
  4039        Secure:
  4040          description: |
  4041            Indicates if the the registry is part of the list of insecure
  4042            registries.
  4043  
  4044            If `false`, the registry is insecure. Insecure registries accept
  4045            un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from
  4046            unknown CAs) communication.
  4047  
  4048            > **Warning**: Insecure registries can be useful when running a local
  4049            > registry. However, because its use creates security vulnerabilities
  4050            > it should ONLY be enabled for testing purposes. For increased
  4051            > security, users should add their CA to their system's list of
  4052            > trusted CAs instead of enabling this option.
  4053          type: "boolean"
  4054          example: true
  4055        Official:
  4056          description: |
  4057            Indicates whether this is an official registry (i.e., Docker Hub / docker.io)
  4058          type: "boolean"
  4059          example: true
  4060  
  4061    Runtime:
  4062      description: |
  4063        Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec)
  4064        runtime.
  4065  
  4066        The runtime is invoked by the daemon via the `containerd` daemon. OCI
  4067        runtimes act as an interface to the Linux kernel namespaces, cgroups,
  4068        and SELinux.
  4069      type: "object"
  4070      properties:
  4071        path:
  4072          description: |
  4073            Name and, optional, path, of the OCI executable binary.
  4074  
  4075            If the path is omitted, the daemon searches the host's `$PATH` for the
  4076            binary and uses the first result.
  4077          type: "string"
  4078          example: "/usr/local/bin/my-oci-runtime"
  4079        runtimeArgs:
  4080          description: |
  4081            List of command-line arguments to pass to the runtime when invoked.
  4082          type: "array"
  4083          x-nullable: true
  4084          items:
  4085            type: "string"
  4086          example: ["--debug", "--systemd-cgroup=false"]
  4087  
  4088    Commit:
  4089      description: |
  4090        Commit holds the Git-commit (SHA1) that a binary was built from, as
  4091        reported in the version-string of external tools, such as `containerd`,
  4092        or `runC`.
  4093      type: "object"
  4094      properties:
  4095        ID:
  4096          description: "Actual commit ID of external tool."
  4097          type: "string"
  4098          example: "cfb82a876ecc11b5ca0977d1733adbe58599088a"
  4099        Expected:
  4100          description: |
  4101            Commit ID of external tool expected by dockerd as set at build time.
  4102          type: "string"
  4103          example: "2d41c047c83e09a6d61d464906feb2a2f3c52aa4"
  4104  
  4105    SwarmInfo:
  4106      description: |
  4107        Represents generic information about swarm.
  4108      type: "object"
  4109      properties:
  4110        NodeID:
  4111          description: "Unique identifier of for this node in the swarm."
  4112          type: "string"
  4113          default: ""
  4114          example: "k67qz4598weg5unwwffg6z1m1"
  4115        NodeAddr:
  4116          description: |
  4117            IP address at which this node can be reached by other nodes in the
  4118            swarm.
  4119          type: "string"
  4120          default: ""
  4121          example: "10.0.0.46"
  4122        LocalNodeState:
  4123          $ref: "#/definitions/LocalNodeState"
  4124        ControlAvailable:
  4125          type: "boolean"
  4126          default: false
  4127          example: true
  4128        Error:
  4129          type: "string"
  4130          default: ""
  4131        RemoteManagers:
  4132          description: |
  4133            List of ID's and addresses of other managers in the swarm.
  4134          type: "array"
  4135          default: null
  4136          x-nullable: true
  4137          items:
  4138            $ref: "#/definitions/PeerNode"
  4139          example:
  4140            - NodeID: "71izy0goik036k48jg985xnds"
  4141              Addr: "10.0.0.158:2377"
  4142            - NodeID: "79y6h1o4gv8n120drcprv5nmc"
  4143              Addr: "10.0.0.159:2377"
  4144            - NodeID: "k67qz4598weg5unwwffg6z1m1"
  4145              Addr: "10.0.0.46:2377"
  4146        Nodes:
  4147          description: "Total number of nodes in the swarm."
  4148          type: "integer"
  4149          x-nullable: true
  4150          example: 4
  4151        Managers:
  4152          description: "Total number of managers in the swarm."
  4153          type: "integer"
  4154          x-nullable: true
  4155          example: 3
  4156        Cluster:
  4157          $ref: "#/definitions/ClusterInfo"
  4158  
  4159    LocalNodeState:
  4160      description: "Current local status of this node."
  4161      type: "string"
  4162      default: ""
  4163      enum:
  4164        - ""
  4165        - "inactive"
  4166        - "pending"
  4167        - "active"
  4168        - "error"
  4169        - "locked"
  4170      example: "active"
  4171  
  4172    PeerNode:
  4173      description: "Represents a peer-node in the swarm"
  4174      type: "object"
  4175      properties:
  4176        NodeID:
  4177          description: "Unique identifier of for this node in the swarm."
  4178          type: "string"
  4179        Addr:
  4180          description: |
  4181            IP address and ports at which this node can be reached.
  4182          type: "string"
  4183  
  4184  paths:
  4185    /containers/json:
  4186      get:
  4187        summary: "List containers"
  4188        description: |
  4189          Returns a list of containers. For details on the format, see [the inspect endpoint](#operation/ContainerInspect).
  4190  
  4191          Note that it uses a different, smaller representation of a container than inspecting a single container. For example,
  4192          the list of linked containers is not propagated .
  4193        operationId: "ContainerList"
  4194        produces:
  4195          - "application/json"
  4196        parameters:
  4197          - name: "all"
  4198            in: "query"
  4199            description: "Return all containers. By default, only running containers are shown"
  4200            type: "boolean"
  4201            default: false
  4202          - name: "limit"
  4203            in: "query"
  4204            description: "Return this number of most recently created containers, including non-running ones."
  4205            type: "integer"
  4206          - name: "size"
  4207            in: "query"
  4208            description: "Return the size of container as fields `SizeRw` and `SizeRootFs`."
  4209            type: "boolean"
  4210            default: false
  4211          - name: "filters"
  4212            in: "query"
  4213            description: |
  4214              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:
  4215  
  4216              - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`)
  4217              - `before`=(`<container id>` or `<container name>`)
  4218              - `expose`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`)
  4219              - `exited=<int>` containers with exit code of `<int>`
  4220              - `health`=(`starting`|`healthy`|`unhealthy`|`none`)
  4221              - `id=<ID>` a container's ID
  4222              - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only)
  4223              - `is-task=`(`true`|`false`)
  4224              - `label=key` or `label="key=value"` of a container label
  4225              - `name=<name>` a container's name
  4226              - `network`=(`<network id>` or `<network name>`)
  4227              - `publish`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`)
  4228              - `since`=(`<container id>` or `<container name>`)
  4229              - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`)
  4230              - `volume`=(`<volume name>` or `<mount point destination>`)
  4231            type: "string"
  4232        responses:
  4233          200:
  4234            description: "no error"
  4235            schema:
  4236              $ref: "#/definitions/ContainerSummary"
  4237            examples:
  4238              application/json:
  4239                - Id: "8dfafdbc3a40"
  4240                  Names:
  4241                    - "/boring_feynman"
  4242                  Image: "ubuntu:latest"
  4243                  ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  4244                  Command: "echo 1"
  4245                  Created: 1367854155
  4246                  State: "Exited"
  4247                  Status: "Exit 0"
  4248                  Ports:
  4249                    - PrivatePort: 2222
  4250                      PublicPort: 3333
  4251                      Type: "tcp"
  4252                  Labels:
  4253                    com.example.vendor: "Acme"
  4254                    com.example.license: "GPL"
  4255                    com.example.version: "1.0"
  4256                  SizeRw: 12288
  4257                  SizeRootFs: 0
  4258                  HostConfig:
  4259                    NetworkMode: "default"
  4260                  NetworkSettings:
  4261                    Networks:
  4262                      bridge:
  4263                        NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  4264                        EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f"
  4265                        Gateway: "172.17.0.1"
  4266                        IPAddress: "172.17.0.2"
  4267                        IPPrefixLen: 16
  4268                        IPv6Gateway: ""
  4269                        GlobalIPv6Address: ""
  4270                        GlobalIPv6PrefixLen: 0
  4271                        MacAddress: "02:42:ac:11:00:02"
  4272                  Mounts:
  4273                    - Name: "fac362...80535"
  4274                      Source: "/data"
  4275                      Destination: "/data"
  4276                      Driver: "local"
  4277                      Mode: "ro,Z"
  4278                      RW: false
  4279                      Propagation: ""
  4280                - Id: "9cd87474be90"
  4281                  Names:
  4282                    - "/coolName"
  4283                  Image: "ubuntu:latest"
  4284                  ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  4285                  Command: "echo 222222"
  4286                  Created: 1367854155
  4287                  State: "Exited"
  4288                  Status: "Exit 0"
  4289                  Ports: []
  4290                  Labels: {}
  4291                  SizeRw: 12288
  4292                  SizeRootFs: 0
  4293                  HostConfig:
  4294                    NetworkMode: "default"
  4295                  NetworkSettings:
  4296                    Networks:
  4297                      bridge:
  4298                        NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  4299                        EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a"
  4300                        Gateway: "172.17.0.1"
  4301                        IPAddress: "172.17.0.8"
  4302                        IPPrefixLen: 16
  4303                        IPv6Gateway: ""
  4304                        GlobalIPv6Address: ""
  4305                        GlobalIPv6PrefixLen: 0
  4306                        MacAddress: "02:42:ac:11:00:08"
  4307                  Mounts: []
  4308                - Id: "3176a2479c92"
  4309                  Names:
  4310                    - "/sleepy_dog"
  4311                  Image: "ubuntu:latest"
  4312                  ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  4313                  Command: "echo 3333333333333333"
  4314                  Created: 1367854154
  4315                  State: "Exited"
  4316                  Status: "Exit 0"
  4317                  Ports: []
  4318                  Labels: {}
  4319                  SizeRw: 12288
  4320                  SizeRootFs: 0
  4321                  HostConfig:
  4322                    NetworkMode: "default"
  4323                  NetworkSettings:
  4324                    Networks:
  4325                      bridge:
  4326                        NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  4327                        EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d"
  4328                        Gateway: "172.17.0.1"
  4329                        IPAddress: "172.17.0.6"
  4330                        IPPrefixLen: 16
  4331                        IPv6Gateway: ""
  4332                        GlobalIPv6Address: ""
  4333                        GlobalIPv6PrefixLen: 0
  4334                        MacAddress: "02:42:ac:11:00:06"
  4335                  Mounts: []
  4336                - Id: "4cb07b47f9fb"
  4337                  Names:
  4338                    - "/running_cat"
  4339                  Image: "ubuntu:latest"
  4340                  ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  4341                  Command: "echo 444444444444444444444444444444444"
  4342                  Created: 1367854152
  4343                  State: "Exited"
  4344                  Status: "Exit 0"
  4345                  Ports: []
  4346                  Labels: {}
  4347                  SizeRw: 12288
  4348                  SizeRootFs: 0
  4349                  HostConfig:
  4350                    NetworkMode: "default"
  4351                  NetworkSettings:
  4352                    Networks:
  4353                      bridge:
  4354                        NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  4355                        EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9"
  4356                        Gateway: "172.17.0.1"
  4357                        IPAddress: "172.17.0.5"
  4358                        IPPrefixLen: 16
  4359                        IPv6Gateway: ""
  4360                        GlobalIPv6Address: ""
  4361                        GlobalIPv6PrefixLen: 0
  4362                        MacAddress: "02:42:ac:11:00:05"
  4363                  Mounts: []
  4364          400:
  4365            description: "bad parameter"
  4366            schema:
  4367              $ref: "#/definitions/ErrorResponse"
  4368          500:
  4369            description: "server error"
  4370            schema:
  4371              $ref: "#/definitions/ErrorResponse"
  4372        tags: ["Container"]
  4373    /containers/create:
  4374      post:
  4375        summary: "Create a container"
  4376        operationId: "ContainerCreate"
  4377        consumes:
  4378          - "application/json"
  4379          - "application/octet-stream"
  4380        produces:
  4381          - "application/json"
  4382        parameters:
  4383          - name: "name"
  4384            in: "query"
  4385            description: "Assign the specified name to the container. Must match `/?[a-zA-Z0-9_-]+`."
  4386            type: "string"
  4387            pattern: "/?[a-zA-Z0-9_-]+"
  4388          - name: "body"
  4389            in: "body"
  4390            description: "Container to create"
  4391            schema:
  4392              allOf:
  4393                - $ref: "#/definitions/ContainerConfig"
  4394                - type: "object"
  4395                  properties:
  4396                    HostConfig:
  4397                      $ref: "#/definitions/HostConfig"
  4398                    NetworkingConfig:
  4399                      description: "This container's networking configuration."
  4400                      type: "object"
  4401                      properties:
  4402                        EndpointsConfig:
  4403                          description: "A mapping of network name to endpoint configuration for that network."
  4404                          type: "object"
  4405                          additionalProperties:
  4406                            $ref: "#/definitions/EndpointSettings"
  4407              example:
  4408                Hostname: ""
  4409                Domainname: ""
  4410                User: ""
  4411                AttachStdin: false
  4412                AttachStdout: true
  4413                AttachStderr: true
  4414                Tty: false
  4415                OpenStdin: false
  4416                StdinOnce: false
  4417                Env:
  4418                  - "FOO=bar"
  4419                  - "BAZ=quux"
  4420                Cmd:
  4421                  - "date"
  4422                Entrypoint: ""
  4423                Image: "ubuntu"
  4424                Labels:
  4425                  com.example.vendor: "Acme"
  4426                  com.example.license: "GPL"
  4427                  com.example.version: "1.0"
  4428                Volumes:
  4429                  /volumes/data: {}
  4430                WorkingDir: ""
  4431                NetworkDisabled: false
  4432                MacAddress: "12:34:56:78:9a:bc"
  4433                ExposedPorts:
  4434                  22/tcp: {}
  4435                StopSignal: "SIGTERM"
  4436                StopTimeout: 10
  4437                HostConfig:
  4438                  Binds:
  4439                    - "/tmp:/tmp"
  4440                  Links:
  4441                    - "redis3:redis"
  4442                  Memory: 0
  4443                  MemorySwap: 0
  4444                  MemoryReservation: 0
  4445                  KernelMemory: 0
  4446                  NanoCpus: 500000
  4447                  CpuPercent: 80
  4448                  CpuShares: 512
  4449                  CpuPeriod: 100000
  4450                  CpuRealtimePeriod: 1000000
  4451                  CpuRealtimeRuntime: 10000
  4452                  CpuQuota: 50000
  4453                  CpusetCpus: "0,1"
  4454                  CpusetMems: "0,1"
  4455                  MaximumIOps: 0
  4456                  MaximumIOBps: 0
  4457                  BlkioWeight: 300
  4458                  BlkioWeightDevice:
  4459                    - {}
  4460                  BlkioDeviceReadBps:
  4461                    - {}
  4462                  BlkioDeviceReadIOps:
  4463                    - {}
  4464                  BlkioDeviceWriteBps:
  4465                    - {}
  4466                  BlkioDeviceWriteIOps:
  4467                    - {}
  4468                  MemorySwappiness: 60
  4469                  OomKillDisable: false
  4470                  OomScoreAdj: 500
  4471                  PidMode: ""
  4472                  PidsLimit: -1
  4473                  PortBindings:
  4474                    22/tcp:
  4475                      - HostPort: "11022"
  4476                  PublishAllPorts: false
  4477                  Privileged: false
  4478                  ReadonlyRootfs: false
  4479                  Dns:
  4480                    - "8.8.8.8"
  4481                  DnsOptions:
  4482                    - ""
  4483                  DnsSearch:
  4484                    - ""
  4485                  VolumesFrom:
  4486                    - "parent"
  4487                    - "other:ro"
  4488                  CapAdd:
  4489                    - "NET_ADMIN"
  4490                  CapDrop:
  4491                    - "MKNOD"
  4492                  GroupAdd:
  4493                    - "newgroup"
  4494                  RestartPolicy:
  4495                    Name: ""
  4496                    MaximumRetryCount: 0
  4497                  AutoRemove: true
  4498                  NetworkMode: "bridge"
  4499                  Devices: []
  4500                  Ulimits:
  4501                    - {}
  4502                  LogConfig:
  4503                    Type: "json-file"
  4504                    Config: {}
  4505                  SecurityOpt: []
  4506                  StorageOpt: {}
  4507                  CgroupParent: ""
  4508                  VolumeDriver: ""
  4509                  ShmSize: 67108864
  4510                NetworkingConfig:
  4511                  EndpointsConfig:
  4512                    isolated_nw:
  4513                      IPAMConfig:
  4514                        IPv4Address: "172.20.30.33"
  4515                        IPv6Address: "2001:db8:abcd::3033"
  4516                        LinkLocalIPs:
  4517                          - "169.254.34.68"
  4518                          - "fe80::3468"
  4519                      Links:
  4520                        - "container_1"
  4521                        - "container_2"
  4522                      Aliases:
  4523                        - "server_x"
  4524                        - "server_y"
  4525  
  4526            required: true
  4527        responses:
  4528          201:
  4529            description: "Container created successfully"
  4530            schema:
  4531              type: "object"
  4532              required: [Id, Warnings]
  4533              properties:
  4534                Id:
  4535                  description: "The ID of the created container"
  4536                  type: "string"
  4537                  x-nullable: false
  4538                Warnings:
  4539                  description: "Warnings encountered when creating the container"
  4540                  type: "array"
  4541                  x-nullable: false
  4542                  items:
  4543                    type: "string"
  4544            examples:
  4545              application/json:
  4546                Id: "e90e34656806"
  4547                Warnings: []
  4548          400:
  4549            description: "bad parameter"
  4550            schema:
  4551              $ref: "#/definitions/ErrorResponse"
  4552          404:
  4553            description: "no such image"
  4554            schema:
  4555              $ref: "#/definitions/ErrorResponse"
  4556            examples:
  4557              application/json:
  4558                message: "No such image: c2ada9df5af8"
  4559          409:
  4560            description: "conflict"
  4561            schema:
  4562              $ref: "#/definitions/ErrorResponse"
  4563          500:
  4564            description: "server error"
  4565            schema:
  4566              $ref: "#/definitions/ErrorResponse"
  4567        tags: ["Container"]
  4568    /containers/{id}/json:
  4569      get:
  4570        summary: "Inspect a container"
  4571        description: "Return low-level information about a container."
  4572        operationId: "ContainerInspect"
  4573        produces:
  4574          - "application/json"
  4575        responses:
  4576          200:
  4577            description: "no error"
  4578            schema:
  4579              type: "object"
  4580              properties:
  4581                Id:
  4582                  description: "The ID of the container"
  4583                  type: "string"
  4584                Created:
  4585                  description: "The time the container was created"
  4586                  type: "string"
  4587                Path:
  4588                  description: "The path to the command being run"
  4589                  type: "string"
  4590                Args:
  4591                  description: "The arguments to the command being run"
  4592                  type: "array"
  4593                  items:
  4594                    type: "string"
  4595                State:
  4596                  description: "The state of the container."
  4597                  type: "object"
  4598                  properties:
  4599                    Status:
  4600                      description: |
  4601                        The status of the container. For example, `"running"` or `"exited"`.
  4602                      type: "string"
  4603                      enum: ["created", "running", "paused", "restarting", "removing", "exited", "dead"]
  4604                    Running:
  4605                      description: |
  4606                        Whether this container is running.
  4607  
  4608                        Note that a running container can be _paused_. The `Running` and `Paused`
  4609                        booleans are not mutually exclusive:
  4610  
  4611                        When pausing a container (on Linux), the cgroups freezer is used to suspend
  4612                        all processes in the container. Freezing the process requires the process to
  4613                        be running. As a result, paused containers are both `Running` _and_ `Paused`.
  4614  
  4615                        Use the `Status` field instead to determine if a container's state is "running".
  4616                      type: "boolean"
  4617                    Paused:
  4618                      description: "Whether this container is paused."
  4619                      type: "boolean"
  4620                    Restarting:
  4621                      description: "Whether this container is restarting."
  4622                      type: "boolean"
  4623                    OOMKilled:
  4624                      description: "Whether this container has been killed because it ran out of memory."
  4625                      type: "boolean"
  4626                    Dead:
  4627                      type: "boolean"
  4628                    Pid:
  4629                      description: "The process ID of this container"
  4630                      type: "integer"
  4631                    ExitCode:
  4632                      description: "The last exit code of this container"
  4633                      type: "integer"
  4634                    Error:
  4635                      type: "string"
  4636                    StartedAt:
  4637                      description: "The time when this container was last started."
  4638                      type: "string"
  4639                    FinishedAt:
  4640                      description: "The time when this container last exited."
  4641                      type: "string"
  4642                Image:
  4643                  description: "The container's image"
  4644                  type: "string"
  4645                ResolvConfPath:
  4646                  type: "string"
  4647                HostnamePath:
  4648                  type: "string"
  4649                HostsPath:
  4650                  type: "string"
  4651                LogPath:
  4652                  type: "string"
  4653                Node:
  4654                  description: "TODO"
  4655                  type: "object"
  4656                Name:
  4657                  type: "string"
  4658                RestartCount:
  4659                  type: "integer"
  4660                Driver:
  4661                  type: "string"
  4662                MountLabel:
  4663                  type: "string"
  4664                ProcessLabel:
  4665                  type: "string"
  4666                AppArmorProfile:
  4667                  type: "string"
  4668                ExecIDs:
  4669                  type: "string"
  4670                HostConfig:
  4671                  $ref: "#/definitions/HostConfig"
  4672                GraphDriver:
  4673                  $ref: "#/definitions/GraphDriverData"
  4674                SizeRw:
  4675                  description: "The size of files that have been created or changed by this container."
  4676                  type: "integer"
  4677                  format: "int64"
  4678                SizeRootFs:
  4679                  description: "The total size of all the files in this container."
  4680                  type: "integer"
  4681                  format: "int64"
  4682                Mounts:
  4683                  type: "array"
  4684                  items:
  4685                    $ref: "#/definitions/MountPoint"
  4686                Config:
  4687                  $ref: "#/definitions/ContainerConfig"
  4688                NetworkSettings:
  4689                  $ref: "#/definitions/NetworkSettings"
  4690            examples:
  4691              application/json:
  4692                AppArmorProfile: ""
  4693                Args:
  4694                  - "-c"
  4695                  - "exit 9"
  4696                Config:
  4697                  AttachStderr: true
  4698                  AttachStdin: false
  4699                  AttachStdout: true
  4700                  Cmd:
  4701                    - "/bin/sh"
  4702                    - "-c"
  4703                    - "exit 9"
  4704                  Domainname: ""
  4705                  Env:
  4706                    - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  4707                  Hostname: "ba033ac44011"
  4708                  Image: "ubuntu"
  4709                  Labels:
  4710                    com.example.vendor: "Acme"
  4711                    com.example.license: "GPL"
  4712                    com.example.version: "1.0"
  4713                  MacAddress: ""
  4714                  NetworkDisabled: false
  4715                  OpenStdin: false
  4716                  StdinOnce: false
  4717                  Tty: false
  4718                  User: ""
  4719                  Volumes:
  4720                    /volumes/data: {}
  4721                  WorkingDir: ""
  4722                  StopSignal: "SIGTERM"
  4723                  StopTimeout: 10
  4724                Created: "2015-01-06T15:47:31.485331387Z"
  4725                Driver: "devicemapper"
  4726                HostConfig:
  4727                  MaximumIOps: 0
  4728                  MaximumIOBps: 0
  4729                  BlkioWeight: 0
  4730                  BlkioWeightDevice:
  4731                    - {}
  4732                  BlkioDeviceReadBps:
  4733                    - {}
  4734                  BlkioDeviceWriteBps:
  4735                    - {}
  4736                  BlkioDeviceReadIOps:
  4737                    - {}
  4738                  BlkioDeviceWriteIOps:
  4739                    - {}
  4740                  ContainerIDFile: ""
  4741                  CpusetCpus: ""
  4742                  CpusetMems: ""
  4743                  CpuPercent: 80
  4744                  CpuShares: 0
  4745                  CpuPeriod: 100000
  4746                  CpuRealtimePeriod: 1000000
  4747                  CpuRealtimeRuntime: 10000
  4748                  Devices: []
  4749                  IpcMode: ""
  4750                  Memory: 0
  4751                  MemorySwap: 0
  4752                  MemoryReservation: 0
  4753                  KernelMemory: 0
  4754                  OomKillDisable: false
  4755                  OomScoreAdj: 500
  4756                  NetworkMode: "bridge"
  4757                  PidMode: ""
  4758                  PortBindings: {}
  4759                  Privileged: false
  4760                  ReadonlyRootfs: false
  4761                  PublishAllPorts: false
  4762                  RestartPolicy:
  4763                    MaximumRetryCount: 2
  4764                    Name: "on-failure"
  4765                  LogConfig:
  4766                    Type: "json-file"
  4767                  Sysctls:
  4768                    net.ipv4.ip_forward: "1"
  4769                  Ulimits:
  4770                    - {}
  4771                  VolumeDriver: ""
  4772                  ShmSize: 67108864
  4773                HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname"
  4774                HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts"
  4775                LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log"
  4776                Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39"
  4777                Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2"
  4778                MountLabel: ""
  4779                Name: "/boring_euclid"
  4780                NetworkSettings:
  4781                  Bridge: ""
  4782                  SandboxID: ""
  4783                  HairpinMode: false
  4784                  LinkLocalIPv6Address: ""
  4785                  LinkLocalIPv6PrefixLen: 0
  4786                  SandboxKey: ""
  4787                  EndpointID: ""
  4788                  Gateway: ""
  4789                  GlobalIPv6Address: ""
  4790                  GlobalIPv6PrefixLen: 0
  4791                  IPAddress: ""
  4792                  IPPrefixLen: 0
  4793                  IPv6Gateway: ""
  4794                  MacAddress: ""
  4795                  Networks:
  4796                    bridge:
  4797                      NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  4798                      EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d"
  4799                      Gateway: "172.17.0.1"
  4800                      IPAddress: "172.17.0.2"
  4801                      IPPrefixLen: 16
  4802                      IPv6Gateway: ""
  4803                      GlobalIPv6Address: ""
  4804                      GlobalIPv6PrefixLen: 0
  4805                      MacAddress: "02:42:ac:12:00:02"
  4806                Path: "/bin/sh"
  4807                ProcessLabel: ""
  4808                ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf"
  4809                RestartCount: 1
  4810                State:
  4811                  Error: ""
  4812                  ExitCode: 9
  4813                  FinishedAt: "2015-01-06T15:47:32.080254511Z"
  4814                  OOMKilled: false
  4815                  Dead: false
  4816                  Paused: false
  4817                  Pid: 0
  4818                  Restarting: false
  4819                  Running: true
  4820                  StartedAt: "2015-01-06T15:47:32.072697474Z"
  4821                  Status: "running"
  4822                Mounts:
  4823                  - Name: "fac362...80535"
  4824                    Source: "/data"
  4825                    Destination: "/data"
  4826                    Driver: "local"
  4827                    Mode: "ro,Z"
  4828                    RW: false
  4829                    Propagation: ""
  4830          404:
  4831            description: "no such container"
  4832            schema:
  4833              $ref: "#/definitions/ErrorResponse"
  4834            examples:
  4835              application/json:
  4836                message: "No such container: c2ada9df5af8"
  4837          500:
  4838            description: "server error"
  4839            schema:
  4840              $ref: "#/definitions/ErrorResponse"
  4841        parameters:
  4842          - name: "id"
  4843            in: "path"
  4844            required: true
  4845            description: "ID or name of the container"
  4846            type: "string"
  4847          - name: "size"
  4848            in: "query"
  4849            type: "boolean"
  4850            default: false
  4851            description: "Return the size of container as fields `SizeRw` and `SizeRootFs`"
  4852        tags: ["Container"]
  4853    /containers/{id}/top:
  4854      get:
  4855        summary: "List processes running inside a container"
  4856        description: "On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows."
  4857        operationId: "ContainerTop"
  4858        responses:
  4859          200:
  4860            description: "no error"
  4861            schema:
  4862              type: "object"
  4863              properties:
  4864                Titles:
  4865                  description: "The ps column titles"
  4866                  type: "array"
  4867                  items:
  4868                    type: "string"
  4869                Processes:
  4870                  description: "Each process running in the container, where each is process is an array of values corresponding to the titles"
  4871                  type: "array"
  4872                  items:
  4873                    type: "array"
  4874                    items:
  4875                      type: "string"
  4876            examples:
  4877              application/json:
  4878                Titles:
  4879                  - "UID"
  4880                  - "PID"
  4881                  - "PPID"
  4882                  - "C"
  4883                  - "STIME"
  4884                  - "TTY"
  4885                  - "TIME"
  4886                  - "CMD"
  4887                Processes:
  4888                  -
  4889                    - "root"
  4890                    - "13642"
  4891                    - "882"
  4892                    - "0"
  4893                    - "17:03"
  4894                    - "pts/0"
  4895                    - "00:00:00"
  4896                    - "/bin/bash"
  4897                  -
  4898                    - "root"
  4899                    - "13735"
  4900                    - "13642"
  4901                    - "0"
  4902                    - "17:06"
  4903                    - "pts/0"
  4904                    - "00:00:00"
  4905                    - "sleep 10"
  4906          404:
  4907            description: "no such container"
  4908            schema:
  4909              $ref: "#/definitions/ErrorResponse"
  4910            examples:
  4911              application/json:
  4912                message: "No such container: c2ada9df5af8"
  4913          500:
  4914            description: "server error"
  4915            schema:
  4916              $ref: "#/definitions/ErrorResponse"
  4917        parameters:
  4918          - name: "id"
  4919            in: "path"
  4920            required: true
  4921            description: "ID or name of the container"
  4922            type: "string"
  4923          - name: "ps_args"
  4924            in: "query"
  4925            description: "The arguments to pass to `ps`. For example, `aux`"
  4926            type: "string"
  4927            default: "-ef"
  4928        tags: ["Container"]
  4929    /containers/{id}/logs:
  4930      get:
  4931        summary: "Get container logs"
  4932        description: |
  4933          Get `stdout` and `stderr` logs from a container.
  4934  
  4935          Note: This endpoint works only for containers with the `json-file` or `journald` logging driver.
  4936        operationId: "ContainerLogs"
  4937        responses:
  4938          101:
  4939            description: "logs returned as a stream"
  4940            schema:
  4941              type: "string"
  4942              format: "binary"
  4943          200:
  4944            description: "logs returned as a string in response body"
  4945            schema:
  4946              type: "string"
  4947          404:
  4948            description: "no such container"
  4949            schema:
  4950              $ref: "#/definitions/ErrorResponse"
  4951            examples:
  4952              application/json:
  4953                message: "No such container: c2ada9df5af8"
  4954          500:
  4955            description: "server error"
  4956            schema:
  4957              $ref: "#/definitions/ErrorResponse"
  4958        parameters:
  4959          - name: "id"
  4960            in: "path"
  4961            required: true
  4962            description: "ID or name of the container"
  4963            type: "string"
  4964          - name: "follow"
  4965            in: "query"
  4966            description: |
  4967              Return the logs as a stream.
  4968  
  4969              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).
  4970            type: "boolean"
  4971            default: false
  4972          - name: "stdout"
  4973            in: "query"
  4974            description: "Return logs from `stdout`"
  4975            type: "boolean"
  4976            default: false
  4977          - name: "stderr"
  4978            in: "query"
  4979            description: "Return logs from `stderr`"
  4980            type: "boolean"
  4981            default: false
  4982          - name: "since"
  4983            in: "query"
  4984            description: "Only return logs since this time, as a UNIX timestamp"
  4985            type: "integer"
  4986            default: 0
  4987          - name: "timestamps"
  4988            in: "query"
  4989            description: "Add timestamps to every log line"
  4990            type: "boolean"
  4991            default: false
  4992          - name: "tail"
  4993            in: "query"
  4994            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."
  4995            type: "string"
  4996            default: "all"
  4997        tags: ["Container"]
  4998    /containers/{id}/changes:
  4999      get:
  5000        summary: "Get changes on a container’s filesystem"
  5001        description: |
  5002          Returns which files in a container's filesystem have been added, deleted,
  5003          or modified. The `Kind` of modification can be one of:
  5004  
  5005          - `0`: Modified
  5006          - `1`: Added
  5007          - `2`: Deleted
  5008        operationId: "ContainerChanges"
  5009        produces: ["application/json"]
  5010        responses:
  5011          200:
  5012            description: "The list of changes"
  5013            schema:
  5014              type: "array"
  5015              items:
  5016                type: "object"
  5017                x-go-name: "ContainerChangeResponseItem"
  5018                required: [Path, Kind]
  5019                properties:
  5020                  Path:
  5021                    description: "Path to file that has changed"
  5022                    type: "string"
  5023                    x-nullable: false
  5024                  Kind:
  5025                    description: "Kind of change"
  5026                    type: "integer"
  5027                    format: "uint8"
  5028                    enum: [0, 1, 2]
  5029                    x-nullable: false
  5030            examples:
  5031              application/json:
  5032                - Path: "/dev"
  5033                  Kind: 0
  5034                - Path: "/dev/kmsg"
  5035                  Kind: 1
  5036                - Path: "/test"
  5037                  Kind: 1
  5038          404:
  5039            description: "no such container"
  5040            schema:
  5041              $ref: "#/definitions/ErrorResponse"
  5042            examples:
  5043              application/json:
  5044                message: "No such container: c2ada9df5af8"
  5045          500:
  5046            description: "server error"
  5047            schema:
  5048              $ref: "#/definitions/ErrorResponse"
  5049        parameters:
  5050          - name: "id"
  5051            in: "path"
  5052            required: true
  5053            description: "ID or name of the container"
  5054            type: "string"
  5055        tags: ["Container"]
  5056    /containers/{id}/export:
  5057      get:
  5058        summary: "Export a container"
  5059        description: "Export the contents of a container as a tarball."
  5060        operationId: "ContainerExport"
  5061        produces:
  5062          - "application/octet-stream"
  5063        responses:
  5064          200:
  5065            description: "no error"
  5066          404:
  5067            description: "no such container"
  5068            schema:
  5069              $ref: "#/definitions/ErrorResponse"
  5070            examples:
  5071              application/json:
  5072                message: "No such container: c2ada9df5af8"
  5073          500:
  5074            description: "server error"
  5075            schema:
  5076              $ref: "#/definitions/ErrorResponse"
  5077        parameters:
  5078          - name: "id"
  5079            in: "path"
  5080            required: true
  5081            description: "ID or name of the container"
  5082            type: "string"
  5083        tags: ["Container"]
  5084    /containers/{id}/stats:
  5085      get:
  5086        summary: "Get container stats based on resource usage"
  5087        description: |
  5088          This endpoint returns a live stream of a container’s resource usage
  5089          statistics.
  5090  
  5091          The `precpu_stats` is the CPU statistic of last read, which is used
  5092          for calculating the CPU usage percentage. It is not the same as the
  5093          `cpu_stats` field.
  5094  
  5095          If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is
  5096          nil then for compatibility with older daemons the length of the
  5097          corresponding `cpu_usage.percpu_usage` array should be used.
  5098        operationId: "ContainerStats"
  5099        produces: ["application/json"]
  5100        responses:
  5101          200:
  5102            description: "no error"
  5103            schema:
  5104              type: "object"
  5105            examples:
  5106              application/json:
  5107                read: "2015-01-08T22:57:31.547920715Z"
  5108                pids_stats:
  5109                  current: 3
  5110                networks:
  5111                  eth0:
  5112                    rx_bytes: 5338
  5113                    rx_dropped: 0
  5114                    rx_errors: 0
  5115                    rx_packets: 36
  5116                    tx_bytes: 648
  5117                    tx_dropped: 0
  5118                    tx_errors: 0
  5119                    tx_packets: 8
  5120                  eth5:
  5121                    rx_bytes: 4641
  5122                    rx_dropped: 0
  5123                    rx_errors: 0
  5124                    rx_packets: 26
  5125                    tx_bytes: 690
  5126                    tx_dropped: 0
  5127                    tx_errors: 0
  5128                    tx_packets: 9
  5129                memory_stats:
  5130                  stats:
  5131                    total_pgmajfault: 0
  5132                    cache: 0
  5133                    mapped_file: 0
  5134                    total_inactive_file: 0
  5135                    pgpgout: 414
  5136                    rss: 6537216
  5137                    total_mapped_file: 0
  5138                    writeback: 0
  5139                    unevictable: 0
  5140                    pgpgin: 477
  5141                    total_unevictable: 0
  5142                    pgmajfault: 0
  5143                    total_rss: 6537216
  5144                    total_rss_huge: 6291456
  5145                    total_writeback: 0
  5146                    total_inactive_anon: 0
  5147                    rss_huge: 6291456
  5148                    hierarchical_memory_limit: 67108864
  5149                    total_pgfault: 964
  5150                    total_active_file: 0
  5151                    active_anon: 6537216
  5152                    total_active_anon: 6537216
  5153                    total_pgpgout: 414
  5154                    total_cache: 0
  5155                    inactive_anon: 0
  5156                    active_file: 0
  5157                    pgfault: 964
  5158                    inactive_file: 0
  5159                    total_pgpgin: 477
  5160                  max_usage: 6651904
  5161                  usage: 6537216
  5162                  failcnt: 0
  5163                  limit: 67108864
  5164                blkio_stats: {}
  5165                cpu_stats:
  5166                  cpu_usage:
  5167                    percpu_usage:
  5168                      - 8646879
  5169                      - 24472255
  5170                      - 36438778
  5171                      - 30657443
  5172                    usage_in_usermode: 50000000
  5173                    total_usage: 100215355
  5174                    usage_in_kernelmode: 30000000
  5175                  system_cpu_usage: 739306590000000
  5176                  online_cpus: 4
  5177                  throttling_data:
  5178                    periods: 0
  5179                    throttled_periods: 0
  5180                    throttled_time: 0
  5181                precpu_stats:
  5182                  cpu_usage:
  5183                    percpu_usage:
  5184                      - 8646879
  5185                      - 24350896
  5186                      - 36438778
  5187                      - 30657443
  5188                    usage_in_usermode: 50000000
  5189                    total_usage: 100093996
  5190                    usage_in_kernelmode: 30000000
  5191                  system_cpu_usage: 9492140000000
  5192                  online_cpus: 4
  5193                  throttling_data:
  5194                    periods: 0
  5195                    throttled_periods: 0
  5196                    throttled_time: 0
  5197          404:
  5198            description: "no such container"
  5199            schema:
  5200              $ref: "#/definitions/ErrorResponse"
  5201            examples:
  5202              application/json:
  5203                message: "No such container: c2ada9df5af8"
  5204          500:
  5205            description: "server error"
  5206            schema:
  5207              $ref: "#/definitions/ErrorResponse"
  5208        parameters:
  5209          - name: "id"
  5210            in: "path"
  5211            required: true
  5212            description: "ID or name of the container"
  5213            type: "string"
  5214          - name: "stream"
  5215            in: "query"
  5216            description: "Stream the output. If false, the stats will be output once and then it will disconnect."
  5217            type: "boolean"
  5218            default: true
  5219        tags: ["Container"]
  5220    /containers/{id}/resize:
  5221      post:
  5222        summary: "Resize a container TTY"
  5223        description: "Resize the TTY for a container. You must restart the container for the resize to take effect."
  5224        operationId: "ContainerResize"
  5225        consumes:
  5226          - "application/octet-stream"
  5227        produces:
  5228          - "text/plain"
  5229        responses:
  5230          200:
  5231            description: "no error"
  5232          404:
  5233            description: "no such container"
  5234            schema:
  5235              $ref: "#/definitions/ErrorResponse"
  5236            examples:
  5237              application/json:
  5238                message: "No such container: c2ada9df5af8"
  5239          500:
  5240            description: "cannot resize container"
  5241            schema:
  5242              $ref: "#/definitions/ErrorResponse"
  5243        parameters:
  5244          - name: "id"
  5245            in: "path"
  5246            required: true
  5247            description: "ID or name of the container"
  5248            type: "string"
  5249          - name: "h"
  5250            in: "query"
  5251            description: "Height of the tty session in characters"
  5252            type: "integer"
  5253          - name: "w"
  5254            in: "query"
  5255            description: "Width of the tty session in characters"
  5256            type: "integer"
  5257        tags: ["Container"]
  5258    /containers/{id}/start:
  5259      post:
  5260        summary: "Start a container"
  5261        operationId: "ContainerStart"
  5262        responses:
  5263          204:
  5264            description: "no error"
  5265          304:
  5266            description: "container already started"
  5267            schema:
  5268              $ref: "#/definitions/ErrorResponse"
  5269          404:
  5270            description: "no such container"
  5271            schema:
  5272              $ref: "#/definitions/ErrorResponse"
  5273            examples:
  5274              application/json:
  5275                message: "No such container: c2ada9df5af8"
  5276          500:
  5277            description: "server error"
  5278            schema:
  5279              $ref: "#/definitions/ErrorResponse"
  5280        parameters:
  5281          - name: "id"
  5282            in: "path"
  5283            required: true
  5284            description: "ID or name of the container"
  5285            type: "string"
  5286          - name: "detachKeys"
  5287            in: "query"
  5288            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 `_`."
  5289            type: "string"
  5290        tags: ["Container"]
  5291    /containers/{id}/stop:
  5292      post:
  5293        summary: "Stop a container"
  5294        operationId: "ContainerStop"
  5295        responses:
  5296          204:
  5297            description: "no error"
  5298          304:
  5299            description: "container already stopped"
  5300            schema:
  5301              $ref: "#/definitions/ErrorResponse"
  5302          404:
  5303            description: "no such container"
  5304            schema:
  5305              $ref: "#/definitions/ErrorResponse"
  5306            examples:
  5307              application/json:
  5308                message: "No such container: c2ada9df5af8"
  5309          500:
  5310            description: "server error"
  5311            schema:
  5312              $ref: "#/definitions/ErrorResponse"
  5313        parameters:
  5314          - name: "id"
  5315            in: "path"
  5316            required: true
  5317            description: "ID or name of the container"
  5318            type: "string"
  5319          - name: "t"
  5320            in: "query"
  5321            description: "Number of seconds to wait before killing the container"
  5322            type: "integer"
  5323        tags: ["Container"]
  5324    /containers/{id}/restart:
  5325      post:
  5326        summary: "Restart a container"
  5327        operationId: "ContainerRestart"
  5328        responses:
  5329          204:
  5330            description: "no error"
  5331          404:
  5332            description: "no such container"
  5333            schema:
  5334              $ref: "#/definitions/ErrorResponse"
  5335            examples:
  5336              application/json:
  5337                message: "No such container: c2ada9df5af8"
  5338          500:
  5339            description: "server error"
  5340            schema:
  5341              $ref: "#/definitions/ErrorResponse"
  5342        parameters:
  5343          - name: "id"
  5344            in: "path"
  5345            required: true
  5346            description: "ID or name of the container"
  5347            type: "string"
  5348          - name: "t"
  5349            in: "query"
  5350            description: "Number of seconds to wait before killing the container"
  5351            type: "integer"
  5352        tags: ["Container"]
  5353    /containers/{id}/kill:
  5354      post:
  5355        summary: "Kill a container"
  5356        description: "Send a POSIX signal to a container, defaulting to killing to the container."
  5357        operationId: "ContainerKill"
  5358        responses:
  5359          204:
  5360            description: "no error"
  5361          404:
  5362            description: "no such container"
  5363            schema:
  5364              $ref: "#/definitions/ErrorResponse"
  5365            examples:
  5366              application/json:
  5367                message: "No such container: c2ada9df5af8"
  5368          500:
  5369            description: "server error"
  5370            schema:
  5371              $ref: "#/definitions/ErrorResponse"
  5372        parameters:
  5373          - name: "id"
  5374            in: "path"
  5375            required: true
  5376            description: "ID or name of the container"
  5377            type: "string"
  5378          - name: "signal"
  5379            in: "query"
  5380            description: "Signal to send to the container as an integer or string (e.g. `SIGINT`)"
  5381            type: "string"
  5382            default: "SIGKILL"
  5383        tags: ["Container"]
  5384    /containers/{id}/update:
  5385      post:
  5386        summary: "Update a container"
  5387        description: "Change various configuration options of a container without having to recreate it."
  5388        operationId: "ContainerUpdate"
  5389        consumes: ["application/json"]
  5390        produces: ["application/json"]
  5391        responses:
  5392          200:
  5393            description: "The container has been updated."
  5394            schema:
  5395              type: "object"
  5396              properties:
  5397                Warnings:
  5398                  type: "array"
  5399                  items:
  5400                    type: "string"
  5401          404:
  5402            description: "no such container"
  5403            schema:
  5404              $ref: "#/definitions/ErrorResponse"
  5405            examples:
  5406              application/json:
  5407                message: "No such container: c2ada9df5af8"
  5408          500:
  5409            description: "server error"
  5410            schema:
  5411              $ref: "#/definitions/ErrorResponse"
  5412        parameters:
  5413          - name: "id"
  5414            in: "path"
  5415            required: true
  5416            description: "ID or name of the container"
  5417            type: "string"
  5418          - name: "update"
  5419            in: "body"
  5420            required: true
  5421            schema:
  5422              allOf:
  5423                - $ref: "#/definitions/Resources"
  5424                - type: "object"
  5425                  properties:
  5426                    RestartPolicy:
  5427                      $ref: "#/definitions/RestartPolicy"
  5428              example:
  5429                BlkioWeight: 300
  5430                CpuShares: 512
  5431                CpuPeriod: 100000
  5432                CpuQuota: 50000
  5433                CpuRealtimePeriod: 1000000
  5434                CpuRealtimeRuntime: 10000
  5435                CpusetCpus: "0,1"
  5436                CpusetMems: "0"
  5437                Memory: 314572800
  5438                MemorySwap: 514288000
  5439                MemoryReservation: 209715200
  5440                KernelMemory: 52428800
  5441                RestartPolicy:
  5442                  MaximumRetryCount: 4
  5443                  Name: "on-failure"
  5444        tags: ["Container"]
  5445    /containers/{id}/rename:
  5446      post:
  5447        summary: "Rename a container"
  5448        operationId: "ContainerRename"
  5449        responses:
  5450          204:
  5451            description: "no error"
  5452          404:
  5453            description: "no such container"
  5454            schema:
  5455              $ref: "#/definitions/ErrorResponse"
  5456            examples:
  5457              application/json:
  5458                message: "No such container: c2ada9df5af8"
  5459          409:
  5460            description: "name already in use"
  5461            schema:
  5462              $ref: "#/definitions/ErrorResponse"
  5463          500:
  5464            description: "server error"
  5465            schema:
  5466              $ref: "#/definitions/ErrorResponse"
  5467        parameters:
  5468          - name: "id"
  5469            in: "path"
  5470            required: true
  5471            description: "ID or name of the container"
  5472            type: "string"
  5473          - name: "name"
  5474            in: "query"
  5475            required: true
  5476            description: "New name for the container"
  5477            type: "string"
  5478        tags: ["Container"]
  5479    /containers/{id}/pause:
  5480      post:
  5481        summary: "Pause a container"
  5482        description: |
  5483          Use the cgroups freezer to suspend all processes in a container.
  5484  
  5485          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.
  5486        operationId: "ContainerPause"
  5487        responses:
  5488          204:
  5489            description: "no error"
  5490          404:
  5491            description: "no such container"
  5492            schema:
  5493              $ref: "#/definitions/ErrorResponse"
  5494            examples:
  5495              application/json:
  5496                message: "No such container: c2ada9df5af8"
  5497          500:
  5498            description: "server error"
  5499            schema:
  5500              $ref: "#/definitions/ErrorResponse"
  5501        parameters:
  5502          - name: "id"
  5503            in: "path"
  5504            required: true
  5505            description: "ID or name of the container"
  5506            type: "string"
  5507        tags: ["Container"]
  5508    /containers/{id}/unpause:
  5509      post:
  5510        summary: "Unpause a container"
  5511        description: "Resume a container which has been paused."
  5512        operationId: "ContainerUnpause"
  5513        responses:
  5514          204:
  5515            description: "no error"
  5516          404:
  5517            description: "no such container"
  5518            schema:
  5519              $ref: "#/definitions/ErrorResponse"
  5520            examples:
  5521              application/json:
  5522                message: "No such container: c2ada9df5af8"
  5523          500:
  5524            description: "server error"
  5525            schema:
  5526              $ref: "#/definitions/ErrorResponse"
  5527        parameters:
  5528          - name: "id"
  5529            in: "path"
  5530            required: true
  5531            description: "ID or name of the container"
  5532            type: "string"
  5533        tags: ["Container"]
  5534    /containers/{id}/attach:
  5535      post:
  5536        summary: "Attach to a container"
  5537        description: |
  5538          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.
  5539  
  5540          Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything.
  5541  
  5542          See [the documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details.
  5543  
  5544          ### Hijacking
  5545  
  5546          This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket.
  5547  
  5548          This is the response from the daemon for an attach request:
  5549  
  5550          ```
  5551          HTTP/1.1 200 OK
  5552          Content-Type: application/vnd.docker.raw-stream
  5553  
  5554          [STREAM]
  5555          ```
  5556  
  5557          After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server.
  5558  
  5559          To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers.
  5560  
  5561          For example, the client sends this request to upgrade the connection:
  5562  
  5563          ```
  5564          POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1
  5565          Upgrade: tcp
  5566          Connection: Upgrade
  5567          ```
  5568  
  5569          The Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream:
  5570  
  5571          ```
  5572          HTTP/1.1 101 UPGRADED
  5573          Content-Type: application/vnd.docker.raw-stream
  5574          Connection: Upgrade
  5575          Upgrade: tcp
  5576  
  5577          [STREAM]
  5578          ```
  5579  
  5580          ### Stream format
  5581  
  5582          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.
  5583  
  5584          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`).
  5585  
  5586          It is encoded on the first eight bytes like this:
  5587  
  5588          ```go
  5589          header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}
  5590          ```
  5591  
  5592          `STREAM_TYPE` can be:
  5593  
  5594          - 0: `stdin` (is written on `stdout`)
  5595          - 1: `stdout`
  5596          - 2: `stderr`
  5597  
  5598          `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian.
  5599  
  5600          Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`.
  5601  
  5602          The simplest way to implement this protocol is the following:
  5603  
  5604          1. Read 8 bytes.
  5605          2. Choose `stdout` or `stderr` depending on the first byte.
  5606          3. Extract the frame size from the last four bytes.
  5607          4. Read the extracted size and output it on the correct output.
  5608          5. Goto 1.
  5609  
  5610          ### Stream format when using a TTY
  5611  
  5612          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`.
  5613  
  5614        operationId: "ContainerAttach"
  5615        produces:
  5616          - "application/vnd.docker.raw-stream"
  5617        responses:
  5618          101:
  5619            description: "no error, hints proxy about hijacking"
  5620          200:
  5621            description: "no error, no upgrade header found"
  5622          400:
  5623            description: "bad parameter"
  5624            schema:
  5625              $ref: "#/definitions/ErrorResponse"
  5626          404:
  5627            description: "no such container"
  5628            schema:
  5629              $ref: "#/definitions/ErrorResponse"
  5630            examples:
  5631              application/json:
  5632                message: "No such container: c2ada9df5af8"
  5633          500:
  5634            description: "server error"
  5635            schema:
  5636              $ref: "#/definitions/ErrorResponse"
  5637        parameters:
  5638          - name: "id"
  5639            in: "path"
  5640            required: true
  5641            description: "ID or name of the container"
  5642            type: "string"
  5643          - name: "detachKeys"
  5644            in: "query"
  5645            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 `_`."
  5646            type: "string"
  5647          - name: "logs"
  5648            in: "query"
  5649            description: |
  5650              Replay previous logs from the container.
  5651  
  5652              This is useful for attaching to a container that has started and you want to output everything since the container started.
  5653  
  5654              If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output.
  5655            type: "boolean"
  5656            default: false
  5657          - name: "stream"
  5658            in: "query"
  5659            description: "Stream attached streams from the time the request was made onwards"
  5660            type: "boolean"
  5661            default: false
  5662          - name: "stdin"
  5663            in: "query"
  5664            description: "Attach to `stdin`"
  5665            type: "boolean"
  5666            default: false
  5667          - name: "stdout"
  5668            in: "query"
  5669            description: "Attach to `stdout`"
  5670            type: "boolean"
  5671            default: false
  5672          - name: "stderr"
  5673            in: "query"
  5674            description: "Attach to `stderr`"
  5675            type: "boolean"
  5676            default: false
  5677        tags: ["Container"]
  5678    /containers/{id}/attach/ws:
  5679      get:
  5680        summary: "Attach to a container via a websocket"
  5681        operationId: "ContainerAttachWebsocket"
  5682        responses:
  5683          101:
  5684            description: "no error, hints proxy about hijacking"
  5685          200:
  5686            description: "no error, no upgrade header found"
  5687          400:
  5688            description: "bad parameter"
  5689            schema:
  5690              $ref: "#/definitions/ErrorResponse"
  5691          404:
  5692            description: "no such container"
  5693            schema:
  5694              $ref: "#/definitions/ErrorResponse"
  5695            examples:
  5696              application/json:
  5697                message: "No such container: c2ada9df5af8"
  5698          500:
  5699            description: "server error"
  5700            schema:
  5701              $ref: "#/definitions/ErrorResponse"
  5702        parameters:
  5703          - name: "id"
  5704            in: "path"
  5705            required: true
  5706            description: "ID or name of the container"
  5707            type: "string"
  5708          - name: "detachKeys"
  5709            in: "query"
  5710            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 `_`."
  5711            type: "string"
  5712          - name: "logs"
  5713            in: "query"
  5714            description: "Return logs"
  5715            type: "boolean"
  5716            default: false
  5717          - name: "stream"
  5718            in: "query"
  5719            description: "Return stream"
  5720            type: "boolean"
  5721            default: false
  5722        tags: ["Container"]
  5723    /containers/{id}/wait:
  5724      post:
  5725        summary: "Wait for a container"
  5726        description: "Block until a container stops, then returns the exit code."
  5727        operationId: "ContainerWait"
  5728        produces: ["application/json"]
  5729        responses:
  5730          200:
  5731            description: "The container has exit."
  5732            schema:
  5733              type: "object"
  5734              required: [StatusCode]
  5735              properties:
  5736                StatusCode:
  5737                  description: "Exit code of the container"
  5738                  type: "integer"
  5739                  x-nullable: false
  5740          400:
  5741            description: "bad parameter"
  5742            schema:
  5743              $ref: "#/definitions/ErrorResponse"
  5744          404:
  5745            description: "no such container"
  5746            schema:
  5747              $ref: "#/definitions/ErrorResponse"
  5748            examples:
  5749              application/json:
  5750                message: "No such container: c2ada9df5af8"
  5751          500:
  5752            description: "server error"
  5753            schema:
  5754              $ref: "#/definitions/ErrorResponse"
  5755        parameters:
  5756          - name: "id"
  5757            in: "path"
  5758            required: true
  5759            description: "ID or name of the container"
  5760            type: "string"
  5761          - name: "condition"
  5762            in: "query"
  5763            description: |
  5764              Wait until a container state reaches the given condition.
  5765  
  5766              Defaults to `not-running` if omitted or empty.
  5767            type: "string"
  5768            enum:
  5769              - "not-running"
  5770              - "next-exit"
  5771              - "removed"
  5772            default: "not-running"
  5773        tags: ["Container"]
  5774    /containers/{id}:
  5775      delete:
  5776        summary: "Remove a container"
  5777        operationId: "ContainerDelete"
  5778        responses:
  5779          204:
  5780            description: "no error"
  5781          400:
  5782            description: "bad parameter"
  5783            schema:
  5784              $ref: "#/definitions/ErrorResponse"
  5785          404:
  5786            description: "no such container"
  5787            schema:
  5788              $ref: "#/definitions/ErrorResponse"
  5789            examples:
  5790              application/json:
  5791                message: "No such container: c2ada9df5af8"
  5792          409:
  5793            description: "conflict"
  5794            schema:
  5795              $ref: "#/definitions/ErrorResponse"
  5796            examples:
  5797              application/json:
  5798                message: "You cannot remove a running container: c2ada9df5af8. Stop the container before attempting removal or force remove"
  5799          500:
  5800            description: "server error"
  5801            schema:
  5802              $ref: "#/definitions/ErrorResponse"
  5803        parameters:
  5804          - name: "id"
  5805            in: "path"
  5806            required: true
  5807            description: "ID or name of the container"
  5808            type: "string"
  5809          - name: "v"
  5810            in: "query"
  5811            description: "Remove anonymous volumes associated with the container."
  5812            type: "boolean"
  5813            default: false
  5814          - name: "force"
  5815            in: "query"
  5816            description: "If the container is running, kill it before removing it."
  5817            type: "boolean"
  5818            default: false
  5819          - name: "link"
  5820            in: "query"
  5821            description: "Remove the specified link associated with the container."
  5822            type: "boolean"
  5823            default: false
  5824        tags: ["Container"]
  5825    /containers/{id}/archive:
  5826      head:
  5827        summary: "Get information about files in a container"
  5828        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."
  5829        operationId: "ContainerArchiveInfo"
  5830        responses:
  5831          200:
  5832            description: "no error"
  5833            headers:
  5834              X-Docker-Container-Path-Stat:
  5835                type: "string"
  5836                description: "TODO"
  5837          400:
  5838            description: "Bad parameter"
  5839            schema:
  5840              $ref: "#/definitions/ErrorResponse"
  5841          404:
  5842            description: "Container or path does not exist"
  5843            schema:
  5844              $ref: "#/definitions/ErrorResponse"
  5845            examples:
  5846              application/json:
  5847                message: "No such container: c2ada9df5af8"
  5848          500:
  5849            description: "Server error"
  5850            schema:
  5851              $ref: "#/definitions/ErrorResponse"
  5852        parameters:
  5853          - name: "id"
  5854            in: "path"
  5855            required: true
  5856            description: "ID or name of the container"
  5857            type: "string"
  5858          - name: "path"
  5859            in: "query"
  5860            required: true
  5861            description: "Resource in the container’s filesystem to archive."
  5862            type: "string"
  5863        tags: ["Container"]
  5864      get:
  5865        summary: "Get an archive of a filesystem resource in a container"
  5866        description: "Get a tar archive of a resource in the filesystem of container id."
  5867        operationId: "ContainerArchive"
  5868        produces: ["application/x-tar"]
  5869        responses:
  5870          200:
  5871            description: "no error"
  5872          400:
  5873            description: "Bad parameter"
  5874            schema:
  5875              $ref: "#/definitions/ErrorResponse"
  5876          404:
  5877            description: "Container or path does not exist"
  5878            schema:
  5879              $ref: "#/definitions/ErrorResponse"
  5880            examples:
  5881              application/json:
  5882                message: "No such container: c2ada9df5af8"
  5883          500:
  5884            description: "server error"
  5885            schema:
  5886              $ref: "#/definitions/ErrorResponse"
  5887        parameters:
  5888          - name: "id"
  5889            in: "path"
  5890            required: true
  5891            description: "ID or name of the container"
  5892            type: "string"
  5893          - name: "path"
  5894            in: "query"
  5895            required: true
  5896            description: "Resource in the container’s filesystem to archive."
  5897            type: "string"
  5898        tags: ["Container"]
  5899      put:
  5900        summary: "Extract an archive of files or folders to a directory in a container"
  5901        description: |
  5902          Upload a tar archive to be extracted to a path in the filesystem of container id.
  5903          `path` parameter is asserted to be a directory. If it exists as a file, 400 error
  5904          will be returned with message "not a directory".
  5905        operationId: "PutContainerArchive"
  5906        consumes: ["application/x-tar", "application/octet-stream"]
  5907        responses:
  5908          200:
  5909            description: "The content was extracted successfully"
  5910          400:
  5911            description: "Bad parameter"
  5912            schema:
  5913              $ref: "#/definitions/ErrorResponse"
  5914            examples:
  5915              application/json:
  5916                message: "not a directory"
  5917          403:
  5918            description: "Permission denied, the volume or container rootfs is marked as read-only."
  5919            schema:
  5920              $ref: "#/definitions/ErrorResponse"
  5921          404:
  5922            description: "No such container or path does not exist inside the container"
  5923            schema:
  5924              $ref: "#/definitions/ErrorResponse"
  5925            examples:
  5926              application/json:
  5927                message: "No such container: c2ada9df5af8"
  5928          500:
  5929            description: "Server error"
  5930            schema:
  5931              $ref: "#/definitions/ErrorResponse"
  5932        parameters:
  5933          - name: "id"
  5934            in: "path"
  5935            required: true
  5936            description: "ID or name of the container"
  5937            type: "string"
  5938          - name: "path"
  5939            in: "query"
  5940            required: true
  5941            description: "Path to a directory in the container to extract the archive’s contents into. "
  5942            type: "string"
  5943          - name: "noOverwriteDirNonDir"
  5944            in: "query"
  5945            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."
  5946            type: "string"
  5947          - name: "inputStream"
  5948            in: "body"
  5949            required: true
  5950            description: "The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz."
  5951            schema:
  5952              type: "string"
  5953        tags: ["Container"]
  5954    /containers/prune:
  5955      post:
  5956        summary: "Delete stopped containers"
  5957        produces:
  5958          - "application/json"
  5959        operationId: "ContainerPrune"
  5960        parameters:
  5961          - name: "filters"
  5962            in: "query"
  5963            description: |
  5964              Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  5965  
  5966              Available filters:
  5967              - `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.
  5968              - `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.
  5969            type: "string"
  5970        responses:
  5971          200:
  5972            description: "No error"
  5973            schema:
  5974              type: "object"
  5975              properties:
  5976                ContainersDeleted:
  5977                  description: "Container IDs that were deleted"
  5978                  type: "array"
  5979                  items:
  5980                    type: "string"
  5981                SpaceReclaimed:
  5982                  description: "Disk space reclaimed in bytes"
  5983                  type: "integer"
  5984                  format: "int64"
  5985          500:
  5986            description: "Server error"
  5987            schema:
  5988              $ref: "#/definitions/ErrorResponse"
  5989        tags: ["Container"]
  5990    /images/json:
  5991      get:
  5992        summary: "List Images"
  5993        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."
  5994        operationId: "ImageList"
  5995        produces:
  5996          - "application/json"
  5997        responses:
  5998          200:
  5999            description: "Summary image data for the images matching the query"
  6000            schema:
  6001              type: "array"
  6002              items:
  6003                $ref: "#/definitions/ImageSummary"
  6004            examples:
  6005              application/json:
  6006                - Id: "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8"
  6007                  ParentId: ""
  6008                  RepoTags:
  6009                    - "ubuntu:12.04"
  6010                    - "ubuntu:precise"
  6011                  RepoDigests:
  6012                    - "ubuntu@sha256:992069aee4016783df6345315302fa59681aae51a8eeb2f889dea59290f21787"
  6013                  Created: 1474925151
  6014                  Size: 103579269
  6015                  VirtualSize: 103579269
  6016                  SharedSize: 0
  6017                  Labels: {}
  6018                  Containers: 2
  6019                - Id: "sha256:3e314f95dcace0f5e4fd37b10862fe8398e3c60ed36600bc0ca5fda78b087175"
  6020                  ParentId: ""
  6021                  RepoTags:
  6022                    - "ubuntu:12.10"
  6023                    - "ubuntu:quantal"
  6024                  RepoDigests:
  6025                    - "ubuntu@sha256:002fba3e3255af10be97ea26e476692a7ebed0bb074a9ab960b2e7a1526b15d7"
  6026                    - "ubuntu@sha256:68ea0200f0b90df725d99d823905b04cf844f6039ef60c60bf3e019915017bd3"
  6027                  Created: 1403128455
  6028                  Size: 172064416
  6029                  VirtualSize: 172064416
  6030                  SharedSize: 0
  6031                  Labels: {}
  6032                  Containers: 5
  6033          500:
  6034            description: "server error"
  6035            schema:
  6036              $ref: "#/definitions/ErrorResponse"
  6037        parameters:
  6038          - name: "all"
  6039            in: "query"
  6040            description: "Show all images. Only images from a final layer (no children) are shown by default."
  6041            type: "boolean"
  6042            default: false
  6043          - name: "filters"
  6044            in: "query"
  6045            description: |
  6046              A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:
  6047  
  6048              - `before`=(`<image-name>[:<tag>]`,  `<image id>` or `<image@digest>`)
  6049              - `dangling=true`
  6050              - `label=key` or `label="key=value"` of an image label
  6051              - `reference`=(`<image-name>[:<tag>]`)
  6052              - `since`=(`<image-name>[:<tag>]`,  `<image id>` or `<image@digest>`)
  6053            type: "string"
  6054          - name: "digests"
  6055            in: "query"
  6056            description: "Show digest information as a `RepoDigests` field on each image."
  6057            type: "boolean"
  6058            default: false
  6059        tags: ["Image"]
  6060    /build:
  6061      post:
  6062        summary: "Build an image"
  6063        description: |
  6064          Build an image from a tar archive with a `Dockerfile` in it.
  6065  
  6066          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/).
  6067  
  6068          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.
  6069  
  6070          The build is canceled if the client drops the connection by quitting or being killed.
  6071        operationId: "ImageBuild"
  6072        consumes:
  6073          - "application/octet-stream"
  6074        produces:
  6075          - "application/json"
  6076        parameters:
  6077          - name: "inputStream"
  6078            in: "body"
  6079            description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz."
  6080            schema:
  6081              type: "string"
  6082              format: "binary"
  6083          - name: "dockerfile"
  6084            in: "query"
  6085            description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`."
  6086            type: "string"
  6087            default: "Dockerfile"
  6088          - name: "t"
  6089            in: "query"
  6090            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."
  6091            type: "string"
  6092          - name: "extrahosts"
  6093            in: "query"
  6094            description: "Extra hosts to add to /etc/hosts"
  6095            type: "string"
  6096          - name: "remote"
  6097            in: "query"
  6098            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."
  6099            type: "string"
  6100          - name: "q"
  6101            in: "query"
  6102            description: "Suppress verbose build output."
  6103            type: "boolean"
  6104            default: false
  6105          - name: "nocache"
  6106            in: "query"
  6107            description: "Do not use the cache when building the image."
  6108            type: "boolean"
  6109            default: false
  6110          - name: "cachefrom"
  6111            in: "query"
  6112            description: "JSON array of images used for build cache resolution."
  6113            type: "string"
  6114          - name: "pull"
  6115            in: "query"
  6116            description: "Attempt to pull the image even if an older image exists locally."
  6117            type: "string"
  6118          - name: "rm"
  6119            in: "query"
  6120            description: "Remove intermediate containers after a successful build."
  6121            type: "boolean"
  6122            default: true
  6123          - name: "forcerm"
  6124            in: "query"
  6125            description: "Always remove intermediate containers, even upon failure."
  6126            type: "boolean"
  6127            default: false
  6128          - name: "memory"
  6129            in: "query"
  6130            description: "Set memory limit for build."
  6131            type: "integer"
  6132          - name: "memswap"
  6133            in: "query"
  6134            description: "Total memory (memory + swap). Set as `-1` to disable swap."
  6135            type: "integer"
  6136          - name: "cpushares"
  6137            in: "query"
  6138            description: "CPU shares (relative weight)."
  6139            type: "integer"
  6140          - name: "cpusetcpus"
  6141            in: "query"
  6142            description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)."
  6143            type: "string"
  6144          - name: "cpuperiod"
  6145            in: "query"
  6146            description: "The length of a CPU period in microseconds."
  6147            type: "integer"
  6148          - name: "cpuquota"
  6149            in: "query"
  6150            description: "Microseconds of CPU time that the container can get in a CPU period."
  6151            type: "integer"
  6152          - name: "buildargs"
  6153            in: "query"
  6154            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)"
  6155            type: "integer"
  6156          - name: "shmsize"
  6157            in: "query"
  6158            description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB."
  6159            type: "integer"
  6160          - name: "squash"
  6161            in: "query"
  6162            description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*"
  6163            type: "boolean"
  6164          - name: "labels"
  6165            in: "query"
  6166            description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs."
  6167            type: "string"
  6168          - name: "networkmode"
  6169            in: "query"
  6170            description: "Sets the networking mode for the run commands during
  6171          build. Supported standard values are: `bridge`, `host`, `none`, and
  6172          `container:<name|id>`. Any other value is taken as a custom network's
  6173          name to which this container should connect to."
  6174            type: "string"
  6175          - name: "Content-type"
  6176            in: "header"
  6177            type: "string"
  6178            enum:
  6179              - "application/x-tar"
  6180            default: "application/x-tar"
  6181          - name: "X-Registry-Config"
  6182            in: "header"
  6183            description: |
  6184              This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to.
  6185  
  6186              The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example:
  6187  
  6188              ```
  6189              {
  6190                "docker.example.com": {
  6191                  "username": "janedoe",
  6192                  "password": "hunter2"
  6193                },
  6194                "https://index.docker.io/v1/": {
  6195                  "username": "mobydock",
  6196                  "password": "conta1n3rize14"
  6197                }
  6198              }
  6199              ```
  6200  
  6201              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.
  6202            type: "string"
  6203        responses:
  6204          200:
  6205            description: "no error"
  6206          400:
  6207            description: "Bad parameter"
  6208            schema:
  6209              $ref: "#/definitions/ErrorResponse"
  6210          500:
  6211            description: "server error"
  6212            schema:
  6213              $ref: "#/definitions/ErrorResponse"
  6214        tags: ["Image"]
  6215    /build/prune:
  6216      post:
  6217        summary: "Delete builder cache"
  6218        produces:
  6219          - "application/json"
  6220        operationId: "BuildPrune"
  6221        responses:
  6222          200:
  6223            description: "No error"
  6224            schema:
  6225              type: "object"
  6226              properties:
  6227                SpaceReclaimed:
  6228                  description: "Disk space reclaimed in bytes"
  6229                  type: "integer"
  6230                  format: "int64"
  6231          500:
  6232            description: "Server error"
  6233            schema:
  6234              $ref: "#/definitions/ErrorResponse"
  6235        tags: ["Image"]
  6236    /images/create:
  6237      post:
  6238        summary: "Create an image"
  6239        description: "Create an image by either pulling it from a registry or importing it."
  6240        operationId: "ImageCreate"
  6241        consumes:
  6242          - "text/plain"
  6243          - "application/octet-stream"
  6244        produces:
  6245          - "application/json"
  6246        responses:
  6247          200:
  6248            description: "no error"
  6249          404:
  6250            description: "repository does not exist or no read access"
  6251            schema:
  6252              $ref: "#/definitions/ErrorResponse"
  6253          500:
  6254            description: "server error"
  6255            schema:
  6256              $ref: "#/definitions/ErrorResponse"
  6257        parameters:
  6258          - name: "fromImage"
  6259            in: "query"
  6260            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."
  6261            type: "string"
  6262          - name: "fromSrc"
  6263            in: "query"
  6264            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."
  6265            type: "string"
  6266          - name: "repo"
  6267            in: "query"
  6268            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."
  6269            type: "string"
  6270          - name: "tag"
  6271            in: "query"
  6272            description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled."
  6273            type: "string"
  6274          - name: "inputImage"
  6275            in: "body"
  6276            description: "Image content if the value `-` has been specified in fromSrc query parameter"
  6277            schema:
  6278              type: "string"
  6279            required: false
  6280          - name: "X-Registry-Auth"
  6281            in: "header"
  6282            description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)"
  6283            type: "string"
  6284          - name: "platform"
  6285            in: "query"
  6286            description: "Platform in the format os[/arch[/variant]]"
  6287            type: "string"
  6288            default: ""
  6289        tags: ["Image"]
  6290    /images/{name}/json:
  6291      get:
  6292        summary: "Inspect an image"
  6293        description: "Return low-level information about an image."
  6294        operationId: "ImageInspect"
  6295        produces:
  6296          - "application/json"
  6297        responses:
  6298          200:
  6299            description: "No error"
  6300            schema:
  6301              $ref: "#/definitions/Image"
  6302            examples:
  6303              application/json:
  6304                Id: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c"
  6305                Container: "cb91e48a60d01f1e27028b4fc6819f4f290b3cf12496c8176ec714d0d390984a"
  6306                Comment: ""
  6307                Os: "linux"
  6308                Architecture: "amd64"
  6309                Parent: "sha256:91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c"
  6310                ContainerConfig:
  6311                  Tty: false
  6312                  Hostname: "e611e15f9c9d"
  6313                  Domainname: ""
  6314                  AttachStdout: false
  6315                  PublishService: ""
  6316                  AttachStdin: false
  6317                  OpenStdin: false
  6318                  StdinOnce: false
  6319                  NetworkDisabled: false
  6320                  OnBuild: []
  6321                  Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c"
  6322                  User: ""
  6323                  WorkingDir: ""
  6324                  MacAddress: ""
  6325                  AttachStderr: false
  6326                  Labels:
  6327                    com.example.license: "GPL"
  6328                    com.example.version: "1.0"
  6329                    com.example.vendor: "Acme"
  6330                  Env:
  6331                    - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  6332                  Cmd:
  6333                    - "/bin/sh"
  6334                    - "-c"
  6335                    - "#(nop) LABEL com.example.vendor=Acme com.example.license=GPL com.example.version=1.0"
  6336                DockerVersion: "1.9.0-dev"
  6337                VirtualSize: 188359297
  6338                Size: 0
  6339                Author: ""
  6340                Created: "2015-09-10T08:30:53.26995814Z"
  6341                GraphDriver:
  6342                  Name: "aufs"
  6343                  Data: {}
  6344                RepoDigests:
  6345                  - "localhost:5000/test/busybox/example@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf"
  6346                RepoTags:
  6347                  - "example:1.0"
  6348                  - "example:latest"
  6349                  - "example:stable"
  6350                Config:
  6351                  Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c"
  6352                  NetworkDisabled: false
  6353                  OnBuild: []
  6354                  StdinOnce: false
  6355                  PublishService: ""
  6356                  AttachStdin: false
  6357                  OpenStdin: false
  6358                  Domainname: ""
  6359                  AttachStdout: false
  6360                  Tty: false
  6361                  Hostname: "e611e15f9c9d"
  6362                  Cmd:
  6363                    - "/bin/bash"
  6364                  Env:
  6365                    - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  6366                  Labels:
  6367                    com.example.vendor: "Acme"
  6368                    com.example.version: "1.0"
  6369                    com.example.license: "GPL"
  6370                  MacAddress: ""
  6371                  AttachStderr: false
  6372                  WorkingDir: ""
  6373                  User: ""
  6374                RootFS:
  6375                  Type: "layers"
  6376                  Layers:
  6377                    - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6"
  6378                    - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"
  6379          404:
  6380            description: "No such image"
  6381            schema:
  6382              $ref: "#/definitions/ErrorResponse"
  6383            examples:
  6384              application/json:
  6385                message: "No such image: someimage (tag: latest)"
  6386          500:
  6387            description: "Server error"
  6388            schema:
  6389              $ref: "#/definitions/ErrorResponse"
  6390        parameters:
  6391          - name: "name"
  6392            in: "path"
  6393            description: "Image name or id"
  6394            type: "string"
  6395            required: true
  6396        tags: ["Image"]
  6397    /images/{name}/history:
  6398      get:
  6399        summary: "Get the history of an image"
  6400        description: "Return parent layers of an image."
  6401        operationId: "ImageHistory"
  6402        produces: ["application/json"]
  6403        responses:
  6404          200:
  6405            description: "List of image layers"
  6406            schema:
  6407              type: "array"
  6408              items:
  6409                type: "object"
  6410                x-go-name: HistoryResponseItem
  6411                required: [Id, Created, CreatedBy, Tags, Size, Comment]
  6412                properties:
  6413                  Id:
  6414                    type: "string"
  6415                    x-nullable: false
  6416                  Created:
  6417                    type: "integer"
  6418                    format: "int64"
  6419                    x-nullable: false
  6420                  CreatedBy:
  6421                    type: "string"
  6422                    x-nullable: false
  6423                  Tags:
  6424                    type: "array"
  6425                    items:
  6426                      type: "string"
  6427                  Size:
  6428                    type: "integer"
  6429                    format: "int64"
  6430                    x-nullable: false
  6431                  Comment:
  6432                    type: "string"
  6433                    x-nullable: false
  6434            examples:
  6435              application/json:
  6436                - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710"
  6437                  Created: 1398108230
  6438                  CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /"
  6439                  Tags:
  6440                    - "ubuntu:lucid"
  6441                    - "ubuntu:10.04"
  6442                  Size: 182964289
  6443                  Comment: ""
  6444                - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8"
  6445                  Created: 1398108222
  6446                  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/"
  6447                  Tags: []
  6448                  Size: 0
  6449                  Comment: ""
  6450                - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158"
  6451                  Created: 1371157430
  6452                  CreatedBy: ""
  6453                  Tags:
  6454                    - "scratch12:latest"
  6455                    - "scratch:latest"
  6456                  Size: 0
  6457                  Comment: "Imported from -"
  6458          404:
  6459            description: "No such image"
  6460            schema:
  6461              $ref: "#/definitions/ErrorResponse"
  6462          500:
  6463            description: "Server error"
  6464            schema:
  6465              $ref: "#/definitions/ErrorResponse"
  6466        parameters:
  6467          - name: "name"
  6468            in: "path"
  6469            description: "Image name or ID"
  6470            type: "string"
  6471            required: true
  6472        tags: ["Image"]
  6473    /images/{name}/push:
  6474      post:
  6475        summary: "Push an image"
  6476        description: |
  6477          Push an image to a registry.
  6478  
  6479          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`.
  6480  
  6481          The push is cancelled if the HTTP connection is closed.
  6482        operationId: "ImagePush"
  6483        consumes:
  6484          - "application/octet-stream"
  6485        responses:
  6486          200:
  6487            description: "No error"
  6488          404:
  6489            description: "No such image"
  6490            schema:
  6491              $ref: "#/definitions/ErrorResponse"
  6492          500:
  6493            description: "Server error"
  6494            schema:
  6495              $ref: "#/definitions/ErrorResponse"
  6496        parameters:
  6497          - name: "name"
  6498            in: "path"
  6499            description: "Image name or ID."
  6500            type: "string"
  6501            required: true
  6502          - name: "tag"
  6503            in: "query"
  6504            description: "The tag to associate with the image on the registry."
  6505            type: "string"
  6506          - name: "X-Registry-Auth"
  6507            in: "header"
  6508            description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)"
  6509            type: "string"
  6510            required: true
  6511        tags: ["Image"]
  6512    /images/{name}/tag:
  6513      post:
  6514        summary: "Tag an image"
  6515        description: "Tag an image so that it becomes part of a repository."
  6516        operationId: "ImageTag"
  6517        responses:
  6518          201:
  6519            description: "No error"
  6520          400:
  6521            description: "Bad parameter"
  6522            schema:
  6523              $ref: "#/definitions/ErrorResponse"
  6524          404:
  6525            description: "No such image"
  6526            schema:
  6527              $ref: "#/definitions/ErrorResponse"
  6528          409:
  6529            description: "Conflict"
  6530            schema:
  6531              $ref: "#/definitions/ErrorResponse"
  6532          500:
  6533            description: "Server error"
  6534            schema:
  6535              $ref: "#/definitions/ErrorResponse"
  6536        parameters:
  6537          - name: "name"
  6538            in: "path"
  6539            description: "Image name or ID to tag."
  6540            type: "string"
  6541            required: true
  6542          - name: "repo"
  6543            in: "query"
  6544            description: "The repository to tag in. For example, `someuser/someimage`."
  6545            type: "string"
  6546          - name: "tag"
  6547            in: "query"
  6548            description: "The name of the new tag."
  6549            type: "string"
  6550        tags: ["Image"]
  6551    /images/{name}:
  6552      delete:
  6553        summary: "Remove an image"
  6554        description: |
  6555          Remove an image, along with any untagged parent images that were
  6556          referenced by that image.
  6557  
  6558          Images can't be removed if they have descendant images, are being
  6559          used by a running container or are being used by a build.
  6560        operationId: "ImageDelete"
  6561        produces: ["application/json"]
  6562        responses:
  6563          200:
  6564            description: "The image was deleted successfully"
  6565            schema:
  6566              type: "array"
  6567              items:
  6568                $ref: "#/definitions/ImageDeleteResponseItem"
  6569            examples:
  6570              application/json:
  6571                - Untagged: "3e2f21a89f"
  6572                - Deleted: "3e2f21a89f"
  6573                - Deleted: "53b4f83ac9"
  6574          404:
  6575            description: "No such image"
  6576            schema:
  6577              $ref: "#/definitions/ErrorResponse"
  6578          409:
  6579            description: "Conflict"
  6580            schema:
  6581              $ref: "#/definitions/ErrorResponse"
  6582          500:
  6583            description: "Server error"
  6584            schema:
  6585              $ref: "#/definitions/ErrorResponse"
  6586        parameters:
  6587          - name: "name"
  6588            in: "path"
  6589            description: "Image name or ID"
  6590            type: "string"
  6591            required: true
  6592          - name: "force"
  6593            in: "query"
  6594            description: "Remove the image even if it is being used by stopped containers or has other tags"
  6595            type: "boolean"
  6596            default: false
  6597          - name: "noprune"
  6598            in: "query"
  6599            description: "Do not delete untagged parent images"
  6600            type: "boolean"
  6601            default: false
  6602        tags: ["Image"]
  6603    /images/search:
  6604      get:
  6605        summary: "Search images"
  6606        description: "Search for an image on Docker Hub."
  6607        operationId: "ImageSearch"
  6608        produces:
  6609          - "application/json"
  6610        responses:
  6611          200:
  6612            description: "No error"
  6613            schema:
  6614              type: "array"
  6615              items:
  6616                type: "object"
  6617                properties:
  6618                  description:
  6619                    type: "string"
  6620                  is_official:
  6621                    type: "boolean"
  6622                  is_automated:
  6623                    type: "boolean"
  6624                  name:
  6625                    type: "string"
  6626                  star_count:
  6627                    type: "integer"
  6628            examples:
  6629              application/json:
  6630                - description: ""
  6631                  is_official: false
  6632                  is_automated: false
  6633                  name: "wma55/u1210sshd"
  6634                  star_count: 0
  6635                - description: ""
  6636                  is_official: false
  6637                  is_automated: false
  6638                  name: "jdswinbank/sshd"
  6639                  star_count: 0
  6640                - description: ""
  6641                  is_official: false
  6642                  is_automated: false
  6643                  name: "vgauthier/sshd"
  6644                  star_count: 0
  6645          500:
  6646            description: "Server error"
  6647            schema:
  6648              $ref: "#/definitions/ErrorResponse"
  6649        parameters:
  6650          - name: "term"
  6651            in: "query"
  6652            description: "Term to search"
  6653            type: "string"
  6654            required: true
  6655          - name: "limit"
  6656            in: "query"
  6657            description: "Maximum number of results to return"
  6658            type: "integer"
  6659          - name: "filters"
  6660            in: "query"
  6661            description: |
  6662              A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:
  6663  
  6664              - `is-automated=(true|false)`
  6665              - `is-official=(true|false)`
  6666              - `stars=<number>` Matches images that has at least 'number' stars.
  6667            type: "string"
  6668        tags: ["Image"]
  6669    /images/prune:
  6670      post:
  6671        summary: "Delete unused images"
  6672        produces:
  6673          - "application/json"
  6674        operationId: "ImagePrune"
  6675        parameters:
  6676          - name: "filters"
  6677            in: "query"
  6678            description: |
  6679              Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters:
  6680  
  6681              - `dangling=<boolean>` When set to `true` (or `1`), prune only
  6682                 unused *and* untagged images. When set to `false`
  6683                 (or `0`), all unused images are pruned.
  6684              - `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.
  6685              - `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.
  6686            type: "string"
  6687        responses:
  6688          200:
  6689            description: "No error"
  6690            schema:
  6691              type: "object"
  6692              properties:
  6693                ImagesDeleted:
  6694                  description: "Images that were deleted"
  6695                  type: "array"
  6696                  items:
  6697                    $ref: "#/definitions/ImageDeleteResponseItem"
  6698                SpaceReclaimed:
  6699                  description: "Disk space reclaimed in bytes"
  6700                  type: "integer"
  6701                  format: "int64"
  6702          500:
  6703            description: "Server error"
  6704            schema:
  6705              $ref: "#/definitions/ErrorResponse"
  6706        tags: ["Image"]
  6707    /auth:
  6708      post:
  6709        summary: "Check auth configuration"
  6710        description: "Validate credentials for a registry and, if available, get an identity token for accessing the registry without password."
  6711        operationId: "SystemAuth"
  6712        consumes: ["application/json"]
  6713        produces: ["application/json"]
  6714        responses:
  6715          200:
  6716            description: "An identity token was generated successfully."
  6717            schema:
  6718              type: "object"
  6719              required: [Status]
  6720              properties:
  6721                Status:
  6722                  description: "The status of the authentication"
  6723                  type: "string"
  6724                  x-nullable: false
  6725                IdentityToken:
  6726                  description: "An opaque token used to authenticate a user after a successful login"
  6727                  type: "string"
  6728                  x-nullable: false
  6729            examples:
  6730              application/json:
  6731                Status: "Login Succeeded"
  6732                IdentityToken: "9cbaf023786cd7..."
  6733          204:
  6734            description: "No error"
  6735          500:
  6736            description: "Server error"
  6737            schema:
  6738              $ref: "#/definitions/ErrorResponse"
  6739        parameters:
  6740          - name: "authConfig"
  6741            in: "body"
  6742            description: "Authentication to check"
  6743            schema:
  6744              $ref: "#/definitions/AuthConfig"
  6745        tags: ["System"]
  6746    /info:
  6747      get:
  6748        summary: "Get system information"
  6749        operationId: "SystemInfo"
  6750        produces:
  6751          - "application/json"
  6752        responses:
  6753          200:
  6754            description: "No error"
  6755            schema:
  6756              $ref: "#/definitions/SystemInfo"
  6757          500:
  6758            description: "Server error"
  6759            schema:
  6760              $ref: "#/definitions/ErrorResponse"
  6761        tags: ["System"]
  6762    /version:
  6763      get:
  6764        summary: "Get version"
  6765        description: "Returns the version of Docker that is running and various information about the system that Docker is running on."
  6766        operationId: "SystemVersion"
  6767        produces: ["application/json"]
  6768        responses:
  6769          200:
  6770            description: "no error"
  6771            schema:
  6772              type: "object"
  6773              properties:
  6774                Version:
  6775                  type: "string"
  6776                ApiVersion:
  6777                  type: "string"
  6778                MinAPIVersion:
  6779                  type: "string"
  6780                GitCommit:
  6781                  type: "string"
  6782                GoVersion:
  6783                  type: "string"
  6784                Os:
  6785                  type: "string"
  6786                Arch:
  6787                  type: "string"
  6788                KernelVersion:
  6789                  type: "string"
  6790                Experimental:
  6791                  type: "boolean"
  6792                BuildTime:
  6793                  type: "string"
  6794            examples:
  6795              application/json:
  6796                Version: "17.04.0"
  6797                Os: "linux"
  6798                KernelVersion: "3.19.0-23-generic"
  6799                GoVersion: "go1.7.5"
  6800                GitCommit: "deadbee"
  6801                Arch: "amd64"
  6802                ApiVersion: "1.27"
  6803                MinAPIVersion: "1.12"
  6804                BuildTime: "2016-06-14T07:09:13.444803460+00:00"
  6805                Experimental: true
  6806          500:
  6807            description: "server error"
  6808            schema:
  6809              $ref: "#/definitions/ErrorResponse"
  6810        tags: ["System"]
  6811    /_ping:
  6812      get:
  6813        summary: "Ping"
  6814        description: "This is a dummy endpoint you can use to test if the server is accessible."
  6815        operationId: "SystemPing"
  6816        produces: ["text/plain"]
  6817        responses:
  6818          200:
  6819            description: "no error"
  6820            schema:
  6821              type: "string"
  6822              example: "OK"
  6823            headers:
  6824              API-Version:
  6825                type: "string"
  6826                description: "Max API Version the server supports"
  6827              Docker-Experimental:
  6828                type: "boolean"
  6829                description: "If the server is running with experimental mode enabled"
  6830          500:
  6831            description: "server error"
  6832            schema:
  6833              $ref: "#/definitions/ErrorResponse"
  6834        tags: ["System"]
  6835    /commit:
  6836      post:
  6837        summary: "Create a new image from a container"
  6838        operationId: "ImageCommit"
  6839        consumes:
  6840          - "application/json"
  6841        produces:
  6842          - "application/json"
  6843        responses:
  6844          201:
  6845            description: "no error"
  6846            schema:
  6847              $ref: "#/definitions/IdResponse"
  6848          404:
  6849            description: "no such container"
  6850            schema:
  6851              $ref: "#/definitions/ErrorResponse"
  6852            examples:
  6853              application/json:
  6854                message: "No such container: c2ada9df5af8"
  6855          500:
  6856            description: "server error"
  6857            schema:
  6858              $ref: "#/definitions/ErrorResponse"
  6859        parameters:
  6860          - name: "containerConfig"
  6861            in: "body"
  6862            description: "The container configuration"
  6863            schema:
  6864              $ref: "#/definitions/ContainerConfig"
  6865          - name: "container"
  6866            in: "query"
  6867            description: "The ID or name of the container to commit"
  6868            type: "string"
  6869          - name: "repo"
  6870            in: "query"
  6871            description: "Repository name for the created image"
  6872            type: "string"
  6873          - name: "tag"
  6874            in: "query"
  6875            description: "Tag name for the create image"
  6876            type: "string"
  6877          - name: "comment"
  6878            in: "query"
  6879            description: "Commit message"
  6880            type: "string"
  6881          - name: "author"
  6882            in: "query"
  6883            description: "Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`)"
  6884            type: "string"
  6885          - name: "pause"
  6886            in: "query"
  6887            description: "Whether to pause the container before committing"
  6888            type: "boolean"
  6889            default: true
  6890          - name: "changes"
  6891            in: "query"
  6892            description: "`Dockerfile` instructions to apply while committing"
  6893            type: "string"
  6894        tags: ["Image"]
  6895    /events:
  6896      get:
  6897        summary: "Monitor events"
  6898        description: |
  6899          Stream real-time events from the server.
  6900  
  6901          Various objects within Docker report events when something happens to them.
  6902  
  6903          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`
  6904  
  6905          Images report these events: `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, and `untag`
  6906  
  6907          Volumes report these events: `create`, `mount`, `unmount`, and `destroy`
  6908  
  6909          Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, and `remove`
  6910  
  6911          The Docker daemon reports these events: `reload`
  6912  
  6913          Services report these events: `create`, `update`, and `remove`
  6914  
  6915          Nodes report these events: `create`, `update`, and `remove`
  6916  
  6917          Secrets report these events: `create`, `update`, and `remove`
  6918  
  6919          Configs report these events: `create`, `update`, and `remove`
  6920  
  6921        operationId: "SystemEvents"
  6922        produces:
  6923          - "application/json"
  6924        responses:
  6925          200:
  6926            description: "no error"
  6927            schema:
  6928              type: "object"
  6929              properties:
  6930                Type:
  6931                  description: "The type of object emitting the event"
  6932                  type: "string"
  6933                Action:
  6934                  description: "The type of event"
  6935                  type: "string"
  6936                Actor:
  6937                  type: "object"
  6938                  properties:
  6939                    ID:
  6940                      description: "The ID of the object emitting the event"
  6941                      type: "string"
  6942                    Attributes:
  6943                      description: "Various key/value attributes of the object, depending on its type"
  6944                      type: "object"
  6945                      additionalProperties:
  6946                        type: "string"
  6947                time:
  6948                  description: "Timestamp of event"
  6949                  type: "integer"
  6950                timeNano:
  6951                  description: "Timestamp of event, with nanosecond accuracy"
  6952                  type: "integer"
  6953                  format: "int64"
  6954            examples:
  6955              application/json:
  6956                Type: "container"
  6957                Action: "create"
  6958                Actor:
  6959                  ID: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743"
  6960                  Attributes:
  6961                    com.example.some-label: "some-label-value"
  6962                    image: "alpine"
  6963                    name: "my-container"
  6964                time: 1461943101
  6965          400:
  6966            description: "bad parameter"
  6967            schema:
  6968              $ref: "#/definitions/ErrorResponse"
  6969          500:
  6970            description: "server error"
  6971            schema:
  6972              $ref: "#/definitions/ErrorResponse"
  6973        parameters:
  6974          - name: "since"
  6975            in: "query"
  6976            description: "Show events created since this timestamp then stream new events."
  6977            type: "string"
  6978          - name: "until"
  6979            in: "query"
  6980            description: "Show events created until this timestamp then stop streaming."
  6981            type: "string"
  6982          - name: "filters"
  6983            in: "query"
  6984            description: |
  6985              A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters:
  6986  
  6987              - `container=<string>` container name or ID
  6988              - `daemon=<string>` daemon name or ID
  6989              - `event=<string>` event type
  6990              - `image=<string>` image name or ID
  6991              - `label=<string>` image or container label
  6992              - `network=<string>` network name or ID
  6993              - `plugin`=<string> plugin name or ID
  6994              - `scope`=<string> local or swarm
  6995              - `type=<string>` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service` or `secret`
  6996              - `volume=<string>` volume name or ID
  6997            type: "string"
  6998        tags: ["System"]
  6999    /system/df:
  7000      get:
  7001        summary: "Get data usage information"
  7002        operationId: "SystemDataUsage"
  7003        responses:
  7004          200:
  7005            description: "no error"
  7006            schema:
  7007              type: "object"
  7008              properties:
  7009                LayersSize:
  7010                  type: "integer"
  7011                  format: "int64"
  7012                Images:
  7013                  type: "array"
  7014                  items:
  7015                    $ref: "#/definitions/ImageSummary"
  7016                Containers:
  7017                  type: "array"
  7018                  items:
  7019                    $ref: "#/definitions/ContainerSummary"
  7020                Volumes:
  7021                  type: "array"
  7022                  items:
  7023                    $ref: "#/definitions/Volume"
  7024              example:
  7025                LayersSize: 1092588
  7026                Images:
  7027                  -
  7028                    Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
  7029                    ParentId: ""
  7030                    RepoTags:
  7031                      - "busybox:latest"
  7032                    RepoDigests:
  7033                      - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6"
  7034                    Created: 1466724217
  7035                    Size: 1092588
  7036                    SharedSize: 0
  7037                    VirtualSize: 1092588
  7038                    Labels: {}
  7039                    Containers: 1
  7040                Containers:
  7041                  -
  7042                    Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148"
  7043                    Names:
  7044                      - "/top"
  7045                    Image: "busybox"
  7046                    ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
  7047                    Command: "top"
  7048                    Created: 1472592424
  7049                    Ports: []
  7050                    SizeRootFs: 1092588
  7051                    Labels: {}
  7052                    State: "exited"
  7053                    Status: "Exited (0) 56 minutes ago"
  7054                    HostConfig:
  7055                      NetworkMode: "default"
  7056                    NetworkSettings:
  7057                      Networks:
  7058                        bridge:
  7059                          IPAMConfig: null
  7060                          Links: null
  7061                          Aliases: null
  7062                          NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92"
  7063                          EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a"
  7064                          Gateway: "172.18.0.1"
  7065                          IPAddress: "172.18.0.2"
  7066                          IPPrefixLen: 16
  7067                          IPv6Gateway: ""
  7068                          GlobalIPv6Address: ""
  7069                          GlobalIPv6PrefixLen: 0
  7070                          MacAddress: "02:42:ac:12:00:02"
  7071                    Mounts: []
  7072                Volumes:
  7073                  -
  7074                    Name: "my-volume"
  7075                    Driver: "local"
  7076                    Mountpoint: "/var/lib/docker/volumes/my-volume/_data"
  7077                    Labels: null
  7078                    Scope: "local"
  7079                    Options: null
  7080                    UsageData:
  7081                      Size: 10920104
  7082                      RefCount: 2
  7083          500:
  7084            description: "server error"
  7085            schema:
  7086              $ref: "#/definitions/ErrorResponse"
  7087        tags: ["System"]
  7088    /images/{name}/get:
  7089      get:
  7090        summary: "Export an image"
  7091        description: |
  7092          Get a tarball containing all images and metadata for a repository.
  7093  
  7094          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.
  7095  
  7096          ### Image tarball format
  7097  
  7098          An image tarball contains one directory per image layer (named using its long ID), each containing these files:
  7099  
  7100          - `VERSION`: currently `1.0` - the file format version
  7101          - `json`: detailed layer information, similar to `docker inspect layer_id`
  7102          - `layer.tar`: A tarfile containing the filesystem changes in this layer
  7103  
  7104          The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions.
  7105  
  7106          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.
  7107  
  7108          ```json
  7109          {
  7110            "hello-world": {
  7111              "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"
  7112            }
  7113          }
  7114          ```
  7115        operationId: "ImageGet"
  7116        produces:
  7117          - "application/x-tar"
  7118        responses:
  7119          200:
  7120            description: "no error"
  7121            schema:
  7122              type: "string"
  7123              format: "binary"
  7124          500:
  7125            description: "server error"
  7126            schema:
  7127              $ref: "#/definitions/ErrorResponse"
  7128        parameters:
  7129          - name: "name"
  7130            in: "path"
  7131            description: "Image name or ID"
  7132            type: "string"
  7133            required: true
  7134        tags: ["Image"]
  7135    /images/get:
  7136      get:
  7137        summary: "Export several images"
  7138        description: |
  7139          Get a tarball containing all images and metadata for several image repositories.
  7140  
  7141          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.
  7142  
  7143          For details on the format, see [the export image endpoint](#operation/ImageGet).
  7144        operationId: "ImageGetAll"
  7145        produces:
  7146          - "application/x-tar"
  7147        responses:
  7148          200:
  7149            description: "no error"
  7150            schema:
  7151              type: "string"
  7152              format: "binary"
  7153          500:
  7154            description: "server error"
  7155            schema:
  7156              $ref: "#/definitions/ErrorResponse"
  7157        parameters:
  7158          - name: "names"
  7159            in: "query"
  7160            description: "Image names to filter by"
  7161            type: "array"
  7162            items:
  7163              type: "string"
  7164        tags: ["Image"]
  7165    /images/load:
  7166      post:
  7167        summary: "Import images"
  7168        description: |
  7169          Load a set of images and tags into a repository.
  7170  
  7171          For details on the format, see [the export image endpoint](#operation/ImageGet).
  7172        operationId: "ImageLoad"
  7173        consumes:
  7174          - "application/x-tar"
  7175        produces:
  7176          - "application/json"
  7177        responses:
  7178          200:
  7179            description: "no error"
  7180          500:
  7181            description: "server error"
  7182            schema:
  7183              $ref: "#/definitions/ErrorResponse"
  7184        parameters:
  7185          - name: "imagesTarball"
  7186            in: "body"
  7187            description: "Tar archive containing images"
  7188            schema:
  7189              type: "string"
  7190              format: "binary"
  7191          - name: "quiet"
  7192            in: "query"
  7193            description: "Suppress progress details during load."
  7194            type: "boolean"
  7195            default: false
  7196        tags: ["Image"]
  7197    /containers/{id}/exec:
  7198      post:
  7199        summary: "Create an exec instance"
  7200        description: "Run a command inside a running container."
  7201        operationId: "ContainerExec"
  7202        consumes:
  7203          - "application/json"
  7204        produces:
  7205          - "application/json"
  7206        responses:
  7207          201:
  7208            description: "no error"
  7209            schema:
  7210              $ref: "#/definitions/IdResponse"
  7211          404:
  7212            description: "no such container"
  7213            schema:
  7214              $ref: "#/definitions/ErrorResponse"
  7215            examples:
  7216              application/json:
  7217                message: "No such container: c2ada9df5af8"
  7218          409:
  7219            description: "container is paused"
  7220            schema:
  7221              $ref: "#/definitions/ErrorResponse"
  7222          500:
  7223            description: "Server error"
  7224            schema:
  7225              $ref: "#/definitions/ErrorResponse"
  7226        parameters:
  7227          - name: "execConfig"
  7228            in: "body"
  7229            description: "Exec configuration"
  7230            schema:
  7231              type: "object"
  7232              properties:
  7233                AttachStdin:
  7234                  type: "boolean"
  7235                  description: "Attach to `stdin` of the exec command."
  7236                AttachStdout:
  7237                  type: "boolean"
  7238                  description: "Attach to `stdout` of the exec command."
  7239                AttachStderr:
  7240                  type: "boolean"
  7241                  description: "Attach to `stderr` of the exec command."
  7242                DetachKeys:
  7243                  type: "string"
  7244                  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 `_`."
  7245                Tty:
  7246                  type: "boolean"
  7247                  description: "Allocate a pseudo-TTY."
  7248                Env:
  7249                  description: "A list of environment variables in the form `[\"VAR=value\", ...]`."
  7250                  type: "array"
  7251                  items:
  7252                    type: "string"
  7253                Cmd:
  7254                  type: "array"
  7255                  description: "Command to run, as a string or array of strings."
  7256                  items:
  7257                    type: "string"
  7258                Privileged:
  7259                  type: "boolean"
  7260                  description: "Runs the exec process with extended privileges."
  7261                  default: false
  7262                User:
  7263                  type: "string"
  7264                  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`."
  7265              example:
  7266                AttachStdin: false
  7267                AttachStdout: true
  7268                AttachStderr: true
  7269                DetachKeys: "ctrl-p,ctrl-q"
  7270                Tty: false
  7271                Cmd:
  7272                  - "date"
  7273                Env:
  7274                  - "FOO=bar"
  7275                  - "BAZ=quux"
  7276            required: true
  7277          - name: "id"
  7278            in: "path"
  7279            description: "ID or name of container"
  7280            type: "string"
  7281            required: true
  7282        tags: ["Exec"]
  7283    /exec/{id}/start:
  7284      post:
  7285        summary: "Start an exec instance"
  7286        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."
  7287        operationId: "ExecStart"
  7288        consumes:
  7289          - "application/json"
  7290        produces:
  7291          - "application/vnd.docker.raw-stream"
  7292        responses:
  7293          200:
  7294            description: "No error"
  7295          404:
  7296            description: "No such exec instance"
  7297            schema:
  7298              $ref: "#/definitions/ErrorResponse"
  7299          409:
  7300            description: "Container is stopped or paused"
  7301            schema:
  7302              $ref: "#/definitions/ErrorResponse"
  7303        parameters:
  7304          - name: "execStartConfig"
  7305            in: "body"
  7306            schema:
  7307              type: "object"
  7308              properties:
  7309                Detach:
  7310                  type: "boolean"
  7311                  description: "Detach from the command."
  7312                Tty:
  7313                  type: "boolean"
  7314                  description: "Allocate a pseudo-TTY."
  7315              example:
  7316                Detach: false
  7317                Tty: false
  7318          - name: "id"
  7319            in: "path"
  7320            description: "Exec instance ID"
  7321            required: true
  7322            type: "string"
  7323        tags: ["Exec"]
  7324    /exec/{id}/resize:
  7325      post:
  7326        summary: "Resize an exec instance"
  7327        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."
  7328        operationId: "ExecResize"
  7329        responses:
  7330          200:
  7331            description: "No error"
  7332          400:
  7333            description: "bad parameter"
  7334            schema:
  7335              $ref: "#/definitions/ErrorResponse"
  7336          404:
  7337            description: "No such exec instance"
  7338            schema:
  7339              $ref: "#/definitions/ErrorResponse"
  7340          500:
  7341            description: "Server error"
  7342            schema:
  7343              $ref: "#/definitions/ErrorResponse"
  7344        parameters:
  7345          - name: "id"
  7346            in: "path"
  7347            description: "Exec instance ID"
  7348            required: true
  7349            type: "string"
  7350          - name: "h"
  7351            in: "query"
  7352            description: "Height of the TTY session in characters"
  7353            type: "integer"
  7354          - name: "w"
  7355            in: "query"
  7356            description: "Width of the TTY session in characters"
  7357            type: "integer"
  7358        tags: ["Exec"]
  7359    /exec/{id}/json:
  7360      get:
  7361        summary: "Inspect an exec instance"
  7362        description: "Return low-level information about an exec instance."
  7363        operationId: "ExecInspect"
  7364        produces:
  7365          - "application/json"
  7366        responses:
  7367          200:
  7368            description: "No error"
  7369            schema:
  7370              type: "object"
  7371              properties:
  7372                ID:
  7373                  type: "string"
  7374                Running:
  7375                  type: "boolean"
  7376                ExitCode:
  7377                  type: "integer"
  7378                ProcessConfig:
  7379                  $ref: "#/definitions/ProcessConfig"
  7380                OpenStdin:
  7381                  type: "boolean"
  7382                OpenStderr:
  7383                  type: "boolean"
  7384                OpenStdout:
  7385                  type: "boolean"
  7386                ContainerID:
  7387                  type: "string"
  7388                Pid:
  7389                  type: "integer"
  7390                  description: "The system process ID for the exec process."
  7391            examples:
  7392              application/json:
  7393                CanRemove: false
  7394                ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126"
  7395                DetachKeys: ""
  7396                ExitCode: 2
  7397                ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b"
  7398                OpenStderr: true
  7399                OpenStdin: true
  7400                OpenStdout: true
  7401                ProcessConfig:
  7402                  arguments:
  7403                    - "-c"
  7404                    - "exit 2"
  7405                  entrypoint: "sh"
  7406                  privileged: false
  7407                  tty: true
  7408                  user: "1000"
  7409                Running: false
  7410                Pid: 42000
  7411          404:
  7412            description: "No such exec instance"
  7413            schema:
  7414              $ref: "#/definitions/ErrorResponse"
  7415          500:
  7416            description: "Server error"
  7417            schema:
  7418              $ref: "#/definitions/ErrorResponse"
  7419        parameters:
  7420          - name: "id"
  7421            in: "path"
  7422            description: "Exec instance ID"
  7423            required: true
  7424            type: "string"
  7425        tags: ["Exec"]
  7426  
  7427    /volumes:
  7428      get:
  7429        summary: "List volumes"
  7430        operationId: "VolumeList"
  7431        produces: ["application/json"]
  7432        responses:
  7433          200:
  7434            description: "Summary volume data that matches the query"
  7435            schema:
  7436              type: "object"
  7437              required: [Volumes, Warnings]
  7438              properties:
  7439                Volumes:
  7440                  type: "array"
  7441                  x-nullable: false
  7442                  description: "List of volumes"
  7443                  items:
  7444                    $ref: "#/definitions/Volume"
  7445                Warnings:
  7446                  type: "array"
  7447                  x-nullable: false
  7448                  description: "Warnings that occurred when fetching the list of volumes"
  7449                  items:
  7450                    type: "string"
  7451  
  7452            examples:
  7453              application/json:
  7454                Volumes:
  7455                  - CreatedAt: "2017-07-19T12:00:26Z"
  7456                    Name: "tardis"
  7457                    Driver: "local"
  7458                    Mountpoint: "/var/lib/docker/volumes/tardis"
  7459                    Labels:
  7460                      com.example.some-label: "some-value"
  7461                      com.example.some-other-label: "some-other-value"
  7462                    Scope: "local"
  7463                    Options:
  7464                      device: "tmpfs"
  7465                      o: "size=100m,uid=1000"
  7466                      type: "tmpfs"
  7467                Warnings: []
  7468          500:
  7469            description: "Server error"
  7470            schema:
  7471              $ref: "#/definitions/ErrorResponse"
  7472        parameters:
  7473          - name: "filters"
  7474            in: "query"
  7475            description: |
  7476              JSON encoded value of the filters (a `map[string][]string`) to
  7477              process on the volumes list. Available filters:
  7478  
  7479              - `dangling=<boolean>` When set to `true` (or `1`), returns all
  7480                 volumes that are not in use by a container. When set to `false`
  7481                 (or `0`), only volumes that are in use by one or more
  7482                 containers are returned.
  7483              - `driver=<volume-driver-name>` Matches volumes based on their driver.
  7484              - `label=<key>` or `label=<key>:<value>` Matches volumes based on
  7485                 the presence of a `label` alone or a `label` and a value.
  7486              - `name=<volume-name>` Matches all or part of a volume name.
  7487            type: "string"
  7488            format: "json"
  7489        tags: ["Volume"]
  7490  
  7491    /volumes/create:
  7492      post:
  7493        summary: "Create a volume"
  7494        operationId: "VolumeCreate"
  7495        consumes: ["application/json"]
  7496        produces: ["application/json"]
  7497        responses:
  7498          201:
  7499            description: "The volume was created successfully"
  7500            schema:
  7501              $ref: "#/definitions/Volume"
  7502          500:
  7503            description: "Server error"
  7504            schema:
  7505              $ref: "#/definitions/ErrorResponse"
  7506        parameters:
  7507          - name: "volumeConfig"
  7508            in: "body"
  7509            required: true
  7510            description: "Volume configuration"
  7511            schema:
  7512              type: "object"
  7513              properties:
  7514                Name:
  7515                  description: "The new volume's name. If not specified, Docker generates a name."
  7516                  type: "string"
  7517                  x-nullable: false
  7518                Driver:
  7519                  description: "Name of the volume driver to use."
  7520                  type: "string"
  7521                  default: "local"
  7522                  x-nullable: false
  7523                DriverOpts:
  7524                  description: "A mapping of driver options and values. These options are passed directly to the driver and are driver specific."
  7525                  type: "object"
  7526                  additionalProperties:
  7527                    type: "string"
  7528                Labels:
  7529                  description: "User-defined key/value metadata."
  7530                  type: "object"
  7531                  additionalProperties:
  7532                    type: "string"
  7533              example:
  7534                Name: "tardis"
  7535                Labels:
  7536                  com.example.some-label: "some-value"
  7537                  com.example.some-other-label: "some-other-value"
  7538                Driver: "custom"
  7539        tags: ["Volume"]
  7540  
  7541    /volumes/{name}:
  7542      get:
  7543        summary: "Inspect a volume"
  7544        operationId: "VolumeInspect"
  7545        produces: ["application/json"]
  7546        responses:
  7547          200:
  7548            description: "No error"
  7549            schema:
  7550              $ref: "#/definitions/Volume"
  7551          404:
  7552            description: "No such volume"
  7553            schema:
  7554              $ref: "#/definitions/ErrorResponse"
  7555          500:
  7556            description: "Server error"
  7557            schema:
  7558              $ref: "#/definitions/ErrorResponse"
  7559        parameters:
  7560          - name: "name"
  7561            in: "path"
  7562            required: true
  7563            description: "Volume name or ID"
  7564            type: "string"
  7565        tags: ["Volume"]
  7566  
  7567      delete:
  7568        summary: "Remove a volume"
  7569        description: "Instruct the driver to remove the volume."
  7570        operationId: "VolumeDelete"
  7571        responses:
  7572          204:
  7573            description: "The volume was removed"
  7574          404:
  7575            description: "No such volume or volume driver"
  7576            schema:
  7577              $ref: "#/definitions/ErrorResponse"
  7578          409:
  7579            description: "Volume is in use and cannot be removed"
  7580            schema:
  7581              $ref: "#/definitions/ErrorResponse"
  7582          500:
  7583            description: "Server error"
  7584            schema:
  7585              $ref: "#/definitions/ErrorResponse"
  7586        parameters:
  7587          - name: "name"
  7588            in: "path"
  7589            required: true
  7590            description: "Volume name or ID"
  7591            type: "string"
  7592          - name: "force"
  7593            in: "query"
  7594            description: "Force the removal of the volume"
  7595            type: "boolean"
  7596            default: false
  7597        tags: ["Volume"]
  7598    /volumes/prune:
  7599      post:
  7600        summary: "Delete unused volumes"
  7601        produces:
  7602          - "application/json"
  7603        operationId: "VolumePrune"
  7604        parameters:
  7605          - name: "filters"
  7606            in: "query"
  7607            description: |
  7608              Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  7609  
  7610              Available filters:
  7611              - `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.
  7612            type: "string"
  7613        responses:
  7614          200:
  7615            description: "No error"
  7616            schema:
  7617              type: "object"
  7618              properties:
  7619                VolumesDeleted:
  7620                  description: "Volumes that were deleted"
  7621                  type: "array"
  7622                  items:
  7623                    type: "string"
  7624                SpaceReclaimed:
  7625                  description: "Disk space reclaimed in bytes"
  7626                  type: "integer"
  7627                  format: "int64"
  7628          500:
  7629            description: "Server error"
  7630            schema:
  7631              $ref: "#/definitions/ErrorResponse"
  7632        tags: ["Volume"]
  7633    /networks:
  7634      get:
  7635        summary: "List networks"
  7636        description: |
  7637          Returns a list of networks. For details on the format, see [the network inspect endpoint](#operation/NetworkInspect).
  7638  
  7639          Note that it uses a different, smaller representation of a network than inspecting a single network. For example,
  7640          the list of containers attached to the network is not propagated in API versions 1.28 and up.
  7641        operationId: "NetworkList"
  7642        produces:
  7643          - "application/json"
  7644        responses:
  7645          200:
  7646            description: "No error"
  7647            schema:
  7648              type: "array"
  7649              items:
  7650                $ref: "#/definitions/Network"
  7651            examples:
  7652              application/json:
  7653                - Name: "bridge"
  7654                  Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566"
  7655                  Created: "2016-10-19T06:21:00.416543526Z"
  7656                  Scope: "local"
  7657                  Driver: "bridge"
  7658                  EnableIPv6: false
  7659                  Internal: false
  7660                  Attachable: false
  7661                  Ingress: false
  7662                  IPAM:
  7663                    Driver: "default"
  7664                    Config:
  7665                      -
  7666                        Subnet: "172.17.0.0/16"
  7667                  Options:
  7668                    com.docker.network.bridge.default_bridge: "true"
  7669                    com.docker.network.bridge.enable_icc: "true"
  7670                    com.docker.network.bridge.enable_ip_masquerade: "true"
  7671                    com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
  7672                    com.docker.network.bridge.name: "docker0"
  7673                    com.docker.network.driver.mtu: "1500"
  7674                - Name: "none"
  7675                  Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794"
  7676                  Created: "0001-01-01T00:00:00Z"
  7677                  Scope: "local"
  7678                  Driver: "null"
  7679                  EnableIPv6: false
  7680                  Internal: false
  7681                  Attachable: false
  7682                  Ingress: false
  7683                  IPAM:
  7684                    Driver: "default"
  7685                    Config: []
  7686                  Containers: {}
  7687                  Options: {}
  7688                - Name: "host"
  7689                  Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e"
  7690                  Created: "0001-01-01T00:00:00Z"
  7691                  Scope: "local"
  7692                  Driver: "host"
  7693                  EnableIPv6: false
  7694                  Internal: false
  7695                  Attachable: false
  7696                  Ingress: false
  7697                  IPAM:
  7698                    Driver: "default"
  7699                    Config: []
  7700                  Containers: {}
  7701                  Options: {}
  7702          500:
  7703            description: "Server error"
  7704            schema:
  7705              $ref: "#/definitions/ErrorResponse"
  7706        parameters:
  7707          - name: "filters"
  7708            in: "query"
  7709            description: |
  7710              JSON encoded value of the filters (a `map[string][]string`) to process on the networks list. Available filters:
  7711  
  7712              - `driver=<driver-name>` Matches a network's driver.
  7713              - `id=<network-id>` Matches all or part of a network ID.
  7714              - `label=<key>` or `label=<key>=<value>` of a network label.
  7715              - `name=<network-name>` Matches all or part of a network name.
  7716              - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`).
  7717              - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks.
  7718            type: "string"
  7719        tags: ["Network"]
  7720  
  7721    /networks/{id}:
  7722      get:
  7723        summary: "Inspect a network"
  7724        operationId: "NetworkInspect"
  7725        produces:
  7726          - "application/json"
  7727        responses:
  7728          200:
  7729            description: "No error"
  7730            schema:
  7731              $ref: "#/definitions/Network"
  7732          404:
  7733            description: "Network not found"
  7734            schema:
  7735              $ref: "#/definitions/ErrorResponse"
  7736          500:
  7737            description: "Server error"
  7738            schema:
  7739              $ref: "#/definitions/ErrorResponse"
  7740        parameters:
  7741          - name: "id"
  7742            in: "path"
  7743            description: "Network ID or name"
  7744            required: true
  7745            type: "string"
  7746          - name: "verbose"
  7747            in: "query"
  7748            description: "Detailed inspect output for troubleshooting"
  7749            type: "boolean"
  7750            default: false
  7751          - name: "scope"
  7752            in: "query"
  7753            description: "Filter the network by scope (swarm, global, or local)"
  7754            type: "string"
  7755        tags: ["Network"]
  7756  
  7757      delete:
  7758        summary: "Remove a network"
  7759        operationId: "NetworkDelete"
  7760        responses:
  7761          204:
  7762            description: "No error"
  7763          403:
  7764            description: "operation not supported for pre-defined networks"
  7765            schema:
  7766              $ref: "#/definitions/ErrorResponse"
  7767          404:
  7768            description: "no such network"
  7769            schema:
  7770              $ref: "#/definitions/ErrorResponse"
  7771          500:
  7772            description: "Server error"
  7773            schema:
  7774              $ref: "#/definitions/ErrorResponse"
  7775        parameters:
  7776          - name: "id"
  7777            in: "path"
  7778            description: "Network ID or name"
  7779            required: true
  7780            type: "string"
  7781        tags: ["Network"]
  7782  
  7783    /networks/create:
  7784      post:
  7785        summary: "Create a network"
  7786        operationId: "NetworkCreate"
  7787        consumes:
  7788          - "application/json"
  7789        produces:
  7790          - "application/json"
  7791        responses:
  7792          201:
  7793            description: "No error"
  7794            schema:
  7795              type: "object"
  7796              properties:
  7797                Id:
  7798                  description: "The ID of the created network."
  7799                  type: "string"
  7800                Warning:
  7801                  type: "string"
  7802              example:
  7803                Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30"
  7804                Warning: ""
  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)"]