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