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