github.com/rawahars/moby@v24.0.4+incompatible/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: "devicemapper"
  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          403:
  6663            description: "operation not supported for pre-defined networks"
  6664            schema:
  6665              $ref: "#/definitions/ErrorResponse"
  6666          404:
  6667            description: "plugin not found"
  6668            schema:
  6669              $ref: "#/definitions/ErrorResponse"
  6670          500:
  6671            description: "Server error"
  6672            schema:
  6673              $ref: "#/definitions/ErrorResponse"
  6674        parameters:
  6675          - name: "networkConfig"
  6676            in: "body"
  6677            description: "Network configuration"
  6678            required: true
  6679            schema:
  6680              type: "object"
  6681              required: ["Name"]
  6682              properties:
  6683                Name:
  6684                  description: "The network's name."
  6685                  type: "string"
  6686                CheckDuplicate:
  6687                  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."
  6688                  type: "boolean"
  6689                Driver:
  6690                  description: "Name of the network driver plugin to use."
  6691                  type: "string"
  6692                  default: "bridge"
  6693                Internal:
  6694                  description: "Restrict external access to the network."
  6695                  type: "boolean"
  6696                Attachable:
  6697                  description: "Globally scoped network is manually attachable by regular containers from workers in swarm mode."
  6698                  type: "boolean"
  6699                Ingress:
  6700                  description: "Ingress network is the network which provides the routing-mesh in swarm mode."
  6701                  type: "boolean"
  6702                IPAM:
  6703                  description: "Optional custom IP scheme for the network."
  6704                  $ref: "#/definitions/IPAM"
  6705                EnableIPv6:
  6706                  description: "Enable IPv6 on the network."
  6707                  type: "boolean"
  6708                Options:
  6709                  description: "Network specific options to be used by the drivers."
  6710                  type: "object"
  6711                  additionalProperties:
  6712                    type: "string"
  6713                Labels:
  6714                  description: "User-defined key/value metadata."
  6715                  type: "object"
  6716                  additionalProperties:
  6717                    type: "string"
  6718              example:
  6719                Name: "isolated_nw"
  6720                CheckDuplicate: false
  6721                Driver: "bridge"
  6722                EnableIPv6: true
  6723                IPAM:
  6724                  Driver: "default"
  6725                  Config:
  6726                    - Subnet: "172.20.0.0/16"
  6727                      IPRange: "172.20.10.0/24"
  6728                      Gateway: "172.20.10.11"
  6729                    - Subnet: "2001:db8:abcd::/64"
  6730                      Gateway: "2001:db8:abcd::1011"
  6731                  Options:
  6732                    foo: "bar"
  6733                Internal: true
  6734                Attachable: false
  6735                Ingress: false
  6736                Options:
  6737                  com.docker.network.bridge.default_bridge: "true"
  6738                  com.docker.network.bridge.enable_icc: "true"
  6739                  com.docker.network.bridge.enable_ip_masquerade: "true"
  6740                  com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
  6741                  com.docker.network.bridge.name: "docker0"
  6742                  com.docker.network.driver.mtu: "1500"
  6743                Labels:
  6744                  com.example.some-label: "some-value"
  6745                  com.example.some-other-label: "some-other-value"
  6746        tags: ["Network"]
  6747  
  6748    /networks/{id}/connect:
  6749      post:
  6750        summary: "Connect a container to a network"
  6751        operationId: "NetworkConnect"
  6752        consumes:
  6753          - "application/octet-stream"
  6754        responses:
  6755          200:
  6756            description: "No error"
  6757          403:
  6758            description: "Operation not supported for swarm scoped networks"
  6759            schema:
  6760              $ref: "#/definitions/ErrorResponse"
  6761          404:
  6762            description: "Network or container not found"
  6763            schema:
  6764              $ref: "#/definitions/ErrorResponse"
  6765          500:
  6766            description: "Server error"
  6767            schema:
  6768              $ref: "#/definitions/ErrorResponse"
  6769        parameters:
  6770          - name: "id"
  6771            in: "path"
  6772            description: "Network ID or name"
  6773            required: true
  6774            type: "string"
  6775          - name: "container"
  6776            in: "body"
  6777            required: true
  6778            schema:
  6779              type: "object"
  6780              properties:
  6781                Container:
  6782                  type: "string"
  6783                  description: "The ID or name of the container to connect to the network."
  6784                EndpointConfig:
  6785                  $ref: "#/definitions/EndpointSettings"
  6786              example:
  6787                Container: "3613f73ba0e4"
  6788                EndpointConfig:
  6789                  IPAMConfig:
  6790                    IPv4Address: "172.24.56.89"
  6791                    IPv6Address: "2001:db8::5689"
  6792        tags: ["Network"]
  6793  
  6794    /networks/{id}/disconnect:
  6795      post:
  6796        summary: "Disconnect a container from a network"
  6797        operationId: "NetworkDisconnect"
  6798        consumes:
  6799          - "application/json"
  6800        responses:
  6801          200:
  6802            description: "No error"
  6803          403:
  6804            description: "Operation not supported for swarm scoped networks"
  6805            schema:
  6806              $ref: "#/definitions/ErrorResponse"
  6807          404:
  6808            description: "Network or container not found"
  6809            schema:
  6810              $ref: "#/definitions/ErrorResponse"
  6811          500:
  6812            description: "Server error"
  6813            schema:
  6814              $ref: "#/definitions/ErrorResponse"
  6815        parameters:
  6816          - name: "id"
  6817            in: "path"
  6818            description: "Network ID or name"
  6819            required: true
  6820            type: "string"
  6821          - name: "container"
  6822            in: "body"
  6823            required: true
  6824            schema:
  6825              type: "object"
  6826              properties:
  6827                Container:
  6828                  type: "string"
  6829                  description: "The ID or name of the container to disconnect from the network."
  6830                Force:
  6831                  type: "boolean"
  6832                  description: "Force the container to disconnect from the network."
  6833        tags: ["Network"]
  6834    /networks/prune:
  6835      post:
  6836        summary: "Delete unused networks"
  6837        produces:
  6838          - "application/json"
  6839        operationId: "NetworkPrune"
  6840        parameters:
  6841          - name: "filters"
  6842            in: "query"
  6843            description: |
  6844              Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  6845  
  6846              Available filters:
  6847              - `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.
  6848              - `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.
  6849            type: "string"
  6850        responses:
  6851          200:
  6852            description: "No error"
  6853            schema:
  6854              type: "object"
  6855              properties:
  6856                NetworksDeleted:
  6857                  description: "Networks that were deleted"
  6858                  type: "array"
  6859                  items:
  6860                    type: "string"
  6861          500:
  6862            description: "Server error"
  6863            schema:
  6864              $ref: "#/definitions/ErrorResponse"
  6865        tags: ["Network"]
  6866    /plugins:
  6867      get:
  6868        summary: "List plugins"
  6869        operationId: "PluginList"
  6870        description: "Returns information about installed plugins."
  6871        produces: ["application/json"]
  6872        responses:
  6873          200:
  6874            description: "No error"
  6875            schema:
  6876              type: "array"
  6877              items:
  6878                $ref: "#/definitions/Plugin"
  6879          500:
  6880            description: "Server error"
  6881            schema:
  6882              $ref: "#/definitions/ErrorResponse"
  6883        parameters:
  6884          - name: "filters"
  6885            in: "query"
  6886            type: "string"
  6887            description: |
  6888              A JSON encoded value of the filters (a `map[string][]string`) to process on the plugin list. Available filters:
  6889  
  6890              - `capability=<capability name>`
  6891              - `enable=<true>|<false>`
  6892        tags: ["Plugin"]
  6893  
  6894    /plugins/privileges:
  6895      get:
  6896        summary: "Get plugin privileges"
  6897        operationId: "GetPluginPrivileges"
  6898        responses:
  6899          200:
  6900            description: "no error"
  6901            schema:
  6902              type: "array"
  6903              items:
  6904                description: "Describes a permission the user has to accept upon installing the plugin."
  6905                type: "object"
  6906                properties:
  6907                  Name:
  6908                    type: "string"
  6909                  Description:
  6910                    type: "string"
  6911                  Value:
  6912                    type: "array"
  6913                    items:
  6914                      type: "string"
  6915              example:
  6916                - Name: "network"
  6917                  Description: ""
  6918                  Value:
  6919                    - "host"
  6920                - Name: "mount"
  6921                  Description: ""
  6922                  Value:
  6923                    - "/data"
  6924                - Name: "device"
  6925                  Description: ""
  6926                  Value:
  6927                    - "/dev/cpu_dma_latency"
  6928          500:
  6929            description: "server error"
  6930            schema:
  6931              $ref: "#/definitions/ErrorResponse"
  6932        parameters:
  6933          - name: "remote"
  6934            in: "query"
  6935            description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  6936            required: true
  6937            type: "string"
  6938        tags:
  6939          - "Plugin"
  6940  
  6941    /plugins/pull:
  6942      post:
  6943        summary: "Install a plugin"
  6944        operationId: "PluginPull"
  6945        description: |
  6946          Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable).
  6947        produces:
  6948          - "application/json"
  6949        responses:
  6950          204:
  6951            description: "no error"
  6952          500:
  6953            description: "server error"
  6954            schema:
  6955              $ref: "#/definitions/ErrorResponse"
  6956        parameters:
  6957          - name: "remote"
  6958            in: "query"
  6959            description: |
  6960              Remote reference for plugin to install.
  6961  
  6962              The `:latest` tag is optional, and is used as the default if omitted.
  6963            required: true
  6964            type: "string"
  6965          - name: "name"
  6966            in: "query"
  6967            description: |
  6968              Local name for the pulled plugin.
  6969  
  6970              The `:latest` tag is optional, and is used as the default if omitted.
  6971            required: false
  6972            type: "string"
  6973          - name: "X-Registry-Auth"
  6974            in: "header"
  6975            description: "A base64-encoded auth configuration to use when pulling a plugin from a registry. [See the authentication section for details.](#section/Authentication)"
  6976            type: "string"
  6977          - name: "body"
  6978            in: "body"
  6979            schema:
  6980              type: "array"
  6981              items:
  6982                description: "Describes a permission accepted by the user upon installing the plugin."
  6983                type: "object"
  6984                properties:
  6985                  Name:
  6986                    type: "string"
  6987                  Description:
  6988                    type: "string"
  6989                  Value:
  6990                    type: "array"
  6991                    items:
  6992                      type: "string"
  6993              example:
  6994                - Name: "network"
  6995                  Description: ""
  6996                  Value:
  6997                    - "host"
  6998                - Name: "mount"
  6999                  Description: ""
  7000                  Value:
  7001                    - "/data"
  7002                - Name: "device"
  7003                  Description: ""
  7004                  Value:
  7005                    - "/dev/cpu_dma_latency"
  7006        tags: ["Plugin"]
  7007    /plugins/{name}/json:
  7008      get:
  7009        summary: "Inspect a plugin"
  7010        operationId: "PluginInspect"
  7011        responses:
  7012          200:
  7013            description: "no error"
  7014            schema:
  7015              $ref: "#/definitions/Plugin"
  7016          404:
  7017            description: "plugin is not installed"
  7018            schema:
  7019              $ref: "#/definitions/ErrorResponse"
  7020          500:
  7021            description: "server error"
  7022            schema:
  7023              $ref: "#/definitions/ErrorResponse"
  7024        parameters:
  7025          - name: "name"
  7026            in: "path"
  7027            description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  7028            required: true
  7029            type: "string"
  7030        tags: ["Plugin"]
  7031    /plugins/{name}:
  7032      delete:
  7033        summary: "Remove a plugin"
  7034        operationId: "PluginDelete"
  7035        responses:
  7036          200:
  7037            description: "no error"
  7038            schema:
  7039              $ref: "#/definitions/Plugin"
  7040          404:
  7041            description: "plugin is not installed"
  7042            schema:
  7043              $ref: "#/definitions/ErrorResponse"
  7044          500:
  7045            description: "server error"
  7046            schema:
  7047              $ref: "#/definitions/ErrorResponse"
  7048        parameters:
  7049          - name: "name"
  7050            in: "path"
  7051            description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  7052            required: true
  7053            type: "string"
  7054          - name: "force"
  7055            in: "query"
  7056            description: "Disable the plugin before removing. This may result in issues if the plugin is in use by a container."
  7057            type: "boolean"
  7058            default: false
  7059        tags: ["Plugin"]
  7060    /plugins/{name}/enable:
  7061      post:
  7062        summary: "Enable a plugin"
  7063        operationId: "PluginEnable"
  7064        responses:
  7065          200:
  7066            description: "no error"
  7067          404:
  7068            description: "plugin is not installed"
  7069            schema:
  7070              $ref: "#/definitions/ErrorResponse"
  7071          500:
  7072            description: "server error"
  7073            schema:
  7074              $ref: "#/definitions/ErrorResponse"
  7075        parameters:
  7076          - name: "name"
  7077            in: "path"
  7078            description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  7079            required: true
  7080            type: "string"
  7081          - name: "timeout"
  7082            in: "query"
  7083            description: "Set the HTTP client timeout (in seconds)"
  7084            type: "integer"
  7085            default: 0
  7086        tags: ["Plugin"]
  7087    /plugins/{name}/disable:
  7088      post:
  7089        summary: "Disable a plugin"
  7090        operationId: "PluginDisable"
  7091        responses:
  7092          200:
  7093            description: "no error"
  7094          404:
  7095            description: "plugin is not installed"
  7096            schema:
  7097              $ref: "#/definitions/ErrorResponse"
  7098          500:
  7099            description: "server error"
  7100            schema:
  7101              $ref: "#/definitions/ErrorResponse"
  7102        parameters:
  7103          - name: "name"
  7104            in: "path"
  7105            description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  7106            required: true
  7107            type: "string"
  7108          - name: "force"
  7109            in: "query"
  7110            description: |
  7111              Force disable a plugin even if still in use.
  7112            required: false
  7113            type: "boolean"
  7114        tags: ["Plugin"]
  7115    /plugins/{name}/upgrade:
  7116      post:
  7117        summary: "Upgrade a plugin"
  7118        operationId: "PluginUpgrade"
  7119        responses:
  7120          204:
  7121            description: "no error"
  7122          404:
  7123            description: "plugin not installed"
  7124            schema:
  7125              $ref: "#/definitions/ErrorResponse"
  7126          500:
  7127            description: "server error"
  7128            schema:
  7129              $ref: "#/definitions/ErrorResponse"
  7130        parameters:
  7131          - name: "name"
  7132            in: "path"
  7133            description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  7134            required: true
  7135            type: "string"
  7136          - name: "remote"
  7137            in: "query"
  7138            description: |
  7139              Remote reference to upgrade to.
  7140  
  7141              The `:latest` tag is optional, and is used as the default if omitted.
  7142            required: true
  7143            type: "string"
  7144          - name: "X-Registry-Auth"
  7145            in: "header"
  7146            description: "A base64-encoded auth configuration to use when pulling a plugin from a registry. [See the authentication section for details.](#section/Authentication)"
  7147            type: "string"
  7148          - name: "body"
  7149            in: "body"
  7150            schema:
  7151              type: "array"
  7152              items:
  7153                description: "Describes a permission accepted by the user upon installing the plugin."
  7154                type: "object"
  7155                properties:
  7156                  Name:
  7157                    type: "string"
  7158                  Description:
  7159                    type: "string"
  7160                  Value:
  7161                    type: "array"
  7162                    items:
  7163                      type: "string"
  7164              example:
  7165                - Name: "network"
  7166                  Description: ""
  7167                  Value:
  7168                    - "host"
  7169                - Name: "mount"
  7170                  Description: ""
  7171                  Value:
  7172                    - "/data"
  7173                - Name: "device"
  7174                  Description: ""
  7175                  Value:
  7176                    - "/dev/cpu_dma_latency"
  7177        tags: ["Plugin"]
  7178    /plugins/create:
  7179      post:
  7180        summary: "Create a plugin"
  7181        operationId: "PluginCreate"
  7182        consumes:
  7183          - "application/x-tar"
  7184        responses:
  7185          204:
  7186            description: "no error"
  7187          500:
  7188            description: "server error"
  7189            schema:
  7190              $ref: "#/definitions/ErrorResponse"
  7191        parameters:
  7192          - name: "name"
  7193            in: "query"
  7194            description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  7195            required: true
  7196            type: "string"
  7197          - name: "tarContext"
  7198            in: "body"
  7199            description: "Path to tar containing plugin rootfs and manifest"
  7200            schema:
  7201              type: "string"
  7202              format: "binary"
  7203        tags: ["Plugin"]
  7204    /plugins/{name}/push:
  7205      post:
  7206        summary: "Push a plugin"
  7207        operationId: "PluginPush"
  7208        description: |
  7209          Push a plugin to the registry.
  7210        parameters:
  7211          - name: "name"
  7212            in: "path"
  7213            description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  7214            required: true
  7215            type: "string"
  7216        responses:
  7217          200:
  7218            description: "no error"
  7219          404:
  7220            description: "plugin not installed"
  7221            schema:
  7222              $ref: "#/definitions/ErrorResponse"
  7223          500:
  7224            description: "server error"
  7225            schema:
  7226              $ref: "#/definitions/ErrorResponse"
  7227        tags: ["Plugin"]
  7228    /plugins/{name}/set:
  7229      post:
  7230        summary: "Configure a plugin"
  7231        operationId: "PluginSet"
  7232        consumes:
  7233          - "application/json"
  7234        parameters:
  7235          - name: "name"
  7236            in: "path"
  7237            description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  7238            required: true
  7239            type: "string"
  7240          - name: "body"
  7241            in: "body"
  7242            schema:
  7243              type: "array"
  7244              items:
  7245                type: "string"
  7246              example: ["DEBUG=1"]
  7247        responses:
  7248          204:
  7249            description: "No error"
  7250          404:
  7251            description: "Plugin not installed"
  7252            schema:
  7253              $ref: "#/definitions/ErrorResponse"
  7254          500:
  7255            description: "Server error"
  7256            schema:
  7257              $ref: "#/definitions/ErrorResponse"
  7258        tags: ["Plugin"]
  7259    /nodes:
  7260      get:
  7261        summary: "List nodes"
  7262        operationId: "NodeList"
  7263        responses:
  7264          200:
  7265            description: "no error"
  7266            schema:
  7267              type: "array"
  7268              items:
  7269                $ref: "#/definitions/Node"
  7270          500:
  7271            description: "server error"
  7272            schema:
  7273              $ref: "#/definitions/ErrorResponse"
  7274          503:
  7275            description: "node is not part of a swarm"
  7276            schema:
  7277              $ref: "#/definitions/ErrorResponse"
  7278        parameters:
  7279          - name: "filters"
  7280            in: "query"
  7281            description: |
  7282              Filters to process on the nodes list, encoded as JSON (a `map[string][]string`).
  7283  
  7284              Available filters:
  7285              - `id=<node id>`
  7286              - `label=<engine label>`
  7287              - `membership=`(`accepted`|`pending`)`
  7288              - `name=<node name>`
  7289              - `role=`(`manager`|`worker`)`
  7290            type: "string"
  7291        tags: ["Node"]
  7292    /nodes/{id}:
  7293      get:
  7294        summary: "Inspect a node"
  7295        operationId: "NodeInspect"
  7296        responses:
  7297          200:
  7298            description: "no error"
  7299            schema:
  7300              $ref: "#/definitions/Node"
  7301          404:
  7302            description: "no such node"
  7303            schema:
  7304              $ref: "#/definitions/ErrorResponse"
  7305          500:
  7306            description: "server error"
  7307            schema:
  7308              $ref: "#/definitions/ErrorResponse"
  7309          503:
  7310            description: "node is not part of a swarm"
  7311            schema:
  7312              $ref: "#/definitions/ErrorResponse"
  7313        parameters:
  7314          - name: "id"
  7315            in: "path"
  7316            description: "The ID or name of the node"
  7317            type: "string"
  7318            required: true
  7319        tags: ["Node"]
  7320      delete:
  7321        summary: "Delete a node"
  7322        operationId: "NodeDelete"
  7323        responses:
  7324          200:
  7325            description: "no error"
  7326          404:
  7327            description: "no such node"
  7328            schema:
  7329              $ref: "#/definitions/ErrorResponse"
  7330          500:
  7331            description: "server error"
  7332            schema:
  7333              $ref: "#/definitions/ErrorResponse"
  7334          503:
  7335            description: "node is not part of a swarm"
  7336            schema:
  7337              $ref: "#/definitions/ErrorResponse"
  7338        parameters:
  7339          - name: "id"
  7340            in: "path"
  7341            description: "The ID or name of the node"
  7342            type: "string"
  7343            required: true
  7344          - name: "force"
  7345            in: "query"
  7346            description: "Force remove a node from the swarm"
  7347            default: false
  7348            type: "boolean"
  7349        tags: ["Node"]
  7350    /nodes/{id}/update:
  7351      post:
  7352        summary: "Update a node"
  7353        operationId: "NodeUpdate"
  7354        responses:
  7355          200:
  7356            description: "no error"
  7357          400:
  7358            description: "bad parameter"
  7359            schema:
  7360              $ref: "#/definitions/ErrorResponse"
  7361          404:
  7362            description: "no such node"
  7363            schema:
  7364              $ref: "#/definitions/ErrorResponse"
  7365          500:
  7366            description: "server error"
  7367            schema:
  7368              $ref: "#/definitions/ErrorResponse"
  7369          503:
  7370            description: "node is not part of a swarm"
  7371            schema:
  7372              $ref: "#/definitions/ErrorResponse"
  7373        parameters:
  7374          - name: "id"
  7375            in: "path"
  7376            description: "The ID of the node"
  7377            type: "string"
  7378            required: true
  7379          - name: "body"
  7380            in: "body"
  7381            schema:
  7382              $ref: "#/definitions/NodeSpec"
  7383          - name: "version"
  7384            in: "query"
  7385            description: "The version number of the node object being updated. This is required to avoid conflicting writes."
  7386            type: "integer"
  7387            format: "int64"
  7388            required: true
  7389        tags: ["Node"]
  7390    /swarm:
  7391      get:
  7392        summary: "Inspect swarm"
  7393        operationId: "SwarmInspect"
  7394        responses:
  7395          200:
  7396            description: "no error"
  7397            schema:
  7398              allOf:
  7399                - $ref: "#/definitions/ClusterInfo"
  7400                - type: "object"
  7401                  properties:
  7402                    JoinTokens:
  7403                      description: "The tokens workers and managers need to join the swarm."
  7404                      type: "object"
  7405                      properties:
  7406                        Worker:
  7407                          description: "The token workers can use to join the swarm."
  7408                          type: "string"
  7409                        Manager:
  7410                          description: "The token managers can use to join the swarm."
  7411                          type: "string"
  7412              example:
  7413                CreatedAt: "2016-08-15T16:00:20.349727406Z"
  7414                Spec:
  7415                  Dispatcher:
  7416                    HeartbeatPeriod: 5000000000
  7417                  Orchestration:
  7418                    TaskHistoryRetentionLimit: 10
  7419                  CAConfig:
  7420                    NodeCertExpiry: 7776000000000000
  7421                  Raft:
  7422                    LogEntriesForSlowFollowers: 500
  7423                    HeartbeatTick: 1
  7424                    SnapshotInterval: 10000
  7425                    ElectionTick: 3
  7426                  TaskDefaults: {}
  7427                  EncryptionConfig:
  7428                    AutoLockManagers: false
  7429                  Name: "default"
  7430                JoinTokens:
  7431                  Worker: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-6qmn92w6bu3jdvnglku58u11a"
  7432                  Manager: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-8llk83c4wm9lwioey2s316r9l"
  7433                ID: "70ilmkj2f6sp2137c753w2nmt"
  7434                UpdatedAt: "2016-08-15T16:32:09.623207604Z"
  7435                Version:
  7436                  Index: 51
  7437                RootRotationInProgress: false
  7438                TLSInfo:
  7439                  TrustRoot: |
  7440                    -----BEGIN CERTIFICATE-----
  7441                    MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw
  7442                    EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0
  7443                    MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH
  7444                    A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf
  7445                    3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB
  7446                    Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO
  7447                    PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz
  7448                    pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H
  7449                    -----END CERTIFICATE-----
  7450                  CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh"
  7451                  CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A=="
  7452          404:
  7453            description: "no such swarm"
  7454            schema:
  7455              $ref: "#/definitions/ErrorResponse"
  7456          500:
  7457            description: "server error"
  7458            schema:
  7459              $ref: "#/definitions/ErrorResponse"
  7460          503:
  7461            description: "node is not part of a swarm"
  7462            schema:
  7463              $ref: "#/definitions/ErrorResponse"
  7464        tags: ["Swarm"]
  7465    /swarm/init:
  7466      post:
  7467        summary: "Initialize a new swarm"
  7468        operationId: "SwarmInit"
  7469        produces:
  7470          - "application/json"
  7471          - "text/plain"
  7472        responses:
  7473          200:
  7474            description: "no error"
  7475            schema:
  7476              description: "The node ID"
  7477              type: "string"
  7478              example: "7v2t30z9blmxuhnyo6s4cpenp"
  7479          400:
  7480            description: "bad parameter"
  7481            schema:
  7482              $ref: "#/definitions/ErrorResponse"
  7483          500:
  7484            description: "server error"
  7485            schema:
  7486              $ref: "#/definitions/ErrorResponse"
  7487          503:
  7488            description: "node is already part of a swarm"
  7489            schema:
  7490              $ref: "#/definitions/ErrorResponse"
  7491        parameters:
  7492          - name: "body"
  7493            in: "body"
  7494            required: true
  7495            schema:
  7496              type: "object"
  7497              properties:
  7498                ListenAddr:
  7499                  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."
  7500                  type: "string"
  7501                AdvertiseAddr:
  7502                  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."
  7503                  type: "string"
  7504                DataPathAddr:
  7505                  description: |
  7506                    Address or interface to use for data path traffic (format: `<ip|interface>`), for example,  `192.168.1.1`,
  7507                    or an interface, like `eth0`. If `DataPathAddr` is unspecified, the same address as `AdvertiseAddr`
  7508                    is used.
  7509  
  7510                    The `DataPathAddr` specifies the address that global scope network drivers will publish towards other
  7511                    nodes in order to reach the containers running on this node. Using this parameter it is possible to
  7512                    separate the container data traffic from the management traffic of the cluster.
  7513                  type: "string"
  7514                ForceNewCluster:
  7515                  description: "Force creation of a new swarm."
  7516                  type: "boolean"
  7517                Spec:
  7518                  $ref: "#/definitions/SwarmSpec"
  7519              example:
  7520                ListenAddr: "0.0.0.0:2377"
  7521                AdvertiseAddr: "192.168.1.1:2377"
  7522                ForceNewCluster: false
  7523                Spec:
  7524                  Orchestration: {}
  7525                  Raft: {}
  7526                  Dispatcher: {}
  7527                  CAConfig: {}
  7528                  EncryptionConfig:
  7529                    AutoLockManagers: false
  7530        tags: ["Swarm"]
  7531    /swarm/join:
  7532      post:
  7533        summary: "Join an existing swarm"
  7534        operationId: "SwarmJoin"
  7535        responses:
  7536          200:
  7537            description: "no error"
  7538          400:
  7539            description: "bad parameter"
  7540            schema:
  7541              $ref: "#/definitions/ErrorResponse"
  7542          500:
  7543            description: "server error"
  7544            schema:
  7545              $ref: "#/definitions/ErrorResponse"
  7546          503:
  7547            description: "node is already part of a swarm"
  7548            schema:
  7549              $ref: "#/definitions/ErrorResponse"
  7550        parameters:
  7551          - name: "body"
  7552            in: "body"
  7553            required: true
  7554            schema:
  7555              type: "object"
  7556              properties:
  7557                ListenAddr:
  7558                  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)."
  7559                  type: "string"
  7560                AdvertiseAddr:
  7561                  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."
  7562                  type: "string"
  7563                DataPathAddr:
  7564                  description: |
  7565                    Address or interface to use for data path traffic (format: `<ip|interface>`), for example,  `192.168.1.1`,
  7566                    or an interface, like `eth0`. If `DataPathAddr` is unspecified, the same address as `AdvertiseAddr`
  7567                    is used.
  7568  
  7569                    The `DataPathAddr` specifies the address that global scope network drivers will publish towards other
  7570                    nodes in order to reach the containers running on this node. Using this parameter it is possible to
  7571                    separate the container data traffic from the management traffic of the cluster.
  7572  
  7573                  type: "string"
  7574                RemoteAddrs:
  7575                  description: "Addresses of manager nodes already participating in the swarm."
  7576                  type: "string"
  7577                JoinToken:
  7578                  description: "Secret token for joining this swarm."
  7579                  type: "string"
  7580              example:
  7581                ListenAddr: "0.0.0.0:2377"
  7582                AdvertiseAddr: "192.168.1.1:2377"
  7583                RemoteAddrs:
  7584                  - "node1:2377"
  7585                JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2"
  7586        tags: ["Swarm"]
  7587    /swarm/leave:
  7588      post:
  7589        summary: "Leave a swarm"
  7590        operationId: "SwarmLeave"
  7591        responses:
  7592          200:
  7593            description: "no error"
  7594          500:
  7595            description: "server error"
  7596            schema:
  7597              $ref: "#/definitions/ErrorResponse"
  7598          503:
  7599            description: "node is not part of a swarm"
  7600            schema:
  7601              $ref: "#/definitions/ErrorResponse"
  7602        parameters:
  7603          - name: "force"
  7604            description: "Force leave swarm, even if this is the last manager or that it will break the cluster."
  7605            in: "query"
  7606            type: "boolean"
  7607            default: false
  7608        tags: ["Swarm"]
  7609    /swarm/update:
  7610      post:
  7611        summary: "Update a swarm"
  7612        operationId: "SwarmUpdate"
  7613        responses:
  7614          200:
  7615            description: "no error"
  7616          400:
  7617            description: "bad parameter"
  7618            schema:
  7619              $ref: "#/definitions/ErrorResponse"
  7620          500:
  7621            description: "server error"
  7622            schema:
  7623              $ref: "#/definitions/ErrorResponse"
  7624          503:
  7625            description: "node is not part of a swarm"
  7626            schema:
  7627              $ref: "#/definitions/ErrorResponse"
  7628        parameters:
  7629          - name: "body"
  7630            in: "body"
  7631            required: true
  7632            schema:
  7633              $ref: "#/definitions/SwarmSpec"
  7634          - name: "version"
  7635            in: "query"
  7636            description: "The version number of the swarm object being updated. This is required to avoid conflicting writes."
  7637            type: "integer"
  7638            format: "int64"
  7639            required: true
  7640          - name: "rotateWorkerToken"
  7641            in: "query"
  7642            description: "Rotate the worker join token."
  7643            type: "boolean"
  7644            default: false
  7645          - name: "rotateManagerToken"
  7646            in: "query"
  7647            description: "Rotate the manager join token."
  7648            type: "boolean"
  7649            default: false
  7650          - name: "rotateManagerUnlockKey"
  7651            in: "query"
  7652            description: "Rotate the manager unlock key."
  7653            type: "boolean"
  7654            default: false
  7655        tags: ["Swarm"]
  7656    /swarm/unlockkey:
  7657      get:
  7658        summary: "Get the unlock key"
  7659        operationId: "SwarmUnlockkey"
  7660        consumes:
  7661          - "application/json"
  7662        responses:
  7663          200:
  7664            description: "no error"
  7665            schema:
  7666              type: "object"
  7667              properties:
  7668                UnlockKey:
  7669                  description: "The swarm's unlock key."
  7670                  type: "string"
  7671              example:
  7672                UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
  7673          500:
  7674            description: "server error"
  7675            schema:
  7676              $ref: "#/definitions/ErrorResponse"
  7677          503:
  7678            description: "node is not part of a swarm"
  7679            schema:
  7680              $ref: "#/definitions/ErrorResponse"
  7681        tags: ["Swarm"]
  7682    /swarm/unlock:
  7683      post:
  7684        summary: "Unlock a locked manager"
  7685        operationId: "SwarmUnlock"
  7686        consumes:
  7687          - "application/json"
  7688        produces:
  7689          - "application/json"
  7690        parameters:
  7691          - name: "body"
  7692            in: "body"
  7693            required: true
  7694            schema:
  7695              type: "object"
  7696              properties:
  7697                UnlockKey:
  7698                  description: "The swarm's unlock key."
  7699                  type: "string"
  7700              example:
  7701                UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
  7702        responses:
  7703          200:
  7704            description: "no error"
  7705          500:
  7706            description: "server error"
  7707            schema:
  7708              $ref: "#/definitions/ErrorResponse"
  7709          503:
  7710            description: "node is not part of a swarm"
  7711            schema:
  7712              $ref: "#/definitions/ErrorResponse"
  7713        tags: ["Swarm"]
  7714    /services:
  7715      get:
  7716        summary: "List services"
  7717        operationId: "ServiceList"
  7718        responses:
  7719          200:
  7720            description: "no error"
  7721            schema:
  7722              type: "array"
  7723              items:
  7724                $ref: "#/definitions/Service"
  7725          500:
  7726            description: "server error"
  7727            schema:
  7728              $ref: "#/definitions/ErrorResponse"
  7729          503:
  7730            description: "node is not part of a swarm"
  7731            schema:
  7732              $ref: "#/definitions/ErrorResponse"
  7733        parameters:
  7734          - name: "filters"
  7735            in: "query"
  7736            type: "string"
  7737            description: |
  7738              A JSON encoded value of the filters (a `map[string][]string`) to process on the services list. Available filters:
  7739  
  7740              - `id=<service id>`
  7741              - `label=<service label>`
  7742              - `mode=["replicated"|"global"]`
  7743              - `name=<service name>`
  7744        tags: ["Service"]
  7745    /services/create:
  7746      post:
  7747        summary: "Create a service"
  7748        operationId: "ServiceCreate"
  7749        consumes:
  7750          - "application/json"
  7751        produces:
  7752          - "application/json"
  7753        responses:
  7754          201:
  7755            description: "no error"
  7756            schema:
  7757              type: "object"
  7758              properties:
  7759                ID:
  7760                  description: "The ID of the created service."
  7761                  type: "string"
  7762                Warning:
  7763                  description: "Optional warning message"
  7764                  type: "string"
  7765              example:
  7766                ID: "ak7w3gjqoa3kuz8xcpnyy0pvl"
  7767                Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found"
  7768          400:
  7769            description: "bad parameter"
  7770            schema:
  7771              $ref: "#/definitions/ErrorResponse"
  7772          403:
  7773            description: "network is not eligible for services"
  7774            schema:
  7775              $ref: "#/definitions/ErrorResponse"
  7776          409:
  7777            description: "name conflicts with an existing service"
  7778            schema:
  7779              $ref: "#/definitions/ErrorResponse"
  7780          500:
  7781            description: "server error"
  7782            schema:
  7783              $ref: "#/definitions/ErrorResponse"
  7784          503:
  7785            description: "node is not part of a swarm"
  7786            schema:
  7787              $ref: "#/definitions/ErrorResponse"
  7788        parameters:
  7789          - name: "body"
  7790            in: "body"
  7791            required: true
  7792            schema:
  7793              allOf:
  7794                - $ref: "#/definitions/ServiceSpec"
  7795                - type: "object"
  7796                  example:
  7797                    Name: "web"
  7798                    TaskTemplate:
  7799                      ContainerSpec:
  7800                        Image: "nginx:alpine"
  7801                        Mounts:
  7802                          -
  7803                            ReadOnly: true
  7804                            Source: "web-data"
  7805                            Target: "/usr/share/nginx/html"
  7806                            Type: "volume"
  7807                            VolumeOptions:
  7808                              DriverConfig: {}
  7809                              Labels:
  7810                                com.example.something: "something-value"
  7811                        Hosts: ["10.10.10.10 host1", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2"]
  7812                        User: "33"
  7813                        DNSConfig:
  7814                          Nameservers: ["8.8.8.8"]
  7815                          Search: ["example.org"]
  7816                          Options: ["timeout:3"]
  7817                        Secrets:
  7818                          -
  7819                            File:
  7820                              Name: "www.example.org.key"
  7821                              UID: "33"
  7822                              GID: "33"
  7823                              Mode: 384
  7824                            SecretID: "fpjqlhnwb19zds35k8wn80lq9"
  7825                            SecretName: "example_org_domain_key"
  7826                      LogDriver:
  7827                        Name: "json-file"
  7828                        Options:
  7829                          max-file: "3"
  7830                          max-size: "10M"
  7831                      Placement: {}
  7832                      Resources:
  7833                        Limits:
  7834                          MemoryBytes: 104857600
  7835                        Reservations: {}
  7836                      RestartPolicy:
  7837                        Condition: "on-failure"
  7838                        Delay: 10000000000
  7839                        MaxAttempts: 10
  7840                    Mode:
  7841                      Replicated:
  7842                        Replicas: 4
  7843                    UpdateConfig:
  7844                      Parallelism: 2
  7845                      Delay: 1000000000
  7846                      FailureAction: "pause"
  7847                      Monitor: 15000000000
  7848                      MaxFailureRatio: 0.15
  7849                    RollbackConfig:
  7850                      Parallelism: 1
  7851                      Delay: 1000000000
  7852                      FailureAction: "pause"
  7853                      Monitor: 15000000000
  7854                      MaxFailureRatio: 0.15
  7855                    EndpointSpec:
  7856                      Ports:
  7857                        -
  7858                          Protocol: "tcp"
  7859                          PublishedPort: 8080
  7860                          TargetPort: 80
  7861                    Labels:
  7862                      foo: "bar"
  7863          - name: "X-Registry-Auth"
  7864            in: "header"
  7865            description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)"
  7866            type: "string"
  7867        tags: ["Service"]
  7868    /services/{id}:
  7869      get:
  7870        summary: "Inspect a service"
  7871        operationId: "ServiceInspect"
  7872        responses:
  7873          200:
  7874            description: "no error"
  7875            schema:
  7876              $ref: "#/definitions/Service"
  7877          404:
  7878            description: "no such service"
  7879            schema:
  7880              $ref: "#/definitions/ErrorResponse"
  7881          500:
  7882            description: "server error"
  7883            schema:
  7884              $ref: "#/definitions/ErrorResponse"
  7885          503:
  7886            description: "node is not part of a swarm"
  7887            schema:
  7888              $ref: "#/definitions/ErrorResponse"
  7889        parameters:
  7890          - name: "id"
  7891            in: "path"
  7892            description: "ID or name of service."
  7893            required: true
  7894            type: "string"
  7895          - name: "insertDefaults"
  7896            in: "query"
  7897            description: "Fill empty fields with default values."
  7898            type: "boolean"
  7899            default: false
  7900        tags: ["Service"]
  7901      delete:
  7902        summary: "Delete a service"
  7903        operationId: "ServiceDelete"
  7904        responses:
  7905          200:
  7906            description: "no error"
  7907          404:
  7908            description: "no such service"
  7909            schema:
  7910              $ref: "#/definitions/ErrorResponse"
  7911          500:
  7912            description: "server error"
  7913            schema:
  7914              $ref: "#/definitions/ErrorResponse"
  7915          503:
  7916            description: "node is not part of a swarm"
  7917            schema:
  7918              $ref: "#/definitions/ErrorResponse"
  7919        parameters:
  7920          - name: "id"
  7921            in: "path"
  7922            description: "ID or name of service."
  7923            required: true
  7924            type: "string"
  7925        tags: ["Service"]
  7926    /services/{id}/update:
  7927      post:
  7928        summary: "Update a service"
  7929        operationId: "ServiceUpdate"
  7930        consumes: ["application/json"]
  7931        produces: ["application/json"]
  7932        responses:
  7933          200:
  7934            description: "no error"
  7935            schema:
  7936              $ref: "#/definitions/ServiceUpdateResponse"
  7937          400:
  7938            description: "bad parameter"
  7939            schema:
  7940              $ref: "#/definitions/ErrorResponse"
  7941          404:
  7942            description: "no such service"
  7943            schema:
  7944              $ref: "#/definitions/ErrorResponse"
  7945          500:
  7946            description: "server error"
  7947            schema:
  7948              $ref: "#/definitions/ErrorResponse"
  7949          503:
  7950            description: "node is not part of a swarm"
  7951            schema:
  7952              $ref: "#/definitions/ErrorResponse"
  7953        parameters:
  7954          - name: "id"
  7955            in: "path"
  7956            description: "ID or name of service."
  7957            required: true
  7958            type: "string"
  7959          - name: "body"
  7960            in: "body"
  7961            required: true
  7962            schema:
  7963              allOf:
  7964                - $ref: "#/definitions/ServiceSpec"
  7965                - type: "object"
  7966                  example:
  7967                    Name: "top"
  7968                    TaskTemplate:
  7969                      ContainerSpec:
  7970                        Image: "busybox"
  7971                        Args:
  7972                          - "top"
  7973                      Resources:
  7974                        Limits: {}
  7975                        Reservations: {}
  7976                      RestartPolicy:
  7977                        Condition: "any"
  7978                        MaxAttempts: 0
  7979                      Placement: {}
  7980                      ForceUpdate: 0
  7981                    Mode:
  7982                      Replicated:
  7983                        Replicas: 1
  7984                    UpdateConfig:
  7985                      Parallelism: 2
  7986                      Delay: 1000000000
  7987                      FailureAction: "pause"
  7988                      Monitor: 15000000000
  7989                      MaxFailureRatio: 0.15
  7990                    RollbackConfig:
  7991                      Parallelism: 1
  7992                      Delay: 1000000000
  7993                      FailureAction: "pause"
  7994                      Monitor: 15000000000
  7995                      MaxFailureRatio: 0.15
  7996                    EndpointSpec:
  7997                      Mode: "vip"
  7998  
  7999          - name: "version"
  8000            in: "query"
  8001            description: "The version number of the service object being updated. This is required to avoid conflicting writes."
  8002            required: true
  8003            type: "integer"
  8004          - name: "registryAuthFrom"
  8005            in: "query"
  8006            type: "string"
  8007            description: "If the X-Registry-Auth header is not specified, this
  8008    parameter indicates where to find registry authorization credentials. The
  8009    valid values are `spec` and `previous-spec`."
  8010            default: "spec"
  8011          - name: "rollback"
  8012            in: "query"
  8013            type: "string"
  8014            description: "Set to this parameter to `previous` to cause a
  8015    server-side rollback to the previous service spec. The supplied spec will be
  8016    ignored in this case."
  8017          - name: "X-Registry-Auth"
  8018            in: "header"
  8019            description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)"
  8020            type: "string"
  8021  
  8022        tags: ["Service"]
  8023    /services/{id}/logs:
  8024      get:
  8025        summary: "Get service logs"
  8026        description: |
  8027          Get `stdout` and `stderr` logs from a service.
  8028  
  8029          **Note**: This endpoint works only for services with the `json-file` or `journald` logging drivers.
  8030        operationId: "ServiceLogs"
  8031        produces:
  8032          - "application/vnd.docker.raw-stream"
  8033          - "application/json"
  8034        responses:
  8035          101:
  8036            description: "logs returned as a stream"
  8037            schema:
  8038              type: "string"
  8039              format: "binary"
  8040          200:
  8041            description: "logs returned as a string in response body"
  8042            schema:
  8043              type: "string"
  8044          404:
  8045            description: "no such service"
  8046            schema:
  8047              $ref: "#/definitions/ErrorResponse"
  8048            examples:
  8049              application/json:
  8050                message: "No such service: c2ada9df5af8"
  8051          500:
  8052            description: "server error"
  8053            schema:
  8054              $ref: "#/definitions/ErrorResponse"
  8055          503:
  8056            description: "node is not part of a swarm"
  8057            schema:
  8058              $ref: "#/definitions/ErrorResponse"
  8059        parameters:
  8060          - name: "id"
  8061            in: "path"
  8062            required: true
  8063            description: "ID or name of the service"
  8064            type: "string"
  8065          - name: "details"
  8066            in: "query"
  8067            description: "Show service context and extra details provided to logs."
  8068            type: "boolean"
  8069            default: false
  8070          - name: "follow"
  8071            in: "query"
  8072            description: |
  8073              Return the logs as a stream.
  8074  
  8075              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).
  8076            type: "boolean"
  8077            default: false
  8078          - name: "stdout"
  8079            in: "query"
  8080            description: "Return logs from `stdout`"
  8081            type: "boolean"
  8082            default: false
  8083          - name: "stderr"
  8084            in: "query"
  8085            description: "Return logs from `stderr`"
  8086            type: "boolean"
  8087            default: false
  8088          - name: "since"
  8089            in: "query"
  8090            description: "Only return logs since this time, as a UNIX timestamp"
  8091            type: "integer"
  8092            default: 0
  8093          - name: "timestamps"
  8094            in: "query"
  8095            description: "Add timestamps to every log line"
  8096            type: "boolean"
  8097            default: false
  8098          - name: "tail"
  8099            in: "query"
  8100            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."
  8101            type: "string"
  8102            default: "all"
  8103        tags: ["Service"]
  8104    /tasks:
  8105      get:
  8106        summary: "List tasks"
  8107        operationId: "TaskList"
  8108        produces:
  8109          - "application/json"
  8110        responses:
  8111          200:
  8112            description: "no error"
  8113            schema:
  8114              type: "array"
  8115              items:
  8116                $ref: "#/definitions/Task"
  8117              example:
  8118                - ID: "0kzzo1i0y4jz6027t0k7aezc7"
  8119                  Version:
  8120                    Index: 71
  8121                  CreatedAt: "2016-06-07T21:07:31.171892745Z"
  8122                  UpdatedAt: "2016-06-07T21:07:31.376370513Z"
  8123                  Spec:
  8124                    ContainerSpec:
  8125                      Image: "redis"
  8126                    Resources:
  8127                      Limits: {}
  8128                      Reservations: {}
  8129                    RestartPolicy:
  8130                      Condition: "any"
  8131                      MaxAttempts: 0
  8132                    Placement: {}
  8133                  ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
  8134                  Slot: 1
  8135                  NodeID: "60gvrl6tm78dmak4yl7srz94v"
  8136                  Status:
  8137                    Timestamp: "2016-06-07T21:07:31.290032978Z"
  8138                    State: "running"
  8139                    Message: "started"
  8140                    ContainerStatus:
  8141                      ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035"
  8142                      PID: 677
  8143                  DesiredState: "running"
  8144                  NetworksAttachments:
  8145                    - Network:
  8146                        ID: "4qvuz4ko70xaltuqbt8956gd1"
  8147                        Version:
  8148                          Index: 18
  8149                        CreatedAt: "2016-06-07T20:31:11.912919752Z"
  8150                        UpdatedAt: "2016-06-07T21:07:29.955277358Z"
  8151                        Spec:
  8152                          Name: "ingress"
  8153                          Labels:
  8154                            com.docker.swarm.internal: "true"
  8155                          DriverConfiguration: {}
  8156                          IPAMOptions:
  8157                            Driver: {}
  8158                            Configs:
  8159                              - Subnet: "10.255.0.0/16"
  8160                                Gateway: "10.255.0.1"
  8161                        DriverState:
  8162                          Name: "overlay"
  8163                          Options:
  8164                            com.docker.network.driver.overlay.vxlanid_list: "256"
  8165                        IPAMOptions:
  8166                          Driver:
  8167                            Name: "default"
  8168                          Configs:
  8169                            - Subnet: "10.255.0.0/16"
  8170                              Gateway: "10.255.0.1"
  8171                      Addresses:
  8172                        - "10.255.0.10/16"
  8173                - ID: "1yljwbmlr8er2waf8orvqpwms"
  8174                  Version:
  8175                    Index: 30
  8176                  CreatedAt: "2016-06-07T21:07:30.019104782Z"
  8177                  UpdatedAt: "2016-06-07T21:07:30.231958098Z"
  8178                  Name: "hopeful_cori"
  8179                  Spec:
  8180                    ContainerSpec:
  8181                      Image: "redis"
  8182                    Resources:
  8183                      Limits: {}
  8184                      Reservations: {}
  8185                    RestartPolicy:
  8186                      Condition: "any"
  8187                      MaxAttempts: 0
  8188                    Placement: {}
  8189                  ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
  8190                  Slot: 1
  8191                  NodeID: "60gvrl6tm78dmak4yl7srz94v"
  8192                  Status:
  8193                    Timestamp: "2016-06-07T21:07:30.202183143Z"
  8194                    State: "shutdown"
  8195                    Message: "shutdown"
  8196                    ContainerStatus:
  8197                      ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213"
  8198                  DesiredState: "shutdown"
  8199                  NetworksAttachments:
  8200                    - Network:
  8201                        ID: "4qvuz4ko70xaltuqbt8956gd1"
  8202                        Version:
  8203                          Index: 18
  8204                        CreatedAt: "2016-06-07T20:31:11.912919752Z"
  8205                        UpdatedAt: "2016-06-07T21:07:29.955277358Z"
  8206                        Spec:
  8207                          Name: "ingress"
  8208                          Labels:
  8209                            com.docker.swarm.internal: "true"
  8210                          DriverConfiguration: {}
  8211                          IPAMOptions:
  8212                            Driver: {}
  8213                            Configs:
  8214                              - Subnet: "10.255.0.0/16"
  8215                                Gateway: "10.255.0.1"
  8216                        DriverState:
  8217                          Name: "overlay"
  8218                          Options:
  8219                            com.docker.network.driver.overlay.vxlanid_list: "256"
  8220                        IPAMOptions:
  8221                          Driver:
  8222                            Name: "default"
  8223                          Configs:
  8224                            - Subnet: "10.255.0.0/16"
  8225                              Gateway: "10.255.0.1"
  8226                      Addresses:
  8227                        - "10.255.0.5/16"
  8228          500:
  8229            description: "server error"
  8230            schema:
  8231              $ref: "#/definitions/ErrorResponse"
  8232          503:
  8233            description: "node is not part of a swarm"
  8234            schema:
  8235              $ref: "#/definitions/ErrorResponse"
  8236        parameters:
  8237          - name: "filters"
  8238            in: "query"
  8239            type: "string"
  8240            description: |
  8241              A JSON encoded value of the filters (a `map[string][]string`) to process on the tasks list. Available filters:
  8242  
  8243              - `desired-state=(running | shutdown | accepted)`
  8244              - `id=<task id>`
  8245              - `label=key` or `label="key=value"`
  8246              - `name=<task name>`
  8247              - `node=<node id or name>`
  8248              - `service=<service name>`
  8249        tags: ["Task"]
  8250    /tasks/{id}:
  8251      get:
  8252        summary: "Inspect a task"
  8253        operationId: "TaskInspect"
  8254        produces:
  8255          - "application/json"
  8256        responses:
  8257          200:
  8258            description: "no error"
  8259            schema:
  8260              $ref: "#/definitions/Task"
  8261          404:
  8262            description: "no such task"
  8263            schema:
  8264              $ref: "#/definitions/ErrorResponse"
  8265          500:
  8266            description: "server error"
  8267            schema:
  8268              $ref: "#/definitions/ErrorResponse"
  8269          503:
  8270            description: "node is not part of a swarm"
  8271            schema:
  8272              $ref: "#/definitions/ErrorResponse"
  8273        parameters:
  8274          - name: "id"
  8275            in: "path"
  8276            description: "ID of the task"
  8277            required: true
  8278            type: "string"
  8279        tags: ["Task"]
  8280    /tasks/{id}/logs:
  8281      get:
  8282        summary: "Get task logs"
  8283        description: |
  8284          Get `stdout` and `stderr` logs from a task.
  8285  
  8286          **Note**: This endpoint works only for services with the `json-file` or `journald` logging drivers.
  8287        operationId: "TaskLogs"
  8288        produces:
  8289          - "application/vnd.docker.raw-stream"
  8290          - "application/json"
  8291        responses:
  8292          101:
  8293            description: "logs returned as a stream"
  8294            schema:
  8295              type: "string"
  8296              format: "binary"
  8297          200:
  8298            description: "logs returned as a string in response body"
  8299            schema:
  8300              type: "string"
  8301          404:
  8302            description: "no such task"
  8303            schema:
  8304              $ref: "#/definitions/ErrorResponse"
  8305            examples:
  8306              application/json:
  8307                message: "No such task: c2ada9df5af8"
  8308          500:
  8309            description: "server error"
  8310            schema:
  8311              $ref: "#/definitions/ErrorResponse"
  8312          503:
  8313            description: "node is not part of a swarm"
  8314            schema:
  8315              $ref: "#/definitions/ErrorResponse"
  8316        parameters:
  8317          - name: "id"
  8318            in: "path"
  8319            required: true
  8320            description: "ID of the task"
  8321            type: "string"
  8322          - name: "details"
  8323            in: "query"
  8324            description: "Show task context and extra details provided to logs."
  8325            type: "boolean"
  8326            default: false
  8327          - name: "follow"
  8328            in: "query"
  8329            description: |
  8330              Return the logs as a stream.
  8331  
  8332              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).
  8333            type: "boolean"
  8334            default: false
  8335          - name: "stdout"
  8336            in: "query"
  8337            description: "Return logs from `stdout`"
  8338            type: "boolean"
  8339            default: false
  8340          - name: "stderr"
  8341            in: "query"
  8342            description: "Return logs from `stderr`"
  8343            type: "boolean"
  8344            default: false
  8345          - name: "since"
  8346            in: "query"
  8347            description: "Only return logs since this time, as a UNIX timestamp"
  8348            type: "integer"
  8349            default: 0
  8350          - name: "timestamps"
  8351            in: "query"
  8352            description: "Add timestamps to every log line"
  8353            type: "boolean"
  8354            default: false
  8355          - name: "tail"
  8356            in: "query"
  8357            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."
  8358            type: "string"
  8359            default: "all"
  8360    /secrets:
  8361      get:
  8362        summary: "List secrets"
  8363        operationId: "SecretList"
  8364        produces:
  8365          - "application/json"
  8366        responses:
  8367          200:
  8368            description: "no error"
  8369            schema:
  8370              type: "array"
  8371              items:
  8372                $ref: "#/definitions/Secret"
  8373              example:
  8374                - ID: "ktnbjxoalbkvbvedmg1urrz8h"
  8375                  Version:
  8376                    Index: 11
  8377                  CreatedAt: "2016-11-05T01:20:17.327670065Z"
  8378                  UpdatedAt: "2016-11-05T01:20:17.327670065Z"
  8379                  Spec:
  8380                    Name: "app-dev.crt"
  8381          500:
  8382            description: "server error"
  8383            schema:
  8384              $ref: "#/definitions/ErrorResponse"
  8385          503:
  8386            description: "node is not part of a swarm"
  8387            schema:
  8388              $ref: "#/definitions/ErrorResponse"
  8389        parameters:
  8390          - name: "filters"
  8391            in: "query"
  8392            type: "string"
  8393            description: |
  8394              A JSON encoded value of the filters (a `map[string][]string`) to process on the secrets list. Available filters:
  8395  
  8396              - `id=<secret id>`
  8397              - `label=<key> or label=<key>=value`
  8398              - `name=<secret name>`
  8399              - `names=<secret name>`
  8400        tags: ["Secret"]
  8401    /secrets/create:
  8402      post:
  8403        summary: "Create a secret"
  8404        operationId: "SecretCreate"
  8405        consumes:
  8406          - "application/json"
  8407        produces:
  8408          - "application/json"
  8409        responses:
  8410          201:
  8411            description: "no error"
  8412            schema:
  8413              type: "object"
  8414              properties:
  8415                ID:
  8416                  description: "The ID of the created secret."
  8417                  type: "string"
  8418              example:
  8419                ID: "ktnbjxoalbkvbvedmg1urrz8h"
  8420          409:
  8421            description: "name conflicts with an existing object"
  8422            schema:
  8423              $ref: "#/definitions/ErrorResponse"
  8424          500:
  8425            description: "server error"
  8426            schema:
  8427              $ref: "#/definitions/ErrorResponse"
  8428          503:
  8429            description: "node is not part of a swarm"
  8430            schema:
  8431              $ref: "#/definitions/ErrorResponse"
  8432        parameters:
  8433          - name: "body"
  8434            in: "body"
  8435            schema:
  8436              allOf:
  8437                - $ref: "#/definitions/SecretSpec"
  8438                - type: "object"
  8439                  example:
  8440                    Name: "app-key.crt"
  8441                    Labels:
  8442                      foo: "bar"
  8443                    Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg=="
  8444        tags: ["Secret"]
  8445    /secrets/{id}:
  8446      get:
  8447        summary: "Inspect a secret"
  8448        operationId: "SecretInspect"
  8449        produces:
  8450          - "application/json"
  8451        responses:
  8452          200:
  8453            description: "no error"
  8454            schema:
  8455              $ref: "#/definitions/Secret"
  8456            examples:
  8457              application/json:
  8458                ID: "ktnbjxoalbkvbvedmg1urrz8h"
  8459                Version:
  8460                  Index: 11
  8461                CreatedAt: "2016-11-05T01:20:17.327670065Z"
  8462                UpdatedAt: "2016-11-05T01:20:17.327670065Z"
  8463                Spec:
  8464                  Name: "app-dev.crt"
  8465          404:
  8466            description: "secret not found"
  8467            schema:
  8468              $ref: "#/definitions/ErrorResponse"
  8469          500:
  8470            description: "server error"
  8471            schema:
  8472              $ref: "#/definitions/ErrorResponse"
  8473          503:
  8474            description: "node is not part of a swarm"
  8475            schema:
  8476              $ref: "#/definitions/ErrorResponse"
  8477        parameters:
  8478          - name: "id"
  8479            in: "path"
  8480            required: true
  8481            type: "string"
  8482            description: "ID of the secret"
  8483        tags: ["Secret"]
  8484      delete:
  8485        summary: "Delete a secret"
  8486        operationId: "SecretDelete"
  8487        produces:
  8488          - "application/json"
  8489        responses:
  8490          204:
  8491            description: "no error"
  8492          404:
  8493            description: "secret not found"
  8494            schema:
  8495              $ref: "#/definitions/ErrorResponse"
  8496          500:
  8497            description: "server error"
  8498            schema:
  8499              $ref: "#/definitions/ErrorResponse"
  8500          503:
  8501            description: "node is not part of a swarm"
  8502            schema:
  8503              $ref: "#/definitions/ErrorResponse"
  8504        parameters:
  8505          - name: "id"
  8506            in: "path"
  8507            required: true
  8508            type: "string"
  8509            description: "ID of the secret"
  8510        tags: ["Secret"]
  8511    /secrets/{id}/update:
  8512      post:
  8513        summary: "Update a Secret"
  8514        operationId: "SecretUpdate"
  8515        responses:
  8516          200:
  8517            description: "no error"
  8518          400:
  8519            description: "bad parameter"
  8520            schema:
  8521              $ref: "#/definitions/ErrorResponse"
  8522          404:
  8523            description: "no such secret"
  8524            schema:
  8525              $ref: "#/definitions/ErrorResponse"
  8526          500:
  8527            description: "server error"
  8528            schema:
  8529              $ref: "#/definitions/ErrorResponse"
  8530          503:
  8531            description: "node is not part of a swarm"
  8532            schema:
  8533              $ref: "#/definitions/ErrorResponse"
  8534        parameters:
  8535          - name: "id"
  8536            in: "path"
  8537            description: "The ID or name of the secret"
  8538            type: "string"
  8539            required: true
  8540          - name: "body"
  8541            in: "body"
  8542            schema:
  8543              $ref: "#/definitions/SecretSpec"
  8544            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."
  8545          - name: "version"
  8546            in: "query"
  8547            description: "The version number of the secret object being updated. This is required to avoid conflicting writes."
  8548            type: "integer"
  8549            format: "int64"
  8550            required: true
  8551        tags: ["Secret"]
  8552    /configs:
  8553      get:
  8554        summary: "List configs"
  8555        operationId: "ConfigList"
  8556        produces:
  8557          - "application/json"
  8558        responses:
  8559          200:
  8560            description: "no error"
  8561            schema:
  8562              type: "array"
  8563              items:
  8564                $ref: "#/definitions/Config"
  8565              example:
  8566                - ID: "ktnbjxoalbkvbvedmg1urrz8h"
  8567                  Version:
  8568                    Index: 11
  8569                  CreatedAt: "2016-11-05T01:20:17.327670065Z"
  8570                  UpdatedAt: "2016-11-05T01:20:17.327670065Z"
  8571                  Spec:
  8572                    Name: "server.conf"
  8573          500:
  8574            description: "server error"
  8575            schema:
  8576              $ref: "#/definitions/ErrorResponse"
  8577          503:
  8578            description: "node is not part of a swarm"
  8579            schema:
  8580              $ref: "#/definitions/ErrorResponse"
  8581        parameters:
  8582          - name: "filters"
  8583            in: "query"
  8584            type: "string"
  8585            description: |
  8586              A JSON encoded value of the filters (a `map[string][]string`) to process on the configs list. Available filters:
  8587  
  8588              - `id=<config id>`
  8589              - `label=<key> or label=<key>=value`
  8590              - `name=<config name>`
  8591              - `names=<config name>`
  8592        tags: ["Config"]
  8593    /configs/create:
  8594      post:
  8595        summary: "Create a config"
  8596        operationId: "ConfigCreate"
  8597        consumes:
  8598          - "application/json"
  8599        produces:
  8600          - "application/json"
  8601        responses:
  8602          201:
  8603            description: "no error"
  8604            schema:
  8605              type: "object"
  8606              properties:
  8607                ID:
  8608                  description: "The ID of the created config."
  8609                  type: "string"
  8610              example:
  8611                ID: "ktnbjxoalbkvbvedmg1urrz8h"
  8612          409:
  8613            description: "name conflicts with an existing object"
  8614            schema:
  8615              $ref: "#/definitions/ErrorResponse"
  8616          500:
  8617            description: "server error"
  8618            schema:
  8619              $ref: "#/definitions/ErrorResponse"
  8620          503:
  8621            description: "node is not part of a swarm"
  8622            schema:
  8623              $ref: "#/definitions/ErrorResponse"
  8624        parameters:
  8625          - name: "body"
  8626            in: "body"
  8627            schema:
  8628              allOf:
  8629                - $ref: "#/definitions/ConfigSpec"
  8630                - type: "object"
  8631                  example:
  8632                    Name: "server.conf"
  8633                    Labels:
  8634                      foo: "bar"
  8635                    Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg=="
  8636        tags: ["Config"]
  8637    /configs/{id}:
  8638      get:
  8639        summary: "Inspect a config"
  8640        operationId: "ConfigInspect"
  8641        produces:
  8642          - "application/json"
  8643        responses:
  8644          200:
  8645            description: "no error"
  8646            schema:
  8647              $ref: "#/definitions/Config"
  8648            examples:
  8649              application/json:
  8650                ID: "ktnbjxoalbkvbvedmg1urrz8h"
  8651                Version:
  8652                  Index: 11
  8653                CreatedAt: "2016-11-05T01:20:17.327670065Z"
  8654                UpdatedAt: "2016-11-05T01:20:17.327670065Z"
  8655                Spec:
  8656                  Name: "app-dev.crt"
  8657          404:
  8658            description: "config not found"
  8659            schema:
  8660              $ref: "#/definitions/ErrorResponse"
  8661          500:
  8662            description: "server error"
  8663            schema:
  8664              $ref: "#/definitions/ErrorResponse"
  8665          503:
  8666            description: "node is not part of a swarm"
  8667            schema:
  8668              $ref: "#/definitions/ErrorResponse"
  8669        parameters:
  8670          - name: "id"
  8671            in: "path"
  8672            required: true
  8673            type: "string"
  8674            description: "ID of the config"
  8675        tags: ["Config"]
  8676      delete:
  8677        summary: "Delete a config"
  8678        operationId: "ConfigDelete"
  8679        produces:
  8680          - "application/json"
  8681        responses:
  8682          204:
  8683            description: "no error"
  8684          404:
  8685            description: "config not found"
  8686            schema:
  8687              $ref: "#/definitions/ErrorResponse"
  8688          500:
  8689            description: "server error"
  8690            schema:
  8691              $ref: "#/definitions/ErrorResponse"
  8692          503:
  8693            description: "node is not part of a swarm"
  8694            schema:
  8695              $ref: "#/definitions/ErrorResponse"
  8696        parameters:
  8697          - name: "id"
  8698            in: "path"
  8699            required: true
  8700            type: "string"
  8701            description: "ID of the config"
  8702        tags: ["Config"]
  8703    /configs/{id}/update:
  8704      post:
  8705        summary: "Update a Config"
  8706        operationId: "ConfigUpdate"
  8707        responses:
  8708          200:
  8709            description: "no error"
  8710          400:
  8711            description: "bad parameter"
  8712            schema:
  8713              $ref: "#/definitions/ErrorResponse"
  8714          404:
  8715            description: "no such config"
  8716            schema:
  8717              $ref: "#/definitions/ErrorResponse"
  8718          500:
  8719            description: "server error"
  8720            schema:
  8721              $ref: "#/definitions/ErrorResponse"
  8722          503:
  8723            description: "node is not part of a swarm"
  8724            schema:
  8725              $ref: "#/definitions/ErrorResponse"
  8726        parameters:
  8727          - name: "id"
  8728            in: "path"
  8729            description: "The ID or name of the config"
  8730            type: "string"
  8731            required: true
  8732          - name: "body"
  8733            in: "body"
  8734            schema:
  8735              $ref: "#/definitions/ConfigSpec"
  8736            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."
  8737          - name: "version"
  8738            in: "query"
  8739            description: "The version number of the config object being updated. This is required to avoid conflicting writes."
  8740            type: "integer"
  8741            format: "int64"
  8742            required: true
  8743        tags: ["Config"]
  8744    /distribution/{name}/json:
  8745      get:
  8746        summary: "Get image information from the registry"
  8747        description: "Return image digest and platform information by contacting the registry."
  8748        operationId: "DistributionInspect"
  8749        produces:
  8750          - "application/json"
  8751        responses:
  8752          200:
  8753            description: "descriptor and platform information"
  8754            schema:
  8755              type: "object"
  8756              x-go-name: DistributionInspect
  8757              required: [Descriptor, Platforms]
  8758              properties:
  8759                Descriptor:
  8760                  type: "object"
  8761                  description: "A descriptor struct containing digest, media type, and size"
  8762                  properties:
  8763                    MediaType:
  8764                      type: "string"
  8765                    Size:
  8766                      type: "integer"
  8767                      format: "int64"
  8768                    Digest:
  8769                      type: "string"
  8770                    URLs:
  8771                      type: "array"
  8772                      items:
  8773                        type: "string"
  8774                Platforms:
  8775                  type: "array"
  8776                  description: "An array containing all platforms supported by the image"
  8777                  items:
  8778                    type: "object"
  8779                    properties:
  8780                      Architecture:
  8781                        type: "string"
  8782                      OS:
  8783                        type: "string"
  8784                      OSVersion:
  8785                        type: "string"
  8786                      OSFeatures:
  8787                        type: "array"
  8788                        items:
  8789                          type: "string"
  8790                      Variant:
  8791                        type: "string"
  8792                      Features:
  8793                        type: "array"
  8794                        items:
  8795                          type: "string"
  8796            examples:
  8797              application/json:
  8798                Descriptor:
  8799                  MediaType: "application/vnd.docker.distribution.manifest.v2+json"
  8800                  Digest: "sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96"
  8801                  Size: 3987495
  8802                  URLs:
  8803                    - ""
  8804                Platforms:
  8805                  - Architecture: "amd64"
  8806                    OS: "linux"
  8807                    OSVersion: ""
  8808                    OSFeatures:
  8809                      - ""
  8810                    Variant: ""
  8811                    Features:
  8812                      - ""
  8813          401:
  8814            description: "Failed authentication or no image found"
  8815            schema:
  8816              $ref: "#/definitions/ErrorResponse"
  8817            examples:
  8818              application/json:
  8819                message: "No such image: someimage (tag: latest)"
  8820          500:
  8821            description: "Server error"
  8822            schema:
  8823              $ref: "#/definitions/ErrorResponse"
  8824        parameters:
  8825          - name: "name"
  8826            in: "path"
  8827            description: "Image name or id"
  8828            type: "string"
  8829            required: true
  8830        tags: ["Distribution"]