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