github.com/moby/docker@v26.1.3+incompatible/docs/api/v1.33.yaml (about)

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