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