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