github.com/openshift/moby-moby@v1.13.2-0.20170601211448-f5ec1e2936dc/api/swagger.yaml (about)

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