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