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