github.com/Prakhar-Agarwal-byte/moby@v0.0.0-20231027092010-a14e3e8ab87e/docs/api/v1.40.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.40"
    23  info:
    24    title: "Docker Engine API"
    25    version: "1.40"
    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
    30      Docker client uses to communicate with the Engine, so everything the Docker
    31      client can do can be done with the API.
    32  
    33      Most of the client's commands map directly to API endpoints (e.g. `docker ps`
    34      is `GET /containers/json`). The notable exception is running containers,
    35      which consists of several API calls.
    36  
    37      # Errors
    38  
    39      The API uses standard HTTP status codes to indicate the success or failure
    40      of the API call. The body of the response will be JSON in the following
    41      format:
    42  
    43      ```
    44      {
    45        "message": "page not found"
    46      }
    47      ```
    48  
    49      # Versioning
    50  
    51      The API is usually changed in each release, so API calls are versioned to
    52      ensure that clients don't break. To lock to a specific version of the API,
    53      you prefix the URL with its version, for example, call `/v1.30/info` to use
    54      the v1.30 version of the `/info` endpoint. If the API version specified in
    55      the URL is not supported by the daemon, a HTTP `400 Bad Request` error message
    56      is returned.
    57  
    58      If you omit the version-prefix, the current version of the API (v1.40) is used.
    59      For example, calling `/info` is the same as calling `/v1.40/info`. Using the
    60      API without a version-prefix is deprecated and will be removed in a future release.
    61  
    62      Engine releases in the near future should support this version of the API,
    63      so your client will continue to work even if it is talking to a newer Engine.
    64  
    65      The API uses an open schema model, which means server may add extra properties
    66      to responses. Likewise, the server will ignore any extra query parameters and
    67      request body properties. When you write clients, you need to ignore additional
    68      properties in responses to ensure they do not break when talking to newer
    69      daemons.
    70  
    71  
    72      # Authentication
    73  
    74      Authentication for registries is handled client side. The client has to send
    75      authentication details to various endpoints that need to communicate with
    76      registries, such as `POST /images/(name)/push`. These are sent as
    77      `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5)
    78      (JSON) string with the following structure:
    79  
    80      ```
    81      {
    82        "username": "string",
    83        "password": "string",
    84        "email": "string",
    85        "serveraddress": "string"
    86      }
    87      ```
    88  
    89      The `serveraddress` is a domain/IP without a protocol. Throughout this
    90      structure, double quotes are required.
    91  
    92      If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth),
    93      you can just pass this instead of credentials:
    94  
    95      ```
    96      {
    97        "identitytoken": "9cbaf023786cd7..."
    98      }
    99      ```
   100  
   101  # The tags on paths define the menu sections in the ReDoc documentation, so
   102  # the usage of tags must make sense for that:
   103  # - They should be singular, not plural.
   104  # - There should not be too many tags, or the menu becomes unwieldy. For
   105  #   example, it is preferable to add a path to the "System" tag instead of
   106  #   creating a tag with a single path in it.
   107  # - The order of tags in this list defines the order in the menu.
   108  tags:
   109    # Primary objects
   110    - name: "Container"
   111      x-displayName: "Containers"
   112      description: |
   113        Create and manage containers.
   114    - name: "Image"
   115      x-displayName: "Images"
   116    - name: "Network"
   117      x-displayName: "Networks"
   118      description: |
   119        Networks are user-defined networks that containers can be attached to.
   120        See the [networking documentation](https://docs.docker.com/network/)
   121        for more information.
   122    - name: "Volume"
   123      x-displayName: "Volumes"
   124      description: |
   125        Create and manage persistent storage that can be attached to containers.
   126    - name: "Exec"
   127      x-displayName: "Exec"
   128      description: |
   129        Run new commands inside running containers. Refer to the
   130        [command-line reference](https://docs.docker.com/engine/reference/commandline/exec/)
   131        for more information.
   132  
   133        To exec a command in a container, you first need to create an exec instance,
   134        then start it. These two API endpoints are wrapped up in a single command-line
   135        command, `docker exec`.
   136  
   137    # Swarm things
   138    - name: "Swarm"
   139      x-displayName: "Swarm"
   140      description: |
   141        Engines can be clustered together in a swarm. Refer to the
   142        [swarm mode documentation](https://docs.docker.com/engine/swarm/)
   143        for more information.
   144    - name: "Node"
   145      x-displayName: "Nodes"
   146      description: |
   147        Nodes are instances of the Engine participating in a swarm. Swarm mode
   148        must be enabled for these endpoints to work.
   149    - name: "Service"
   150      x-displayName: "Services"
   151      description: |
   152        Services are the definitions of tasks to run on a swarm. Swarm mode must
   153        be enabled for these endpoints to work.
   154    - name: "Task"
   155      x-displayName: "Tasks"
   156      description: |
   157        A task is a container running on a swarm. It is the atomic scheduling unit
   158        of swarm. Swarm mode must be enabled for these endpoints to work.
   159    - name: "Secret"
   160      x-displayName: "Secrets"
   161      description: |
   162        Secrets are sensitive data that can be used by services. Swarm mode must
   163        be enabled for these endpoints to work.
   164    - name: "Config"
   165      x-displayName: "Configs"
   166      description: |
   167        Configs are application configurations that can be used by services. Swarm
   168        mode must be enabled for these endpoints to work.
   169    # System things
   170    - name: "Plugin"
   171      x-displayName: "Plugins"
   172    - name: "System"
   173      x-displayName: "System"
   174  
   175  definitions:
   176    Port:
   177      type: "object"
   178      description: "An open port on a container"
   179      required: [PrivatePort, Type]
   180      properties:
   181        IP:
   182          type: "string"
   183          format: "ip-address"
   184          description: "Host IP address that the container's port is mapped to"
   185        PrivatePort:
   186          type: "integer"
   187          format: "uint16"
   188          x-nullable: false
   189          description: "Port on the container"
   190        PublicPort:
   191          type: "integer"
   192          format: "uint16"
   193          description: "Port exposed on the host"
   194        Type:
   195          type: "string"
   196          x-nullable: false
   197          enum: ["tcp", "udp", "sctp"]
   198      example:
   199        PrivatePort: 8080
   200        PublicPort: 80
   201        Type: "tcp"
   202  
   203    MountPoint:
   204      type: "object"
   205      description: |
   206        MountPoint represents a mount point configuration inside the container.
   207        This is used for reporting the mountpoints in use by a container.
   208      properties:
   209        Type:
   210          description: |
   211            The mount type:
   212  
   213            - `bind` a mount of a file or directory from the host into the container.
   214            - `volume` a docker volume with the given `Name`.
   215            - `tmpfs` a `tmpfs`.
   216            - `npipe` a named pipe from the host into the container.
   217          type: "string"
   218          enum:
   219            - "bind"
   220            - "volume"
   221            - "tmpfs"
   222            - "npipe"
   223          example: "volume"
   224        Name:
   225          description: |
   226            Name is the name reference to the underlying data defined by `Source`
   227            e.g., the volume name.
   228          type: "string"
   229          example: "myvolume"
   230        Source:
   231          description: |
   232            Source location of the mount.
   233  
   234            For volumes, this contains the storage location of the volume (within
   235            `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains
   236            the source (host) part of the bind-mount. For `tmpfs` mount points, this
   237            field is empty.
   238          type: "string"
   239          example: "/var/lib/docker/volumes/myvolume/_data"
   240        Destination:
   241          description: |
   242            Destination is the path relative to the container root (`/`) where
   243            the `Source` is mounted inside the container.
   244          type: "string"
   245          example: "/usr/share/nginx/html/"
   246        Driver:
   247          description: |
   248            Driver is the volume driver used to create the volume (if it is a volume).
   249          type: "string"
   250          example: "local"
   251        Mode:
   252          description: |
   253            Mode is a comma separated list of options supplied by the user when
   254            creating the bind/volume mount.
   255  
   256            The default is platform-specific (`"z"` on Linux, empty on Windows).
   257          type: "string"
   258          example: "z"
   259        RW:
   260          description: |
   261            Whether the mount is mounted writable (read-write).
   262          type: "boolean"
   263          example: true
   264        Propagation:
   265          description: |
   266            Propagation describes how mounts are propagated from the host into the
   267            mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)
   268            for details. This field is not used on Windows.
   269          type: "string"
   270          example: ""
   271  
   272    DeviceMapping:
   273      type: "object"
   274      description: "A device mapping between the host and container"
   275      properties:
   276        PathOnHost:
   277          type: "string"
   278        PathInContainer:
   279          type: "string"
   280        CgroupPermissions:
   281          type: "string"
   282      example:
   283        PathOnHost: "/dev/deviceName"
   284        PathInContainer: "/dev/deviceName"
   285        CgroupPermissions: "mrw"
   286  
   287    DeviceRequest:
   288      type: "object"
   289      description: "A request for devices to be sent to device drivers"
   290      properties:
   291        Driver:
   292          type: "string"
   293          example: "nvidia"
   294        Count:
   295          type: "integer"
   296          example: -1
   297        DeviceIDs:
   298          type: "array"
   299          items:
   300            type: "string"
   301          example:
   302            - "0"
   303            - "1"
   304            - "GPU-fef8089b-4820-abfc-e83e-94318197576e"
   305        Capabilities:
   306          description: |
   307            A list of capabilities; an OR list of AND lists of capabilities.
   308          type: "array"
   309          items:
   310            type: "array"
   311            items:
   312              type: "string"
   313          example:
   314            # gpu AND nvidia AND compute
   315            - ["gpu", "nvidia", "compute"]
   316        Options:
   317          description: |
   318            Driver-specific options, specified as a key/value pairs. These options
   319            are passed directly to the driver.
   320          type: "object"
   321          additionalProperties:
   322            type: "string"
   323  
   324    ThrottleDevice:
   325      type: "object"
   326      properties:
   327        Path:
   328          description: "Device path"
   329          type: "string"
   330        Rate:
   331          description: "Rate"
   332          type: "integer"
   333          format: "int64"
   334          minimum: 0
   335  
   336    Mount:
   337      type: "object"
   338      properties:
   339        Target:
   340          description: "Container path."
   341          type: "string"
   342        Source:
   343          description: "Mount source (e.g. a volume name, a host path)."
   344          type: "string"
   345        Type:
   346          description: |
   347            The mount type. Available types:
   348  
   349            - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container.
   350            - `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.
   351            - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs.
   352            - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container.
   353          type: "string"
   354          enum:
   355            - "bind"
   356            - "volume"
   357            - "tmpfs"
   358            - "npipe"
   359        ReadOnly:
   360          description: "Whether the mount should be read-only."
   361          type: "boolean"
   362        Consistency:
   363          description: "The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`."
   364          type: "string"
   365        BindOptions:
   366          description: "Optional configuration for the `bind` type."
   367          type: "object"
   368          properties:
   369            Propagation:
   370              description: "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`."
   371              type: "string"
   372              enum:
   373                - "private"
   374                - "rprivate"
   375                - "shared"
   376                - "rshared"
   377                - "slave"
   378                - "rslave"
   379            NonRecursive:
   380              description: "Disable recursive bind mount."
   381              type: "boolean"
   382              default: false
   383        VolumeOptions:
   384          description: "Optional configuration for the `volume` type."
   385          type: "object"
   386          properties:
   387            NoCopy:
   388              description: "Populate volume with data from the target."
   389              type: "boolean"
   390              default: false
   391            Labels:
   392              description: "User-defined key/value metadata."
   393              type: "object"
   394              additionalProperties:
   395                type: "string"
   396            DriverConfig:
   397              description: "Map of driver specific options"
   398              type: "object"
   399              properties:
   400                Name:
   401                  description: "Name of the driver to use to create the volume."
   402                  type: "string"
   403                Options:
   404                  description: "key/value map of driver specific options."
   405                  type: "object"
   406                  additionalProperties:
   407                    type: "string"
   408        TmpfsOptions:
   409          description: "Optional configuration for the `tmpfs` type."
   410          type: "object"
   411          properties:
   412            SizeBytes:
   413              description: "The size for the tmpfs mount in bytes."
   414              type: "integer"
   415              format: "int64"
   416            Mode:
   417              description: "The permission mode for the tmpfs mount in an integer."
   418              type: "integer"
   419  
   420    RestartPolicy:
   421      description: |
   422        The behavior to apply when the container exits. The default is not to
   423        restart.
   424  
   425        An ever increasing delay (double the previous delay, starting at 100ms) is
   426        added before each restart to prevent flooding the server.
   427      type: "object"
   428      properties:
   429        Name:
   430          type: "string"
   431          description: |
   432            - Empty string means not to restart
   433            - `no` Do not automatically restart
   434            - `always` Always restart
   435            - `unless-stopped` Restart always except when the user has manually stopped the container
   436            - `on-failure` Restart only when the container exit code is non-zero
   437          enum:
   438            - ""
   439            - "no"
   440            - "always"
   441            - "unless-stopped"
   442            - "on-failure"
   443        MaximumRetryCount:
   444          type: "integer"
   445          description: |
   446            If `on-failure` is used, the number of times to retry before giving up.
   447  
   448    Resources:
   449      description: "A container's resources (cgroups config, ulimits, etc)"
   450      type: "object"
   451      properties:
   452        # Applicable to all platforms
   453        CpuShares:
   454          description: |
   455            An integer value representing this container's relative CPU weight
   456            versus other containers.
   457          type: "integer"
   458        Memory:
   459          description: "Memory limit in bytes."
   460          type: "integer"
   461          format: "int64"
   462          default: 0
   463        # Applicable to UNIX platforms
   464        CgroupParent:
   465          description: |
   466            Path to `cgroups` under which the container's `cgroup` is created. If
   467            the path is not absolute, the path is considered to be relative to the
   468            `cgroups` path of the init process. Cgroups are created if they do not
   469            already exist.
   470          type: "string"
   471        BlkioWeight:
   472          description: "Block IO weight (relative weight)."
   473          type: "integer"
   474          minimum: 0
   475          maximum: 1000
   476        BlkioWeightDevice:
   477          description: |
   478            Block IO weight (relative device weight) in the form:
   479  
   480            ```
   481            [{"Path": "device_path", "Weight": weight}]
   482            ```
   483          type: "array"
   484          items:
   485            type: "object"
   486            properties:
   487              Path:
   488                type: "string"
   489              Weight:
   490                type: "integer"
   491                minimum: 0
   492        BlkioDeviceReadBps:
   493          description: |
   494            Limit read rate (bytes per second) from a device, in the form:
   495  
   496            ```
   497            [{"Path": "device_path", "Rate": rate}]
   498            ```
   499          type: "array"
   500          items:
   501            $ref: "#/definitions/ThrottleDevice"
   502        BlkioDeviceWriteBps:
   503          description: |
   504            Limit write rate (bytes per second) to a device, in the form:
   505  
   506            ```
   507            [{"Path": "device_path", "Rate": rate}]
   508            ```
   509          type: "array"
   510          items:
   511            $ref: "#/definitions/ThrottleDevice"
   512        BlkioDeviceReadIOps:
   513          description: |
   514            Limit read rate (IO per second) from a device, in the form:
   515  
   516            ```
   517            [{"Path": "device_path", "Rate": rate}]
   518            ```
   519          type: "array"
   520          items:
   521            $ref: "#/definitions/ThrottleDevice"
   522        BlkioDeviceWriteIOps:
   523          description: |
   524            Limit write rate (IO per second) to a device, in the form:
   525  
   526            ```
   527            [{"Path": "device_path", "Rate": rate}]
   528            ```
   529          type: "array"
   530          items:
   531            $ref: "#/definitions/ThrottleDevice"
   532        CpuPeriod:
   533          description: "The length of a CPU period in microseconds."
   534          type: "integer"
   535          format: "int64"
   536        CpuQuota:
   537          description: |
   538            Microseconds of CPU time that the container can get in a CPU period.
   539          type: "integer"
   540          format: "int64"
   541        CpuRealtimePeriod:
   542          description: |
   543            The length of a CPU real-time period in microseconds. Set to 0 to
   544            allocate no time allocated to real-time tasks.
   545          type: "integer"
   546          format: "int64"
   547        CpuRealtimeRuntime:
   548          description: |
   549            The length of a CPU real-time runtime in microseconds. Set to 0 to
   550            allocate no time allocated to real-time tasks.
   551          type: "integer"
   552          format: "int64"
   553        CpusetCpus:
   554          description: |
   555            CPUs in which to allow execution (e.g., `0-3`, `0,1`).
   556          type: "string"
   557          example: "0-3"
   558        CpusetMems:
   559          description: |
   560            Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only
   561            effective on NUMA systems.
   562          type: "string"
   563        Devices:
   564          description: "A list of devices to add to the container."
   565          type: "array"
   566          items:
   567            $ref: "#/definitions/DeviceMapping"
   568        DeviceCgroupRules:
   569          description: "a list of cgroup rules to apply to the container"
   570          type: "array"
   571          items:
   572            type: "string"
   573            example: "c 13:* rwm"
   574        DeviceRequests:
   575          description: |
   576            A list of requests for devices to be sent to device drivers.
   577          type: "array"
   578          items:
   579            $ref: "#/definitions/DeviceRequest"
   580        KernelMemory:
   581          description: "Kernel memory limit in bytes."
   582          type: "integer"
   583          format: "int64"
   584          example: 209715200
   585        KernelMemoryTCP:
   586          description: "Hard limit for kernel TCP buffer memory (in bytes)."
   587          type: "integer"
   588          format: "int64"
   589        MemoryReservation:
   590          description: "Memory soft limit in bytes."
   591          type: "integer"
   592          format: "int64"
   593        MemorySwap:
   594          description: |
   595            Total memory limit (memory + swap). Set as `-1` to enable unlimited
   596            swap.
   597          type: "integer"
   598          format: "int64"
   599        MemorySwappiness:
   600          description: |
   601            Tune a container's memory swappiness behavior. Accepts an integer
   602            between 0 and 100.
   603          type: "integer"
   604          format: "int64"
   605          minimum: 0
   606          maximum: 100
   607        NanoCpus:
   608          description: "CPU quota in units of 10<sup>-9</sup> CPUs."
   609          type: "integer"
   610          format: "int64"
   611        OomKillDisable:
   612          description: "Disable OOM Killer for the container."
   613          type: "boolean"
   614        Init:
   615          description: |
   616            Run an init inside the container that forwards signals and reaps
   617            processes. This field is omitted if empty, and the default (as
   618            configured on the daemon) is used.
   619          type: "boolean"
   620          x-nullable: true
   621        PidsLimit:
   622          description: |
   623            Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null`
   624            to not change.
   625          type: "integer"
   626          format: "int64"
   627          x-nullable: true
   628        Ulimits:
   629          description: |
   630            A list of resource limits to set in the container. For example:
   631  
   632            ```
   633            {"Name": "nofile", "Soft": 1024, "Hard": 2048}
   634            ```
   635          type: "array"
   636          items:
   637            type: "object"
   638            properties:
   639              Name:
   640                description: "Name of ulimit"
   641                type: "string"
   642              Soft:
   643                description: "Soft limit"
   644                type: "integer"
   645              Hard:
   646                description: "Hard limit"
   647                type: "integer"
   648        # Applicable to Windows
   649        CpuCount:
   650          description: |
   651            The number of usable CPUs (Windows only).
   652  
   653            On Windows Server containers, the processor resource controls are
   654            mutually exclusive. The order of precedence is `CPUCount` first, then
   655            `CPUShares`, and `CPUPercent` last.
   656          type: "integer"
   657          format: "int64"
   658        CpuPercent:
   659          description: |
   660            The usable percentage of the available CPUs (Windows only).
   661  
   662            On Windows Server containers, the processor resource controls are
   663            mutually exclusive. The order of precedence is `CPUCount` first, then
   664            `CPUShares`, and `CPUPercent` last.
   665          type: "integer"
   666          format: "int64"
   667        IOMaximumIOps:
   668          description: "Maximum IOps for the container system drive (Windows only)"
   669          type: "integer"
   670          format: "int64"
   671        IOMaximumBandwidth:
   672          description: |
   673            Maximum IO in bytes per second for the container system drive
   674            (Windows only).
   675          type: "integer"
   676          format: "int64"
   677  
   678    ResourceObject:
   679      description: |
   680        An object describing the resources which can be advertised by a node and
   681        requested by a task.
   682      type: "object"
   683      properties:
   684        NanoCPUs:
   685          type: "integer"
   686          format: "int64"
   687          example: 4000000000
   688        MemoryBytes:
   689          type: "integer"
   690          format: "int64"
   691          example: 8272408576
   692        GenericResources:
   693          $ref: "#/definitions/GenericResources"
   694  
   695    GenericResources:
   696      description: |
   697        User-defined resources can be either Integer resources (e.g, `SSD=3`) or
   698        String resources (e.g, `GPU=UUID1`).
   699      type: "array"
   700      items:
   701        type: "object"
   702        properties:
   703          NamedResourceSpec:
   704            type: "object"
   705            properties:
   706              Kind:
   707                type: "string"
   708              Value:
   709                type: "string"
   710          DiscreteResourceSpec:
   711            type: "object"
   712            properties:
   713              Kind:
   714                type: "string"
   715              Value:
   716                type: "integer"
   717                format: "int64"
   718      example:
   719        - DiscreteResourceSpec:
   720            Kind: "SSD"
   721            Value: 3
   722        - NamedResourceSpec:
   723            Kind: "GPU"
   724            Value: "UUID1"
   725        - NamedResourceSpec:
   726            Kind: "GPU"
   727            Value: "UUID2"
   728  
   729    HealthConfig:
   730      description: "A test to perform to check that the container is healthy."
   731      type: "object"
   732      properties:
   733        Test:
   734          description: |
   735            The test to perform. Possible values are:
   736  
   737            - `[]` inherit healthcheck from image or parent image
   738            - `["NONE"]` disable healthcheck
   739            - `["CMD", args...]` exec arguments directly
   740            - `["CMD-SHELL", command]` run command with system's default shell
   741          type: "array"
   742          items:
   743            type: "string"
   744        Interval:
   745          description: |
   746            The time to wait between checks in nanoseconds. It should be 0 or at
   747            least 1000000 (1 ms). 0 means inherit.
   748          type: "integer"
   749          format: "int64"
   750        Timeout:
   751          description: |
   752            The time to wait before considering the check to have hung. It should
   753            be 0 or at least 1000000 (1 ms). 0 means inherit.
   754          type: "integer"
   755          format: "int64"
   756        Retries:
   757          description: |
   758            The number of consecutive failures needed to consider a container as
   759            unhealthy. 0 means inherit.
   760          type: "integer"
   761        StartPeriod:
   762          description: |
   763            Start period for the container to initialize before starting
   764            health-retries countdown in nanoseconds. It should be 0 or at least
   765            1000000 (1 ms). 0 means inherit.
   766          type: "integer"
   767          format: "int64"
   768  
   769    Health:
   770      description: |
   771        Health stores information about the container's healthcheck results.
   772      type: "object"
   773      x-nullable: true
   774      properties:
   775        Status:
   776          description: |
   777            Status is one of `none`, `starting`, `healthy` or `unhealthy`
   778  
   779            - "none"      Indicates there is no healthcheck
   780            - "starting"  Starting indicates that the container is not yet ready
   781            - "healthy"   Healthy indicates that the container is running correctly
   782            - "unhealthy" Unhealthy indicates that the container has a problem
   783          type: "string"
   784          enum:
   785            - "none"
   786            - "starting"
   787            - "healthy"
   788            - "unhealthy"
   789          example: "healthy"
   790        FailingStreak:
   791          description: "FailingStreak is the number of consecutive failures"
   792          type: "integer"
   793          example: 0
   794        Log:
   795          type: "array"
   796          description: |
   797            Log contains the last few results (oldest first)
   798          items:
   799            $ref: "#/definitions/HealthcheckResult"
   800  
   801    HealthcheckResult:
   802      description: |
   803        HealthcheckResult stores information about a single run of a healthcheck probe
   804      type: "object"
   805      x-nullable: true
   806      properties:
   807        Start:
   808          description: |
   809            Date and time at which this check started in
   810            [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
   811          type: "string"
   812          format: "date-time"
   813          example: "2020-01-04T10:44:24.496525531Z"
   814        End:
   815          description: |
   816            Date and time at which this check ended in
   817            [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
   818          type: "string"
   819          format: "dateTime"
   820          example: "2020-01-04T10:45:21.364524523Z"
   821        ExitCode:
   822          description: |
   823            ExitCode meanings:
   824  
   825            - `0` healthy
   826            - `1` unhealthy
   827            - `2` reserved (considered unhealthy)
   828            - other values: error running probe
   829          type: "integer"
   830          example: 0
   831        Output:
   832          description: "Output from last check"
   833          type: "string"
   834  
   835    HostConfig:
   836      description: "Container configuration that depends on the host we are running on"
   837      allOf:
   838        - $ref: "#/definitions/Resources"
   839        - type: "object"
   840          properties:
   841            # Applicable to all platforms
   842            Binds:
   843              type: "array"
   844              description: |
   845                A list of volume bindings for this container. Each volume binding
   846                is a string in one of these forms:
   847  
   848                - `host-src:container-dest[:options]` to bind-mount a host path
   849                  into the container. Both `host-src`, and `container-dest` must
   850                  be an _absolute_ path.
   851                - `volume-name:container-dest[:options]` to bind-mount a volume
   852                  managed by a volume driver into the container. `container-dest`
   853                  must be an _absolute_ path.
   854  
   855                `options` is an optional, comma-delimited list of:
   856  
   857                - `nocopy` disables automatic copying of data from the container
   858                  path to the volume. The `nocopy` flag only applies to named volumes.
   859                - `[ro|rw]` mounts a volume read-only or read-write, respectively.
   860                  If omitted or set to `rw`, volumes are mounted read-write.
   861                - `[z|Z]` applies SELinux labels to allow or deny multiple containers
   862                  to read and write to the same volume.
   863                    - `z`: a _shared_ content label is applied to the content. This
   864                      label indicates that multiple containers can share the volume
   865                      content, for both reading and writing.
   866                    - `Z`: a _private unshared_ label is applied to the content.
   867                      This label indicates that only the current container can use
   868                      a private volume. Labeling systems such as SELinux require
   869                      proper labels to be placed on volume content that is mounted
   870                      into a container. Without a label, the security system can
   871                      prevent a container's processes from using the content. By
   872                      default, the labels set by the host operating system are not
   873                      modified.
   874                - `[[r]shared|[r]slave|[r]private]` specifies mount
   875                  [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt).
   876                  This only applies to bind-mounted volumes, not internal volumes
   877                  or named volumes. Mount propagation requires the source mount
   878                  point (the location where the source directory is mounted in the
   879                  host operating system) to have the correct propagation properties.
   880                  For shared volumes, the source mount point must be set to `shared`.
   881                  For slave volumes, the mount must be set to either `shared` or
   882                  `slave`.
   883              items:
   884                type: "string"
   885            ContainerIDFile:
   886              type: "string"
   887              description: "Path to a file where the container ID is written"
   888            LogConfig:
   889              type: "object"
   890              description: "The logging configuration for this container"
   891              properties:
   892                Type:
   893                  type: "string"
   894                  enum:
   895                    - "json-file"
   896                    - "syslog"
   897                    - "journald"
   898                    - "gelf"
   899                    - "fluentd"
   900                    - "awslogs"
   901                    - "splunk"
   902                    - "etwlogs"
   903                    - "none"
   904                Config:
   905                  type: "object"
   906                  additionalProperties:
   907                    type: "string"
   908            NetworkMode:
   909              type: "string"
   910              description: |
   911                Network mode to use for this container. Supported standard values
   912                are: `bridge`, `host`, `none`, and `container:<name|id>`. Any
   913                other value is taken as a custom network's name to which this
   914                container should connect to.
   915            PortBindings:
   916              $ref: "#/definitions/PortMap"
   917            RestartPolicy:
   918              $ref: "#/definitions/RestartPolicy"
   919            AutoRemove:
   920              type: "boolean"
   921              description: |
   922                Automatically remove the container when the container's process
   923                exits. This has no effect if `RestartPolicy` is set.
   924            VolumeDriver:
   925              type: "string"
   926              description: "Driver that this container uses to mount volumes."
   927            VolumesFrom:
   928              type: "array"
   929              description: |
   930                A list of volumes to inherit from another container, specified in
   931                the form `<container name>[:<ro|rw>]`.
   932              items:
   933                type: "string"
   934            Mounts:
   935              description: |
   936                Specification for mounts to be added to the container.
   937              type: "array"
   938              items:
   939                $ref: "#/definitions/Mount"
   940  
   941            # Applicable to UNIX platforms
   942            Capabilities:
   943              type: "array"
   944              description: |
   945                A list of kernel capabilities to be available for container (this
   946                overrides the default set).
   947  
   948                Conflicts with options 'CapAdd' and 'CapDrop'"
   949              items:
   950                type: "string"
   951            CapAdd:
   952              type: "array"
   953              description: |
   954                A list of kernel capabilities to add to the container. Conflicts
   955                with option 'Capabilities'.
   956              items:
   957                type: "string"
   958            CapDrop:
   959              type: "array"
   960              description: |
   961                A list of kernel capabilities to drop from the container. Conflicts
   962                with option 'Capabilities'.
   963              items:
   964                type: "string"
   965            Dns:
   966              type: "array"
   967              description: "A list of DNS servers for the container to use."
   968              items:
   969                type: "string"
   970            DnsOptions:
   971              type: "array"
   972              description: "A list of DNS options."
   973              items:
   974                type: "string"
   975            DnsSearch:
   976              type: "array"
   977              description: "A list of DNS search domains."
   978              items:
   979                type: "string"
   980            ExtraHosts:
   981              type: "array"
   982              description: |
   983                A list of hostnames/IP mappings to add to the container's `/etc/hosts`
   984                file. Specified in the form `["hostname:IP"]`.
   985              items:
   986                type: "string"
   987            GroupAdd:
   988              type: "array"
   989              description: |
   990                A list of additional groups that the container process will run as.
   991              items:
   992                type: "string"
   993            IpcMode:
   994              type: "string"
   995              description: |
   996                IPC sharing mode for the container. Possible values are:
   997  
   998                - `"none"`: own private IPC namespace, with /dev/shm not mounted
   999                - `"private"`: own private IPC namespace
  1000                - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers
  1001                - `"container:<name|id>"`: join another (shareable) container's IPC namespace
  1002                - `"host"`: use the host system's IPC namespace
  1003  
  1004                If not specified, daemon default is used, which can either be `"private"`
  1005                or `"shareable"`, depending on daemon version and configuration.
  1006            Cgroup:
  1007              type: "string"
  1008              description: "Cgroup to use for the container."
  1009            Links:
  1010              type: "array"
  1011              description: |
  1012                A list of links for the container in the form `container_name:alias`.
  1013              items:
  1014                type: "string"
  1015            OomScoreAdj:
  1016              type: "integer"
  1017              description: |
  1018                An integer value containing the score given to the container in
  1019                order to tune OOM killer preferences.
  1020              example: 500
  1021            PidMode:
  1022              type: "string"
  1023              description: |
  1024                Set the PID (Process) Namespace mode for the container. It can be
  1025                either:
  1026  
  1027                - `"container:<name|id>"`: joins another container's PID namespace
  1028                - `"host"`: use the host's PID namespace inside the container
  1029            Privileged:
  1030              type: "boolean"
  1031              description: "Gives the container full access to the host."
  1032            PublishAllPorts:
  1033              type: "boolean"
  1034              description: |
  1035                Allocates an ephemeral host port for all of a container's
  1036                exposed ports.
  1037  
  1038                Ports are de-allocated when the container stops and allocated when
  1039                the container starts. The allocated port might be changed when
  1040                restarting the container.
  1041  
  1042                The port is selected from the ephemeral port range that depends on
  1043                the kernel. For example, on Linux the range is defined by
  1044                `/proc/sys/net/ipv4/ip_local_port_range`.
  1045            ReadonlyRootfs:
  1046              type: "boolean"
  1047              description: "Mount the container's root filesystem as read only."
  1048            SecurityOpt:
  1049              type: "array"
  1050              description: |
  1051                A list of string values to customize labels for MLS systems, such
  1052                as SELinux.
  1053              items:
  1054                type: "string"
  1055            StorageOpt:
  1056              type: "object"
  1057              description: |
  1058                Storage driver options for this container, in the form `{"size": "120G"}`.
  1059              additionalProperties:
  1060                type: "string"
  1061            Tmpfs:
  1062              type: "object"
  1063              description: |
  1064                A map of container directories which should be replaced by tmpfs
  1065                mounts, and their corresponding mount options. For example:
  1066  
  1067                ```
  1068                { "/run": "rw,noexec,nosuid,size=65536k" }
  1069                ```
  1070              additionalProperties:
  1071                type: "string"
  1072            UTSMode:
  1073              type: "string"
  1074              description: "UTS namespace to use for the container."
  1075            UsernsMode:
  1076              type: "string"
  1077              description: |
  1078                Sets the usernamespace mode for the container when usernamespace
  1079                remapping option is enabled.
  1080            ShmSize:
  1081              type: "integer"
  1082              format: "int64"
  1083              description: |
  1084                Size of `/dev/shm` in bytes. If omitted, the system uses 64MB.
  1085              minimum: 0
  1086            Sysctls:
  1087              type: "object"
  1088              description: |
  1089                A list of kernel parameters (sysctls) to set in the container.
  1090                For example:
  1091  
  1092                ```
  1093                {"net.ipv4.ip_forward": "1"}
  1094                ```
  1095              additionalProperties:
  1096                type: "string"
  1097            Runtime:
  1098              type: "string"
  1099              description: "Runtime to use with this container."
  1100            # Applicable to Windows
  1101            ConsoleSize:
  1102              type: "array"
  1103              description: |
  1104                Initial console size, as an `[height, width]` array. (Windows only)
  1105              minItems: 2
  1106              maxItems: 2
  1107              items:
  1108                type: "integer"
  1109                minimum: 0
  1110            Isolation:
  1111              type: "string"
  1112              description: |
  1113                Isolation technology of the container. (Windows only)
  1114              enum:
  1115                - "default"
  1116                - "process"
  1117                - "hyperv"
  1118            MaskedPaths:
  1119              type: "array"
  1120              description: |
  1121                The list of paths to be masked inside the container (this overrides
  1122                the default set of paths).
  1123              items:
  1124                type: "string"
  1125            ReadonlyPaths:
  1126              type: "array"
  1127              description: |
  1128                The list of paths to be set as read-only inside the container
  1129                (this overrides the default set of paths).
  1130              items:
  1131                type: "string"
  1132  
  1133    ContainerConfig:
  1134      description: |
  1135        Configuration for a container that is portable between hosts.
  1136  
  1137        When used as `ContainerConfig` field in an image, `ContainerConfig` is an
  1138        optional field containing the configuration of the container that was last
  1139        committed when creating the image.
  1140  
  1141        Previous versions of Docker builder used this field to store build cache,
  1142        and it is not in active use anymore.
  1143      type: "object"
  1144      properties:
  1145        Hostname:
  1146          description: |
  1147            The hostname to use for the container, as a valid RFC 1123 hostname.
  1148          type: "string"
  1149          example: "439f4e91bd1d"
  1150        Domainname:
  1151          description: |
  1152            The domain name to use for the container.
  1153          type: "string"
  1154        User:
  1155          description: "The user that commands are run as inside the container."
  1156          type: "string"
  1157        AttachStdin:
  1158          description: "Whether to attach to `stdin`."
  1159          type: "boolean"
  1160          default: false
  1161        AttachStdout:
  1162          description: "Whether to attach to `stdout`."
  1163          type: "boolean"
  1164          default: true
  1165        AttachStderr:
  1166          description: "Whether to attach to `stderr`."
  1167          type: "boolean"
  1168          default: true
  1169        ExposedPorts:
  1170          description: |
  1171            An object mapping ports to an empty object in the form:
  1172  
  1173            `{"<port>/<tcp|udp|sctp>": {}}`
  1174          type: "object"
  1175          x-nullable: true
  1176          additionalProperties:
  1177            type: "object"
  1178            enum:
  1179              - {}
  1180            default: {}
  1181          example: {
  1182            "80/tcp": {},
  1183            "443/tcp": {}
  1184          }
  1185        Tty:
  1186          description: |
  1187            Attach standard streams to a TTY, including `stdin` if it is not closed.
  1188          type: "boolean"
  1189          default: false
  1190        OpenStdin:
  1191          description: "Open `stdin`"
  1192          type: "boolean"
  1193          default: false
  1194        StdinOnce:
  1195          description: "Close `stdin` after one attached client disconnects"
  1196          type: "boolean"
  1197          default: false
  1198        Env:
  1199          description: |
  1200            A list of environment variables to set inside the container in the
  1201            form `["VAR=value", ...]`. A variable without `=` is removed from the
  1202            environment, rather than to have an empty value.
  1203          type: "array"
  1204          items:
  1205            type: "string"
  1206          example:
  1207            - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  1208        Cmd:
  1209          description: |
  1210            Command to run specified as a string or an array of strings.
  1211          type: "array"
  1212          items:
  1213            type: "string"
  1214          example: ["/bin/sh"]
  1215        Healthcheck:
  1216          $ref: "#/definitions/HealthConfig"
  1217        ArgsEscaped:
  1218          description: "Command is already escaped (Windows only)"
  1219          type: "boolean"
  1220          default: false
  1221          example: false
  1222          x-nullable: true
  1223        Image:
  1224          description: |
  1225            The name (or reference) of the image to use when creating the container,
  1226            or which was used when the container was created.
  1227          type: "string"
  1228          example: "example-image:1.0"
  1229        Volumes:
  1230          description: |
  1231            An object mapping mount point paths inside the container to empty
  1232            objects.
  1233          type: "object"
  1234          additionalProperties:
  1235            type: "object"
  1236            enum:
  1237              - {}
  1238            default: {}
  1239        WorkingDir:
  1240          description: "The working directory for commands to run in."
  1241          type: "string"
  1242          example: "/public/"
  1243        Entrypoint:
  1244          description: |
  1245            The entry point for the container as a string or an array of strings.
  1246  
  1247            If the array consists of exactly one empty string (`[""]`) then the
  1248            entry point is reset to system default (i.e., the entry point used by
  1249            docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`).
  1250          type: "array"
  1251          items:
  1252            type: "string"
  1253          example: []
  1254        NetworkDisabled:
  1255          description: "Disable networking for the container."
  1256          type: "boolean"
  1257          x-nullable: true
  1258        MacAddress:
  1259          description: "MAC address of the container."
  1260          type: "string"
  1261          x-nullable: true
  1262        OnBuild:
  1263          description: |
  1264            `ONBUILD` metadata that were defined in the image's `Dockerfile`.
  1265          type: "array"
  1266          x-nullable: true
  1267          items:
  1268            type: "string"
  1269          example: []
  1270        Labels:
  1271          description: "User-defined key/value metadata."
  1272          type: "object"
  1273          additionalProperties:
  1274            type: "string"
  1275          example:
  1276            com.example.some-label: "some-value"
  1277            com.example.some-other-label: "some-other-value"
  1278        StopSignal:
  1279          description: |
  1280            Signal to stop a container as a string or unsigned integer.
  1281          type: "string"
  1282          example: "SIGTERM"
  1283          x-nullable: true
  1284        StopTimeout:
  1285          description: "Timeout to stop a container in seconds."
  1286          type: "integer"
  1287          default: 10
  1288          x-nullable: true
  1289        Shell:
  1290          description: |
  1291            Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell.
  1292          type: "array"
  1293          x-nullable: true
  1294          items:
  1295            type: "string"
  1296          example: ["/bin/sh", "-c"]
  1297  
  1298    NetworkingConfig:
  1299      description: |
  1300        NetworkingConfig represents the container's networking configuration for
  1301        each of its interfaces.
  1302        It is used for the networking configs specified in the `docker create`
  1303        and `docker network connect` commands.
  1304      type: "object"
  1305      properties:
  1306        EndpointsConfig:
  1307          description: |
  1308            A mapping of network name to endpoint configuration for that network.
  1309          type: "object"
  1310          additionalProperties:
  1311            $ref: "#/definitions/EndpointSettings"
  1312      example:
  1313        # putting an example here, instead of using the example values from
  1314        # /definitions/EndpointSettings, because containers/create currently
  1315        # does not support attaching to multiple networks, so the example request
  1316        # would be confusing if it showed that multiple networks can be contained
  1317        # in the EndpointsConfig.
  1318        # TODO remove once we support multiple networks on container create (see https://github.com/moby/moby/blob/07e6b843594e061f82baa5fa23c2ff7d536c2a05/daemon/create.go#L323)
  1319        EndpointsConfig:
  1320          isolated_nw:
  1321            IPAMConfig:
  1322              IPv4Address: "172.20.30.33"
  1323              IPv6Address: "2001:db8:abcd::3033"
  1324              LinkLocalIPs:
  1325                - "169.254.34.68"
  1326                - "fe80::3468"
  1327            Links:
  1328              - "container_1"
  1329              - "container_2"
  1330            Aliases:
  1331              - "server_x"
  1332              - "server_y"
  1333  
  1334    NetworkSettings:
  1335      description: "NetworkSettings exposes the network settings in the API"
  1336      type: "object"
  1337      properties:
  1338        Bridge:
  1339          description: Name of the network's bridge (for example, `docker0`).
  1340          type: "string"
  1341          example: "docker0"
  1342        SandboxID:
  1343          description: SandboxID uniquely represents a container's network stack.
  1344          type: "string"
  1345          example: "9d12daf2c33f5959c8bf90aa513e4f65b561738661003029ec84830cd503a0c3"
  1346        HairpinMode:
  1347          description: |
  1348            Indicates if hairpin NAT should be enabled on the virtual interface.
  1349          type: "boolean"
  1350          example: false
  1351        LinkLocalIPv6Address:
  1352          description: IPv6 unicast address using the link-local prefix.
  1353          type: "string"
  1354          example: "fe80::42:acff:fe11:1"
  1355        LinkLocalIPv6PrefixLen:
  1356          description: Prefix length of the IPv6 unicast address.
  1357          type: "integer"
  1358          example: "64"
  1359        Ports:
  1360          $ref: "#/definitions/PortMap"
  1361        SandboxKey:
  1362          description: SandboxKey identifies the sandbox
  1363          type: "string"
  1364          example: "/var/run/docker/netns/8ab54b426c38"
  1365  
  1366        # TODO is SecondaryIPAddresses actually used?
  1367        SecondaryIPAddresses:
  1368          description: ""
  1369          type: "array"
  1370          items:
  1371            $ref: "#/definitions/Address"
  1372          x-nullable: true
  1373  
  1374        # TODO is SecondaryIPv6Addresses actually used?
  1375        SecondaryIPv6Addresses:
  1376          description: ""
  1377          type: "array"
  1378          items:
  1379            $ref: "#/definitions/Address"
  1380          x-nullable: true
  1381  
  1382        # TODO properties below are part of DefaultNetworkSettings, which is
  1383        # marked as deprecated since Docker 1.9 and to be removed in Docker v17.12
  1384        EndpointID:
  1385          description: |
  1386            EndpointID uniquely represents a service endpoint in a Sandbox.
  1387  
  1388            <p><br /></p>
  1389  
  1390            > **Deprecated**: This field is only propagated when attached to the
  1391            > default "bridge" network. Use the information from the "bridge"
  1392            > network inside the `Networks` map instead, which contains the same
  1393            > information. This field was deprecated in Docker 1.9 and is scheduled
  1394            > to be removed in Docker 17.12.0
  1395          type: "string"
  1396          example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b"
  1397        Gateway:
  1398          description: |
  1399            Gateway address for the default "bridge" network.
  1400  
  1401            <p><br /></p>
  1402  
  1403            > **Deprecated**: This field is only propagated when attached to the
  1404            > default "bridge" network. Use the information from the "bridge"
  1405            > network inside the `Networks` map instead, which contains the same
  1406            > information. This field was deprecated in Docker 1.9 and is scheduled
  1407            > to be removed in Docker 17.12.0
  1408          type: "string"
  1409          example: "172.17.0.1"
  1410        GlobalIPv6Address:
  1411          description: |
  1412            Global IPv6 address for the default "bridge" network.
  1413  
  1414            <p><br /></p>
  1415  
  1416            > **Deprecated**: This field is only propagated when attached to the
  1417            > default "bridge" network. Use the information from the "bridge"
  1418            > network inside the `Networks` map instead, which contains the same
  1419            > information. This field was deprecated in Docker 1.9 and is scheduled
  1420            > to be removed in Docker 17.12.0
  1421          type: "string"
  1422          example: "2001:db8::5689"
  1423        GlobalIPv6PrefixLen:
  1424          description: |
  1425            Mask length of the global IPv6 address.
  1426  
  1427            <p><br /></p>
  1428  
  1429            > **Deprecated**: This field is only propagated when attached to the
  1430            > default "bridge" network. Use the information from the "bridge"
  1431            > network inside the `Networks` map instead, which contains the same
  1432            > information. This field was deprecated in Docker 1.9 and is scheduled
  1433            > to be removed in Docker 17.12.0
  1434          type: "integer"
  1435          example: 64
  1436        IPAddress:
  1437          description: |
  1438            IPv4 address for the default "bridge" network.
  1439  
  1440            <p><br /></p>
  1441  
  1442            > **Deprecated**: This field is only propagated when attached to the
  1443            > default "bridge" network. Use the information from the "bridge"
  1444            > network inside the `Networks` map instead, which contains the same
  1445            > information. This field was deprecated in Docker 1.9 and is scheduled
  1446            > to be removed in Docker 17.12.0
  1447          type: "string"
  1448          example: "172.17.0.4"
  1449        IPPrefixLen:
  1450          description: |
  1451            Mask length of the IPv4 address.
  1452  
  1453            <p><br /></p>
  1454  
  1455            > **Deprecated**: This field is only propagated when attached to the
  1456            > default "bridge" network. Use the information from the "bridge"
  1457            > network inside the `Networks` map instead, which contains the same
  1458            > information. This field was deprecated in Docker 1.9 and is scheduled
  1459            > to be removed in Docker 17.12.0
  1460          type: "integer"
  1461          example: 16
  1462        IPv6Gateway:
  1463          description: |
  1464            IPv6 gateway address for this network.
  1465  
  1466            <p><br /></p>
  1467  
  1468            > **Deprecated**: This field is only propagated when attached to the
  1469            > default "bridge" network. Use the information from the "bridge"
  1470            > network inside the `Networks` map instead, which contains the same
  1471            > information. This field was deprecated in Docker 1.9 and is scheduled
  1472            > to be removed in Docker 17.12.0
  1473          type: "string"
  1474          example: "2001:db8:2::100"
  1475        MacAddress:
  1476          description: |
  1477            MAC address for the container on the default "bridge" network.
  1478  
  1479            <p><br /></p>
  1480  
  1481            > **Deprecated**: This field is only propagated when attached to the
  1482            > default "bridge" network. Use the information from the "bridge"
  1483            > network inside the `Networks` map instead, which contains the same
  1484            > information. This field was deprecated in Docker 1.9 and is scheduled
  1485            > to be removed in Docker 17.12.0
  1486          type: "string"
  1487          example: "02:42:ac:11:00:04"
  1488        Networks:
  1489          description: |
  1490            Information about all networks that the container is connected to.
  1491          type: "object"
  1492          additionalProperties:
  1493            $ref: "#/definitions/EndpointSettings"
  1494  
  1495    Address:
  1496      description: Address represents an IPv4 or IPv6 IP address.
  1497      type: "object"
  1498      properties:
  1499        Addr:
  1500          description: IP address.
  1501          type: "string"
  1502        PrefixLen:
  1503          description: Mask length of the IP address.
  1504          type: "integer"
  1505  
  1506    PortMap:
  1507      description: |
  1508        PortMap describes the mapping of container ports to host ports, using the
  1509        container's port-number and protocol as key in the format `<port>/<protocol>`,
  1510        for example, `80/udp`.
  1511  
  1512        If a container's port is mapped for multiple protocols, separate entries
  1513        are added to the mapping table.
  1514      type: "object"
  1515      additionalProperties:
  1516        type: "array"
  1517        x-nullable: true
  1518        items:
  1519          $ref: "#/definitions/PortBinding"
  1520      example:
  1521        "443/tcp":
  1522          - HostIp: "127.0.0.1"
  1523            HostPort: "4443"
  1524        "80/tcp":
  1525          - HostIp: "0.0.0.0"
  1526            HostPort: "80"
  1527          - HostIp: "0.0.0.0"
  1528            HostPort: "8080"
  1529        "80/udp":
  1530          - HostIp: "0.0.0.0"
  1531            HostPort: "80"
  1532        "53/udp":
  1533          - HostIp: "0.0.0.0"
  1534            HostPort: "53"
  1535        "2377/tcp": null
  1536  
  1537    PortBinding:
  1538      description: |
  1539        PortBinding represents a binding between a host IP address and a host
  1540        port.
  1541      type: "object"
  1542      properties:
  1543        HostIp:
  1544          description: "Host IP address that the container's port is mapped to."
  1545          type: "string"
  1546          example: "127.0.0.1"
  1547        HostPort:
  1548          description: "Host port number that the container's port is mapped to."
  1549          type: "string"
  1550          example: "4443"
  1551  
  1552    GraphDriverData:
  1553      description: |
  1554        Information about the storage driver used to store the container's and
  1555        image's filesystem.
  1556      type: "object"
  1557      required: [Name, Data]
  1558      properties:
  1559        Name:
  1560          description: "Name of the storage driver."
  1561          type: "string"
  1562          x-nullable: false
  1563          example: "overlay2"
  1564        Data:
  1565          description: |
  1566            Low-level storage metadata, provided as key/value pairs.
  1567  
  1568            This information is driver-specific, and depends on the storage-driver
  1569            in use, and should be used for informational purposes only.
  1570          type: "object"
  1571          x-nullable: false
  1572          additionalProperties:
  1573            type: "string"
  1574          example: {
  1575            "MergedDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/merged",
  1576            "UpperDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/diff",
  1577            "WorkDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/work"
  1578          }
  1579  
  1580    ImageInspect:
  1581      description: |
  1582        Information about an image in the local image cache.
  1583      type: "object"
  1584      properties:
  1585        Id:
  1586          description: |
  1587            ID is the content-addressable ID of an image.
  1588  
  1589            This identifier is a content-addressable digest calculated from the
  1590            image's configuration (which includes the digests of layers used by
  1591            the image).
  1592  
  1593            Note that this digest differs from the `RepoDigests` below, which
  1594            holds digests of image manifests that reference the image.
  1595          type: "string"
  1596          x-nullable: false
  1597          example: "sha256:ec3f0931a6e6b6855d76b2d7b0be30e81860baccd891b2e243280bf1cd8ad710"
  1598        RepoTags:
  1599          description: |
  1600            List of image names/tags in the local image cache that reference this
  1601            image.
  1602  
  1603            Multiple image tags can refer to the same image, and this list may be
  1604            empty if no tags reference the image, in which case the image is
  1605            "untagged", in which case it can still be referenced by its ID.
  1606          type: "array"
  1607          items:
  1608            type: "string"
  1609          example:
  1610            - "example:1.0"
  1611            - "example:latest"
  1612            - "example:stable"
  1613            - "internal.registry.example.com:5000/example:1.0"
  1614        RepoDigests:
  1615          description: |
  1616            List of content-addressable digests of locally available image manifests
  1617            that the image is referenced from. Multiple manifests can refer to the
  1618            same image.
  1619  
  1620            These digests are usually only available if the image was either pulled
  1621            from a registry, or if the image was pushed to a registry, which is when
  1622            the manifest is generated and its digest calculated.
  1623          type: "array"
  1624          items:
  1625            type: "string"
  1626          example:
  1627            - "example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb"
  1628            - "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578"
  1629        Parent:
  1630          description: |
  1631            ID of the parent image.
  1632  
  1633            Depending on how the image was created, this field may be empty and
  1634            is only set for images that were built/created locally. This field
  1635            is empty if the image was pulled from an image registry.
  1636          type: "string"
  1637          x-nullable: false
  1638          example: ""
  1639        Comment:
  1640          description: |
  1641            Optional message that was set when committing or importing the image.
  1642          type: "string"
  1643          x-nullable: false
  1644          example: ""
  1645        Created:
  1646          description: |
  1647            Date and time at which the image was created, formatted in
  1648            [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
  1649          type: "string"
  1650          x-nullable: false
  1651          example: "2022-02-04T21:20:12.497794809Z"
  1652        Container:
  1653          description: |
  1654            The ID of the container that was used to create the image.
  1655  
  1656            Depending on how the image was created, this field may be empty.
  1657          type: "string"
  1658          x-nullable: false
  1659          example: "65974bc86f1770ae4bff79f651ebdbce166ae9aada632ee3fa9af3a264911735"
  1660        ContainerConfig:
  1661          $ref: "#/definitions/ContainerConfig"
  1662        DockerVersion:
  1663          description: |
  1664            The version of Docker that was used to build the image.
  1665  
  1666            Depending on how the image was created, this field may be empty.
  1667          type: "string"
  1668          x-nullable: false
  1669          example: "20.10.7"
  1670        Author:
  1671          description: |
  1672            Name of the author that was specified when committing the image, or as
  1673            specified through MAINTAINER (deprecated) in the Dockerfile.
  1674          type: "string"
  1675          x-nullable: false
  1676          example: ""
  1677        Config:
  1678          $ref: "#/definitions/ContainerConfig"
  1679        Architecture:
  1680          description: |
  1681            Hardware CPU architecture that the image runs on.
  1682          type: "string"
  1683          x-nullable: false
  1684          example: "arm"
  1685        Variant:
  1686          description: |
  1687            CPU architecture variant (presently ARM-only).
  1688          type: "string"
  1689          x-nullable: true
  1690          example: "v7"
  1691        Os:
  1692          description: |
  1693            Operating System the image is built to run on.
  1694          type: "string"
  1695          x-nullable: false
  1696          example: "linux"
  1697        OsVersion:
  1698          description: |
  1699            Operating System version the image is built to run on (especially
  1700            for Windows).
  1701          type: "string"
  1702          example: ""
  1703          x-nullable: true
  1704        Size:
  1705          description: |
  1706            Total size of the image including all layers it is composed of.
  1707          type: "integer"
  1708          format: "int64"
  1709          x-nullable: false
  1710          example: 1239828
  1711        VirtualSize:
  1712          description: |
  1713            Total size of the image including all layers it is composed of.
  1714  
  1715            In versions of Docker before v1.10, this field was calculated from
  1716            the image itself and all of its parent images. Docker v1.10 and up
  1717            store images self-contained, and no longer use a parent-chain, making
  1718            this field an equivalent of the Size field.
  1719  
  1720            This field is kept for backward compatibility, but may be removed in
  1721            a future version of the API.
  1722          type: "integer"
  1723          format: "int64"
  1724          x-nullable: false
  1725          example: 1239828
  1726        GraphDriver:
  1727          $ref: "#/definitions/GraphDriverData"
  1728        RootFS:
  1729          description: |
  1730            Information about the image's RootFS, including the layer IDs.
  1731          type: "object"
  1732          required: [Type]
  1733          properties:
  1734            Type:
  1735              type: "string"
  1736              x-nullable: false
  1737              example: "layers"
  1738            Layers:
  1739              type: "array"
  1740              items:
  1741                type: "string"
  1742              example:
  1743                - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6"
  1744                - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"
  1745        Metadata:
  1746          description: |
  1747            Additional metadata of the image in the local cache. This information
  1748            is local to the daemon, and not part of the image itself.
  1749          type: "object"
  1750          properties:
  1751            LastTagTime:
  1752              description: |
  1753                Date and time at which the image was last tagged in
  1754                [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
  1755  
  1756                This information is only available if the image was tagged locally,
  1757                and omitted otherwise.
  1758              type: "string"
  1759              format: "dateTime"
  1760              example: "2022-02-28T14:40:02.623929178Z"
  1761              x-nullable: true
  1762    ImageSummary:
  1763      type: "object"
  1764      required:
  1765        - Id
  1766        - ParentId
  1767        - RepoTags
  1768        - RepoDigests
  1769        - Created
  1770        - Size
  1771        - SharedSize
  1772        - VirtualSize
  1773        - Labels
  1774        - Containers
  1775      properties:
  1776        Id:
  1777          description: |
  1778            ID is the content-addressable ID of an image.
  1779  
  1780            This identifier is a content-addressable digest calculated from the
  1781            image's configuration (which includes the digests of layers used by
  1782            the image).
  1783  
  1784            Note that this digest differs from the `RepoDigests` below, which
  1785            holds digests of image manifests that reference the image.
  1786          type: "string"
  1787          x-nullable: false
  1788          example: "sha256:ec3f0931a6e6b6855d76b2d7b0be30e81860baccd891b2e243280bf1cd8ad710"
  1789        ParentId:
  1790          description: |
  1791            ID of the parent image.
  1792  
  1793            Depending on how the image was created, this field may be empty and
  1794            is only set for images that were built/created locally. This field
  1795            is empty if the image was pulled from an image registry.
  1796          type: "string"
  1797          x-nullable: false
  1798          example: ""
  1799        RepoTags:
  1800          description: |
  1801            List of image names/tags in the local image cache that reference this
  1802            image.
  1803  
  1804            Multiple image tags can refer to the same image, and this list may be
  1805            empty if no tags reference the image, in which case the image is
  1806            "untagged", in which case it can still be referenced by its ID.
  1807          type: "array"
  1808          x-nullable: false
  1809          items:
  1810            type: "string"
  1811          example:
  1812            - "example:1.0"
  1813            - "example:latest"
  1814            - "example:stable"
  1815            - "internal.registry.example.com:5000/example:1.0"
  1816        RepoDigests:
  1817          description: |
  1818            List of content-addressable digests of locally available image manifests
  1819            that the image is referenced from. Multiple manifests can refer to the
  1820            same image.
  1821  
  1822            These digests are usually only available if the image was either pulled
  1823            from a registry, or if the image was pushed to a registry, which is when
  1824            the manifest is generated and its digest calculated.
  1825          type: "array"
  1826          x-nullable: false
  1827          items:
  1828            type: "string"
  1829          example:
  1830            - "example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb"
  1831            - "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578"
  1832        Created:
  1833          description: |
  1834            Date and time at which the image was created as a Unix timestamp
  1835            (number of seconds sinds EPOCH).
  1836          type: "integer"
  1837          x-nullable: false
  1838          example: "1644009612"
  1839        Size:
  1840          description: |
  1841            Total size of the image including all layers it is composed of.
  1842          type: "integer"
  1843          format: "int64"
  1844          x-nullable: false
  1845          example: 172064416
  1846        SharedSize:
  1847          description: |
  1848            Total size of image layers that are shared between this image and other
  1849            images.
  1850  
  1851            This size is not calculated by default. `-1` indicates that the value
  1852            has not been set / calculated.
  1853          type: "integer"
  1854          format: "int64"
  1855          x-nullable: false
  1856          example: 1239828
  1857        VirtualSize:
  1858          description: |
  1859            Total size of the image including all layers it is composed of.
  1860  
  1861            In versions of Docker before v1.10, this field was calculated from
  1862            the image itself and all of its parent images. Docker v1.10 and up
  1863            store images self-contained, and no longer use a parent-chain, making
  1864            this field an equivalent of the Size field.
  1865  
  1866            This field is kept for backward compatibility, but may be removed in
  1867            a future version of the API.
  1868          type: "integer"
  1869          format: "int64"
  1870          x-nullable: false
  1871          example: 172064416
  1872        Labels:
  1873          description: "User-defined key/value metadata."
  1874          type: "object"
  1875          x-nullable: false
  1876          additionalProperties:
  1877            type: "string"
  1878          example:
  1879            com.example.some-label: "some-value"
  1880            com.example.some-other-label: "some-other-value"
  1881        Containers:
  1882          description: |
  1883            Number of containers using this image. Includes both stopped and running
  1884            containers.
  1885  
  1886            This size is not calculated by default, and depends on which API endpoint
  1887            is used. `-1` indicates that the value has not been set / calculated.
  1888          x-nullable: false
  1889          type: "integer"
  1890          example: 2
  1891  
  1892    AuthConfig:
  1893      type: "object"
  1894      properties:
  1895        username:
  1896          type: "string"
  1897        password:
  1898          type: "string"
  1899        email:
  1900          type: "string"
  1901        serveraddress:
  1902          type: "string"
  1903      example:
  1904        username: "hannibal"
  1905        password: "xxxx"
  1906        serveraddress: "https://index.docker.io/v1/"
  1907  
  1908    ProcessConfig:
  1909      type: "object"
  1910      properties:
  1911        privileged:
  1912          type: "boolean"
  1913        user:
  1914          type: "string"
  1915        tty:
  1916          type: "boolean"
  1917        entrypoint:
  1918          type: "string"
  1919        arguments:
  1920          type: "array"
  1921          items:
  1922            type: "string"
  1923  
  1924    Volume:
  1925      type: "object"
  1926      required: [Name, Driver, Mountpoint, Labels, Scope, Options]
  1927      properties:
  1928        Name:
  1929          type: "string"
  1930          description: "Name of the volume."
  1931          x-nullable: false
  1932          example: "tardis"
  1933        Driver:
  1934          type: "string"
  1935          description: "Name of the volume driver used by the volume."
  1936          x-nullable: false
  1937          example: "custom"
  1938        Mountpoint:
  1939          type: "string"
  1940          description: "Mount path of the volume on the host."
  1941          x-nullable: false
  1942          example: "/var/lib/docker/volumes/tardis"
  1943        CreatedAt:
  1944          type: "string"
  1945          format: "dateTime"
  1946          description: "Date/Time the volume was created."
  1947          example: "2016-06-07T20:31:11.853781916Z"
  1948        Status:
  1949          type: "object"
  1950          description: |
  1951            Low-level details about the volume, provided by the volume driver.
  1952            Details are returned as a map with key/value pairs:
  1953            `{"key":"value","key2":"value2"}`.
  1954  
  1955            The `Status` field is optional, and is omitted if the volume driver
  1956            does not support this feature.
  1957          additionalProperties:
  1958            type: "object"
  1959          example:
  1960            hello: "world"
  1961        Labels:
  1962          type: "object"
  1963          description: "User-defined key/value metadata."
  1964          x-nullable: false
  1965          additionalProperties:
  1966            type: "string"
  1967          example:
  1968            com.example.some-label: "some-value"
  1969            com.example.some-other-label: "some-other-value"
  1970        Scope:
  1971          type: "string"
  1972          description: |
  1973            The level at which the volume exists. Either `global` for cluster-wide,
  1974            or `local` for machine level.
  1975          default: "local"
  1976          x-nullable: false
  1977          enum: ["local", "global"]
  1978          example: "local"
  1979        Options:
  1980          type: "object"
  1981          description: |
  1982            The driver specific options used when creating the volume.
  1983          additionalProperties:
  1984            type: "string"
  1985          example:
  1986            device: "tmpfs"
  1987            o: "size=100m,uid=1000"
  1988            type: "tmpfs"
  1989        UsageData:
  1990          type: "object"
  1991          x-nullable: true
  1992          required: [Size, RefCount]
  1993          description: |
  1994            Usage details about the volume. This information is used by the
  1995            `GET /system/df` endpoint, and omitted in other endpoints.
  1996          properties:
  1997            Size:
  1998              type: "integer"
  1999              format: "int64"
  2000              default: -1
  2001              description: |
  2002                Amount of disk space used by the volume (in bytes). This information
  2003                is only available for volumes created with the `"local"` volume
  2004                driver. For volumes created with other volume drivers, this field
  2005                is set to `-1` ("not available")
  2006              x-nullable: false
  2007            RefCount:
  2008              type: "integer"
  2009              format: "int64"
  2010              default: -1
  2011              description: |
  2012                The number of containers referencing this volume. This field
  2013                is set to `-1` if the reference-count is not available.
  2014              x-nullable: false
  2015  
  2016    VolumeCreateOptions:
  2017      description: "Volume configuration"
  2018      type: "object"
  2019      title: "VolumeConfig"
  2020      x-go-name: "VolumeCreateBody"
  2021      properties:
  2022        Name:
  2023          description: |
  2024            The new volume's name. If not specified, Docker generates a name.
  2025          type: "string"
  2026          x-nullable: false
  2027          example: "tardis"
  2028        Driver:
  2029          description: "Name of the volume driver to use."
  2030          type: "string"
  2031          default: "local"
  2032          x-nullable: false
  2033          example: "custom"
  2034        DriverOpts:
  2035          description: |
  2036            A mapping of driver options and values. These options are
  2037            passed directly to the driver and are driver specific.
  2038          type: "object"
  2039          additionalProperties:
  2040            type: "string"
  2041          example:
  2042            device: "tmpfs"
  2043            o: "size=100m,uid=1000"
  2044            type: "tmpfs"
  2045        Labels:
  2046          description: "User-defined key/value metadata."
  2047          type: "object"
  2048          additionalProperties:
  2049            type: "string"
  2050          example:
  2051            com.example.some-label: "some-value"
  2052            com.example.some-other-label: "some-other-value"
  2053  
  2054    VolumeListResponse:
  2055      type: "object"
  2056      title: "VolumeListResponse"
  2057      x-go-name: "VolumeListOKBody"
  2058      description: "Volume list response"
  2059      properties:
  2060        Volumes:
  2061          type: "array"
  2062          description: "List of volumes"
  2063          items:
  2064            $ref: "#/definitions/Volume"
  2065        Warnings:
  2066          type: "array"
  2067          description: |
  2068            Warnings that occurred when fetching the list of volumes.
  2069          items:
  2070            type: "string"
  2071          example: []
  2072  
  2073    Network:
  2074      type: "object"
  2075      properties:
  2076        Name:
  2077          type: "string"
  2078        Id:
  2079          type: "string"
  2080        Created:
  2081          type: "string"
  2082          format: "dateTime"
  2083        Scope:
  2084          type: "string"
  2085        Driver:
  2086          type: "string"
  2087        EnableIPv6:
  2088          type: "boolean"
  2089        IPAM:
  2090          $ref: "#/definitions/IPAM"
  2091        Internal:
  2092          type: "boolean"
  2093        Attachable:
  2094          type: "boolean"
  2095        Ingress:
  2096          type: "boolean"
  2097        Containers:
  2098          type: "object"
  2099          additionalProperties:
  2100            $ref: "#/definitions/NetworkContainer"
  2101        Options:
  2102          type: "object"
  2103          additionalProperties:
  2104            type: "string"
  2105        Labels:
  2106          type: "object"
  2107          additionalProperties:
  2108            type: "string"
  2109      example:
  2110        Name: "net01"
  2111        Id: "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99"
  2112        Created: "2016-10-19T04:33:30.360899459Z"
  2113        Scope: "local"
  2114        Driver: "bridge"
  2115        EnableIPv6: false
  2116        IPAM:
  2117          Driver: "default"
  2118          Config:
  2119            - Subnet: "172.19.0.0/16"
  2120              Gateway: "172.19.0.1"
  2121          Options:
  2122            foo: "bar"
  2123        Internal: false
  2124        Attachable: false
  2125        Ingress: false
  2126        Containers:
  2127          19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c:
  2128            Name: "test"
  2129            EndpointID: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a"
  2130            MacAddress: "02:42:ac:13:00:02"
  2131            IPv4Address: "172.19.0.2/16"
  2132            IPv6Address: ""
  2133        Options:
  2134          com.docker.network.bridge.default_bridge: "true"
  2135          com.docker.network.bridge.enable_icc: "true"
  2136          com.docker.network.bridge.enable_ip_masquerade: "true"
  2137          com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
  2138          com.docker.network.bridge.name: "docker0"
  2139          com.docker.network.driver.mtu: "1500"
  2140        Labels:
  2141          com.example.some-label: "some-value"
  2142          com.example.some-other-label: "some-other-value"
  2143    IPAM:
  2144      type: "object"
  2145      properties:
  2146        Driver:
  2147          description: "Name of the IPAM driver to use."
  2148          type: "string"
  2149          default: "default"
  2150        Config:
  2151          description: |
  2152            List of IPAM configuration options, specified as a map:
  2153  
  2154            ```
  2155            {"Subnet": <CIDR>, "IPRange": <CIDR>, "Gateway": <IP address>, "AuxAddress": <device_name:IP address>}
  2156            ```
  2157          type: "array"
  2158          items:
  2159            type: "object"
  2160            additionalProperties:
  2161              type: "string"
  2162        Options:
  2163          description: "Driver-specific options, specified as a map."
  2164          type: "object"
  2165          additionalProperties:
  2166            type: "string"
  2167  
  2168    NetworkContainer:
  2169      type: "object"
  2170      properties:
  2171        Name:
  2172          type: "string"
  2173        EndpointID:
  2174          type: "string"
  2175        MacAddress:
  2176          type: "string"
  2177        IPv4Address:
  2178          type: "string"
  2179        IPv6Address:
  2180          type: "string"
  2181  
  2182    BuildInfo:
  2183      type: "object"
  2184      properties:
  2185        id:
  2186          type: "string"
  2187        stream:
  2188          type: "string"
  2189        error:
  2190          type: "string"
  2191        errorDetail:
  2192          $ref: "#/definitions/ErrorDetail"
  2193        status:
  2194          type: "string"
  2195        progress:
  2196          type: "string"
  2197        progressDetail:
  2198          $ref: "#/definitions/ProgressDetail"
  2199        aux:
  2200          $ref: "#/definitions/ImageID"
  2201  
  2202    BuildCache:
  2203      type: "object"
  2204      description: |
  2205        BuildCache contains information about a build cache record.
  2206      properties:
  2207        ID:
  2208          type: "string"
  2209          description: |
  2210            Unique ID of the build cache record.
  2211          example: "ndlpt0hhvkqcdfkputsk4cq9c"
  2212        Parent:
  2213          description: |
  2214            ID of the parent build cache record.
  2215          type: "string"
  2216          example: "hw53o5aio51xtltp5xjp8v7fx"
  2217        Type:
  2218          type: "string"
  2219          description: |
  2220            Cache record type.
  2221          example: "regular"
  2222          # see https://github.com/moby/buildkit/blob/fce4a32258dc9d9664f71a4831d5de10f0670677/client/diskusage.go#L75-L84
  2223          enum:
  2224            - "internal"
  2225            - "frontend"
  2226            - "source.local"
  2227            - "source.git.checkout"
  2228            - "exec.cachemount"
  2229            - "regular"
  2230        Description:
  2231          type: "string"
  2232          description: |
  2233            Description of the build-step that produced the build cache.
  2234          example: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache"
  2235        InUse:
  2236          type: "boolean"
  2237          description: |
  2238            Indicates if the build cache is in use.
  2239          example: false
  2240        Shared:
  2241          type: "boolean"
  2242          description: |
  2243            Indicates if the build cache is shared.
  2244          example: true
  2245        Size:
  2246          description: |
  2247            Amount of disk space used by the build cache (in bytes).
  2248          type: "integer"
  2249          example: 51
  2250        CreatedAt:
  2251          description: |
  2252            Date and time at which the build cache was created in
  2253            [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
  2254          type: "string"
  2255          format: "dateTime"
  2256          example: "2016-08-18T10:44:24.496525531Z"
  2257        LastUsedAt:
  2258          description: |
  2259            Date and time at which the build cache was last used in
  2260            [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
  2261          type: "string"
  2262          format: "dateTime"
  2263          x-nullable: true
  2264          example: "2017-08-09T07:09:37.632105588Z"
  2265        UsageCount:
  2266          type: "integer"
  2267          example: 26
  2268  
  2269    ImageID:
  2270      type: "object"
  2271      description: "Image ID or Digest"
  2272      properties:
  2273        ID:
  2274          type: "string"
  2275      example:
  2276        ID: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c"
  2277  
  2278    CreateImageInfo:
  2279      type: "object"
  2280      properties:
  2281        id:
  2282          type: "string"
  2283        error:
  2284          type: "string"
  2285        errorDetail:
  2286          $ref: "#/definitions/ErrorDetail"
  2287        status:
  2288          type: "string"
  2289        progress:
  2290          type: "string"
  2291        progressDetail:
  2292          $ref: "#/definitions/ProgressDetail"
  2293  
  2294    PushImageInfo:
  2295      type: "object"
  2296      properties:
  2297        error:
  2298          type: "string"
  2299        status:
  2300          type: "string"
  2301        progress:
  2302          type: "string"
  2303        progressDetail:
  2304          $ref: "#/definitions/ProgressDetail"
  2305  
  2306    ErrorDetail:
  2307      type: "object"
  2308      properties:
  2309        code:
  2310          type: "integer"
  2311        message:
  2312          type: "string"
  2313  
  2314    ProgressDetail:
  2315      type: "object"
  2316      properties:
  2317        current:
  2318          type: "integer"
  2319        total:
  2320          type: "integer"
  2321  
  2322    ErrorResponse:
  2323      description: "Represents an error."
  2324      type: "object"
  2325      required: ["message"]
  2326      properties:
  2327        message:
  2328          description: "The error message."
  2329          type: "string"
  2330          x-nullable: false
  2331      example:
  2332        message: "Something went wrong."
  2333  
  2334    IdResponse:
  2335      description: "Response to an API call that returns just an Id"
  2336      type: "object"
  2337      required: ["Id"]
  2338      properties:
  2339        Id:
  2340          description: "The id of the newly created object."
  2341          type: "string"
  2342          x-nullable: false
  2343  
  2344    EndpointSettings:
  2345      description: "Configuration for a network endpoint."
  2346      type: "object"
  2347      properties:
  2348        # Configurations
  2349        IPAMConfig:
  2350          $ref: "#/definitions/EndpointIPAMConfig"
  2351        Links:
  2352          type: "array"
  2353          items:
  2354            type: "string"
  2355          example:
  2356            - "container_1"
  2357            - "container_2"
  2358        Aliases:
  2359          type: "array"
  2360          items:
  2361            type: "string"
  2362          example:
  2363            - "server_x"
  2364            - "server_y"
  2365  
  2366        # Operational data
  2367        NetworkID:
  2368          description: |
  2369            Unique ID of the network.
  2370          type: "string"
  2371          example: "08754567f1f40222263eab4102e1c733ae697e8e354aa9cd6e18d7402835292a"
  2372        EndpointID:
  2373          description: |
  2374            Unique ID for the service endpoint in a Sandbox.
  2375          type: "string"
  2376          example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b"
  2377        Gateway:
  2378          description: |
  2379            Gateway address for this network.
  2380          type: "string"
  2381          example: "172.17.0.1"
  2382        IPAddress:
  2383          description: |
  2384            IPv4 address.
  2385          type: "string"
  2386          example: "172.17.0.4"
  2387        IPPrefixLen:
  2388          description: |
  2389            Mask length of the IPv4 address.
  2390          type: "integer"
  2391          example: 16
  2392        IPv6Gateway:
  2393          description: |
  2394            IPv6 gateway address.
  2395          type: "string"
  2396          example: "2001:db8:2::100"
  2397        GlobalIPv6Address:
  2398          description: |
  2399            Global IPv6 address.
  2400          type: "string"
  2401          example: "2001:db8::5689"
  2402        GlobalIPv6PrefixLen:
  2403          description: |
  2404            Mask length of the global IPv6 address.
  2405          type: "integer"
  2406          format: "int64"
  2407          example: 64
  2408        MacAddress:
  2409          description: |
  2410            MAC address for the endpoint on this network.
  2411          type: "string"
  2412          example: "02:42:ac:11:00:04"
  2413        DriverOpts:
  2414          description: |
  2415            DriverOpts is a mapping of driver options and values. These options
  2416            are passed directly to the driver and are driver specific.
  2417          type: "object"
  2418          x-nullable: true
  2419          additionalProperties:
  2420            type: "string"
  2421          example:
  2422            com.example.some-label: "some-value"
  2423            com.example.some-other-label: "some-other-value"
  2424  
  2425    EndpointIPAMConfig:
  2426      description: |
  2427        EndpointIPAMConfig represents an endpoint's IPAM configuration.
  2428      type: "object"
  2429      x-nullable: true
  2430      properties:
  2431        IPv4Address:
  2432          type: "string"
  2433          example: "172.20.30.33"
  2434        IPv6Address:
  2435          type: "string"
  2436          example: "2001:db8:abcd::3033"
  2437        LinkLocalIPs:
  2438          type: "array"
  2439          items:
  2440            type: "string"
  2441          example:
  2442            - "169.254.34.68"
  2443            - "fe80::3468"
  2444  
  2445    PluginMount:
  2446      type: "object"
  2447      x-nullable: false
  2448      required: [Name, Description, Settable, Source, Destination, Type, Options]
  2449      properties:
  2450        Name:
  2451          type: "string"
  2452          x-nullable: false
  2453          example: "some-mount"
  2454        Description:
  2455          type: "string"
  2456          x-nullable: false
  2457          example: "This is a mount that's used by the plugin."
  2458        Settable:
  2459          type: "array"
  2460          items:
  2461            type: "string"
  2462        Source:
  2463          type: "string"
  2464          example: "/var/lib/docker/plugins/"
  2465        Destination:
  2466          type: "string"
  2467          x-nullable: false
  2468          example: "/mnt/state"
  2469        Type:
  2470          type: "string"
  2471          x-nullable: false
  2472          example: "bind"
  2473        Options:
  2474          type: "array"
  2475          items:
  2476            type: "string"
  2477          example:
  2478            - "rbind"
  2479            - "rw"
  2480  
  2481    PluginDevice:
  2482      type: "object"
  2483      required: [Name, Description, Settable, Path]
  2484      x-nullable: false
  2485      properties:
  2486        Name:
  2487          type: "string"
  2488          x-nullable: false
  2489        Description:
  2490          type: "string"
  2491          x-nullable: false
  2492        Settable:
  2493          type: "array"
  2494          items:
  2495            type: "string"
  2496        Path:
  2497          type: "string"
  2498          example: "/dev/fuse"
  2499  
  2500    PluginEnv:
  2501      type: "object"
  2502      x-nullable: false
  2503      required: [Name, Description, Settable, Value]
  2504      properties:
  2505        Name:
  2506          x-nullable: false
  2507          type: "string"
  2508        Description:
  2509          x-nullable: false
  2510          type: "string"
  2511        Settable:
  2512          type: "array"
  2513          items:
  2514            type: "string"
  2515        Value:
  2516          type: "string"
  2517  
  2518    PluginInterfaceType:
  2519      type: "object"
  2520      x-nullable: false
  2521      required: [Prefix, Capability, Version]
  2522      properties:
  2523        Prefix:
  2524          type: "string"
  2525          x-nullable: false
  2526        Capability:
  2527          type: "string"
  2528          x-nullable: false
  2529        Version:
  2530          type: "string"
  2531          x-nullable: false
  2532  
  2533    PluginPrivilege:
  2534      description: |
  2535        Describes a permission the user has to accept upon installing
  2536        the plugin.
  2537      type: "object"
  2538      x-go-name: "PluginPrivilege"
  2539      properties:
  2540        Name:
  2541          type: "string"
  2542          example: "network"
  2543        Description:
  2544          type: "string"
  2545        Value:
  2546          type: "array"
  2547          items:
  2548            type: "string"
  2549          example:
  2550            - "host"
  2551  
  2552    Plugin:
  2553      description: "A plugin for the Engine API"
  2554      type: "object"
  2555      required: [Settings, Enabled, Config, Name]
  2556      properties:
  2557        Id:
  2558          type: "string"
  2559          example: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078"
  2560        Name:
  2561          type: "string"
  2562          x-nullable: false
  2563          example: "tiborvass/sample-volume-plugin"
  2564        Enabled:
  2565          description:
  2566            True if the plugin is running. False if the plugin is not running,
  2567            only installed.
  2568          type: "boolean"
  2569          x-nullable: false
  2570          example: true
  2571        Settings:
  2572          description: "Settings that can be modified by users."
  2573          type: "object"
  2574          x-nullable: false
  2575          required: [Args, Devices, Env, Mounts]
  2576          properties:
  2577            Mounts:
  2578              type: "array"
  2579              items:
  2580                $ref: "#/definitions/PluginMount"
  2581            Env:
  2582              type: "array"
  2583              items:
  2584                type: "string"
  2585              example:
  2586                - "DEBUG=0"
  2587            Args:
  2588              type: "array"
  2589              items:
  2590                type: "string"
  2591            Devices:
  2592              type: "array"
  2593              items:
  2594                $ref: "#/definitions/PluginDevice"
  2595        PluginReference:
  2596          description: "plugin remote reference used to push/pull the plugin"
  2597          type: "string"
  2598          x-nullable: false
  2599          example: "localhost:5000/tiborvass/sample-volume-plugin:latest"
  2600        Config:
  2601          description: "The config of a plugin."
  2602          type: "object"
  2603          x-nullable: false
  2604          required:
  2605            - Description
  2606            - Documentation
  2607            - Interface
  2608            - Entrypoint
  2609            - WorkDir
  2610            - Network
  2611            - Linux
  2612            - PidHost
  2613            - PropagatedMount
  2614            - IpcHost
  2615            - Mounts
  2616            - Env
  2617            - Args
  2618          properties:
  2619            DockerVersion:
  2620              description: "Docker Version used to create the plugin"
  2621              type: "string"
  2622              x-nullable: false
  2623              example: "17.06.0-ce"
  2624            Description:
  2625              type: "string"
  2626              x-nullable: false
  2627              example: "A sample volume plugin for Docker"
  2628            Documentation:
  2629              type: "string"
  2630              x-nullable: false
  2631              example: "https://docs.docker.com/engine/extend/plugins/"
  2632            Interface:
  2633              description: "The interface between Docker and the plugin"
  2634              x-nullable: false
  2635              type: "object"
  2636              required: [Types, Socket]
  2637              properties:
  2638                Types:
  2639                  type: "array"
  2640                  items:
  2641                    $ref: "#/definitions/PluginInterfaceType"
  2642                  example:
  2643                    - "docker.volumedriver/1.0"
  2644                Socket:
  2645                  type: "string"
  2646                  x-nullable: false
  2647                  example: "plugins.sock"
  2648                ProtocolScheme:
  2649                  type: "string"
  2650                  example: "some.protocol/v1.0"
  2651                  description: "Protocol to use for clients connecting to the plugin."
  2652                  enum:
  2653                    - ""
  2654                    - "moby.plugins.http/v1"
  2655            Entrypoint:
  2656              type: "array"
  2657              items:
  2658                type: "string"
  2659              example:
  2660                - "/usr/bin/sample-volume-plugin"
  2661                - "/data"
  2662            WorkDir:
  2663              type: "string"
  2664              x-nullable: false
  2665              example: "/bin/"
  2666            User:
  2667              type: "object"
  2668              x-nullable: false
  2669              properties:
  2670                UID:
  2671                  type: "integer"
  2672                  format: "uint32"
  2673                  example: 1000
  2674                GID:
  2675                  type: "integer"
  2676                  format: "uint32"
  2677                  example: 1000
  2678            Network:
  2679              type: "object"
  2680              x-nullable: false
  2681              required: [Type]
  2682              properties:
  2683                Type:
  2684                  x-nullable: false
  2685                  type: "string"
  2686                  example: "host"
  2687            Linux:
  2688              type: "object"
  2689              x-nullable: false
  2690              required: [Capabilities, AllowAllDevices, Devices]
  2691              properties:
  2692                Capabilities:
  2693                  type: "array"
  2694                  items:
  2695                    type: "string"
  2696                  example:
  2697                    - "CAP_SYS_ADMIN"
  2698                    - "CAP_SYSLOG"
  2699                AllowAllDevices:
  2700                  type: "boolean"
  2701                  x-nullable: false
  2702                  example: false
  2703                Devices:
  2704                  type: "array"
  2705                  items:
  2706                    $ref: "#/definitions/PluginDevice"
  2707            PropagatedMount:
  2708              type: "string"
  2709              x-nullable: false
  2710              example: "/mnt/volumes"
  2711            IpcHost:
  2712              type: "boolean"
  2713              x-nullable: false
  2714              example: false
  2715            PidHost:
  2716              type: "boolean"
  2717              x-nullable: false
  2718              example: false
  2719            Mounts:
  2720              type: "array"
  2721              items:
  2722                $ref: "#/definitions/PluginMount"
  2723            Env:
  2724              type: "array"
  2725              items:
  2726                $ref: "#/definitions/PluginEnv"
  2727              example:
  2728                - Name: "DEBUG"
  2729                  Description: "If set, prints debug messages"
  2730                  Settable: null
  2731                  Value: "0"
  2732            Args:
  2733              type: "object"
  2734              x-nullable: false
  2735              required: [Name, Description, Settable, Value]
  2736              properties:
  2737                Name:
  2738                  x-nullable: false
  2739                  type: "string"
  2740                  example: "args"
  2741                Description:
  2742                  x-nullable: false
  2743                  type: "string"
  2744                  example: "command line arguments"
  2745                Settable:
  2746                  type: "array"
  2747                  items:
  2748                    type: "string"
  2749                Value:
  2750                  type: "array"
  2751                  items:
  2752                    type: "string"
  2753            rootfs:
  2754              type: "object"
  2755              properties:
  2756                type:
  2757                  type: "string"
  2758                  example: "layers"
  2759                diff_ids:
  2760                  type: "array"
  2761                  items:
  2762                    type: "string"
  2763                  example:
  2764                    - "sha256:675532206fbf3030b8458f88d6e26d4eb1577688a25efec97154c94e8b6b4887"
  2765                    - "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8"
  2766  
  2767    ObjectVersion:
  2768      description: |
  2769        The version number of the object such as node, service, etc. This is needed
  2770        to avoid conflicting writes. The client must send the version number along
  2771        with the modified specification when updating these objects.
  2772  
  2773        This approach ensures safe concurrency and determinism in that the change
  2774        on the object may not be applied if the version number has changed from the
  2775        last read. In other words, if two update requests specify the same base
  2776        version, only one of the requests can succeed. As a result, two separate
  2777        update requests that happen at the same time will not unintentionally
  2778        overwrite each other.
  2779      type: "object"
  2780      properties:
  2781        Index:
  2782          type: "integer"
  2783          format: "uint64"
  2784          example: 373531
  2785  
  2786    NodeSpec:
  2787      type: "object"
  2788      properties:
  2789        Name:
  2790          description: "Name for the node."
  2791          type: "string"
  2792          example: "my-node"
  2793        Labels:
  2794          description: "User-defined key/value metadata."
  2795          type: "object"
  2796          additionalProperties:
  2797            type: "string"
  2798        Role:
  2799          description: "Role of the node."
  2800          type: "string"
  2801          enum:
  2802            - "worker"
  2803            - "manager"
  2804          example: "manager"
  2805        Availability:
  2806          description: "Availability of the node."
  2807          type: "string"
  2808          enum:
  2809            - "active"
  2810            - "pause"
  2811            - "drain"
  2812          example: "active"
  2813      example:
  2814        Availability: "active"
  2815        Name: "node-name"
  2816        Role: "manager"
  2817        Labels:
  2818          foo: "bar"
  2819  
  2820    Node:
  2821      type: "object"
  2822      properties:
  2823        ID:
  2824          type: "string"
  2825          example: "24ifsmvkjbyhk"
  2826        Version:
  2827          $ref: "#/definitions/ObjectVersion"
  2828        CreatedAt:
  2829          description: |
  2830            Date and time at which the node was added to the swarm in
  2831            [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
  2832          type: "string"
  2833          format: "dateTime"
  2834          example: "2016-08-18T10:44:24.496525531Z"
  2835        UpdatedAt:
  2836          description: |
  2837            Date and time at which the node was last updated in
  2838            [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
  2839          type: "string"
  2840          format: "dateTime"
  2841          example: "2017-08-09T07:09:37.632105588Z"
  2842        Spec:
  2843          $ref: "#/definitions/NodeSpec"
  2844        Description:
  2845          $ref: "#/definitions/NodeDescription"
  2846        Status:
  2847          $ref: "#/definitions/NodeStatus"
  2848        ManagerStatus:
  2849          $ref: "#/definitions/ManagerStatus"
  2850  
  2851    NodeDescription:
  2852      description: |
  2853        NodeDescription encapsulates the properties of the Node as reported by the
  2854        agent.
  2855      type: "object"
  2856      properties:
  2857        Hostname:
  2858          type: "string"
  2859          example: "bf3067039e47"
  2860        Platform:
  2861          $ref: "#/definitions/Platform"
  2862        Resources:
  2863          $ref: "#/definitions/ResourceObject"
  2864        Engine:
  2865          $ref: "#/definitions/EngineDescription"
  2866        TLSInfo:
  2867          $ref: "#/definitions/TLSInfo"
  2868  
  2869    Platform:
  2870      description: |
  2871        Platform represents the platform (Arch/OS).
  2872      type: "object"
  2873      properties:
  2874        Architecture:
  2875          description: |
  2876            Architecture represents the hardware architecture (for example,
  2877            `x86_64`).
  2878          type: "string"
  2879          example: "x86_64"
  2880        OS:
  2881          description: |
  2882            OS represents the Operating System (for example, `linux` or `windows`).
  2883          type: "string"
  2884          example: "linux"
  2885  
  2886    EngineDescription:
  2887      description: "EngineDescription provides information about an engine."
  2888      type: "object"
  2889      properties:
  2890        EngineVersion:
  2891          type: "string"
  2892          example: "17.06.0"
  2893        Labels:
  2894          type: "object"
  2895          additionalProperties:
  2896            type: "string"
  2897          example:
  2898            foo: "bar"
  2899        Plugins:
  2900          type: "array"
  2901          items:
  2902            type: "object"
  2903            properties:
  2904              Type:
  2905                type: "string"
  2906              Name:
  2907                type: "string"
  2908          example:
  2909            - Type: "Log"
  2910              Name: "awslogs"
  2911            - Type: "Log"
  2912              Name: "fluentd"
  2913            - Type: "Log"
  2914              Name: "gcplogs"
  2915            - Type: "Log"
  2916              Name: "gelf"
  2917            - Type: "Log"
  2918              Name: "journald"
  2919            - Type: "Log"
  2920              Name: "json-file"
  2921            - Type: "Log"
  2922              Name: "logentries"
  2923            - Type: "Log"
  2924              Name: "splunk"
  2925            - Type: "Log"
  2926              Name: "syslog"
  2927            - Type: "Network"
  2928              Name: "bridge"
  2929            - Type: "Network"
  2930              Name: "host"
  2931            - Type: "Network"
  2932              Name: "ipvlan"
  2933            - Type: "Network"
  2934              Name: "macvlan"
  2935            - Type: "Network"
  2936              Name: "null"
  2937            - Type: "Network"
  2938              Name: "overlay"
  2939            - Type: "Volume"
  2940              Name: "local"
  2941            - Type: "Volume"
  2942              Name: "localhost:5000/vieux/sshfs:latest"
  2943            - Type: "Volume"
  2944              Name: "vieux/sshfs:latest"
  2945  
  2946    TLSInfo:
  2947      description: |
  2948        Information about the issuer of leaf TLS certificates and the trusted root
  2949        CA certificate.
  2950      type: "object"
  2951      properties:
  2952        TrustRoot:
  2953          description: |
  2954            The root CA certificate(s) that are used to validate leaf TLS
  2955            certificates.
  2956          type: "string"
  2957        CertIssuerSubject:
  2958          description:
  2959            The base64-url-safe-encoded raw subject bytes of the issuer.
  2960          type: "string"
  2961        CertIssuerPublicKey:
  2962          description: |
  2963            The base64-url-safe-encoded raw public key bytes of the issuer.
  2964          type: "string"
  2965      example:
  2966        TrustRoot: |
  2967          -----BEGIN CERTIFICATE-----
  2968          MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw
  2969          EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0
  2970          MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH
  2971          A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf
  2972          3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB
  2973          Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO
  2974          PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz
  2975          pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H
  2976          -----END CERTIFICATE-----
  2977        CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh"
  2978        CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A=="
  2979  
  2980    NodeStatus:
  2981      description: |
  2982        NodeStatus represents the status of a node.
  2983  
  2984        It provides the current status of the node, as seen by the manager.
  2985      type: "object"
  2986      properties:
  2987        State:
  2988          $ref: "#/definitions/NodeState"
  2989        Message:
  2990          type: "string"
  2991          example: ""
  2992        Addr:
  2993          description: "IP address of the node."
  2994          type: "string"
  2995          example: "172.17.0.2"
  2996  
  2997    NodeState:
  2998      description: "NodeState represents the state of a node."
  2999      type: "string"
  3000      enum:
  3001        - "unknown"
  3002        - "down"
  3003        - "ready"
  3004        - "disconnected"
  3005      example: "ready"
  3006  
  3007    ManagerStatus:
  3008      description: |
  3009        ManagerStatus represents the status of a manager.
  3010  
  3011        It provides the current status of a node's manager component, if the node
  3012        is a manager.
  3013      x-nullable: true
  3014      type: "object"
  3015      properties:
  3016        Leader:
  3017          type: "boolean"
  3018          default: false
  3019          example: true
  3020        Reachability:
  3021          $ref: "#/definitions/Reachability"
  3022        Addr:
  3023          description: |
  3024            The IP address and port at which the manager is reachable.
  3025          type: "string"
  3026          example: "10.0.0.46:2377"
  3027  
  3028    Reachability:
  3029      description: "Reachability represents the reachability of a node."
  3030      type: "string"
  3031      enum:
  3032        - "unknown"
  3033        - "unreachable"
  3034        - "reachable"
  3035      example: "reachable"
  3036  
  3037    SwarmSpec:
  3038      description: "User modifiable swarm configuration."
  3039      type: "object"
  3040      properties:
  3041        Name:
  3042          description: "Name of the swarm."
  3043          type: "string"
  3044          example: "default"
  3045        Labels:
  3046          description: "User-defined key/value metadata."
  3047          type: "object"
  3048          additionalProperties:
  3049            type: "string"
  3050          example:
  3051            com.example.corp.type: "production"
  3052            com.example.corp.department: "engineering"
  3053        Orchestration:
  3054          description: "Orchestration configuration."
  3055          type: "object"
  3056          x-nullable: true
  3057          properties:
  3058            TaskHistoryRetentionLimit:
  3059              description: |
  3060                The number of historic tasks to keep per instance or node. If
  3061                negative, never remove completed or failed tasks.
  3062              type: "integer"
  3063              format: "int64"
  3064              example: 10
  3065        Raft:
  3066          description: "Raft configuration."
  3067          type: "object"
  3068          properties:
  3069            SnapshotInterval:
  3070              description: "The number of log entries between snapshots."
  3071              type: "integer"
  3072              format: "uint64"
  3073              example: 10000
  3074            KeepOldSnapshots:
  3075              description: |
  3076                The number of snapshots to keep beyond the current snapshot.
  3077              type: "integer"
  3078              format: "uint64"
  3079            LogEntriesForSlowFollowers:
  3080              description: |
  3081                The number of log entries to keep around to sync up slow followers
  3082                after a snapshot is created.
  3083              type: "integer"
  3084              format: "uint64"
  3085              example: 500
  3086            ElectionTick:
  3087              description: |
  3088                The number of ticks that a follower will wait for a message from
  3089                the leader before becoming a candidate and starting an election.
  3090                `ElectionTick` must be greater than `HeartbeatTick`.
  3091  
  3092                A tick currently defaults to one second, so these translate
  3093                directly to seconds currently, but this is NOT guaranteed.
  3094              type: "integer"
  3095              example: 3
  3096            HeartbeatTick:
  3097              description: |
  3098                The number of ticks between heartbeats. Every HeartbeatTick ticks,
  3099                the leader will send a heartbeat to the followers.
  3100  
  3101                A tick currently defaults to one second, so these translate
  3102                directly to seconds currently, but this is NOT guaranteed.
  3103              type: "integer"
  3104              example: 1
  3105        Dispatcher:
  3106          description: "Dispatcher configuration."
  3107          type: "object"
  3108          x-nullable: true
  3109          properties:
  3110            HeartbeatPeriod:
  3111              description: |
  3112                The delay for an agent to send a heartbeat to the dispatcher.
  3113              type: "integer"
  3114              format: "int64"
  3115              example: 5000000000
  3116        CAConfig:
  3117          description: "CA configuration."
  3118          type: "object"
  3119          x-nullable: true
  3120          properties:
  3121            NodeCertExpiry:
  3122              description: "The duration node certificates are issued for."
  3123              type: "integer"
  3124              format: "int64"
  3125              example: 7776000000000000
  3126            ExternalCAs:
  3127              description: |
  3128                Configuration for forwarding signing requests to an external
  3129                certificate authority.
  3130              type: "array"
  3131              items:
  3132                type: "object"
  3133                properties:
  3134                  Protocol:
  3135                    description: |
  3136                      Protocol for communication with the external CA (currently
  3137                      only `cfssl` is supported).
  3138                    type: "string"
  3139                    enum:
  3140                      - "cfssl"
  3141                    default: "cfssl"
  3142                  URL:
  3143                    description: |
  3144                      URL where certificate signing requests should be sent.
  3145                    type: "string"
  3146                  Options:
  3147                    description: |
  3148                      An object with key/value pairs that are interpreted as
  3149                      protocol-specific options for the external CA driver.
  3150                    type: "object"
  3151                    additionalProperties:
  3152                      type: "string"
  3153                  CACert:
  3154                    description: |
  3155                      The root CA certificate (in PEM format) this external CA uses
  3156                      to issue TLS certificates (assumed to be to the current swarm
  3157                      root CA certificate if not provided).
  3158                    type: "string"
  3159            SigningCACert:
  3160              description: |
  3161                The desired signing CA certificate for all swarm node TLS leaf
  3162                certificates, in PEM format.
  3163              type: "string"
  3164            SigningCAKey:
  3165              description: |
  3166                The desired signing CA key for all swarm node TLS leaf certificates,
  3167                in PEM format.
  3168              type: "string"
  3169            ForceRotate:
  3170              description: |
  3171                An integer whose purpose is to force swarm to generate a new
  3172                signing CA certificate and key, if none have been specified in
  3173                `SigningCACert` and `SigningCAKey`
  3174              format: "uint64"
  3175              type: "integer"
  3176        EncryptionConfig:
  3177          description: "Parameters related to encryption-at-rest."
  3178          type: "object"
  3179          properties:
  3180            AutoLockManagers:
  3181              description: |
  3182                If set, generate a key and use it to lock data stored on the
  3183                managers.
  3184              type: "boolean"
  3185              example: false
  3186        TaskDefaults:
  3187          description: "Defaults for creating tasks in this cluster."
  3188          type: "object"
  3189          properties:
  3190            LogDriver:
  3191              description: |
  3192                The log driver to use for tasks created in the orchestrator if
  3193                unspecified by a service.
  3194  
  3195                Updating this value only affects new tasks. Existing tasks continue
  3196                to use their previously configured log driver until recreated.
  3197              type: "object"
  3198              properties:
  3199                Name:
  3200                  description: |
  3201                    The log driver to use as a default for new tasks.
  3202                  type: "string"
  3203                  example: "json-file"
  3204                Options:
  3205                  description: |
  3206                    Driver-specific options for the selectd log driver, specified
  3207                    as key/value pairs.
  3208                  type: "object"
  3209                  additionalProperties:
  3210                    type: "string"
  3211                  example:
  3212                    "max-file": "10"
  3213                    "max-size": "100m"
  3214  
  3215    # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but
  3216    # without `JoinTokens`.
  3217    ClusterInfo:
  3218      description: |
  3219        ClusterInfo represents information about the swarm as is returned by the
  3220        "/info" endpoint. Join-tokens are not included.
  3221      x-nullable: true
  3222      type: "object"
  3223      properties:
  3224        ID:
  3225          description: "The ID of the swarm."
  3226          type: "string"
  3227          example: "abajmipo7b4xz5ip2nrla6b11"
  3228        Version:
  3229          $ref: "#/definitions/ObjectVersion"
  3230        CreatedAt:
  3231          description: |
  3232            Date and time at which the swarm was initialised in
  3233            [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
  3234          type: "string"
  3235          format: "dateTime"
  3236          example: "2016-08-18T10:44:24.496525531Z"
  3237        UpdatedAt:
  3238          description: |
  3239            Date and time at which the swarm was last updated in
  3240            [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
  3241          type: "string"
  3242          format: "dateTime"
  3243          example: "2017-08-09T07:09:37.632105588Z"
  3244        Spec:
  3245          $ref: "#/definitions/SwarmSpec"
  3246        TLSInfo:
  3247          $ref: "#/definitions/TLSInfo"
  3248        RootRotationInProgress:
  3249          description: |
  3250            Whether there is currently a root CA rotation in progress for the swarm
  3251          type: "boolean"
  3252          example: false
  3253        DataPathPort:
  3254          description: |
  3255            DataPathPort specifies the data path port number for data traffic.
  3256            Acceptable port range is 1024 to 49151.
  3257            If no port is set or is set to 0, the default port (4789) is used.
  3258          type: "integer"
  3259          format: "uint32"
  3260          default: 4789
  3261          example: 4789
  3262        DefaultAddrPool:
  3263          description: |
  3264            Default Address Pool specifies default subnet pools for global scope
  3265            networks.
  3266          type: "array"
  3267          items:
  3268            type: "string"
  3269            format: "CIDR"
  3270            example: ["10.10.0.0/16", "20.20.0.0/16"]
  3271        SubnetSize:
  3272          description: |
  3273            SubnetSize specifies the subnet size of the networks created from the
  3274            default subnet pool.
  3275          type: "integer"
  3276          format: "uint32"
  3277          maximum: 29
  3278          default: 24
  3279          example: 24
  3280  
  3281    JoinTokens:
  3282      description: |
  3283        JoinTokens contains the tokens workers and managers need to join the swarm.
  3284      type: "object"
  3285      properties:
  3286        Worker:
  3287          description: |
  3288            The token workers can use to join the swarm.
  3289          type: "string"
  3290          example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx"
  3291        Manager:
  3292          description: |
  3293            The token managers can use to join the swarm.
  3294          type: "string"
  3295          example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2"
  3296  
  3297    Swarm:
  3298      type: "object"
  3299      allOf:
  3300        - $ref: "#/definitions/ClusterInfo"
  3301        - type: "object"
  3302          properties:
  3303            JoinTokens:
  3304              $ref: "#/definitions/JoinTokens"
  3305  
  3306    TaskSpec:
  3307      description: "User modifiable task configuration."
  3308      type: "object"
  3309      properties:
  3310        PluginSpec:
  3311          type: "object"
  3312          description: |
  3313            Plugin spec for the service.  *(Experimental release only.)*
  3314  
  3315            <p><br /></p>
  3316  
  3317            > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
  3318            > mutually exclusive. PluginSpec is only used when the Runtime field
  3319            > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime
  3320            > field is set to `attachment`.
  3321          properties:
  3322            Name:
  3323              description: "The name or 'alias' to use for the plugin."
  3324              type: "string"
  3325            Remote:
  3326              description: "The plugin image reference to use."
  3327              type: "string"
  3328            Disabled:
  3329              description: "Disable the plugin once scheduled."
  3330              type: "boolean"
  3331            PluginPrivilege:
  3332              type: "array"
  3333              items:
  3334                $ref: "#/definitions/PluginPrivilege"
  3335        ContainerSpec:
  3336          type: "object"
  3337          description: |
  3338            Container spec for the service.
  3339  
  3340            <p><br /></p>
  3341  
  3342            > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
  3343            > mutually exclusive. PluginSpec is only used when the Runtime field
  3344            > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime
  3345            > field is set to `attachment`.
  3346          properties:
  3347            Image:
  3348              description: "The image name to use for the container"
  3349              type: "string"
  3350            Labels:
  3351              description: "User-defined key/value data."
  3352              type: "object"
  3353              additionalProperties:
  3354                type: "string"
  3355            Command:
  3356              description: "The command to be run in the image."
  3357              type: "array"
  3358              items:
  3359                type: "string"
  3360            Args:
  3361              description: "Arguments to the command."
  3362              type: "array"
  3363              items:
  3364                type: "string"
  3365            Hostname:
  3366              description: |
  3367                The hostname to use for the container, as a valid
  3368                [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname.
  3369              type: "string"
  3370            Env:
  3371              description: |
  3372                A list of environment variables in the form `VAR=value`.
  3373              type: "array"
  3374              items:
  3375                type: "string"
  3376            Dir:
  3377              description: "The working directory for commands to run in."
  3378              type: "string"
  3379            User:
  3380              description: "The user inside the container."
  3381              type: "string"
  3382            Groups:
  3383              type: "array"
  3384              description: |
  3385                A list of additional groups that the container process will run as.
  3386              items:
  3387                type: "string"
  3388            Privileges:
  3389              type: "object"
  3390              description: "Security options for the container"
  3391              properties:
  3392                CredentialSpec:
  3393                  type: "object"
  3394                  description: "CredentialSpec for managed service account (Windows only)"
  3395                  properties:
  3396                    Config:
  3397                      type: "string"
  3398                      example: "0bt9dmxjvjiqermk6xrop3ekq"
  3399                      description: |
  3400                        Load credential spec from a Swarm Config with the given ID.
  3401                        The specified config must also be present in the Configs
  3402                        field with the Runtime property set.
  3403  
  3404                        <p><br /></p>
  3405  
  3406  
  3407                        > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`,
  3408                        > and `CredentialSpec.Config` are mutually exclusive.
  3409                    File:
  3410                      type: "string"
  3411                      example: "spec.json"
  3412                      description: |
  3413                        Load credential spec from this file. The file is read by
  3414                        the daemon, and must be present in the `CredentialSpecs`
  3415                        subdirectory in the docker data directory, which defaults
  3416                        to `C:\ProgramData\Docker\` on Windows.
  3417  
  3418                        For example, specifying `spec.json` loads
  3419                        `C:\ProgramData\Docker\CredentialSpecs\spec.json`.
  3420  
  3421                        <p><br /></p>
  3422  
  3423                        > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`,
  3424                        > and `CredentialSpec.Config` are mutually exclusive.
  3425                    Registry:
  3426                      type: "string"
  3427                      description: |
  3428                        Load credential spec from this value in the Windows
  3429                        registry. The specified registry value must be located in:
  3430  
  3431                        `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs`
  3432  
  3433                        <p><br /></p>
  3434  
  3435  
  3436                        > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`,
  3437                        > and `CredentialSpec.Config` are mutually exclusive.
  3438                SELinuxContext:
  3439                  type: "object"
  3440                  description: "SELinux labels of the container"
  3441                  properties:
  3442                    Disable:
  3443                      type: "boolean"
  3444                      description: "Disable SELinux"
  3445                    User:
  3446                      type: "string"
  3447                      description: "SELinux user label"
  3448                    Role:
  3449                      type: "string"
  3450                      description: "SELinux role label"
  3451                    Type:
  3452                      type: "string"
  3453                      description: "SELinux type label"
  3454                    Level:
  3455                      type: "string"
  3456                      description: "SELinux level label"
  3457            TTY:
  3458              description: "Whether a pseudo-TTY should be allocated."
  3459              type: "boolean"
  3460            OpenStdin:
  3461              description: "Open `stdin`"
  3462              type: "boolean"
  3463            ReadOnly:
  3464              description: "Mount the container's root filesystem as read only."
  3465              type: "boolean"
  3466            Mounts:
  3467              description: |
  3468                Specification for mounts to be added to containers created as part
  3469                of the service.
  3470              type: "array"
  3471              items:
  3472                $ref: "#/definitions/Mount"
  3473            StopSignal:
  3474              description: "Signal to stop the container."
  3475              type: "string"
  3476            StopGracePeriod:
  3477              description: |
  3478                Amount of time to wait for the container to terminate before
  3479                forcefully killing it.
  3480              type: "integer"
  3481              format: "int64"
  3482            HealthCheck:
  3483              $ref: "#/definitions/HealthConfig"
  3484            Hosts:
  3485              type: "array"
  3486              description: |
  3487                A list of hostname/IP mappings to add to the container's `hosts`
  3488                file. The format of extra hosts is specified in the
  3489                [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html)
  3490                man page:
  3491  
  3492                    IP_address canonical_hostname [aliases...]
  3493              items:
  3494                type: "string"
  3495            DNSConfig:
  3496              description: |
  3497                Specification for DNS related configurations in resolver configuration
  3498                file (`resolv.conf`).
  3499              type: "object"
  3500              properties:
  3501                Nameservers:
  3502                  description: "The IP addresses of the name servers."
  3503                  type: "array"
  3504                  items:
  3505                    type: "string"
  3506                Search:
  3507                  description: "A search list for host-name lookup."
  3508                  type: "array"
  3509                  items:
  3510                    type: "string"
  3511                Options:
  3512                  description: |
  3513                    A list of internal resolver variables to be modified (e.g.,
  3514                    `debug`, `ndots:3`, etc.).
  3515                  type: "array"
  3516                  items:
  3517                    type: "string"
  3518            Secrets:
  3519              description: |
  3520                Secrets contains references to zero or more secrets that will be
  3521                exposed to the service.
  3522              type: "array"
  3523              items:
  3524                type: "object"
  3525                properties:
  3526                  File:
  3527                    description: |
  3528                      File represents a specific target that is backed by a file.
  3529                    type: "object"
  3530                    properties:
  3531                      Name:
  3532                        description: |
  3533                          Name represents the final filename in the filesystem.
  3534                        type: "string"
  3535                      UID:
  3536                        description: "UID represents the file UID."
  3537                        type: "string"
  3538                      GID:
  3539                        description: "GID represents the file GID."
  3540                        type: "string"
  3541                      Mode:
  3542                        description: "Mode represents the FileMode of the file."
  3543                        type: "integer"
  3544                        format: "uint32"
  3545                  SecretID:
  3546                    description: |
  3547                      SecretID represents the ID of the specific secret that we're
  3548                      referencing.
  3549                    type: "string"
  3550                  SecretName:
  3551                    description: |
  3552                      SecretName is the name of the secret that this references,
  3553                      but this is just provided for lookup/display purposes. The
  3554                      secret in the reference will be identified by its ID.
  3555                    type: "string"
  3556            Configs:
  3557              description: |
  3558                Configs contains references to zero or more configs that will be
  3559                exposed to the service.
  3560              type: "array"
  3561              items:
  3562                type: "object"
  3563                properties:
  3564                  File:
  3565                    description: |
  3566                      File represents a specific target that is backed by a file.
  3567  
  3568                      <p><br /><p>
  3569  
  3570                      > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive
  3571                    type: "object"
  3572                    properties:
  3573                      Name:
  3574                        description: |
  3575                          Name represents the final filename in the filesystem.
  3576                        type: "string"
  3577                      UID:
  3578                        description: "UID represents the file UID."
  3579                        type: "string"
  3580                      GID:
  3581                        description: "GID represents the file GID."
  3582                        type: "string"
  3583                      Mode:
  3584                        description: "Mode represents the FileMode of the file."
  3585                        type: "integer"
  3586                        format: "uint32"
  3587                  Runtime:
  3588                    description: |
  3589                      Runtime represents a target that is not mounted into the
  3590                      container but is used by the task
  3591  
  3592                      <p><br /><p>
  3593  
  3594                      > **Note**: `Configs.File` and `Configs.Runtime` are mutually
  3595                      > exclusive
  3596                    type: "object"
  3597                  ConfigID:
  3598                    description: |
  3599                      ConfigID represents the ID of the specific config that we're
  3600                      referencing.
  3601                    type: "string"
  3602                  ConfigName:
  3603                    description: |
  3604                      ConfigName is the name of the config that this references,
  3605                      but this is just provided for lookup/display purposes. The
  3606                      config in the reference will be identified by its ID.
  3607                    type: "string"
  3608            Isolation:
  3609              type: "string"
  3610              description: |
  3611                Isolation technology of the containers running the service.
  3612                (Windows only)
  3613              enum:
  3614                - "default"
  3615                - "process"
  3616                - "hyperv"
  3617            Init:
  3618              description: |
  3619                Run an init inside the container that forwards signals and reaps
  3620                processes. This field is omitted if empty, and the default (as
  3621                configured on the daemon) is used.
  3622              type: "boolean"
  3623              x-nullable: true
  3624            Sysctls:
  3625              description: |
  3626                Set kernel namedspaced parameters (sysctls) in the container.
  3627                The Sysctls option on services accepts the same sysctls as the
  3628                are supported on containers. Note that while the same sysctls are
  3629                supported, no guarantees or checks are made about their
  3630                suitability for a clustered environment, and it's up to the user
  3631                to determine whether a given sysctl will work properly in a
  3632                Service.
  3633              type: "object"
  3634              additionalProperties:
  3635                type: "string"
  3636        NetworkAttachmentSpec:
  3637          description: |
  3638            Read-only spec type for non-swarm containers attached to swarm overlay
  3639            networks.
  3640  
  3641            <p><br /></p>
  3642  
  3643            > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
  3644            > mutually exclusive. PluginSpec is only used when the Runtime field
  3645            > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime
  3646            > field is set to `attachment`.
  3647          type: "object"
  3648          properties:
  3649            ContainerID:
  3650              description: "ID of the container represented by this task"
  3651              type: "string"
  3652        Resources:
  3653          description: |
  3654            Resource requirements which apply to each individual container created
  3655            as part of the service.
  3656          type: "object"
  3657          properties:
  3658            Limits:
  3659              description: "Define resources limits."
  3660              $ref: "#/definitions/ResourceObject"
  3661            Reservations:
  3662              description: "Define resources reservation."
  3663              $ref: "#/definitions/ResourceObject"
  3664        RestartPolicy:
  3665          description: |
  3666            Specification for the restart policy which applies to containers
  3667            created as part of this service.
  3668          type: "object"
  3669          properties:
  3670            Condition:
  3671              description: "Condition for restart."
  3672              type: "string"
  3673              enum:
  3674                - "none"
  3675                - "on-failure"
  3676                - "any"
  3677            Delay:
  3678              description: "Delay between restart attempts."
  3679              type: "integer"
  3680              format: "int64"
  3681            MaxAttempts:
  3682              description: |
  3683                Maximum attempts to restart a given container before giving up
  3684                (default value is 0, which is ignored).
  3685              type: "integer"
  3686              format: "int64"
  3687              default: 0
  3688            Window:
  3689              description: |
  3690                Windows is the time window used to evaluate the restart policy
  3691                (default value is 0, which is unbounded).
  3692              type: "integer"
  3693              format: "int64"
  3694              default: 0
  3695        Placement:
  3696          type: "object"
  3697          properties:
  3698            Constraints:
  3699              description: |
  3700                An array of constraint expressions to limit the set of nodes where
  3701                a task can be scheduled. Constraint expressions can either use a
  3702                _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find
  3703                nodes that satisfy every expression (AND match). Constraints can
  3704                match node or Docker Engine labels as follows:
  3705  
  3706                node attribute       | matches                        | example
  3707                ---------------------|--------------------------------|-----------------------------------------------
  3708                `node.id`            | Node ID                        | `node.id==2ivku8v2gvtg4`
  3709                `node.hostname`      | Node hostname                  | `node.hostname!=node-2`
  3710                `node.role`          | Node role (`manager`/`worker`) | `node.role==manager`
  3711                `node.platform.os`   | Node operating system          | `node.platform.os==windows`
  3712                `node.platform.arch` | Node architecture              | `node.platform.arch==x86_64`
  3713                `node.labels`        | User-defined node labels       | `node.labels.security==high`
  3714                `engine.labels`      | Docker Engine's labels         | `engine.labels.operatingsystem==ubuntu-14.04`
  3715  
  3716                `engine.labels` apply to Docker Engine labels like operating system,
  3717                drivers, etc. Swarm administrators add `node.labels` for operational
  3718                purposes by using the [`node update endpoint`](#operation/NodeUpdate).
  3719  
  3720              type: "array"
  3721              items:
  3722                type: "string"
  3723              example:
  3724                - "node.hostname!=node3.corp.example.com"
  3725                - "node.role!=manager"
  3726                - "node.labels.type==production"
  3727                - "node.platform.os==linux"
  3728                - "node.platform.arch==x86_64"
  3729            Preferences:
  3730              description: |
  3731                Preferences provide a way to make the scheduler aware of factors
  3732                such as topology. They are provided in order from highest to
  3733                lowest precedence.
  3734              type: "array"
  3735              items:
  3736                type: "object"
  3737                properties:
  3738                  Spread:
  3739                    type: "object"
  3740                    properties:
  3741                      SpreadDescriptor:
  3742                        description: |
  3743                          label descriptor, such as `engine.labels.az`.
  3744                        type: "string"
  3745              example:
  3746                - Spread:
  3747                    SpreadDescriptor: "node.labels.datacenter"
  3748                - Spread:
  3749                    SpreadDescriptor: "node.labels.rack"
  3750            MaxReplicas:
  3751              description: |
  3752                Maximum number of replicas for per node (default value is 0, which
  3753                is unlimited)
  3754              type: "integer"
  3755              format: "int64"
  3756              default: 0
  3757            Platforms:
  3758              description: |
  3759                Platforms stores all the platforms that the service's image can
  3760                run on. This field is used in the platform filter for scheduling.
  3761                If empty, then the platform filter is off, meaning there are no
  3762                scheduling restrictions.
  3763              type: "array"
  3764              items:
  3765                $ref: "#/definitions/Platform"
  3766        ForceUpdate:
  3767          description: |
  3768            A counter that triggers an update even if no relevant parameters have
  3769            been changed.
  3770          type: "integer"
  3771        Runtime:
  3772          description: |
  3773            Runtime is the type of runtime specified for the task executor.
  3774          type: "string"
  3775        Networks:
  3776          description: "Specifies which networks the service should attach to."
  3777          type: "array"
  3778          items:
  3779            $ref: "#/definitions/NetworkAttachmentConfig"
  3780        LogDriver:
  3781          description: |
  3782            Specifies the log driver to use for tasks created from this spec. If
  3783            not present, the default one for the swarm will be used, finally
  3784            falling back to the engine default if not specified.
  3785          type: "object"
  3786          properties:
  3787            Name:
  3788              type: "string"
  3789            Options:
  3790              type: "object"
  3791              additionalProperties:
  3792                type: "string"
  3793  
  3794    TaskState:
  3795      type: "string"
  3796      enum:
  3797        - "new"
  3798        - "allocated"
  3799        - "pending"
  3800        - "assigned"
  3801        - "accepted"
  3802        - "preparing"
  3803        - "ready"
  3804        - "starting"
  3805        - "running"
  3806        - "complete"
  3807        - "shutdown"
  3808        - "failed"
  3809        - "rejected"
  3810        - "remove"
  3811        - "orphaned"
  3812  
  3813    Task:
  3814      type: "object"
  3815      properties:
  3816        ID:
  3817          description: "The ID of the task."
  3818          type: "string"
  3819        Version:
  3820          $ref: "#/definitions/ObjectVersion"
  3821        CreatedAt:
  3822          type: "string"
  3823          format: "dateTime"
  3824        UpdatedAt:
  3825          type: "string"
  3826          format: "dateTime"
  3827        Name:
  3828          description: "Name of the task."
  3829          type: "string"
  3830        Labels:
  3831          description: "User-defined key/value metadata."
  3832          type: "object"
  3833          additionalProperties:
  3834            type: "string"
  3835        Spec:
  3836          $ref: "#/definitions/TaskSpec"
  3837        ServiceID:
  3838          description: "The ID of the service this task is part of."
  3839          type: "string"
  3840        Slot:
  3841          type: "integer"
  3842        NodeID:
  3843          description: "The ID of the node that this task is on."
  3844          type: "string"
  3845        AssignedGenericResources:
  3846          $ref: "#/definitions/GenericResources"
  3847        Status:
  3848          type: "object"
  3849          properties:
  3850            Timestamp:
  3851              type: "string"
  3852              format: "dateTime"
  3853            State:
  3854              $ref: "#/definitions/TaskState"
  3855            Message:
  3856              type: "string"
  3857            Err:
  3858              type: "string"
  3859            ContainerStatus:
  3860              type: "object"
  3861              properties:
  3862                ContainerID:
  3863                  type: "string"
  3864                PID:
  3865                  type: "integer"
  3866                ExitCode:
  3867                  type: "integer"
  3868        DesiredState:
  3869          $ref: "#/definitions/TaskState"
  3870      example:
  3871        ID: "0kzzo1i0y4jz6027t0k7aezc7"
  3872        Version:
  3873          Index: 71
  3874        CreatedAt: "2016-06-07T21:07:31.171892745Z"
  3875        UpdatedAt: "2016-06-07T21:07:31.376370513Z"
  3876        Spec:
  3877          ContainerSpec:
  3878            Image: "redis"
  3879          Resources:
  3880            Limits: {}
  3881            Reservations: {}
  3882          RestartPolicy:
  3883            Condition: "any"
  3884            MaxAttempts: 0
  3885          Placement: {}
  3886        ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
  3887        Slot: 1
  3888        NodeID: "60gvrl6tm78dmak4yl7srz94v"
  3889        Status:
  3890          Timestamp: "2016-06-07T21:07:31.290032978Z"
  3891          State: "running"
  3892          Message: "started"
  3893          ContainerStatus:
  3894            ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035"
  3895            PID: 677
  3896        DesiredState: "running"
  3897        NetworksAttachments:
  3898          - Network:
  3899              ID: "4qvuz4ko70xaltuqbt8956gd1"
  3900              Version:
  3901                Index: 18
  3902              CreatedAt: "2016-06-07T20:31:11.912919752Z"
  3903              UpdatedAt: "2016-06-07T21:07:29.955277358Z"
  3904              Spec:
  3905                Name: "ingress"
  3906                Labels:
  3907                  com.docker.swarm.internal: "true"
  3908                DriverConfiguration: {}
  3909                IPAMOptions:
  3910                  Driver: {}
  3911                  Configs:
  3912                    - Subnet: "10.255.0.0/16"
  3913                      Gateway: "10.255.0.1"
  3914              DriverState:
  3915                Name: "overlay"
  3916                Options:
  3917                  com.docker.network.driver.overlay.vxlanid_list: "256"
  3918              IPAMOptions:
  3919                Driver:
  3920                  Name: "default"
  3921                Configs:
  3922                  - Subnet: "10.255.0.0/16"
  3923                    Gateway: "10.255.0.1"
  3924            Addresses:
  3925              - "10.255.0.10/16"
  3926        AssignedGenericResources:
  3927          - DiscreteResourceSpec:
  3928              Kind: "SSD"
  3929              Value: 3
  3930          - NamedResourceSpec:
  3931              Kind: "GPU"
  3932              Value: "UUID1"
  3933          - NamedResourceSpec:
  3934              Kind: "GPU"
  3935              Value: "UUID2"
  3936  
  3937    ServiceSpec:
  3938      description: "User modifiable configuration for a service."
  3939      type: object
  3940      properties:
  3941        Name:
  3942          description: "Name of the service."
  3943          type: "string"
  3944        Labels:
  3945          description: "User-defined key/value metadata."
  3946          type: "object"
  3947          additionalProperties:
  3948            type: "string"
  3949        TaskTemplate:
  3950          $ref: "#/definitions/TaskSpec"
  3951        Mode:
  3952          description: "Scheduling mode for the service."
  3953          type: "object"
  3954          properties:
  3955            Replicated:
  3956              type: "object"
  3957              properties:
  3958                Replicas:
  3959                  type: "integer"
  3960                  format: "int64"
  3961            Global:
  3962              type: "object"
  3963        UpdateConfig:
  3964          description: "Specification for the update strategy of the service."
  3965          type: "object"
  3966          properties:
  3967            Parallelism:
  3968              description: |
  3969                Maximum number of tasks to be updated in one iteration (0 means
  3970                unlimited parallelism).
  3971              type: "integer"
  3972              format: "int64"
  3973            Delay:
  3974              description: "Amount of time between updates, in nanoseconds."
  3975              type: "integer"
  3976              format: "int64"
  3977            FailureAction:
  3978              description: |
  3979                Action to take if an updated task fails to run, or stops running
  3980                during the update.
  3981              type: "string"
  3982              enum:
  3983                - "continue"
  3984                - "pause"
  3985                - "rollback"
  3986            Monitor:
  3987              description: |
  3988                Amount of time to monitor each updated task for failures, in
  3989                nanoseconds.
  3990              type: "integer"
  3991              format: "int64"
  3992            MaxFailureRatio:
  3993              description: |
  3994                The fraction of tasks that may fail during an update before the
  3995                failure action is invoked, specified as a floating point number
  3996                between 0 and 1.
  3997              type: "number"
  3998              default: 0
  3999            Order:
  4000              description: |
  4001                The order of operations when rolling out an updated task. Either
  4002                the old task is shut down before the new task is started, or the
  4003                new task is started before the old task is shut down.
  4004              type: "string"
  4005              enum:
  4006                - "stop-first"
  4007                - "start-first"
  4008        RollbackConfig:
  4009          description: "Specification for the rollback strategy of the service."
  4010          type: "object"
  4011          properties:
  4012            Parallelism:
  4013              description: |
  4014                Maximum number of tasks to be rolled back in one iteration (0 means
  4015                unlimited parallelism).
  4016              type: "integer"
  4017              format: "int64"
  4018            Delay:
  4019              description: |
  4020                Amount of time between rollback iterations, in nanoseconds.
  4021              type: "integer"
  4022              format: "int64"
  4023            FailureAction:
  4024              description: |
  4025                Action to take if an rolled back task fails to run, or stops
  4026                running during the rollback.
  4027              type: "string"
  4028              enum:
  4029                - "continue"
  4030                - "pause"
  4031            Monitor:
  4032              description: |
  4033                Amount of time to monitor each rolled back task for failures, in
  4034                nanoseconds.
  4035              type: "integer"
  4036              format: "int64"
  4037            MaxFailureRatio:
  4038              description: |
  4039                The fraction of tasks that may fail during a rollback before the
  4040                failure action is invoked, specified as a floating point number
  4041                between 0 and 1.
  4042              type: "number"
  4043              default: 0
  4044            Order:
  4045              description: |
  4046                The order of operations when rolling back a task. Either the old
  4047                task is shut down before the new task is started, or the new task
  4048                is started before the old task is shut down.
  4049              type: "string"
  4050              enum:
  4051                - "stop-first"
  4052                - "start-first"
  4053        Networks:
  4054          description: "Specifies which networks the service should attach to."
  4055          type: "array"
  4056          items:
  4057            $ref: "#/definitions/NetworkAttachmentConfig"
  4058  
  4059        EndpointSpec:
  4060          $ref: "#/definitions/EndpointSpec"
  4061  
  4062    EndpointPortConfig:
  4063      type: "object"
  4064      properties:
  4065        Name:
  4066          type: "string"
  4067        Protocol:
  4068          type: "string"
  4069          enum:
  4070            - "tcp"
  4071            - "udp"
  4072            - "sctp"
  4073        TargetPort:
  4074          description: "The port inside the container."
  4075          type: "integer"
  4076        PublishedPort:
  4077          description: "The port on the swarm hosts."
  4078          type: "integer"
  4079        PublishMode:
  4080          description: |
  4081            The mode in which port is published.
  4082  
  4083            <p><br /></p>
  4084  
  4085            - "ingress" makes the target port accessible on every node,
  4086              regardless of whether there is a task for the service running on
  4087              that node or not.
  4088            - "host" bypasses the routing mesh and publish the port directly on
  4089              the swarm node where that service is running.
  4090  
  4091          type: "string"
  4092          enum:
  4093            - "ingress"
  4094            - "host"
  4095          default: "ingress"
  4096          example: "ingress"
  4097  
  4098    EndpointSpec:
  4099      description: "Properties that can be configured to access and load balance a service."
  4100      type: "object"
  4101      properties:
  4102        Mode:
  4103          description: |
  4104            The mode of resolution to use for internal load balancing between tasks.
  4105          type: "string"
  4106          enum:
  4107            - "vip"
  4108            - "dnsrr"
  4109          default: "vip"
  4110        Ports:
  4111          description: |
  4112            List of exposed ports that this service is accessible on from the
  4113            outside. Ports can only be provided if `vip` resolution mode is used.
  4114          type: "array"
  4115          items:
  4116            $ref: "#/definitions/EndpointPortConfig"
  4117  
  4118    Service:
  4119      type: "object"
  4120      properties:
  4121        ID:
  4122          type: "string"
  4123        Version:
  4124          $ref: "#/definitions/ObjectVersion"
  4125        CreatedAt:
  4126          type: "string"
  4127          format: "dateTime"
  4128        UpdatedAt:
  4129          type: "string"
  4130          format: "dateTime"
  4131        Spec:
  4132          $ref: "#/definitions/ServiceSpec"
  4133        Endpoint:
  4134          type: "object"
  4135          properties:
  4136            Spec:
  4137              $ref: "#/definitions/EndpointSpec"
  4138            Ports:
  4139              type: "array"
  4140              items:
  4141                $ref: "#/definitions/EndpointPortConfig"
  4142            VirtualIPs:
  4143              type: "array"
  4144              items:
  4145                type: "object"
  4146                properties:
  4147                  NetworkID:
  4148                    type: "string"
  4149                  Addr:
  4150                    type: "string"
  4151        UpdateStatus:
  4152          description: "The status of a service update."
  4153          type: "object"
  4154          properties:
  4155            State:
  4156              type: "string"
  4157              enum:
  4158                - "updating"
  4159                - "paused"
  4160                - "completed"
  4161            StartedAt:
  4162              type: "string"
  4163              format: "dateTime"
  4164            CompletedAt:
  4165              type: "string"
  4166              format: "dateTime"
  4167            Message:
  4168              type: "string"
  4169      example:
  4170        ID: "9mnpnzenvg8p8tdbtq4wvbkcz"
  4171        Version:
  4172          Index: 19
  4173        CreatedAt: "2016-06-07T21:05:51.880065305Z"
  4174        UpdatedAt: "2016-06-07T21:07:29.962229872Z"
  4175        Spec:
  4176          Name: "hopeful_cori"
  4177          TaskTemplate:
  4178            ContainerSpec:
  4179              Image: "redis"
  4180            Resources:
  4181              Limits: {}
  4182              Reservations: {}
  4183            RestartPolicy:
  4184              Condition: "any"
  4185              MaxAttempts: 0
  4186            Placement: {}
  4187            ForceUpdate: 0
  4188          Mode:
  4189            Replicated:
  4190              Replicas: 1
  4191          UpdateConfig:
  4192            Parallelism: 1
  4193            Delay: 1000000000
  4194            FailureAction: "pause"
  4195            Monitor: 15000000000
  4196            MaxFailureRatio: 0.15
  4197          RollbackConfig:
  4198            Parallelism: 1
  4199            Delay: 1000000000
  4200            FailureAction: "pause"
  4201            Monitor: 15000000000
  4202            MaxFailureRatio: 0.15
  4203          EndpointSpec:
  4204            Mode: "vip"
  4205            Ports:
  4206              -
  4207                Protocol: "tcp"
  4208                TargetPort: 6379
  4209                PublishedPort: 30001
  4210        Endpoint:
  4211          Spec:
  4212            Mode: "vip"
  4213            Ports:
  4214              -
  4215                Protocol: "tcp"
  4216                TargetPort: 6379
  4217                PublishedPort: 30001
  4218          Ports:
  4219            -
  4220              Protocol: "tcp"
  4221              TargetPort: 6379
  4222              PublishedPort: 30001
  4223          VirtualIPs:
  4224            -
  4225              NetworkID: "4qvuz4ko70xaltuqbt8956gd1"
  4226              Addr: "10.255.0.2/16"
  4227            -
  4228              NetworkID: "4qvuz4ko70xaltuqbt8956gd1"
  4229              Addr: "10.255.0.3/16"
  4230  
  4231    ImageDeleteResponseItem:
  4232      type: "object"
  4233      properties:
  4234        Untagged:
  4235          description: "The image ID of an image that was untagged"
  4236          type: "string"
  4237        Deleted:
  4238          description: "The image ID of an image that was deleted"
  4239          type: "string"
  4240  
  4241    ServiceUpdateResponse:
  4242      type: "object"
  4243      properties:
  4244        Warnings:
  4245          description: "Optional warning messages"
  4246          type: "array"
  4247          items:
  4248            type: "string"
  4249      example:
  4250        Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found"
  4251  
  4252    ContainerSummary:
  4253      type: "object"
  4254      properties:
  4255        Id:
  4256          description: "The ID of this container"
  4257          type: "string"
  4258          x-go-name: "ID"
  4259        Names:
  4260          description: "The names that this container has been given"
  4261          type: "array"
  4262          items:
  4263            type: "string"
  4264        Image:
  4265          description: "The name of the image used when creating this container"
  4266          type: "string"
  4267        ImageID:
  4268          description: "The ID of the image that this container was created from"
  4269          type: "string"
  4270        Command:
  4271          description: "Command to run when starting the container"
  4272          type: "string"
  4273        Created:
  4274          description: "When the container was created"
  4275          type: "integer"
  4276          format: "int64"
  4277        Ports:
  4278          description: "The ports exposed by this container"
  4279          type: "array"
  4280          items:
  4281            $ref: "#/definitions/Port"
  4282        SizeRw:
  4283          description: "The size of files that have been created or changed by this container"
  4284          type: "integer"
  4285          format: "int64"
  4286        SizeRootFs:
  4287          description: "The total size of all the files in this container"
  4288          type: "integer"
  4289          format: "int64"
  4290        Labels:
  4291          description: "User-defined key/value metadata."
  4292          type: "object"
  4293          additionalProperties:
  4294            type: "string"
  4295        State:
  4296          description: "The state of this container (e.g. `Exited`)"
  4297          type: "string"
  4298        Status:
  4299          description: "Additional human-readable status of this container (e.g. `Exit 0`)"
  4300          type: "string"
  4301        HostConfig:
  4302          type: "object"
  4303          properties:
  4304            NetworkMode:
  4305              type: "string"
  4306        NetworkSettings:
  4307          description: "A summary of the container's network settings"
  4308          type: "object"
  4309          properties:
  4310            Networks:
  4311              type: "object"
  4312              additionalProperties:
  4313                $ref: "#/definitions/EndpointSettings"
  4314        Mounts:
  4315          type: "array"
  4316          items:
  4317            $ref: "#/definitions/MountPoint"
  4318  
  4319    Driver:
  4320      description: "Driver represents a driver (network, logging, secrets)."
  4321      type: "object"
  4322      required: [Name]
  4323      properties:
  4324        Name:
  4325          description: "Name of the driver."
  4326          type: "string"
  4327          x-nullable: false
  4328          example: "some-driver"
  4329        Options:
  4330          description: "Key/value map of driver-specific options."
  4331          type: "object"
  4332          x-nullable: false
  4333          additionalProperties:
  4334            type: "string"
  4335          example:
  4336            OptionA: "value for driver-specific option A"
  4337            OptionB: "value for driver-specific option B"
  4338  
  4339    SecretSpec:
  4340      type: "object"
  4341      properties:
  4342        Name:
  4343          description: "User-defined name of the secret."
  4344          type: "string"
  4345        Labels:
  4346          description: "User-defined key/value metadata."
  4347          type: "object"
  4348          additionalProperties:
  4349            type: "string"
  4350          example:
  4351            com.example.some-label: "some-value"
  4352            com.example.some-other-label: "some-other-value"
  4353        Data:
  4354          description: |
  4355            Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5))
  4356            data to store as secret.
  4357  
  4358            This field is only used to _create_ a secret, and is not returned by
  4359            other endpoints.
  4360          type: "string"
  4361          example: ""
  4362        Driver:
  4363          description: |
  4364            Name of the secrets driver used to fetch the secret's value from an
  4365            external secret store.
  4366          $ref: "#/definitions/Driver"
  4367        Templating:
  4368          description: |
  4369            Templating driver, if applicable
  4370  
  4371            Templating controls whether and how to evaluate the config payload as
  4372            a template. If no driver is set, no templating is used.
  4373          $ref: "#/definitions/Driver"
  4374  
  4375    Secret:
  4376      type: "object"
  4377      properties:
  4378        ID:
  4379          type: "string"
  4380          example: "blt1owaxmitz71s9v5zh81zun"
  4381        Version:
  4382          $ref: "#/definitions/ObjectVersion"
  4383        CreatedAt:
  4384          type: "string"
  4385          format: "dateTime"
  4386          example: "2017-07-20T13:55:28.678958722Z"
  4387        UpdatedAt:
  4388          type: "string"
  4389          format: "dateTime"
  4390          example: "2017-07-20T13:55:28.678958722Z"
  4391        Spec:
  4392          $ref: "#/definitions/SecretSpec"
  4393  
  4394    ConfigSpec:
  4395      type: "object"
  4396      properties:
  4397        Name:
  4398          description: "User-defined name of the config."
  4399          type: "string"
  4400        Labels:
  4401          description: "User-defined key/value metadata."
  4402          type: "object"
  4403          additionalProperties:
  4404            type: "string"
  4405        Data:
  4406          description: |
  4407            Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5))
  4408            config data.
  4409          type: "string"
  4410        Templating:
  4411          description: |
  4412            Templating driver, if applicable
  4413  
  4414            Templating controls whether and how to evaluate the config payload as
  4415            a template. If no driver is set, no templating is used.
  4416          $ref: "#/definitions/Driver"
  4417  
  4418    Config:
  4419      type: "object"
  4420      properties:
  4421        ID:
  4422          type: "string"
  4423        Version:
  4424          $ref: "#/definitions/ObjectVersion"
  4425        CreatedAt:
  4426          type: "string"
  4427          format: "dateTime"
  4428        UpdatedAt:
  4429          type: "string"
  4430          format: "dateTime"
  4431        Spec:
  4432          $ref: "#/definitions/ConfigSpec"
  4433  
  4434    ContainerState:
  4435      description: |
  4436        ContainerState stores container's running state. It's part of ContainerJSONBase
  4437        and will be returned by the "inspect" command.
  4438      type: "object"
  4439      x-nullable: true
  4440      properties:
  4441        Status:
  4442          description: |
  4443            String representation of the container state. Can be one of "created",
  4444            "running", "paused", "restarting", "removing", "exited", or "dead".
  4445          type: "string"
  4446          enum: ["created", "running", "paused", "restarting", "removing", "exited", "dead"]
  4447          example: "running"
  4448        Running:
  4449          description: |
  4450            Whether this container is running.
  4451  
  4452            Note that a running container can be _paused_. The `Running` and `Paused`
  4453            booleans are not mutually exclusive:
  4454  
  4455            When pausing a container (on Linux), the freezer cgroup is used to suspend
  4456            all processes in the container. Freezing the process requires the process to
  4457            be running. As a result, paused containers are both `Running` _and_ `Paused`.
  4458  
  4459            Use the `Status` field instead to determine if a container's state is "running".
  4460          type: "boolean"
  4461          example: true
  4462        Paused:
  4463          description: "Whether this container is paused."
  4464          type: "boolean"
  4465          example: false
  4466        Restarting:
  4467          description: "Whether this container is restarting."
  4468          type: "boolean"
  4469          example: false
  4470        OOMKilled:
  4471          description: |
  4472            Whether this container has been killed because it ran out of memory.
  4473          type: "boolean"
  4474          example: false
  4475        Dead:
  4476          type: "boolean"
  4477          example: false
  4478        Pid:
  4479          description: "The process ID of this container"
  4480          type: "integer"
  4481          example: 1234
  4482        ExitCode:
  4483          description: "The last exit code of this container"
  4484          type: "integer"
  4485          example: 0
  4486        Error:
  4487          type: "string"
  4488        StartedAt:
  4489          description: "The time when this container was last started."
  4490          type: "string"
  4491          example: "2020-01-06T09:06:59.461876391Z"
  4492        FinishedAt:
  4493          description: "The time when this container last exited."
  4494          type: "string"
  4495          example: "2020-01-06T09:07:59.461876391Z"
  4496        Health:
  4497          $ref: "#/definitions/Health"
  4498  
  4499    ContainerWaitResponse:
  4500      description: "OK response to ContainerWait operation"
  4501      type: "object"
  4502      x-go-name: "ContainerWaitOKBody"
  4503      title: "ContainerWaitResponse"
  4504      required: [StatusCode]
  4505      properties:
  4506        StatusCode:
  4507          description: "Exit code of the container"
  4508          type: "integer"
  4509          format: "int64"
  4510          x-nullable: false
  4511        Error:
  4512          $ref: "#/definitions/ContainerWaitExitError"
  4513  
  4514    ContainerWaitExitError:
  4515      description: "container waiting error, if any"
  4516      type: "object"
  4517      x-go-name: "ContainerWaitOKBodyError"
  4518      properties:
  4519        Message:
  4520          description: "Details of an error"
  4521          type: "string"
  4522  
  4523    SystemVersion:
  4524      type: "object"
  4525      description: |
  4526        Response of Engine API: GET "/version"
  4527      properties:
  4528        Platform:
  4529          type: "object"
  4530          required: [Name]
  4531          properties:
  4532            Name:
  4533              type: "string"
  4534        Components:
  4535          type: "array"
  4536          description: |
  4537            Information about system components
  4538          items:
  4539            type: "object"
  4540            x-go-name: ComponentVersion
  4541            required: [Name, Version]
  4542            properties:
  4543              Name:
  4544                description: |
  4545                  Name of the component
  4546                type: "string"
  4547                example: "Engine"
  4548              Version:
  4549                description: |
  4550                  Version of the component
  4551                type: "string"
  4552                x-nullable: false
  4553                example: "19.03.12"
  4554              Details:
  4555                description: |
  4556                  Key/value pairs of strings with additional information about the
  4557                  component. These values are intended for informational purposes
  4558                  only, and their content is not defined, and not part of the API
  4559                  specification.
  4560  
  4561                  These messages can be printed by the client as information to the user.
  4562                type: "object"
  4563                x-nullable: true
  4564        Version:
  4565          description: "The version of the daemon"
  4566          type: "string"
  4567          example: "19.03.12"
  4568        ApiVersion:
  4569          description: |
  4570            The default (and highest) API version that is supported by the daemon
  4571          type: "string"
  4572          example: "1.40"
  4573        MinAPIVersion:
  4574          description: |
  4575            The minimum API version that is supported by the daemon
  4576          type: "string"
  4577          example: "1.12"
  4578        GitCommit:
  4579          description: |
  4580            The Git commit of the source code that was used to build the daemon
  4581          type: "string"
  4582          example: "48a66213fe"
  4583        GoVersion:
  4584          description: |
  4585            The version Go used to compile the daemon, and the version of the Go
  4586            runtime in use.
  4587          type: "string"
  4588          example: "go1.13.14"
  4589        Os:
  4590          description: |
  4591            The operating system that the daemon is running on ("linux" or "windows")
  4592          type: "string"
  4593          example: "linux"
  4594        Arch:
  4595          description: |
  4596            The architecture that the daemon is running on
  4597          type: "string"
  4598          example: "amd64"
  4599        KernelVersion:
  4600          description: |
  4601            The kernel version (`uname -r`) that the daemon is running on.
  4602  
  4603            This field is omitted when empty.
  4604          type: "string"
  4605          example: "4.19.76-linuxkit"
  4606        Experimental:
  4607          description: |
  4608            Indicates if the daemon is started with experimental features enabled.
  4609  
  4610            This field is omitted when empty / false.
  4611          type: "boolean"
  4612          example: true
  4613        BuildTime:
  4614          description: |
  4615            The date and time that the daemon was compiled.
  4616          type: "string"
  4617          example: "2020-06-22T15:49:27.000000000+00:00"
  4618  
  4619    SystemInfo:
  4620      type: "object"
  4621      properties:
  4622        ID:
  4623          description: |
  4624            Unique identifier of the daemon.
  4625  
  4626            <p><br /></p>
  4627  
  4628            > **Note**: The format of the ID itself is not part of the API, and
  4629            > should not be considered stable.
  4630          type: "string"
  4631          example: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS"
  4632        Containers:
  4633          description: "Total number of containers on the host."
  4634          type: "integer"
  4635          example: 14
  4636        ContainersRunning:
  4637          description: |
  4638            Number of containers with status `"running"`.
  4639          type: "integer"
  4640          example: 3
  4641        ContainersPaused:
  4642          description: |
  4643            Number of containers with status `"paused"`.
  4644          type: "integer"
  4645          example: 1
  4646        ContainersStopped:
  4647          description: |
  4648            Number of containers with status `"stopped"`.
  4649          type: "integer"
  4650          example: 10
  4651        Images:
  4652          description: |
  4653            Total number of images on the host.
  4654  
  4655            Both _tagged_ and _untagged_ (dangling) images are counted.
  4656          type: "integer"
  4657          example: 508
  4658        Driver:
  4659          description: "Name of the storage driver in use."
  4660          type: "string"
  4661          example: "overlay2"
  4662        DriverStatus:
  4663          description: |
  4664            Information specific to the storage driver, provided as
  4665            "label" / "value" pairs.
  4666  
  4667            This information is provided by the storage driver, and formatted
  4668            in a way consistent with the output of `docker info` on the command
  4669            line.
  4670  
  4671            <p><br /></p>
  4672  
  4673            > **Note**: The information returned in this field, including the
  4674            > formatting of values and labels, should not be considered stable,
  4675            > and may change without notice.
  4676          type: "array"
  4677          items:
  4678            type: "array"
  4679            items:
  4680              type: "string"
  4681          example:
  4682            - ["Backing Filesystem", "extfs"]
  4683            - ["Supports d_type", "true"]
  4684            - ["Native Overlay Diff", "true"]
  4685        DockerRootDir:
  4686          description: |
  4687            Root directory of persistent Docker state.
  4688  
  4689            Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker`
  4690            on Windows.
  4691          type: "string"
  4692          example: "/var/lib/docker"
  4693        SystemStatus:
  4694          description: |
  4695            Status information about this node (standalone Swarm API).
  4696  
  4697            <p><br /></p>
  4698  
  4699            > **Note**: The information returned in this field is only propagated
  4700            > by the Swarm standalone API, and is empty (`null`) when using
  4701            > built-in swarm mode.
  4702          type: "array"
  4703          items:
  4704            type: "array"
  4705            items:
  4706              type: "string"
  4707          example:
  4708            - ["Role", "primary"]
  4709            - ["State", "Healthy"]
  4710            - ["Strategy", "spread"]
  4711            - ["Filters", "health, port, containerslots, dependency, affinity, constraint, whitelist"]
  4712            - ["Nodes", "2"]
  4713            - [" swarm-agent-00", "192.168.99.102:2376"]
  4714            - ["  â”” ID", "5CT6:FBGO:RVGO:CZL4:PB2K:WCYN:2JSV:KSHH:GGFW:QOPG:6J5Q:IOZ2|192.168.99.102:2376"]
  4715            - ["  â”” Status", "Healthy"]
  4716            - ["  â”” Containers", "1 (1 Running, 0 Paused, 0 Stopped)"]
  4717            - ["  â”” Reserved CPUs", "0 / 1"]
  4718            - ["  â”” Reserved Memory", "0 B / 1.021 GiB"]
  4719            - ["  â”” Labels", "kernelversion=4.4.74-boot2docker, operatingsystem=Boot2Docker 17.06.0-ce (TCL 7.2); HEAD : 0672754 - Thu Jun 29 00:06:31 UTC 2017, ostype=linux, provider=virtualbox, storagedriver=aufs"]
  4720            - ["  â”” UpdatedAt", "2017-08-09T10:03:46Z"]
  4721            - ["  â”” ServerVersion", "17.06.0-ce"]
  4722            - [" swarm-manager", "192.168.99.101:2376"]
  4723            - ["  â”” ID", "TAMD:7LL3:SEF7:LW2W:4Q2X:WVFH:RTXX:JSYS:XY2P:JEHL:ZMJK:JGIW|192.168.99.101:2376"]
  4724            - ["  â”” Status", "Healthy"]
  4725            - ["  â”” Containers", "2 (2 Running, 0 Paused, 0 Stopped)"]
  4726            - ["  â”” Reserved CPUs", "0 / 1"]
  4727            - ["  â”” Reserved Memory", "0 B / 1.021 GiB"]
  4728            - ["  â”” Labels", "kernelversion=4.4.74-boot2docker, operatingsystem=Boot2Docker 17.06.0-ce (TCL 7.2); HEAD : 0672754 - Thu Jun 29 00:06:31 UTC 2017, ostype=linux, provider=virtualbox, storagedriver=aufs"]
  4729            - ["  â”” UpdatedAt", "2017-08-09T10:04:11Z"]
  4730            - ["  â”” ServerVersion", "17.06.0-ce"]
  4731        Plugins:
  4732          $ref: "#/definitions/PluginsInfo"
  4733        MemoryLimit:
  4734          description: "Indicates if the host has memory limit support enabled."
  4735          type: "boolean"
  4736          example: true
  4737        SwapLimit:
  4738          description: "Indicates if the host has memory swap limit support enabled."
  4739          type: "boolean"
  4740          example: true
  4741        KernelMemory:
  4742          description: "Indicates if the host has kernel memory limit support enabled."
  4743          type: "boolean"
  4744          example: true
  4745        KernelMemoryTCP:
  4746          description: |
  4747            Indicates if the host has kernel memory TCP limit support enabled.
  4748  
  4749            Kernel memory TCP limits are not supported when using cgroups v2, which
  4750            does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup.
  4751          type: "boolean"
  4752          example: true
  4753        CpuCfsPeriod:
  4754          description: |
  4755            Indicates if CPU CFS(Completely Fair Scheduler) period is supported by
  4756            the host.
  4757          type: "boolean"
  4758          example: true
  4759        CpuCfsQuota:
  4760          description: |
  4761            Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by
  4762            the host.
  4763          type: "boolean"
  4764          example: true
  4765        CPUShares:
  4766          description: |
  4767            Indicates if CPU Shares limiting is supported by the host.
  4768          type: "boolean"
  4769          example: true
  4770        CPUSet:
  4771          description: |
  4772            Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host.
  4773  
  4774            See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt)
  4775          type: "boolean"
  4776          example: true
  4777        PidsLimit:
  4778          description: "Indicates if the host kernel has PID limit support enabled."
  4779          type: "boolean"
  4780          example: true
  4781        OomKillDisable:
  4782          description: "Indicates if OOM killer disable is supported on the host."
  4783          type: "boolean"
  4784        IPv4Forwarding:
  4785          description: "Indicates IPv4 forwarding is enabled."
  4786          type: "boolean"
  4787          example: true
  4788        BridgeNfIptables:
  4789          description: "Indicates if `bridge-nf-call-iptables` is available on the host."
  4790          type: "boolean"
  4791          example: true
  4792        BridgeNfIp6tables:
  4793          description: "Indicates if `bridge-nf-call-ip6tables` is available on the host."
  4794          type: "boolean"
  4795          example: true
  4796        Debug:
  4797          description: |
  4798            Indicates if the daemon is running in debug-mode / with debug-level
  4799            logging enabled.
  4800          type: "boolean"
  4801          example: true
  4802        NFd:
  4803          description: |
  4804            The total number of file Descriptors in use by the daemon process.
  4805  
  4806            This information is only returned if debug-mode is enabled.
  4807          type: "integer"
  4808          example: 64
  4809        NGoroutines:
  4810          description: |
  4811            The  number of goroutines that currently exist.
  4812  
  4813            This information is only returned if debug-mode is enabled.
  4814          type: "integer"
  4815          example: 174
  4816        SystemTime:
  4817          description: |
  4818            Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt)
  4819            format with nano-seconds.
  4820          type: "string"
  4821          example: "2017-08-08T20:28:29.06202363Z"
  4822        LoggingDriver:
  4823          description: |
  4824            The logging driver to use as a default for new containers.
  4825          type: "string"
  4826        CgroupDriver:
  4827          description: |
  4828            The driver to use for managing cgroups.
  4829          type: "string"
  4830          enum: ["cgroupfs", "systemd", "none"]
  4831          default: "cgroupfs"
  4832          example: "cgroupfs"
  4833        NEventsListener:
  4834          description: "Number of event listeners subscribed."
  4835          type: "integer"
  4836          example: 30
  4837        KernelVersion:
  4838          description: |
  4839            Kernel version of the host.
  4840  
  4841            On Linux, this information obtained from `uname`. On Windows this
  4842            information is queried from the <kbd>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\</kbd>
  4843            registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_.
  4844          type: "string"
  4845          example: "4.9.38-moby"
  4846        OperatingSystem:
  4847          description: |
  4848            Name of the host's operating system, for example: "Ubuntu 16.04.2 LTS"
  4849            or "Windows Server 2016 Datacenter"
  4850          type: "string"
  4851          example: "Alpine Linux v3.5"
  4852        OSType:
  4853          description: |
  4854            Generic type of the operating system of the host, as returned by the
  4855            Go runtime (`GOOS`).
  4856  
  4857            Currently returned values are "linux" and "windows". A full list of
  4858            possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment).
  4859          type: "string"
  4860          example: "linux"
  4861        Architecture:
  4862          description: |
  4863            Hardware architecture of the host, as returned by the Go runtime
  4864            (`GOARCH`).
  4865  
  4866            A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment).
  4867          type: "string"
  4868          example: "x86_64"
  4869        NCPU:
  4870          description: |
  4871            The number of logical CPUs usable by the daemon.
  4872  
  4873            The number of available CPUs is checked by querying the operating
  4874            system when the daemon starts. Changes to operating system CPU
  4875            allocation after the daemon is started are not reflected.
  4876          type: "integer"
  4877          example: 4
  4878        MemTotal:
  4879          description: |
  4880            Total amount of physical memory available on the host, in bytes.
  4881          type: "integer"
  4882          format: "int64"
  4883          example: 2095882240
  4884  
  4885        IndexServerAddress:
  4886          description: |
  4887            Address / URL of the index server that is used for image search,
  4888            and as a default for user authentication for Docker Hub and Docker Cloud.
  4889          default: "https://index.docker.io/v1/"
  4890          type: "string"
  4891          example: "https://index.docker.io/v1/"
  4892        RegistryConfig:
  4893          $ref: "#/definitions/RegistryServiceConfig"
  4894        GenericResources:
  4895          $ref: "#/definitions/GenericResources"
  4896        HttpProxy:
  4897          description: |
  4898            HTTP-proxy configured for the daemon. This value is obtained from the
  4899            [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable.
  4900            Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL
  4901            are masked in the API response.
  4902  
  4903            Containers do not automatically inherit this configuration.
  4904          type: "string"
  4905          example: "http://xxxxx:xxxxx@proxy.corp.example.com:8080"
  4906        HttpsProxy:
  4907          description: |
  4908            HTTPS-proxy configured for the daemon. This value is obtained from the
  4909            [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable.
  4910            Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL
  4911            are masked in the API response.
  4912  
  4913            Containers do not automatically inherit this configuration.
  4914          type: "string"
  4915          example: "https://xxxxx:xxxxx@proxy.corp.example.com:4443"
  4916        NoProxy:
  4917          description: |
  4918            Comma-separated list of domain extensions for which no proxy should be
  4919            used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html)
  4920            environment variable.
  4921  
  4922            Containers do not automatically inherit this configuration.
  4923          type: "string"
  4924          example: "*.local, 169.254/16"
  4925        Name:
  4926          description: "Hostname of the host."
  4927          type: "string"
  4928          example: "node5.corp.example.com"
  4929        Labels:
  4930          description: |
  4931            User-defined labels (key/value metadata) as set on the daemon.
  4932  
  4933            <p><br /></p>
  4934  
  4935            > **Note**: When part of a Swarm, nodes can both have _daemon_ labels,
  4936            > set through the daemon configuration, and _node_ labels, set from a
  4937            > manager node in the Swarm. Node labels are not included in this
  4938            > field. Node labels can be retrieved using the `/nodes/(id)` endpoint
  4939            > on a manager node in the Swarm.
  4940          type: "array"
  4941          items:
  4942            type: "string"
  4943          example: ["storage=ssd", "production"]
  4944        ExperimentalBuild:
  4945          description: |
  4946            Indicates if experimental features are enabled on the daemon.
  4947          type: "boolean"
  4948          example: true
  4949        ServerVersion:
  4950          description: |
  4951            Version string of the daemon.
  4952          type: "string"
  4953          example: "17.06.0-ce"
  4954        ClusterStore:
  4955          description: |
  4956            URL of the distributed storage backend.
  4957  
  4958  
  4959            The storage backend is used for multihost networking (to store
  4960            network and endpoint information) and by the node discovery mechanism.
  4961  
  4962            <p><br /></p>
  4963  
  4964            > **Note**: This field is only propagated when using standalone Swarm
  4965            > mode, and overlay networking using an external k/v store. Overlay
  4966            > networks with Swarm mode enabled use the built-in raft store, and
  4967            > this field will be empty.
  4968          type: "string"
  4969          example: "consul://consul.corp.example.com:8600/some/path"
  4970        ClusterAdvertise:
  4971          description: |
  4972            The network endpoint that the Engine advertises for the purpose of
  4973            node discovery. ClusterAdvertise is a `host:port` combination on which
  4974            the daemon is reachable by other hosts.
  4975  
  4976            <p><br /></p>
  4977  
  4978            > **Note**: This field is only propagated when using standalone Swarm
  4979            > mode, and overlay networking using an external k/v store. Overlay
  4980            > networks with Swarm mode enabled use the built-in raft store, and
  4981            > this field will be empty.
  4982          type: "string"
  4983          example: "node5.corp.example.com:8000"
  4984        Runtimes:
  4985          description: |
  4986            List of [OCI compliant](https://github.com/opencontainers/runtime-spec)
  4987            runtimes configured on the daemon. Keys hold the "name" used to
  4988            reference the runtime.
  4989  
  4990            The Docker daemon relies on an OCI compliant runtime (invoked via the
  4991            `containerd` daemon) as its interface to the Linux kernel namespaces,
  4992            cgroups, and SELinux.
  4993  
  4994            The default runtime is `runc`, and automatically configured. Additional
  4995            runtimes can be configured by the user and will be listed here.
  4996          type: "object"
  4997          additionalProperties:
  4998            $ref: "#/definitions/Runtime"
  4999          default:
  5000            runc:
  5001              path: "runc"
  5002          example:
  5003            runc:
  5004              path: "runc"
  5005            runc-master:
  5006              path: "/go/bin/runc"
  5007            custom:
  5008              path: "/usr/local/bin/my-oci-runtime"
  5009              runtimeArgs: ["--debug", "--systemd-cgroup=false"]
  5010        DefaultRuntime:
  5011          description: |
  5012            Name of the default OCI runtime that is used when starting containers.
  5013  
  5014            The default can be overridden per-container at create time.
  5015          type: "string"
  5016          default: "runc"
  5017          example: "runc"
  5018        Swarm:
  5019          $ref: "#/definitions/SwarmInfo"
  5020        LiveRestoreEnabled:
  5021          description: |
  5022            Indicates if live restore is enabled.
  5023  
  5024            If enabled, containers are kept running when the daemon is shutdown
  5025            or upon daemon start if running containers are detected.
  5026          type: "boolean"
  5027          default: false
  5028          example: false
  5029        Isolation:
  5030          description: |
  5031            Represents the isolation technology to use as a default for containers.
  5032            The supported values are platform-specific.
  5033  
  5034            If no isolation value is specified on daemon start, on Windows client,
  5035            the default is `hyperv`, and on Windows server, the default is `process`.
  5036  
  5037            This option is currently not used on other platforms.
  5038          default: "default"
  5039          type: "string"
  5040          enum:
  5041            - "default"
  5042            - "hyperv"
  5043            - "process"
  5044        InitBinary:
  5045          description: |
  5046            Name and, optional, path of the `docker-init` binary.
  5047  
  5048            If the path is omitted, the daemon searches the host's `$PATH` for the
  5049            binary and uses the first result.
  5050          type: "string"
  5051          example: "docker-init"
  5052        ContainerdCommit:
  5053          $ref: "#/definitions/Commit"
  5054        RuncCommit:
  5055          $ref: "#/definitions/Commit"
  5056        InitCommit:
  5057          $ref: "#/definitions/Commit"
  5058        SecurityOptions:
  5059          description: |
  5060            List of security features that are enabled on the daemon, such as
  5061            apparmor, seccomp, SELinux, user-namespaces (userns), and rootless.
  5062  
  5063            Additional configuration options for each security feature may
  5064            be present, and are included as a comma-separated list of key/value
  5065            pairs.
  5066          type: "array"
  5067          items:
  5068            type: "string"
  5069          example:
  5070            - "name=apparmor"
  5071            - "name=seccomp,profile=default"
  5072            - "name=selinux"
  5073            - "name=userns"
  5074            - "name=rootless"
  5075        ProductLicense:
  5076          description: |
  5077            Reports a summary of the product license on the daemon.
  5078  
  5079            If a commercial license has been applied to the daemon, information
  5080            such as number of nodes, and expiration are included.
  5081          type: "string"
  5082          example: "Community Engine"
  5083        Warnings:
  5084          description: |
  5085            List of warnings / informational messages about missing features, or
  5086            issues related to the daemon configuration.
  5087  
  5088            These messages can be printed by the client as information to the user.
  5089          type: "array"
  5090          items:
  5091            type: "string"
  5092          example:
  5093            - "WARNING: No memory limit support"
  5094            - "WARNING: bridge-nf-call-iptables is disabled"
  5095            - "WARNING: bridge-nf-call-ip6tables is disabled"
  5096  
  5097  
  5098    # PluginsInfo is a temp struct holding Plugins name
  5099    # registered with docker daemon. It is used by Info struct
  5100    PluginsInfo:
  5101      description: |
  5102        Available plugins per type.
  5103  
  5104        <p><br /></p>
  5105  
  5106        > **Note**: Only unmanaged (V1) plugins are included in this list.
  5107        > V1 plugins are "lazily" loaded, and are not returned in this list
  5108        > if there is no resource using the plugin.
  5109      type: "object"
  5110      properties:
  5111        Volume:
  5112          description: "Names of available volume-drivers, and network-driver plugins."
  5113          type: "array"
  5114          items:
  5115            type: "string"
  5116          example: ["local"]
  5117        Network:
  5118          description: "Names of available network-drivers, and network-driver plugins."
  5119          type: "array"
  5120          items:
  5121            type: "string"
  5122          example: ["bridge", "host", "ipvlan", "macvlan", "null", "overlay"]
  5123        Authorization:
  5124          description: "Names of available authorization plugins."
  5125          type: "array"
  5126          items:
  5127            type: "string"
  5128          example: ["img-authz-plugin", "hbm"]
  5129        Log:
  5130          description: "Names of available logging-drivers, and logging-driver plugins."
  5131          type: "array"
  5132          items:
  5133            type: "string"
  5134          example: ["awslogs", "fluentd", "gcplogs", "gelf", "journald", "json-file", "logentries", "splunk", "syslog"]
  5135  
  5136  
  5137    RegistryServiceConfig:
  5138      description: |
  5139        RegistryServiceConfig stores daemon registry services configuration.
  5140      type: "object"
  5141      x-nullable: true
  5142      properties:
  5143        AllowNondistributableArtifactsCIDRs:
  5144          description: |
  5145            List of IP ranges to which nondistributable artifacts can be pushed,
  5146            using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632).
  5147  
  5148            Some images (for example, Windows base images) contain artifacts
  5149            whose distribution is restricted by license. When these images are
  5150            pushed to a registry, restricted artifacts are not included.
  5151  
  5152            This configuration override this behavior, and enables the daemon to
  5153            push nondistributable artifacts to all registries whose resolved IP
  5154            address is within the subnet described by the CIDR syntax.
  5155  
  5156            This option is useful when pushing images containing
  5157            nondistributable artifacts to a registry on an air-gapped network so
  5158            hosts on that network can pull the images without connecting to
  5159            another server.
  5160  
  5161            > **Warning**: Nondistributable artifacts typically have restrictions
  5162            > on how and where they can be distributed and shared. Only use this
  5163            > feature to push artifacts to private registries and ensure that you
  5164            > are in compliance with any terms that cover redistributing
  5165            > nondistributable artifacts.
  5166  
  5167          type: "array"
  5168          items:
  5169            type: "string"
  5170          example: ["::1/128", "127.0.0.0/8"]
  5171        AllowNondistributableArtifactsHostnames:
  5172          description: |
  5173            List of registry hostnames to which nondistributable artifacts can be
  5174            pushed, using the format `<hostname>[:<port>]` or `<IP address>[:<port>]`.
  5175  
  5176            Some images (for example, Windows base images) contain artifacts
  5177            whose distribution is restricted by license. When these images are
  5178            pushed to a registry, restricted artifacts are not included.
  5179  
  5180            This configuration override this behavior for the specified
  5181            registries.
  5182  
  5183            This option is useful when pushing images containing
  5184            nondistributable artifacts to a registry on an air-gapped network so
  5185            hosts on that network can pull the images without connecting to
  5186            another server.
  5187  
  5188            > **Warning**: Nondistributable artifacts typically have restrictions
  5189            > on how and where they can be distributed and shared. Only use this
  5190            > feature to push artifacts to private registries and ensure that you
  5191            > are in compliance with any terms that cover redistributing
  5192            > nondistributable artifacts.
  5193          type: "array"
  5194          items:
  5195            type: "string"
  5196          example: ["registry.internal.corp.example.com:3000", "[2001:db8:a0b:12f0::1]:443"]
  5197        InsecureRegistryCIDRs:
  5198          description: |
  5199            List of IP ranges of insecure registries, using the CIDR syntax
  5200            ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries
  5201            accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates
  5202            from unknown CAs) communication.
  5203  
  5204            By default, local registries (`127.0.0.0/8`) are configured as
  5205            insecure. All other registries are secure. Communicating with an
  5206            insecure registry is not possible if the daemon assumes that registry
  5207            is secure.
  5208  
  5209            This configuration override this behavior, insecure communication with
  5210            registries whose resolved IP address is within the subnet described by
  5211            the CIDR syntax.
  5212  
  5213            Registries can also be marked insecure by hostname. Those registries
  5214            are listed under `IndexConfigs` and have their `Secure` field set to
  5215            `false`.
  5216  
  5217            > **Warning**: Using this option can be useful when running a local
  5218            > registry, but introduces security vulnerabilities. This option
  5219            > should therefore ONLY be used for testing purposes. For increased
  5220            > security, users should add their CA to their system's list of trusted
  5221            > CAs instead of enabling this option.
  5222          type: "array"
  5223          items:
  5224            type: "string"
  5225          example: ["::1/128", "127.0.0.0/8"]
  5226        IndexConfigs:
  5227          type: "object"
  5228          additionalProperties:
  5229            $ref: "#/definitions/IndexInfo"
  5230          example:
  5231            "127.0.0.1:5000":
  5232              "Name": "127.0.0.1:5000"
  5233              "Mirrors": []
  5234              "Secure": false
  5235              "Official": false
  5236            "[2001:db8:a0b:12f0::1]:80":
  5237              "Name": "[2001:db8:a0b:12f0::1]:80"
  5238              "Mirrors": []
  5239              "Secure": false
  5240              "Official": false
  5241            "docker.io":
  5242              Name: "docker.io"
  5243              Mirrors: ["https://hub-mirror.corp.example.com:5000/"]
  5244              Secure: true
  5245              Official: true
  5246            "registry.internal.corp.example.com:3000":
  5247              Name: "registry.internal.corp.example.com:3000"
  5248              Mirrors: []
  5249              Secure: false
  5250              Official: false
  5251        Mirrors:
  5252          description: |
  5253            List of registry URLs that act as a mirror for the official
  5254            (`docker.io`) registry.
  5255  
  5256          type: "array"
  5257          items:
  5258            type: "string"
  5259          example:
  5260            - "https://hub-mirror.corp.example.com:5000/"
  5261            - "https://[2001:db8:a0b:12f0::1]/"
  5262  
  5263    IndexInfo:
  5264      description:
  5265        IndexInfo contains information about a registry.
  5266      type: "object"
  5267      x-nullable: true
  5268      properties:
  5269        Name:
  5270          description: |
  5271            Name of the registry, such as "docker.io".
  5272          type: "string"
  5273          example: "docker.io"
  5274        Mirrors:
  5275          description: |
  5276            List of mirrors, expressed as URIs.
  5277          type: "array"
  5278          items:
  5279            type: "string"
  5280          example:
  5281            - "https://hub-mirror.corp.example.com:5000/"
  5282            - "https://registry-2.docker.io/"
  5283            - "https://registry-3.docker.io/"
  5284        Secure:
  5285          description: |
  5286            Indicates if the registry is part of the list of insecure
  5287            registries.
  5288  
  5289            If `false`, the registry is insecure. Insecure registries accept
  5290            un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from
  5291            unknown CAs) communication.
  5292  
  5293            > **Warning**: Insecure registries can be useful when running a local
  5294            > registry. However, because its use creates security vulnerabilities
  5295            > it should ONLY be enabled for testing purposes. For increased
  5296            > security, users should add their CA to their system's list of
  5297            > trusted CAs instead of enabling this option.
  5298          type: "boolean"
  5299          example: true
  5300        Official:
  5301          description: |
  5302            Indicates whether this is an official registry (i.e., Docker Hub / docker.io)
  5303          type: "boolean"
  5304          example: true
  5305  
  5306    Runtime:
  5307      description: |
  5308        Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec)
  5309        runtime.
  5310  
  5311        The runtime is invoked by the daemon via the `containerd` daemon. OCI
  5312        runtimes act as an interface to the Linux kernel namespaces, cgroups,
  5313        and SELinux.
  5314      type: "object"
  5315      properties:
  5316        path:
  5317          description: |
  5318            Name and, optional, path, of the OCI executable binary.
  5319  
  5320            If the path is omitted, the daemon searches the host's `$PATH` for the
  5321            binary and uses the first result.
  5322          type: "string"
  5323          example: "/usr/local/bin/my-oci-runtime"
  5324        runtimeArgs:
  5325          description: |
  5326            List of command-line arguments to pass to the runtime when invoked.
  5327          type: "array"
  5328          x-nullable: true
  5329          items:
  5330            type: "string"
  5331          example: ["--debug", "--systemd-cgroup=false"]
  5332  
  5333    Commit:
  5334      description: |
  5335        Commit holds the Git-commit (SHA1) that a binary was built from, as
  5336        reported in the version-string of external tools, such as `containerd`,
  5337        or `runC`.
  5338      type: "object"
  5339      properties:
  5340        ID:
  5341          description: "Actual commit ID of external tool."
  5342          type: "string"
  5343          example: "cfb82a876ecc11b5ca0977d1733adbe58599088a"
  5344        Expected:
  5345          description: |
  5346            Commit ID of external tool expected by dockerd as set at build time.
  5347          type: "string"
  5348          example: "2d41c047c83e09a6d61d464906feb2a2f3c52aa4"
  5349  
  5350    SwarmInfo:
  5351      description: |
  5352        Represents generic information about swarm.
  5353      type: "object"
  5354      properties:
  5355        NodeID:
  5356          description: "Unique identifier of for this node in the swarm."
  5357          type: "string"
  5358          default: ""
  5359          example: "k67qz4598weg5unwwffg6z1m1"
  5360        NodeAddr:
  5361          description: |
  5362            IP address at which this node can be reached by other nodes in the
  5363            swarm.
  5364          type: "string"
  5365          default: ""
  5366          example: "10.0.0.46"
  5367        LocalNodeState:
  5368          $ref: "#/definitions/LocalNodeState"
  5369        ControlAvailable:
  5370          type: "boolean"
  5371          default: false
  5372          example: true
  5373        Error:
  5374          type: "string"
  5375          default: ""
  5376        RemoteManagers:
  5377          description: |
  5378            List of ID's and addresses of other managers in the swarm.
  5379          type: "array"
  5380          default: null
  5381          x-nullable: true
  5382          items:
  5383            $ref: "#/definitions/PeerNode"
  5384          example:
  5385            - NodeID: "71izy0goik036k48jg985xnds"
  5386              Addr: "10.0.0.158:2377"
  5387            - NodeID: "79y6h1o4gv8n120drcprv5nmc"
  5388              Addr: "10.0.0.159:2377"
  5389            - NodeID: "k67qz4598weg5unwwffg6z1m1"
  5390              Addr: "10.0.0.46:2377"
  5391        Nodes:
  5392          description: "Total number of nodes in the swarm."
  5393          type: "integer"
  5394          x-nullable: true
  5395          example: 4
  5396        Managers:
  5397          description: "Total number of managers in the swarm."
  5398          type: "integer"
  5399          x-nullable: true
  5400          example: 3
  5401        Cluster:
  5402          $ref: "#/definitions/ClusterInfo"
  5403  
  5404    LocalNodeState:
  5405      description: "Current local status of this node."
  5406      type: "string"
  5407      default: ""
  5408      enum:
  5409        - ""
  5410        - "inactive"
  5411        - "pending"
  5412        - "active"
  5413        - "error"
  5414        - "locked"
  5415      example: "active"
  5416  
  5417    PeerNode:
  5418      description: "Represents a peer-node in the swarm"
  5419      type: "object"
  5420      properties:
  5421        NodeID:
  5422          description: "Unique identifier of for this node in the swarm."
  5423          type: "string"
  5424        Addr:
  5425          description: |
  5426            IP address and ports at which this node can be reached.
  5427          type: "string"
  5428  
  5429    NetworkAttachmentConfig:
  5430      description: |
  5431        Specifies how a service should be attached to a particular network.
  5432      type: "object"
  5433      properties:
  5434        Target:
  5435          description: |
  5436            The target network for attachment. Must be a network name or ID.
  5437          type: "string"
  5438        Aliases:
  5439          description: |
  5440            Discoverable alternate names for the service on this network.
  5441          type: "array"
  5442          items:
  5443            type: "string"
  5444        DriverOpts:
  5445          description: |
  5446            Driver attachment options for the network target.
  5447          type: "object"
  5448          additionalProperties:
  5449            type: "string"
  5450  
  5451    EventActor:
  5452      description: |
  5453        Actor describes something that generates events, like a container, network,
  5454        or a volume.
  5455      type: "object"
  5456      properties:
  5457        ID:
  5458          description: "The ID of the object emitting the event"
  5459          type: "string"
  5460          example: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743"
  5461        Attributes:
  5462          description: |
  5463            Various key/value attributes of the object, depending on its type.
  5464          type: "object"
  5465          additionalProperties:
  5466            type: "string"
  5467          example:
  5468            com.example.some-label: "some-label-value"
  5469            image: "alpine:latest"
  5470            name: "my-container"
  5471  
  5472    EventMessage:
  5473      description: |
  5474        EventMessage represents the information an event contains.
  5475      type: "object"
  5476      title: "SystemEventsResponse"
  5477      properties:
  5478        Type:
  5479          description: "The type of object emitting the event"
  5480          type: "string"
  5481          enum: ["builder", "config", "container", "daemon", "image", "network", "node", "plugin", "secret", "service", "volume"]
  5482          example: "container"
  5483        Action:
  5484          description: "The type of event"
  5485          type: "string"
  5486          example: "create"
  5487        Actor:
  5488          $ref: "#/definitions/EventActor"
  5489        scope:
  5490          description: |
  5491            Scope of the event. Engine events are `local` scope. Cluster (Swarm)
  5492            events are `swarm` scope.
  5493          type: "string"
  5494          enum: ["local", "swarm"]
  5495        time:
  5496          description: "Timestamp of event"
  5497          type: "integer"
  5498          format: "int64"
  5499          example: 1629574695
  5500        timeNano:
  5501          description: "Timestamp of event, with nanosecond accuracy"
  5502          type: "integer"
  5503          format: "int64"
  5504          example: 1629574695515050031
  5505  
  5506    OCIDescriptor:
  5507      type: "object"
  5508      x-go-name: Descriptor
  5509      description: |
  5510        A descriptor struct containing digest, media type, and size, as defined in
  5511        the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md).
  5512      properties:
  5513        mediaType:
  5514          description: |
  5515            The media type of the object this schema refers to.
  5516          type: "string"
  5517          example: "application/vnd.docker.distribution.manifest.v2+json"
  5518        digest:
  5519          description: |
  5520            The digest of the targeted content.
  5521          type: "string"
  5522          example: "sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96"
  5523        size:
  5524          description: |
  5525            The size in bytes of the blob.
  5526          type: "integer"
  5527          format: "int64"
  5528          example: 3987495
  5529          # TODO Not yet including these fields for now, as they are nil / omitted in our response.
  5530          # urls:
  5531          #   description: |
  5532          #     List of URLs from which this object MAY be downloaded.
  5533          #   type: "array"
  5534          #   items:
  5535          #     type: "string"
  5536          #     format: "uri"
  5537          # annotations:
  5538          #   description: |
  5539          #     Arbitrary metadata relating to the targeted content.
  5540          #   type: "object"
  5541          #   additionalProperties:
  5542          #     type: "string"
  5543          # platform:
  5544          #   $ref: "#/definitions/OCIPlatform"
  5545  
  5546    OCIPlatform:
  5547      type: "object"
  5548      x-go-name: Platform
  5549      description: |
  5550        Describes the platform which the image in the manifest runs on, as defined
  5551        in the [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md).
  5552      properties:
  5553        architecture:
  5554          description: |
  5555            The CPU architecture, for example `amd64` or `ppc64`.
  5556          type: "string"
  5557          example: "arm"
  5558        os:
  5559          description: |
  5560            The operating system, for example `linux` or `windows`.
  5561          type: "string"
  5562          example: "windows"
  5563        os.version:
  5564          description: |
  5565            Optional field specifying the operating system version, for example on
  5566            Windows `10.0.19041.1165`.
  5567          type: "string"
  5568          example: "10.0.19041.1165"
  5569        os.features:
  5570          description: |
  5571            Optional field specifying an array of strings, each listing a required
  5572            OS feature (for example on Windows `win32k`).
  5573          type: "array"
  5574          items:
  5575            type: "string"
  5576          example:
  5577            - "win32k"
  5578        variant:
  5579          description: |
  5580            Optional field specifying a variant of the CPU, for example `v7` to
  5581            specify ARMv7 when architecture is `arm`.
  5582          type: "string"
  5583          example: "v7"
  5584  
  5585    DistributionInspect:
  5586      type: "object"
  5587      x-go-name: DistributionInspect
  5588      title: "DistributionInspectResponse"
  5589      required: [Descriptor, Platforms]
  5590      description: |
  5591        Describes the result obtained from contacting the registry to retrieve
  5592        image metadata.
  5593      properties:
  5594        Descriptor:
  5595          $ref: "#/definitions/OCIDescriptor"
  5596        Platforms:
  5597          type: "array"
  5598          description: |
  5599            An array containing all platforms supported by the image.
  5600          items:
  5601            $ref: "#/definitions/OCIPlatform"
  5602  
  5603  paths:
  5604    /containers/json:
  5605      get:
  5606        summary: "List containers"
  5607        description: |
  5608          Returns a list of containers. For details on the format, see the
  5609          [inspect endpoint](#operation/ContainerInspect).
  5610  
  5611          Note that it uses a different, smaller representation of a container
  5612          than inspecting a single container. For example, the list of linked
  5613          containers is not propagated .
  5614        operationId: "ContainerList"
  5615        produces:
  5616          - "application/json"
  5617        parameters:
  5618          - name: "all"
  5619            in: "query"
  5620            description: |
  5621              Return all containers. By default, only running containers are shown.
  5622            type: "boolean"
  5623            default: false
  5624          - name: "limit"
  5625            in: "query"
  5626            description: |
  5627              Return this number of most recently created containers, including
  5628              non-running ones.
  5629            type: "integer"
  5630          - name: "size"
  5631            in: "query"
  5632            description: |
  5633              Return the size of container as fields `SizeRw` and `SizeRootFs`.
  5634            type: "boolean"
  5635            default: false
  5636          - name: "filters"
  5637            in: "query"
  5638            description: |
  5639              Filters to process on the container list, encoded as JSON (a
  5640              `map[string][]string`). For example, `{"status": ["paused"]}` will
  5641              only return paused containers.
  5642  
  5643              Available filters:
  5644  
  5645              - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`)
  5646              - `before`=(`<container id>` or `<container name>`)
  5647              - `expose`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`)
  5648              - `exited=<int>` containers with exit code of `<int>`
  5649              - `health`=(`starting`|`healthy`|`unhealthy`|`none`)
  5650              - `id=<ID>` a container's ID
  5651              - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only)
  5652              - `is-task=`(`true`|`false`)
  5653              - `label=key` or `label="key=value"` of a container label
  5654              - `name=<name>` a container's name
  5655              - `network`=(`<network id>` or `<network name>`)
  5656              - `publish`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`)
  5657              - `since`=(`<container id>` or `<container name>`)
  5658              - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`)
  5659              - `volume`=(`<volume name>` or `<mount point destination>`)
  5660            type: "string"
  5661        responses:
  5662          200:
  5663            description: "no error"
  5664            schema:
  5665              type: "array"
  5666              items:
  5667                $ref: "#/definitions/ContainerSummary"
  5668            examples:
  5669              application/json:
  5670                - Id: "8dfafdbc3a40"
  5671                  Names:
  5672                    - "/boring_feynman"
  5673                  Image: "ubuntu:latest"
  5674                  ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  5675                  Command: "echo 1"
  5676                  Created: 1367854155
  5677                  State: "Exited"
  5678                  Status: "Exit 0"
  5679                  Ports:
  5680                    - PrivatePort: 2222
  5681                      PublicPort: 3333
  5682                      Type: "tcp"
  5683                  Labels:
  5684                    com.example.vendor: "Acme"
  5685                    com.example.license: "GPL"
  5686                    com.example.version: "1.0"
  5687                  SizeRw: 12288
  5688                  SizeRootFs: 0
  5689                  HostConfig:
  5690                    NetworkMode: "default"
  5691                  NetworkSettings:
  5692                    Networks:
  5693                      bridge:
  5694                        NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  5695                        EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f"
  5696                        Gateway: "172.17.0.1"
  5697                        IPAddress: "172.17.0.2"
  5698                        IPPrefixLen: 16
  5699                        IPv6Gateway: ""
  5700                        GlobalIPv6Address: ""
  5701                        GlobalIPv6PrefixLen: 0
  5702                        MacAddress: "02:42:ac:11:00:02"
  5703                  Mounts:
  5704                    - Name: "fac362...80535"
  5705                      Source: "/data"
  5706                      Destination: "/data"
  5707                      Driver: "local"
  5708                      Mode: "ro,Z"
  5709                      RW: false
  5710                      Propagation: ""
  5711                - Id: "9cd87474be90"
  5712                  Names:
  5713                    - "/coolName"
  5714                  Image: "ubuntu:latest"
  5715                  ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  5716                  Command: "echo 222222"
  5717                  Created: 1367854155
  5718                  State: "Exited"
  5719                  Status: "Exit 0"
  5720                  Ports: []
  5721                  Labels: {}
  5722                  SizeRw: 12288
  5723                  SizeRootFs: 0
  5724                  HostConfig:
  5725                    NetworkMode: "default"
  5726                  NetworkSettings:
  5727                    Networks:
  5728                      bridge:
  5729                        NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  5730                        EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a"
  5731                        Gateway: "172.17.0.1"
  5732                        IPAddress: "172.17.0.8"
  5733                        IPPrefixLen: 16
  5734                        IPv6Gateway: ""
  5735                        GlobalIPv6Address: ""
  5736                        GlobalIPv6PrefixLen: 0
  5737                        MacAddress: "02:42:ac:11:00:08"
  5738                  Mounts: []
  5739                - Id: "3176a2479c92"
  5740                  Names:
  5741                    - "/sleepy_dog"
  5742                  Image: "ubuntu:latest"
  5743                  ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  5744                  Command: "echo 3333333333333333"
  5745                  Created: 1367854154
  5746                  State: "Exited"
  5747                  Status: "Exit 0"
  5748                  Ports: []
  5749                  Labels: {}
  5750                  SizeRw: 12288
  5751                  SizeRootFs: 0
  5752                  HostConfig:
  5753                    NetworkMode: "default"
  5754                  NetworkSettings:
  5755                    Networks:
  5756                      bridge:
  5757                        NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  5758                        EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d"
  5759                        Gateway: "172.17.0.1"
  5760                        IPAddress: "172.17.0.6"
  5761                        IPPrefixLen: 16
  5762                        IPv6Gateway: ""
  5763                        GlobalIPv6Address: ""
  5764                        GlobalIPv6PrefixLen: 0
  5765                        MacAddress: "02:42:ac:11:00:06"
  5766                  Mounts: []
  5767                - Id: "4cb07b47f9fb"
  5768                  Names:
  5769                    - "/running_cat"
  5770                  Image: "ubuntu:latest"
  5771                  ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  5772                  Command: "echo 444444444444444444444444444444444"
  5773                  Created: 1367854152
  5774                  State: "Exited"
  5775                  Status: "Exit 0"
  5776                  Ports: []
  5777                  Labels: {}
  5778                  SizeRw: 12288
  5779                  SizeRootFs: 0
  5780                  HostConfig:
  5781                    NetworkMode: "default"
  5782                  NetworkSettings:
  5783                    Networks:
  5784                      bridge:
  5785                        NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  5786                        EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9"
  5787                        Gateway: "172.17.0.1"
  5788                        IPAddress: "172.17.0.5"
  5789                        IPPrefixLen: 16
  5790                        IPv6Gateway: ""
  5791                        GlobalIPv6Address: ""
  5792                        GlobalIPv6PrefixLen: 0
  5793                        MacAddress: "02:42:ac:11:00:05"
  5794                  Mounts: []
  5795          400:
  5796            description: "bad parameter"
  5797            schema:
  5798              $ref: "#/definitions/ErrorResponse"
  5799          500:
  5800            description: "server error"
  5801            schema:
  5802              $ref: "#/definitions/ErrorResponse"
  5803        tags: ["Container"]
  5804    /containers/create:
  5805      post:
  5806        summary: "Create a container"
  5807        operationId: "ContainerCreate"
  5808        consumes:
  5809          - "application/json"
  5810          - "application/octet-stream"
  5811        produces:
  5812          - "application/json"
  5813        parameters:
  5814          - name: "name"
  5815            in: "query"
  5816            description: |
  5817              Assign the specified name to the container. Must match
  5818              `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`.
  5819            type: "string"
  5820            pattern: "^/?[a-zA-Z0-9][a-zA-Z0-9_.-]+$"
  5821          - name: "body"
  5822            in: "body"
  5823            description: "Container to create"
  5824            schema:
  5825              allOf:
  5826                - $ref: "#/definitions/ContainerConfig"
  5827                - type: "object"
  5828                  properties:
  5829                    HostConfig:
  5830                      $ref: "#/definitions/HostConfig"
  5831                    NetworkingConfig:
  5832                      $ref: "#/definitions/NetworkingConfig"
  5833              example:
  5834                Hostname: ""
  5835                Domainname: ""
  5836                User: ""
  5837                AttachStdin: false
  5838                AttachStdout: true
  5839                AttachStderr: true
  5840                Tty: false
  5841                OpenStdin: false
  5842                StdinOnce: false
  5843                Env:
  5844                  - "FOO=bar"
  5845                  - "BAZ=quux"
  5846                Cmd:
  5847                  - "date"
  5848                Entrypoint: ""
  5849                Image: "ubuntu"
  5850                Labels:
  5851                  com.example.vendor: "Acme"
  5852                  com.example.license: "GPL"
  5853                  com.example.version: "1.0"
  5854                Volumes:
  5855                  /volumes/data: {}
  5856                WorkingDir: ""
  5857                NetworkDisabled: false
  5858                MacAddress: "12:34:56:78:9a:bc"
  5859                ExposedPorts:
  5860                  22/tcp: {}
  5861                StopSignal: "SIGTERM"
  5862                StopTimeout: 10
  5863                HostConfig:
  5864                  Binds:
  5865                    - "/tmp:/tmp"
  5866                  Links:
  5867                    - "redis3:redis"
  5868                  Memory: 0
  5869                  MemorySwap: 0
  5870                  MemoryReservation: 0
  5871                  KernelMemory: 0
  5872                  NanoCpus: 500000
  5873                  CpuPercent: 80
  5874                  CpuShares: 512
  5875                  CpuPeriod: 100000
  5876                  CpuRealtimePeriod: 1000000
  5877                  CpuRealtimeRuntime: 10000
  5878                  CpuQuota: 50000
  5879                  CpusetCpus: "0,1"
  5880                  CpusetMems: "0,1"
  5881                  MaximumIOps: 0
  5882                  MaximumIOBps: 0
  5883                  BlkioWeight: 300
  5884                  BlkioWeightDevice:
  5885                    - {}
  5886                  BlkioDeviceReadBps:
  5887                    - {}
  5888                  BlkioDeviceReadIOps:
  5889                    - {}
  5890                  BlkioDeviceWriteBps:
  5891                    - {}
  5892                  BlkioDeviceWriteIOps:
  5893                    - {}
  5894                  DeviceRequests:
  5895                    - Driver: "nvidia"
  5896                      Count: -1
  5897                      DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"]
  5898                      Capabilities: [["gpu", "nvidia", "compute"]]
  5899                      Options:
  5900                        property1: "string"
  5901                        property2: "string"
  5902                  MemorySwappiness: 60
  5903                  OomKillDisable: false
  5904                  OomScoreAdj: 500
  5905                  PidMode: ""
  5906                  PidsLimit: 0
  5907                  PortBindings:
  5908                    22/tcp:
  5909                      - HostPort: "11022"
  5910                  PublishAllPorts: false
  5911                  Privileged: false
  5912                  ReadonlyRootfs: false
  5913                  Dns:
  5914                    - "8.8.8.8"
  5915                  DnsOptions:
  5916                    - ""
  5917                  DnsSearch:
  5918                    - ""
  5919                  VolumesFrom:
  5920                    - "parent"
  5921                    - "other:ro"
  5922                  CapAdd:
  5923                    - "NET_ADMIN"
  5924                  CapDrop:
  5925                    - "MKNOD"
  5926                  GroupAdd:
  5927                    - "newgroup"
  5928                  RestartPolicy:
  5929                    Name: ""
  5930                    MaximumRetryCount: 0
  5931                  AutoRemove: true
  5932                  NetworkMode: "bridge"
  5933                  Devices: []
  5934                  Ulimits:
  5935                    - {}
  5936                  LogConfig:
  5937                    Type: "json-file"
  5938                    Config: {}
  5939                  SecurityOpt: []
  5940                  StorageOpt: {}
  5941                  CgroupParent: ""
  5942                  VolumeDriver: ""
  5943                  ShmSize: 67108864
  5944                NetworkingConfig:
  5945                  EndpointsConfig:
  5946                    isolated_nw:
  5947                      IPAMConfig:
  5948                        IPv4Address: "172.20.30.33"
  5949                        IPv6Address: "2001:db8:abcd::3033"
  5950                        LinkLocalIPs:
  5951                          - "169.254.34.68"
  5952                          - "fe80::3468"
  5953                      Links:
  5954                        - "container_1"
  5955                        - "container_2"
  5956                      Aliases:
  5957                        - "server_x"
  5958                        - "server_y"
  5959  
  5960            required: true
  5961        responses:
  5962          201:
  5963            description: "Container created successfully"
  5964            schema:
  5965              type: "object"
  5966              title: "ContainerCreateResponse"
  5967              description: "OK response to ContainerCreate operation"
  5968              required: [Id, Warnings]
  5969              properties:
  5970                Id:
  5971                  description: "The ID of the created container"
  5972                  type: "string"
  5973                  x-nullable: false
  5974                Warnings:
  5975                  description: "Warnings encountered when creating the container"
  5976                  type: "array"
  5977                  x-nullable: false
  5978                  items:
  5979                    type: "string"
  5980            examples:
  5981              application/json:
  5982                Id: "e90e34656806"
  5983                Warnings: []
  5984          400:
  5985            description: "bad parameter"
  5986            schema:
  5987              $ref: "#/definitions/ErrorResponse"
  5988          404:
  5989            description: "no such image"
  5990            schema:
  5991              $ref: "#/definitions/ErrorResponse"
  5992            examples:
  5993              application/json:
  5994                message: "No such image: c2ada9df5af8"
  5995          409:
  5996            description: "conflict"
  5997            schema:
  5998              $ref: "#/definitions/ErrorResponse"
  5999          500:
  6000            description: "server error"
  6001            schema:
  6002              $ref: "#/definitions/ErrorResponse"
  6003        tags: ["Container"]
  6004    /containers/{id}/json:
  6005      get:
  6006        summary: "Inspect a container"
  6007        description: "Return low-level information about a container."
  6008        operationId: "ContainerInspect"
  6009        produces:
  6010          - "application/json"
  6011        responses:
  6012          200:
  6013            description: "no error"
  6014            schema:
  6015              type: "object"
  6016              title: "ContainerInspectResponse"
  6017              properties:
  6018                Id:
  6019                  description: "The ID of the container"
  6020                  type: "string"
  6021                Created:
  6022                  description: "The time the container was created"
  6023                  type: "string"
  6024                Path:
  6025                  description: "The path to the command being run"
  6026                  type: "string"
  6027                Args:
  6028                  description: "The arguments to the command being run"
  6029                  type: "array"
  6030                  items:
  6031                    type: "string"
  6032                State:
  6033                  $ref: "#/definitions/ContainerState"
  6034                Image:
  6035                  description: "The container's image ID"
  6036                  type: "string"
  6037                ResolvConfPath:
  6038                  type: "string"
  6039                HostnamePath:
  6040                  type: "string"
  6041                HostsPath:
  6042                  type: "string"
  6043                LogPath:
  6044                  type: "string"
  6045                Name:
  6046                  type: "string"
  6047                RestartCount:
  6048                  type: "integer"
  6049                Driver:
  6050                  type: "string"
  6051                Platform:
  6052                  type: "string"
  6053                MountLabel:
  6054                  type: "string"
  6055                ProcessLabel:
  6056                  type: "string"
  6057                AppArmorProfile:
  6058                  type: "string"
  6059                ExecIDs:
  6060                  description: "IDs of exec instances that are running in the container."
  6061                  type: "array"
  6062                  items:
  6063                    type: "string"
  6064                  x-nullable: true
  6065                HostConfig:
  6066                  $ref: "#/definitions/HostConfig"
  6067                GraphDriver:
  6068                  $ref: "#/definitions/GraphDriverData"
  6069                SizeRw:
  6070                  description: |
  6071                    The size of files that have been created or changed by this
  6072                    container.
  6073                  type: "integer"
  6074                  format: "int64"
  6075                SizeRootFs:
  6076                  description: "The total size of all the files in this container."
  6077                  type: "integer"
  6078                  format: "int64"
  6079                Mounts:
  6080                  type: "array"
  6081                  items:
  6082                    $ref: "#/definitions/MountPoint"
  6083                Config:
  6084                  $ref: "#/definitions/ContainerConfig"
  6085                NetworkSettings:
  6086                  $ref: "#/definitions/NetworkSettings"
  6087            examples:
  6088              application/json:
  6089                AppArmorProfile: ""
  6090                Args:
  6091                  - "-c"
  6092                  - "exit 9"
  6093                Config:
  6094                  AttachStderr: true
  6095                  AttachStdin: false
  6096                  AttachStdout: true
  6097                  Cmd:
  6098                    - "/bin/sh"
  6099                    - "-c"
  6100                    - "exit 9"
  6101                  Domainname: ""
  6102                  Env:
  6103                    - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  6104                  Healthcheck:
  6105                    Test: ["CMD-SHELL", "exit 0"]
  6106                  Hostname: "ba033ac44011"
  6107                  Image: "ubuntu"
  6108                  Labels:
  6109                    com.example.vendor: "Acme"
  6110                    com.example.license: "GPL"
  6111                    com.example.version: "1.0"
  6112                  MacAddress: ""
  6113                  NetworkDisabled: false
  6114                  OpenStdin: false
  6115                  StdinOnce: false
  6116                  Tty: false
  6117                  User: ""
  6118                  Volumes:
  6119                    /volumes/data: {}
  6120                  WorkingDir: ""
  6121                  StopSignal: "SIGTERM"
  6122                  StopTimeout: 10
  6123                Created: "2015-01-06T15:47:31.485331387Z"
  6124                Driver: "overlay2"
  6125                ExecIDs:
  6126                  - "b35395de42bc8abd327f9dd65d913b9ba28c74d2f0734eeeae84fa1c616a0fca"
  6127                  - "3fc1232e5cd20c8de182ed81178503dc6437f4e7ef12b52cc5e8de020652f1c4"
  6128                HostConfig:
  6129                  MaximumIOps: 0
  6130                  MaximumIOBps: 0
  6131                  BlkioWeight: 0
  6132                  BlkioWeightDevice:
  6133                    - {}
  6134                  BlkioDeviceReadBps:
  6135                    - {}
  6136                  BlkioDeviceWriteBps:
  6137                    - {}
  6138                  BlkioDeviceReadIOps:
  6139                    - {}
  6140                  BlkioDeviceWriteIOps:
  6141                    - {}
  6142                  ContainerIDFile: ""
  6143                  CpusetCpus: ""
  6144                  CpusetMems: ""
  6145                  CpuPercent: 80
  6146                  CpuShares: 0
  6147                  CpuPeriod: 100000
  6148                  CpuRealtimePeriod: 1000000
  6149                  CpuRealtimeRuntime: 10000
  6150                  Devices: []
  6151                  DeviceRequests:
  6152                    - Driver: "nvidia"
  6153                      Count: -1
  6154                      DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"]
  6155                      Capabilities: [["gpu", "nvidia", "compute"]]
  6156                      Options:
  6157                        property1: "string"
  6158                        property2: "string"
  6159                  IpcMode: ""
  6160                  Memory: 0
  6161                  MemorySwap: 0
  6162                  MemoryReservation: 0
  6163                  KernelMemory: 0
  6164                  OomKillDisable: false
  6165                  OomScoreAdj: 500
  6166                  NetworkMode: "bridge"
  6167                  PidMode: ""
  6168                  PortBindings: {}
  6169                  Privileged: false
  6170                  ReadonlyRootfs: false
  6171                  PublishAllPorts: false
  6172                  RestartPolicy:
  6173                    MaximumRetryCount: 2
  6174                    Name: "on-failure"
  6175                  LogConfig:
  6176                    Type: "json-file"
  6177                  Sysctls:
  6178                    net.ipv4.ip_forward: "1"
  6179                  Ulimits:
  6180                    - {}
  6181                  VolumeDriver: ""
  6182                  ShmSize: 67108864
  6183                HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname"
  6184                HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts"
  6185                LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log"
  6186                Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39"
  6187                Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2"
  6188                MountLabel: ""
  6189                Name: "/boring_euclid"
  6190                NetworkSettings:
  6191                  Bridge: ""
  6192                  SandboxID: ""
  6193                  HairpinMode: false
  6194                  LinkLocalIPv6Address: ""
  6195                  LinkLocalIPv6PrefixLen: 0
  6196                  SandboxKey: ""
  6197                  EndpointID: ""
  6198                  Gateway: ""
  6199                  GlobalIPv6Address: ""
  6200                  GlobalIPv6PrefixLen: 0
  6201                  IPAddress: ""
  6202                  IPPrefixLen: 0
  6203                  IPv6Gateway: ""
  6204                  MacAddress: ""
  6205                  Networks:
  6206                    bridge:
  6207                      NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  6208                      EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d"
  6209                      Gateway: "172.17.0.1"
  6210                      IPAddress: "172.17.0.2"
  6211                      IPPrefixLen: 16
  6212                      IPv6Gateway: ""
  6213                      GlobalIPv6Address: ""
  6214                      GlobalIPv6PrefixLen: 0
  6215                      MacAddress: "02:42:ac:12:00:02"
  6216                Path: "/bin/sh"
  6217                ProcessLabel: ""
  6218                ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf"
  6219                RestartCount: 1
  6220                State:
  6221                  Error: ""
  6222                  ExitCode: 9
  6223                  FinishedAt: "2015-01-06T15:47:32.080254511Z"
  6224                  Health:
  6225                    Status: "healthy"
  6226                    FailingStreak: 0
  6227                    Log:
  6228                      - Start: "2019-12-22T10:59:05.6385933Z"
  6229                        End: "2019-12-22T10:59:05.8078452Z"
  6230                        ExitCode: 0
  6231                        Output: ""
  6232                  OOMKilled: false
  6233                  Dead: false
  6234                  Paused: false
  6235                  Pid: 0
  6236                  Restarting: false
  6237                  Running: true
  6238                  StartedAt: "2015-01-06T15:47:32.072697474Z"
  6239                  Status: "running"
  6240                Mounts:
  6241                  - Name: "fac362...80535"
  6242                    Source: "/data"
  6243                    Destination: "/data"
  6244                    Driver: "local"
  6245                    Mode: "ro,Z"
  6246                    RW: false
  6247                    Propagation: ""
  6248          404:
  6249            description: "no such container"
  6250            schema:
  6251              $ref: "#/definitions/ErrorResponse"
  6252            examples:
  6253              application/json:
  6254                message: "No such container: c2ada9df5af8"
  6255          500:
  6256            description: "server error"
  6257            schema:
  6258              $ref: "#/definitions/ErrorResponse"
  6259        parameters:
  6260          - name: "id"
  6261            in: "path"
  6262            required: true
  6263            description: "ID or name of the container"
  6264            type: "string"
  6265          - name: "size"
  6266            in: "query"
  6267            type: "boolean"
  6268            default: false
  6269            description: "Return the size of container as fields `SizeRw` and `SizeRootFs`"
  6270        tags: ["Container"]
  6271    /containers/{id}/top:
  6272      get:
  6273        summary: "List processes running inside a container"
  6274        description: |
  6275          On Unix systems, this is done by running the `ps` command. This endpoint
  6276          is not supported on Windows.
  6277        operationId: "ContainerTop"
  6278        responses:
  6279          200:
  6280            description: "no error"
  6281            schema:
  6282              type: "object"
  6283              title: "ContainerTopResponse"
  6284              description: "OK response to ContainerTop operation"
  6285              properties:
  6286                Titles:
  6287                  description: "The ps column titles"
  6288                  type: "array"
  6289                  items:
  6290                    type: "string"
  6291                Processes:
  6292                  description: |
  6293                    Each process running in the container, where each is process
  6294                    is an array of values corresponding to the titles.
  6295                  type: "array"
  6296                  items:
  6297                    type: "array"
  6298                    items:
  6299                      type: "string"
  6300            examples:
  6301              application/json:
  6302                Titles:
  6303                  - "UID"
  6304                  - "PID"
  6305                  - "PPID"
  6306                  - "C"
  6307                  - "STIME"
  6308                  - "TTY"
  6309                  - "TIME"
  6310                  - "CMD"
  6311                Processes:
  6312                  -
  6313                    - "root"
  6314                    - "13642"
  6315                    - "882"
  6316                    - "0"
  6317                    - "17:03"
  6318                    - "pts/0"
  6319                    - "00:00:00"
  6320                    - "/bin/bash"
  6321                  -
  6322                    - "root"
  6323                    - "13735"
  6324                    - "13642"
  6325                    - "0"
  6326                    - "17:06"
  6327                    - "pts/0"
  6328                    - "00:00:00"
  6329                    - "sleep 10"
  6330          404:
  6331            description: "no such container"
  6332            schema:
  6333              $ref: "#/definitions/ErrorResponse"
  6334            examples:
  6335              application/json:
  6336                message: "No such container: c2ada9df5af8"
  6337          500:
  6338            description: "server error"
  6339            schema:
  6340              $ref: "#/definitions/ErrorResponse"
  6341        parameters:
  6342          - name: "id"
  6343            in: "path"
  6344            required: true
  6345            description: "ID or name of the container"
  6346            type: "string"
  6347          - name: "ps_args"
  6348            in: "query"
  6349            description: "The arguments to pass to `ps`. For example, `aux`"
  6350            type: "string"
  6351            default: "-ef"
  6352        tags: ["Container"]
  6353    /containers/{id}/logs:
  6354      get:
  6355        summary: "Get container logs"
  6356        description: |
  6357          Get `stdout` and `stderr` logs from a container.
  6358  
  6359          Note: This endpoint works only for containers with the `json-file` or
  6360          `journald` logging driver.
  6361        operationId: "ContainerLogs"
  6362        responses:
  6363          200:
  6364            description: |
  6365              logs returned as a stream in response body.
  6366              For the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach).
  6367              Note that unlike the attach endpoint, the logs endpoint does not
  6368              upgrade the connection and does not set Content-Type.
  6369            schema:
  6370              type: "string"
  6371              format: "binary"
  6372          404:
  6373            description: "no such container"
  6374            schema:
  6375              $ref: "#/definitions/ErrorResponse"
  6376            examples:
  6377              application/json:
  6378                message: "No such container: c2ada9df5af8"
  6379          500:
  6380            description: "server error"
  6381            schema:
  6382              $ref: "#/definitions/ErrorResponse"
  6383        parameters:
  6384          - name: "id"
  6385            in: "path"
  6386            required: true
  6387            description: "ID or name of the container"
  6388            type: "string"
  6389          - name: "follow"
  6390            in: "query"
  6391            description: "Keep connection after returning logs."
  6392            type: "boolean"
  6393            default: false
  6394          - name: "stdout"
  6395            in: "query"
  6396            description: "Return logs from `stdout`"
  6397            type: "boolean"
  6398            default: false
  6399          - name: "stderr"
  6400            in: "query"
  6401            description: "Return logs from `stderr`"
  6402            type: "boolean"
  6403            default: false
  6404          - name: "since"
  6405            in: "query"
  6406            description: "Only return logs since this time, as a UNIX timestamp"
  6407            type: "integer"
  6408            default: 0
  6409          - name: "until"
  6410            in: "query"
  6411            description: "Only return logs before this time, as a UNIX timestamp"
  6412            type: "integer"
  6413            default: 0
  6414          - name: "timestamps"
  6415            in: "query"
  6416            description: "Add timestamps to every log line"
  6417            type: "boolean"
  6418            default: false
  6419          - name: "tail"
  6420            in: "query"
  6421            description: |
  6422              Only return this number of log lines from the end of the logs.
  6423              Specify as an integer or `all` to output all log lines.
  6424            type: "string"
  6425            default: "all"
  6426        tags: ["Container"]
  6427    /containers/{id}/changes:
  6428      get:
  6429        summary: "Get changes on a container’s filesystem"
  6430        description: |
  6431          Returns which files in a container's filesystem have been added, deleted,
  6432          or modified. The `Kind` of modification can be one of:
  6433  
  6434          - `0`: Modified
  6435          - `1`: Added
  6436          - `2`: Deleted
  6437        operationId: "ContainerChanges"
  6438        produces: ["application/json"]
  6439        responses:
  6440          200:
  6441            description: "The list of changes"
  6442            schema:
  6443              type: "array"
  6444              items:
  6445                type: "object"
  6446                x-go-name: "ContainerChangeResponseItem"
  6447                title: "ContainerChangeResponseItem"
  6448                description: "change item in response to ContainerChanges operation"
  6449                required: [Path, Kind]
  6450                properties:
  6451                  Path:
  6452                    description: "Path to file that has changed"
  6453                    type: "string"
  6454                    x-nullable: false
  6455                  Kind:
  6456                    description: "Kind of change"
  6457                    type: "integer"
  6458                    format: "uint8"
  6459                    enum: [0, 1, 2]
  6460                    x-nullable: false
  6461            examples:
  6462              application/json:
  6463                - Path: "/dev"
  6464                  Kind: 0
  6465                - Path: "/dev/kmsg"
  6466                  Kind: 1
  6467                - Path: "/test"
  6468                  Kind: 1
  6469          404:
  6470            description: "no such container"
  6471            schema:
  6472              $ref: "#/definitions/ErrorResponse"
  6473            examples:
  6474              application/json:
  6475                message: "No such container: c2ada9df5af8"
  6476          500:
  6477            description: "server error"
  6478            schema:
  6479              $ref: "#/definitions/ErrorResponse"
  6480        parameters:
  6481          - name: "id"
  6482            in: "path"
  6483            required: true
  6484            description: "ID or name of the container"
  6485            type: "string"
  6486        tags: ["Container"]
  6487    /containers/{id}/export:
  6488      get:
  6489        summary: "Export a container"
  6490        description: "Export the contents of a container as a tarball."
  6491        operationId: "ContainerExport"
  6492        produces:
  6493          - "application/octet-stream"
  6494        responses:
  6495          200:
  6496            description: "no error"
  6497          404:
  6498            description: "no such container"
  6499            schema:
  6500              $ref: "#/definitions/ErrorResponse"
  6501            examples:
  6502              application/json:
  6503                message: "No such container: c2ada9df5af8"
  6504          500:
  6505            description: "server error"
  6506            schema:
  6507              $ref: "#/definitions/ErrorResponse"
  6508        parameters:
  6509          - name: "id"
  6510            in: "path"
  6511            required: true
  6512            description: "ID or name of the container"
  6513            type: "string"
  6514        tags: ["Container"]
  6515    /containers/{id}/stats:
  6516      get:
  6517        summary: "Get container stats based on resource usage"
  6518        description: |
  6519          This endpoint returns a live stream of a container’s resource usage
  6520          statistics.
  6521  
  6522          The `precpu_stats` is the CPU statistic of the *previous* read, and is
  6523          used to calculate the CPU usage percentage. It is not an exact copy
  6524          of the `cpu_stats` field.
  6525  
  6526          If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is
  6527          nil then for compatibility with older daemons the length of the
  6528          corresponding `cpu_usage.percpu_usage` array should be used.
  6529  
  6530          To calculate the values shown by the `stats` command of the docker cli tool
  6531          the following formulas can be used:
  6532          * used_memory = `memory_stats.usage - memory_stats.stats.cache`
  6533          * available_memory = `memory_stats.limit`
  6534          * Memory usage % = `(used_memory / available_memory) * 100.0`
  6535          * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
  6536          * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
  6537          * number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
  6538          * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
  6539        operationId: "ContainerStats"
  6540        produces: ["application/json"]
  6541        responses:
  6542          200:
  6543            description: "no error"
  6544            schema:
  6545              type: "object"
  6546            examples:
  6547              application/json:
  6548                read: "2015-01-08T22:57:31.547920715Z"
  6549                pids_stats:
  6550                  current: 3
  6551                networks:
  6552                  eth0:
  6553                    rx_bytes: 5338
  6554                    rx_dropped: 0
  6555                    rx_errors: 0
  6556                    rx_packets: 36
  6557                    tx_bytes: 648
  6558                    tx_dropped: 0
  6559                    tx_errors: 0
  6560                    tx_packets: 8
  6561                  eth5:
  6562                    rx_bytes: 4641
  6563                    rx_dropped: 0
  6564                    rx_errors: 0
  6565                    rx_packets: 26
  6566                    tx_bytes: 690
  6567                    tx_dropped: 0
  6568                    tx_errors: 0
  6569                    tx_packets: 9
  6570                memory_stats:
  6571                  stats:
  6572                    total_pgmajfault: 0
  6573                    cache: 0
  6574                    mapped_file: 0
  6575                    total_inactive_file: 0
  6576                    pgpgout: 414
  6577                    rss: 6537216
  6578                    total_mapped_file: 0
  6579                    writeback: 0
  6580                    unevictable: 0
  6581                    pgpgin: 477
  6582                    total_unevictable: 0
  6583                    pgmajfault: 0
  6584                    total_rss: 6537216
  6585                    total_rss_huge: 6291456
  6586                    total_writeback: 0
  6587                    total_inactive_anon: 0
  6588                    rss_huge: 6291456
  6589                    hierarchical_memory_limit: 67108864
  6590                    total_pgfault: 964
  6591                    total_active_file: 0
  6592                    active_anon: 6537216
  6593                    total_active_anon: 6537216
  6594                    total_pgpgout: 414
  6595                    total_cache: 0
  6596                    inactive_anon: 0
  6597                    active_file: 0
  6598                    pgfault: 964
  6599                    inactive_file: 0
  6600                    total_pgpgin: 477
  6601                  max_usage: 6651904
  6602                  usage: 6537216
  6603                  failcnt: 0
  6604                  limit: 67108864
  6605                blkio_stats: {}
  6606                cpu_stats:
  6607                  cpu_usage:
  6608                    percpu_usage:
  6609                      - 8646879
  6610                      - 24472255
  6611                      - 36438778
  6612                      - 30657443
  6613                    usage_in_usermode: 50000000
  6614                    total_usage: 100215355
  6615                    usage_in_kernelmode: 30000000
  6616                  system_cpu_usage: 739306590000000
  6617                  online_cpus: 4
  6618                  throttling_data:
  6619                    periods: 0
  6620                    throttled_periods: 0
  6621                    throttled_time: 0
  6622                precpu_stats:
  6623                  cpu_usage:
  6624                    percpu_usage:
  6625                      - 8646879
  6626                      - 24350896
  6627                      - 36438778
  6628                      - 30657443
  6629                    usage_in_usermode: 50000000
  6630                    total_usage: 100093996
  6631                    usage_in_kernelmode: 30000000
  6632                  system_cpu_usage: 9492140000000
  6633                  online_cpus: 4
  6634                  throttling_data:
  6635                    periods: 0
  6636                    throttled_periods: 0
  6637                    throttled_time: 0
  6638          404:
  6639            description: "no such container"
  6640            schema:
  6641              $ref: "#/definitions/ErrorResponse"
  6642            examples:
  6643              application/json:
  6644                message: "No such container: c2ada9df5af8"
  6645          500:
  6646            description: "server error"
  6647            schema:
  6648              $ref: "#/definitions/ErrorResponse"
  6649        parameters:
  6650          - name: "id"
  6651            in: "path"
  6652            required: true
  6653            description: "ID or name of the container"
  6654            type: "string"
  6655          - name: "stream"
  6656            in: "query"
  6657            description: |
  6658              Stream the output. If false, the stats will be output once and then
  6659              it will disconnect.
  6660            type: "boolean"
  6661            default: true
  6662        tags: ["Container"]
  6663    /containers/{id}/resize:
  6664      post:
  6665        summary: "Resize a container TTY"
  6666        description: "Resize the TTY for a container."
  6667        operationId: "ContainerResize"
  6668        consumes:
  6669          - "application/octet-stream"
  6670        produces:
  6671          - "text/plain"
  6672        responses:
  6673          200:
  6674            description: "no error"
  6675          404:
  6676            description: "no such container"
  6677            schema:
  6678              $ref: "#/definitions/ErrorResponse"
  6679            examples:
  6680              application/json:
  6681                message: "No such container: c2ada9df5af8"
  6682          500:
  6683            description: "cannot resize container"
  6684            schema:
  6685              $ref: "#/definitions/ErrorResponse"
  6686        parameters:
  6687          - name: "id"
  6688            in: "path"
  6689            required: true
  6690            description: "ID or name of the container"
  6691            type: "string"
  6692          - name: "h"
  6693            in: "query"
  6694            description: "Height of the TTY session in characters"
  6695            type: "integer"
  6696          - name: "w"
  6697            in: "query"
  6698            description: "Width of the TTY session in characters"
  6699            type: "integer"
  6700        tags: ["Container"]
  6701    /containers/{id}/start:
  6702      post:
  6703        summary: "Start a container"
  6704        operationId: "ContainerStart"
  6705        responses:
  6706          204:
  6707            description: "no error"
  6708          304:
  6709            description: "container already started"
  6710          404:
  6711            description: "no such container"
  6712            schema:
  6713              $ref: "#/definitions/ErrorResponse"
  6714            examples:
  6715              application/json:
  6716                message: "No such container: c2ada9df5af8"
  6717          500:
  6718            description: "server error"
  6719            schema:
  6720              $ref: "#/definitions/ErrorResponse"
  6721        parameters:
  6722          - name: "id"
  6723            in: "path"
  6724            required: true
  6725            description: "ID or name of the container"
  6726            type: "string"
  6727          - name: "detachKeys"
  6728            in: "query"
  6729            description: |
  6730              Override the key sequence for detaching a container. Format is a
  6731              single character `[a-Z]` or `ctrl-<value>` where `<value>` is one
  6732              of: `a-z`, `@`, `^`, `[`, `,` or `_`.
  6733            type: "string"
  6734        tags: ["Container"]
  6735    /containers/{id}/stop:
  6736      post:
  6737        summary: "Stop a container"
  6738        operationId: "ContainerStop"
  6739        responses:
  6740          204:
  6741            description: "no error"
  6742          304:
  6743            description: "container already stopped"
  6744          404:
  6745            description: "no such container"
  6746            schema:
  6747              $ref: "#/definitions/ErrorResponse"
  6748            examples:
  6749              application/json:
  6750                message: "No such container: c2ada9df5af8"
  6751          500:
  6752            description: "server error"
  6753            schema:
  6754              $ref: "#/definitions/ErrorResponse"
  6755        parameters:
  6756          - name: "id"
  6757            in: "path"
  6758            required: true
  6759            description: "ID or name of the container"
  6760            type: "string"
  6761          - name: "t"
  6762            in: "query"
  6763            description: "Number of seconds to wait before killing the container"
  6764            type: "integer"
  6765        tags: ["Container"]
  6766    /containers/{id}/restart:
  6767      post:
  6768        summary: "Restart a container"
  6769        operationId: "ContainerRestart"
  6770        responses:
  6771          204:
  6772            description: "no error"
  6773          404:
  6774            description: "no such container"
  6775            schema:
  6776              $ref: "#/definitions/ErrorResponse"
  6777            examples:
  6778              application/json:
  6779                message: "No such container: c2ada9df5af8"
  6780          500:
  6781            description: "server error"
  6782            schema:
  6783              $ref: "#/definitions/ErrorResponse"
  6784        parameters:
  6785          - name: "id"
  6786            in: "path"
  6787            required: true
  6788            description: "ID or name of the container"
  6789            type: "string"
  6790          - name: "t"
  6791            in: "query"
  6792            description: "Number of seconds to wait before killing the container"
  6793            type: "integer"
  6794        tags: ["Container"]
  6795    /containers/{id}/kill:
  6796      post:
  6797        summary: "Kill a container"
  6798        description: |
  6799          Send a POSIX signal to a container, defaulting to killing to the
  6800          container.
  6801        operationId: "ContainerKill"
  6802        responses:
  6803          204:
  6804            description: "no error"
  6805          404:
  6806            description: "no such container"
  6807            schema:
  6808              $ref: "#/definitions/ErrorResponse"
  6809            examples:
  6810              application/json:
  6811                message: "No such container: c2ada9df5af8"
  6812          409:
  6813            description: "container is not running"
  6814            schema:
  6815              $ref: "#/definitions/ErrorResponse"
  6816            examples:
  6817              application/json:
  6818                message: "Container d37cde0fe4ad63c3a7252023b2f9800282894247d145cb5933ddf6e52cc03a28 is not running"
  6819          500:
  6820            description: "server error"
  6821            schema:
  6822              $ref: "#/definitions/ErrorResponse"
  6823        parameters:
  6824          - name: "id"
  6825            in: "path"
  6826            required: true
  6827            description: "ID or name of the container"
  6828            type: "string"
  6829          - name: "signal"
  6830            in: "query"
  6831            description: |
  6832              Signal to send to the container as an integer or string (e.g. `SIGINT`).
  6833            type: "string"
  6834            default: "SIGKILL"
  6835        tags: ["Container"]
  6836    /containers/{id}/update:
  6837      post:
  6838        summary: "Update a container"
  6839        description: |
  6840          Change various configuration options of a container without having to
  6841          recreate it.
  6842        operationId: "ContainerUpdate"
  6843        consumes: ["application/json"]
  6844        produces: ["application/json"]
  6845        responses:
  6846          200:
  6847            description: "The container has been updated."
  6848            schema:
  6849              type: "object"
  6850              title: "ContainerUpdateResponse"
  6851              description: "OK response to ContainerUpdate operation"
  6852              properties:
  6853                Warnings:
  6854                  type: "array"
  6855                  items:
  6856                    type: "string"
  6857          404:
  6858            description: "no such container"
  6859            schema:
  6860              $ref: "#/definitions/ErrorResponse"
  6861            examples:
  6862              application/json:
  6863                message: "No such container: c2ada9df5af8"
  6864          500:
  6865            description: "server error"
  6866            schema:
  6867              $ref: "#/definitions/ErrorResponse"
  6868        parameters:
  6869          - name: "id"
  6870            in: "path"
  6871            required: true
  6872            description: "ID or name of the container"
  6873            type: "string"
  6874          - name: "update"
  6875            in: "body"
  6876            required: true
  6877            schema:
  6878              allOf:
  6879                - $ref: "#/definitions/Resources"
  6880                - type: "object"
  6881                  properties:
  6882                    RestartPolicy:
  6883                      $ref: "#/definitions/RestartPolicy"
  6884              example:
  6885                BlkioWeight: 300
  6886                CpuShares: 512
  6887                CpuPeriod: 100000
  6888                CpuQuota: 50000
  6889                CpuRealtimePeriod: 1000000
  6890                CpuRealtimeRuntime: 10000
  6891                CpusetCpus: "0,1"
  6892                CpusetMems: "0"
  6893                Memory: 314572800
  6894                MemorySwap: 514288000
  6895                MemoryReservation: 209715200
  6896                KernelMemory: 52428800
  6897                RestartPolicy:
  6898                  MaximumRetryCount: 4
  6899                  Name: "on-failure"
  6900        tags: ["Container"]
  6901    /containers/{id}/rename:
  6902      post:
  6903        summary: "Rename a container"
  6904        operationId: "ContainerRename"
  6905        responses:
  6906          204:
  6907            description: "no error"
  6908          404:
  6909            description: "no such container"
  6910            schema:
  6911              $ref: "#/definitions/ErrorResponse"
  6912            examples:
  6913              application/json:
  6914                message: "No such container: c2ada9df5af8"
  6915          409:
  6916            description: "name already in use"
  6917            schema:
  6918              $ref: "#/definitions/ErrorResponse"
  6919          500:
  6920            description: "server error"
  6921            schema:
  6922              $ref: "#/definitions/ErrorResponse"
  6923        parameters:
  6924          - name: "id"
  6925            in: "path"
  6926            required: true
  6927            description: "ID or name of the container"
  6928            type: "string"
  6929          - name: "name"
  6930            in: "query"
  6931            required: true
  6932            description: "New name for the container"
  6933            type: "string"
  6934        tags: ["Container"]
  6935    /containers/{id}/pause:
  6936      post:
  6937        summary: "Pause a container"
  6938        description: |
  6939          Use the freezer cgroup to suspend all processes in a container.
  6940  
  6941          Traditionally, when suspending a process the `SIGSTOP` signal is used,
  6942          which is observable by the process being suspended. With the freezer
  6943          cgroup the process is unaware, and unable to capture, that it is being
  6944          suspended, and subsequently resumed.
  6945        operationId: "ContainerPause"
  6946        responses:
  6947          204:
  6948            description: "no error"
  6949          404:
  6950            description: "no such container"
  6951            schema:
  6952              $ref: "#/definitions/ErrorResponse"
  6953            examples:
  6954              application/json:
  6955                message: "No such container: c2ada9df5af8"
  6956          500:
  6957            description: "server error"
  6958            schema:
  6959              $ref: "#/definitions/ErrorResponse"
  6960        parameters:
  6961          - name: "id"
  6962            in: "path"
  6963            required: true
  6964            description: "ID or name of the container"
  6965            type: "string"
  6966        tags: ["Container"]
  6967    /containers/{id}/unpause:
  6968      post:
  6969        summary: "Unpause a container"
  6970        description: "Resume a container which has been paused."
  6971        operationId: "ContainerUnpause"
  6972        responses:
  6973          204:
  6974            description: "no error"
  6975          404:
  6976            description: "no such container"
  6977            schema:
  6978              $ref: "#/definitions/ErrorResponse"
  6979            examples:
  6980              application/json:
  6981                message: "No such container: c2ada9df5af8"
  6982          500:
  6983            description: "server error"
  6984            schema:
  6985              $ref: "#/definitions/ErrorResponse"
  6986        parameters:
  6987          - name: "id"
  6988            in: "path"
  6989            required: true
  6990            description: "ID or name of the container"
  6991            type: "string"
  6992        tags: ["Container"]
  6993    /containers/{id}/attach:
  6994      post:
  6995        summary: "Attach to a container"
  6996        description: |
  6997          Attach to a container to read its output or send it input. You can attach
  6998          to the same container multiple times and you can reattach to containers
  6999          that have been detached.
  7000  
  7001          Either the `stream` or `logs` parameter must be `true` for this endpoint
  7002          to do anything.
  7003  
  7004          See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/)
  7005          for more details.
  7006  
  7007          ### Hijacking
  7008  
  7009          This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`,
  7010          and `stderr` on the same socket.
  7011  
  7012          This is the response from the daemon for an attach request:
  7013  
  7014          ```
  7015          HTTP/1.1 200 OK
  7016          Content-Type: application/vnd.docker.raw-stream
  7017  
  7018          [STREAM]
  7019          ```
  7020  
  7021          After the headers and two new lines, the TCP connection can now be used
  7022          for raw, bidirectional communication between the client and server.
  7023  
  7024          To hint potential proxies about connection hijacking, the Docker client
  7025          can also optionally send connection upgrade headers.
  7026  
  7027          For example, the client sends this request to upgrade the connection:
  7028  
  7029          ```
  7030          POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1
  7031          Upgrade: tcp
  7032          Connection: Upgrade
  7033          ```
  7034  
  7035          The Docker daemon will respond with a `101 UPGRADED` response, and will
  7036          similarly follow with the raw stream:
  7037  
  7038          ```
  7039          HTTP/1.1 101 UPGRADED
  7040          Content-Type: application/vnd.docker.raw-stream
  7041          Connection: Upgrade
  7042          Upgrade: tcp
  7043  
  7044          [STREAM]
  7045          ```
  7046  
  7047          ### Stream format
  7048  
  7049          When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate),
  7050          the stream over the hijacked connected is multiplexed to separate out
  7051          `stdout` and `stderr`. The stream consists of a series of frames, each
  7052          containing a header and a payload.
  7053  
  7054          The header contains the information which the stream writes (`stdout` or
  7055          `stderr`). It also contains the size of the associated frame encoded in
  7056          the last four bytes (`uint32`).
  7057  
  7058          It is encoded on the first eight bytes like this:
  7059  
  7060          ```go
  7061          header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}
  7062          ```
  7063  
  7064          `STREAM_TYPE` can be:
  7065  
  7066          - 0: `stdin` (is written on `stdout`)
  7067          - 1: `stdout`
  7068          - 2: `stderr`
  7069  
  7070          `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size
  7071          encoded as big endian.
  7072  
  7073          Following the header is the payload, which is the specified number of
  7074          bytes of `STREAM_TYPE`.
  7075  
  7076          The simplest way to implement this protocol is the following:
  7077  
  7078          1. Read 8 bytes.
  7079          2. Choose `stdout` or `stderr` depending on the first byte.
  7080          3. Extract the frame size from the last four bytes.
  7081          4. Read the extracted size and output it on the correct output.
  7082          5. Goto 1.
  7083  
  7084          ### Stream format when using a TTY
  7085  
  7086          When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate),
  7087          the stream is not multiplexed. The data exchanged over the hijacked
  7088          connection is simply the raw data from the process PTY and client's
  7089          `stdin`.
  7090  
  7091        operationId: "ContainerAttach"
  7092        produces:
  7093          - "application/vnd.docker.raw-stream"
  7094        responses:
  7095          101:
  7096            description: "no error, hints proxy about hijacking"
  7097          200:
  7098            description: "no error, no upgrade header found"
  7099          400:
  7100            description: "bad parameter"
  7101            schema:
  7102              $ref: "#/definitions/ErrorResponse"
  7103          404:
  7104            description: "no such container"
  7105            schema:
  7106              $ref: "#/definitions/ErrorResponse"
  7107            examples:
  7108              application/json:
  7109                message: "No such container: c2ada9df5af8"
  7110          500:
  7111            description: "server error"
  7112            schema:
  7113              $ref: "#/definitions/ErrorResponse"
  7114        parameters:
  7115          - name: "id"
  7116            in: "path"
  7117            required: true
  7118            description: "ID or name of the container"
  7119            type: "string"
  7120          - name: "detachKeys"
  7121            in: "query"
  7122            description: |
  7123              Override the key sequence for detaching a container.Format is a single
  7124              character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`,
  7125              `@`, `^`, `[`, `,` or `_`.
  7126            type: "string"
  7127          - name: "logs"
  7128            in: "query"
  7129            description: |
  7130              Replay previous logs from the container.
  7131  
  7132              This is useful for attaching to a container that has started and you
  7133              want to output everything since the container started.
  7134  
  7135              If `stream` is also enabled, once all the previous output has been
  7136              returned, it will seamlessly transition into streaming current
  7137              output.
  7138            type: "boolean"
  7139            default: false
  7140          - name: "stream"
  7141            in: "query"
  7142            description: |
  7143              Stream attached streams from the time the request was made onwards.
  7144            type: "boolean"
  7145            default: false
  7146          - name: "stdin"
  7147            in: "query"
  7148            description: "Attach to `stdin`"
  7149            type: "boolean"
  7150            default: false
  7151          - name: "stdout"
  7152            in: "query"
  7153            description: "Attach to `stdout`"
  7154            type: "boolean"
  7155            default: false
  7156          - name: "stderr"
  7157            in: "query"
  7158            description: "Attach to `stderr`"
  7159            type: "boolean"
  7160            default: false
  7161        tags: ["Container"]
  7162    /containers/{id}/attach/ws:
  7163      get:
  7164        summary: "Attach to a container via a websocket"
  7165        operationId: "ContainerAttachWebsocket"
  7166        responses:
  7167          101:
  7168            description: "no error, hints proxy about hijacking"
  7169          200:
  7170            description: "no error, no upgrade header found"
  7171          400:
  7172            description: "bad parameter"
  7173            schema:
  7174              $ref: "#/definitions/ErrorResponse"
  7175          404:
  7176            description: "no such container"
  7177            schema:
  7178              $ref: "#/definitions/ErrorResponse"
  7179            examples:
  7180              application/json:
  7181                message: "No such container: c2ada9df5af8"
  7182          500:
  7183            description: "server error"
  7184            schema:
  7185              $ref: "#/definitions/ErrorResponse"
  7186        parameters:
  7187          - name: "id"
  7188            in: "path"
  7189            required: true
  7190            description: "ID or name of the container"
  7191            type: "string"
  7192          - name: "detachKeys"
  7193            in: "query"
  7194            description: |
  7195              Override the key sequence for detaching a container.Format is a single
  7196              character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`,
  7197              `@`, `^`, `[`, `,`, or `_`.
  7198            type: "string"
  7199          - name: "logs"
  7200            in: "query"
  7201            description: "Return logs"
  7202            type: "boolean"
  7203            default: false
  7204          - name: "stream"
  7205            in: "query"
  7206            description: "Return stream"
  7207            type: "boolean"
  7208            default: false
  7209        tags: ["Container"]
  7210    /containers/{id}/wait:
  7211      post:
  7212        summary: "Wait for a container"
  7213        description: "Block until a container stops, then returns the exit code."
  7214        operationId: "ContainerWait"
  7215        produces: ["application/json"]
  7216        responses:
  7217          200:
  7218            description: "The container has exit."
  7219            schema:
  7220              $ref: "#/definitions/ContainerWaitResponse"
  7221          400:
  7222            description: "bad parameter"
  7223            schema:
  7224              $ref: "#/definitions/ErrorResponse"
  7225          404:
  7226            description: "no such container"
  7227            schema:
  7228              $ref: "#/definitions/ErrorResponse"
  7229            examples:
  7230              application/json:
  7231                message: "No such container: c2ada9df5af8"
  7232          500:
  7233            description: "server error"
  7234            schema:
  7235              $ref: "#/definitions/ErrorResponse"
  7236        parameters:
  7237          - name: "id"
  7238            in: "path"
  7239            required: true
  7240            description: "ID or name of the container"
  7241            type: "string"
  7242          - name: "condition"
  7243            in: "query"
  7244            description: |
  7245              Wait until a container state reaches the given condition.
  7246  
  7247              Defaults to `not-running` if omitted or empty.
  7248            type: "string"
  7249            enum:
  7250              - "not-running"
  7251              - "next-exit"
  7252              - "removed"
  7253            default: "not-running"
  7254        tags: ["Container"]
  7255    /containers/{id}:
  7256      delete:
  7257        summary: "Remove a container"
  7258        operationId: "ContainerDelete"
  7259        responses:
  7260          204:
  7261            description: "no error"
  7262          400:
  7263            description: "bad parameter"
  7264            schema:
  7265              $ref: "#/definitions/ErrorResponse"
  7266          404:
  7267            description: "no such container"
  7268            schema:
  7269              $ref: "#/definitions/ErrorResponse"
  7270            examples:
  7271              application/json:
  7272                message: "No such container: c2ada9df5af8"
  7273          409:
  7274            description: "conflict"
  7275            schema:
  7276              $ref: "#/definitions/ErrorResponse"
  7277            examples:
  7278              application/json:
  7279                message: |
  7280                  You cannot remove a running container: c2ada9df5af8. Stop the
  7281                  container before attempting removal or force remove
  7282          500:
  7283            description: "server error"
  7284            schema:
  7285              $ref: "#/definitions/ErrorResponse"
  7286        parameters:
  7287          - name: "id"
  7288            in: "path"
  7289            required: true
  7290            description: "ID or name of the container"
  7291            type: "string"
  7292          - name: "v"
  7293            in: "query"
  7294            description: "Remove anonymous volumes associated with the container."
  7295            type: "boolean"
  7296            default: false
  7297          - name: "force"
  7298            in: "query"
  7299            description: "If the container is running, kill it before removing it."
  7300            type: "boolean"
  7301            default: false
  7302          - name: "link"
  7303            in: "query"
  7304            description: "Remove the specified link associated with the container."
  7305            type: "boolean"
  7306            default: false
  7307        tags: ["Container"]
  7308    /containers/{id}/archive:
  7309      head:
  7310        summary: "Get information about files in a container"
  7311        description: |
  7312          A response header `X-Docker-Container-Path-Stat` is returned, containing
  7313          a base64 - encoded JSON object with some filesystem header information
  7314          about the path.
  7315        operationId: "ContainerArchiveInfo"
  7316        responses:
  7317          200:
  7318            description: "no error"
  7319            headers:
  7320              X-Docker-Container-Path-Stat:
  7321                type: "string"
  7322                description: |
  7323                  A base64 - encoded JSON object with some filesystem header
  7324                  information about the path
  7325          400:
  7326            description: "Bad parameter"
  7327            schema:
  7328              $ref: "#/definitions/ErrorResponse"
  7329          404:
  7330            description: "Container or path does not exist"
  7331            schema:
  7332              $ref: "#/definitions/ErrorResponse"
  7333            examples:
  7334              application/json:
  7335                message: "No such container: c2ada9df5af8"
  7336          500:
  7337            description: "Server error"
  7338            schema:
  7339              $ref: "#/definitions/ErrorResponse"
  7340        parameters:
  7341          - name: "id"
  7342            in: "path"
  7343            required: true
  7344            description: "ID or name of the container"
  7345            type: "string"
  7346          - name: "path"
  7347            in: "query"
  7348            required: true
  7349            description: "Resource in the container’s filesystem to archive."
  7350            type: "string"
  7351        tags: ["Container"]
  7352      get:
  7353        summary: "Get an archive of a filesystem resource in a container"
  7354        description: "Get a tar archive of a resource in the filesystem of container id."
  7355        operationId: "ContainerArchive"
  7356        produces: ["application/x-tar"]
  7357        responses:
  7358          200:
  7359            description: "no error"
  7360          400:
  7361            description: "Bad parameter"
  7362            schema:
  7363              $ref: "#/definitions/ErrorResponse"
  7364          404:
  7365            description: "Container or path does not exist"
  7366            schema:
  7367              $ref: "#/definitions/ErrorResponse"
  7368            examples:
  7369              application/json:
  7370                message: "No such container: c2ada9df5af8"
  7371          500:
  7372            description: "server error"
  7373            schema:
  7374              $ref: "#/definitions/ErrorResponse"
  7375        parameters:
  7376          - name: "id"
  7377            in: "path"
  7378            required: true
  7379            description: "ID or name of the container"
  7380            type: "string"
  7381          - name: "path"
  7382            in: "query"
  7383            required: true
  7384            description: "Resource in the container’s filesystem to archive."
  7385            type: "string"
  7386        tags: ["Container"]
  7387      put:
  7388        summary: "Extract an archive of files or folders to a directory in a container"
  7389        description: |
  7390          Upload a tar archive to be extracted to a path in the filesystem of container id.
  7391          `path` parameter is asserted to be a directory. If it exists as a file, 400 error
  7392          will be returned with message "not a directory".
  7393        operationId: "PutContainerArchive"
  7394        consumes: ["application/x-tar", "application/octet-stream"]
  7395        responses:
  7396          200:
  7397            description: "The content was extracted successfully"
  7398          400:
  7399            description: "Bad parameter"
  7400            schema:
  7401              $ref: "#/definitions/ErrorResponse"
  7402            examples:
  7403              application/json:
  7404                message: "not a directory"
  7405          403:
  7406            description: "Permission denied, the volume or container rootfs is marked as read-only."
  7407            schema:
  7408              $ref: "#/definitions/ErrorResponse"
  7409          404:
  7410            description: "No such container or path does not exist inside the container"
  7411            schema:
  7412              $ref: "#/definitions/ErrorResponse"
  7413            examples:
  7414              application/json:
  7415                message: "No such container: c2ada9df5af8"
  7416          500:
  7417            description: "Server error"
  7418            schema:
  7419              $ref: "#/definitions/ErrorResponse"
  7420        parameters:
  7421          - name: "id"
  7422            in: "path"
  7423            required: true
  7424            description: "ID or name of the container"
  7425            type: "string"
  7426          - name: "path"
  7427            in: "query"
  7428            required: true
  7429            description: "Path to a directory in the container to extract the archive’s contents into. "
  7430            type: "string"
  7431          - name: "noOverwriteDirNonDir"
  7432            in: "query"
  7433            description: |
  7434              If `1`, `true`, or `True` then it will be an error if unpacking the
  7435              given content would cause an existing directory to be replaced with
  7436              a non-directory and vice versa.
  7437            type: "string"
  7438          - name: "copyUIDGID"
  7439            in: "query"
  7440            description: |
  7441              If `1`, `true`, then it will copy UID/GID maps to the dest file or
  7442              dir
  7443            type: "string"
  7444          - name: "inputStream"
  7445            in: "body"
  7446            required: true
  7447            description: |
  7448              The input stream must be a tar archive compressed with one of the
  7449              following algorithms: `identity` (no compression), `gzip`, `bzip2`,
  7450              or `xz`.
  7451            schema:
  7452              type: "string"
  7453              format: "binary"
  7454        tags: ["Container"]
  7455    /containers/prune:
  7456      post:
  7457        summary: "Delete stopped containers"
  7458        produces:
  7459          - "application/json"
  7460        operationId: "ContainerPrune"
  7461        parameters:
  7462          - name: "filters"
  7463            in: "query"
  7464            description: |
  7465              Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  7466  
  7467              Available filters:
  7468              - `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.
  7469              - `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.
  7470            type: "string"
  7471        responses:
  7472          200:
  7473            description: "No error"
  7474            schema:
  7475              type: "object"
  7476              title: "ContainerPruneResponse"
  7477              properties:
  7478                ContainersDeleted:
  7479                  description: "Container IDs that were deleted"
  7480                  type: "array"
  7481                  items:
  7482                    type: "string"
  7483                SpaceReclaimed:
  7484                  description: "Disk space reclaimed in bytes"
  7485                  type: "integer"
  7486                  format: "int64"
  7487          500:
  7488            description: "Server error"
  7489            schema:
  7490              $ref: "#/definitions/ErrorResponse"
  7491        tags: ["Container"]
  7492    /images/json:
  7493      get:
  7494        summary: "List Images"
  7495        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."
  7496        operationId: "ImageList"
  7497        produces:
  7498          - "application/json"
  7499        responses:
  7500          200:
  7501            description: "Summary image data for the images matching the query"
  7502            schema:
  7503              type: "array"
  7504              items:
  7505                $ref: "#/definitions/ImageSummary"
  7506          500:
  7507            description: "server error"
  7508            schema:
  7509              $ref: "#/definitions/ErrorResponse"
  7510        parameters:
  7511          - name: "all"
  7512            in: "query"
  7513            description: "Show all images. Only images from a final layer (no children) are shown by default."
  7514            type: "boolean"
  7515            default: false
  7516          - name: "filters"
  7517            in: "query"
  7518            description: |
  7519              A JSON encoded value of the filters (a `map[string][]string`) to
  7520              process on the images list.
  7521  
  7522              Available filters:
  7523  
  7524              - `before`=(`<image-name>[:<tag>]`,  `<image id>` or `<image@digest>`)
  7525              - `dangling=true`
  7526              - `label=key` or `label="key=value"` of an image label
  7527              - `reference`=(`<image-name>[:<tag>]`)
  7528              - `since`=(`<image-name>[:<tag>]`,  `<image id>` or `<image@digest>`)
  7529            type: "string"
  7530          - name: "digests"
  7531            in: "query"
  7532            description: "Show digest information as a `RepoDigests` field on each image."
  7533            type: "boolean"
  7534            default: false
  7535        tags: ["Image"]
  7536    /build:
  7537      post:
  7538        summary: "Build an image"
  7539        description: |
  7540          Build an image from a tar archive with a `Dockerfile` in it.
  7541  
  7542          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/).
  7543  
  7544          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.
  7545  
  7546          The build is canceled if the client drops the connection by quitting or being killed.
  7547        operationId: "ImageBuild"
  7548        consumes:
  7549          - "application/octet-stream"
  7550        produces:
  7551          - "application/json"
  7552        parameters:
  7553          - name: "inputStream"
  7554            in: "body"
  7555            description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz."
  7556            schema:
  7557              type: "string"
  7558              format: "binary"
  7559          - name: "dockerfile"
  7560            in: "query"
  7561            description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`."
  7562            type: "string"
  7563            default: "Dockerfile"
  7564          - name: "t"
  7565            in: "query"
  7566            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."
  7567            type: "string"
  7568          - name: "extrahosts"
  7569            in: "query"
  7570            description: "Extra hosts to add to /etc/hosts"
  7571            type: "string"
  7572          - name: "remote"
  7573            in: "query"
  7574            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."
  7575            type: "string"
  7576          - name: "q"
  7577            in: "query"
  7578            description: "Suppress verbose build output."
  7579            type: "boolean"
  7580            default: false
  7581          - name: "nocache"
  7582            in: "query"
  7583            description: "Do not use the cache when building the image."
  7584            type: "boolean"
  7585            default: false
  7586          - name: "cachefrom"
  7587            in: "query"
  7588            description: "JSON array of images used for build cache resolution."
  7589            type: "string"
  7590          - name: "pull"
  7591            in: "query"
  7592            description: "Attempt to pull the image even if an older image exists locally."
  7593            type: "string"
  7594          - name: "rm"
  7595            in: "query"
  7596            description: "Remove intermediate containers after a successful build."
  7597            type: "boolean"
  7598            default: true
  7599          - name: "forcerm"
  7600            in: "query"
  7601            description: "Always remove intermediate containers, even upon failure."
  7602            type: "boolean"
  7603            default: false
  7604          - name: "memory"
  7605            in: "query"
  7606            description: "Set memory limit for build."
  7607            type: "integer"
  7608          - name: "memswap"
  7609            in: "query"
  7610            description: "Total memory (memory + swap). Set as `-1` to disable swap."
  7611            type: "integer"
  7612          - name: "cpushares"
  7613            in: "query"
  7614            description: "CPU shares (relative weight)."
  7615            type: "integer"
  7616          - name: "cpusetcpus"
  7617            in: "query"
  7618            description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)."
  7619            type: "string"
  7620          - name: "cpuperiod"
  7621            in: "query"
  7622            description: "The length of a CPU period in microseconds."
  7623            type: "integer"
  7624          - name: "cpuquota"
  7625            in: "query"
  7626            description: "Microseconds of CPU time that the container can get in a CPU period."
  7627            type: "integer"
  7628          - name: "buildargs"
  7629            in: "query"
  7630            description: >
  7631              JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker
  7632              uses the buildargs as the environment context for commands run via the `Dockerfile` RUN
  7633              instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for
  7634              passing secret values.
  7635  
  7636  
  7637              For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the
  7638              query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded.
  7639  
  7640  
  7641              [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)
  7642            type: "string"
  7643          - name: "shmsize"
  7644            in: "query"
  7645            description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB."
  7646            type: "integer"
  7647          - name: "squash"
  7648            in: "query"
  7649            description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*"
  7650            type: "boolean"
  7651          - name: "labels"
  7652            in: "query"
  7653            description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs."
  7654            type: "string"
  7655          - name: "networkmode"
  7656            in: "query"
  7657            description: |
  7658              Sets the networking mode for the run commands during build. Supported
  7659              standard values are: `bridge`, `host`, `none`, and `container:<name|id>`.
  7660              Any other value is taken as a custom network's name or ID to which this
  7661              container should connect to.
  7662            type: "string"
  7663          - name: "Content-type"
  7664            in: "header"
  7665            type: "string"
  7666            enum:
  7667              - "application/x-tar"
  7668            default: "application/x-tar"
  7669          - name: "X-Registry-Config"
  7670            in: "header"
  7671            description: |
  7672              This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to.
  7673  
  7674              The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example:
  7675  
  7676              ```
  7677              {
  7678                "docker.example.com": {
  7679                  "username": "janedoe",
  7680                  "password": "hunter2"
  7681                },
  7682                "https://index.docker.io/v1/": {
  7683                  "username": "mobydock",
  7684                  "password": "conta1n3rize14"
  7685                }
  7686              }
  7687              ```
  7688  
  7689              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.
  7690            type: "string"
  7691          - name: "platform"
  7692            in: "query"
  7693            description: "Platform in the format os[/arch[/variant]]"
  7694            type: "string"
  7695            default: ""
  7696          - name: "target"
  7697            in: "query"
  7698            description: "Target build stage"
  7699            type: "string"
  7700            default: ""
  7701          - name: "outputs"
  7702            in: "query"
  7703            description: "BuildKit output configuration"
  7704            type: "string"
  7705            default: ""
  7706        responses:
  7707          200:
  7708            description: "no error"
  7709          400:
  7710            description: "Bad parameter"
  7711            schema:
  7712              $ref: "#/definitions/ErrorResponse"
  7713          500:
  7714            description: "server error"
  7715            schema:
  7716              $ref: "#/definitions/ErrorResponse"
  7717        tags: ["Image"]
  7718    /build/prune:
  7719      post:
  7720        summary: "Delete builder cache"
  7721        produces:
  7722          - "application/json"
  7723        operationId: "BuildPrune"
  7724        parameters:
  7725          - name: "keep-storage"
  7726            in: "query"
  7727            description: "Amount of disk space in bytes to keep for cache"
  7728            type: "integer"
  7729            format: "int64"
  7730          - name: "all"
  7731            in: "query"
  7732            type: "boolean"
  7733            description: "Remove all types of build cache"
  7734          - name: "filters"
  7735            in: "query"
  7736            type: "string"
  7737            description: |
  7738              A JSON encoded value of the filters (a `map[string][]string`) to
  7739              process on the list of build cache objects.
  7740  
  7741              Available filters:
  7742  
  7743              - `until=<duration>`: duration relative to daemon's time, during which build cache was not used, in Go's duration format (e.g., '24h')
  7744              - `id=<id>`
  7745              - `parent=<id>`
  7746              - `type=<string>`
  7747              - `description=<string>`
  7748              - `inuse`
  7749              - `shared`
  7750              - `private`
  7751        responses:
  7752          200:
  7753            description: "No error"
  7754            schema:
  7755              type: "object"
  7756              title: "BuildPruneResponse"
  7757              properties:
  7758                CachesDeleted:
  7759                  type: "array"
  7760                  items:
  7761                    description: "ID of build cache object"
  7762                    type: "string"
  7763                SpaceReclaimed:
  7764                  description: "Disk space reclaimed in bytes"
  7765                  type: "integer"
  7766                  format: "int64"
  7767          500:
  7768            description: "Server error"
  7769            schema:
  7770              $ref: "#/definitions/ErrorResponse"
  7771        tags: ["Image"]
  7772    /images/create:
  7773      post:
  7774        summary: "Create an image"
  7775        description: "Create an image by either pulling it from a registry or importing it."
  7776        operationId: "ImageCreate"
  7777        consumes:
  7778          - "text/plain"
  7779          - "application/octet-stream"
  7780        produces:
  7781          - "application/json"
  7782        responses:
  7783          200:
  7784            description: "no error"
  7785          404:
  7786            description: "repository does not exist or no read access"
  7787            schema:
  7788              $ref: "#/definitions/ErrorResponse"
  7789          500:
  7790            description: "server error"
  7791            schema:
  7792              $ref: "#/definitions/ErrorResponse"
  7793        parameters:
  7794          - name: "fromImage"
  7795            in: "query"
  7796            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."
  7797            type: "string"
  7798          - name: "fromSrc"
  7799            in: "query"
  7800            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."
  7801            type: "string"
  7802          - name: "repo"
  7803            in: "query"
  7804            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."
  7805            type: "string"
  7806          - name: "tag"
  7807            in: "query"
  7808            description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled."
  7809            type: "string"
  7810          - name: "message"
  7811            in: "query"
  7812            description: "Set commit message for imported image."
  7813            type: "string"
  7814          - name: "inputImage"
  7815            in: "body"
  7816            description: "Image content if the value `-` has been specified in fromSrc query parameter"
  7817            schema:
  7818              type: "string"
  7819            required: false
  7820          - name: "X-Registry-Auth"
  7821            in: "header"
  7822            description: |
  7823              A base64url-encoded auth configuration.
  7824  
  7825              Refer to the [authentication section](#section/Authentication) for
  7826              details.
  7827            type: "string"
  7828          - name: "changes"
  7829            in: "query"
  7830            description: |
  7831              Apply `Dockerfile` instructions to the image that is created,
  7832              for example: `changes=ENV DEBUG=true`.
  7833              Note that `ENV DEBUG=true` should be URI component encoded.
  7834  
  7835              Supported `Dockerfile` instructions:
  7836              `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
  7837            type: "array"
  7838            items:
  7839              type: "string"
  7840          - name: "platform"
  7841            in: "query"
  7842            description: "Platform in the format os[/arch[/variant]]"
  7843            type: "string"
  7844            default: ""
  7845        tags: ["Image"]
  7846    /images/{name}/json:
  7847      get:
  7848        summary: "Inspect an image"
  7849        description: "Return low-level information about an image."
  7850        operationId: "ImageInspect"
  7851        produces:
  7852          - "application/json"
  7853        responses:
  7854          200:
  7855            description: "No error"
  7856            schema:
  7857              $ref: "#/definitions/ImageInspect"
  7858          404:
  7859            description: "No such image"
  7860            schema:
  7861              $ref: "#/definitions/ErrorResponse"
  7862            examples:
  7863              application/json:
  7864                message: "No such image: someimage (tag: latest)"
  7865          500:
  7866            description: "Server error"
  7867            schema:
  7868              $ref: "#/definitions/ErrorResponse"
  7869        parameters:
  7870          - name: "name"
  7871            in: "path"
  7872            description: "Image name or id"
  7873            type: "string"
  7874            required: true
  7875        tags: ["Image"]
  7876    /images/{name}/history:
  7877      get:
  7878        summary: "Get the history of an image"
  7879        description: "Return parent layers of an image."
  7880        operationId: "ImageHistory"
  7881        produces: ["application/json"]
  7882        responses:
  7883          200:
  7884            description: "List of image layers"
  7885            schema:
  7886              type: "array"
  7887              items:
  7888                type: "object"
  7889                x-go-name: HistoryResponseItem
  7890                title: "HistoryResponseItem"
  7891                description: "individual image layer information in response to ImageHistory operation"
  7892                required: [Id, Created, CreatedBy, Tags, Size, Comment]
  7893                properties:
  7894                  Id:
  7895                    type: "string"
  7896                    x-nullable: false
  7897                  Created:
  7898                    type: "integer"
  7899                    format: "int64"
  7900                    x-nullable: false
  7901                  CreatedBy:
  7902                    type: "string"
  7903                    x-nullable: false
  7904                  Tags:
  7905                    type: "array"
  7906                    items:
  7907                      type: "string"
  7908                  Size:
  7909                    type: "integer"
  7910                    format: "int64"
  7911                    x-nullable: false
  7912                  Comment:
  7913                    type: "string"
  7914                    x-nullable: false
  7915            examples:
  7916              application/json:
  7917                - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710"
  7918                  Created: 1398108230
  7919                  CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /"
  7920                  Tags:
  7921                    - "ubuntu:lucid"
  7922                    - "ubuntu:10.04"
  7923                  Size: 182964289
  7924                  Comment: ""
  7925                - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8"
  7926                  Created: 1398108222
  7927                  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/"
  7928                  Tags: []
  7929                  Size: 0
  7930                  Comment: ""
  7931                - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158"
  7932                  Created: 1371157430
  7933                  CreatedBy: ""
  7934                  Tags:
  7935                    - "scratch12:latest"
  7936                    - "scratch:latest"
  7937                  Size: 0
  7938                  Comment: "Imported from -"
  7939          404:
  7940            description: "No such image"
  7941            schema:
  7942              $ref: "#/definitions/ErrorResponse"
  7943          500:
  7944            description: "Server error"
  7945            schema:
  7946              $ref: "#/definitions/ErrorResponse"
  7947        parameters:
  7948          - name: "name"
  7949            in: "path"
  7950            description: "Image name or ID"
  7951            type: "string"
  7952            required: true
  7953        tags: ["Image"]
  7954    /images/{name}/push:
  7955      post:
  7956        summary: "Push an image"
  7957        description: |
  7958          Push an image to a registry.
  7959  
  7960          If you wish to push an image on to a private registry, that image must
  7961          already have a tag which references the registry. For example,
  7962          `registry.example.com/myimage:latest`.
  7963  
  7964          The push is cancelled if the HTTP connection is closed.
  7965        operationId: "ImagePush"
  7966        consumes:
  7967          - "application/octet-stream"
  7968        responses:
  7969          200:
  7970            description: "No error"
  7971          404:
  7972            description: "No such image"
  7973            schema:
  7974              $ref: "#/definitions/ErrorResponse"
  7975          500:
  7976            description: "Server error"
  7977            schema:
  7978              $ref: "#/definitions/ErrorResponse"
  7979        parameters:
  7980          - name: "name"
  7981            in: "path"
  7982            description: "Image name or ID."
  7983            type: "string"
  7984            required: true
  7985          - name: "tag"
  7986            in: "query"
  7987            description: "The tag to associate with the image on the registry."
  7988            type: "string"
  7989          - name: "X-Registry-Auth"
  7990            in: "header"
  7991            description: |
  7992              A base64url-encoded auth configuration.
  7993  
  7994              Refer to the [authentication section](#section/Authentication) for
  7995              details.
  7996            type: "string"
  7997            required: true
  7998        tags: ["Image"]
  7999    /images/{name}/tag:
  8000      post:
  8001        summary: "Tag an image"
  8002        description: "Tag an image so that it becomes part of a repository."
  8003        operationId: "ImageTag"
  8004        responses:
  8005          201:
  8006            description: "No error"
  8007          400:
  8008            description: "Bad parameter"
  8009            schema:
  8010              $ref: "#/definitions/ErrorResponse"
  8011          404:
  8012            description: "No such image"
  8013            schema:
  8014              $ref: "#/definitions/ErrorResponse"
  8015          409:
  8016            description: "Conflict"
  8017            schema:
  8018              $ref: "#/definitions/ErrorResponse"
  8019          500:
  8020            description: "Server error"
  8021            schema:
  8022              $ref: "#/definitions/ErrorResponse"
  8023        parameters:
  8024          - name: "name"
  8025            in: "path"
  8026            description: "Image name or ID to tag."
  8027            type: "string"
  8028            required: true
  8029          - name: "repo"
  8030            in: "query"
  8031            description: "The repository to tag in. For example, `someuser/someimage`."
  8032            type: "string"
  8033          - name: "tag"
  8034            in: "query"
  8035            description: "The name of the new tag."
  8036            type: "string"
  8037        tags: ["Image"]
  8038    /images/{name}:
  8039      delete:
  8040        summary: "Remove an image"
  8041        description: |
  8042          Remove an image, along with any untagged parent images that were
  8043          referenced by that image.
  8044  
  8045          Images can't be removed if they have descendant images, are being
  8046          used by a running container or are being used by a build.
  8047        operationId: "ImageDelete"
  8048        produces: ["application/json"]
  8049        responses:
  8050          200:
  8051            description: "The image was deleted successfully"
  8052            schema:
  8053              type: "array"
  8054              items:
  8055                $ref: "#/definitions/ImageDeleteResponseItem"
  8056            examples:
  8057              application/json:
  8058                - Untagged: "3e2f21a89f"
  8059                - Deleted: "3e2f21a89f"
  8060                - Deleted: "53b4f83ac9"
  8061          404:
  8062            description: "No such image"
  8063            schema:
  8064              $ref: "#/definitions/ErrorResponse"
  8065          409:
  8066            description: "Conflict"
  8067            schema:
  8068              $ref: "#/definitions/ErrorResponse"
  8069          500:
  8070            description: "Server error"
  8071            schema:
  8072              $ref: "#/definitions/ErrorResponse"
  8073        parameters:
  8074          - name: "name"
  8075            in: "path"
  8076            description: "Image name or ID"
  8077            type: "string"
  8078            required: true
  8079          - name: "force"
  8080            in: "query"
  8081            description: "Remove the image even if it is being used by stopped containers or has other tags"
  8082            type: "boolean"
  8083            default: false
  8084          - name: "noprune"
  8085            in: "query"
  8086            description: "Do not delete untagged parent images"
  8087            type: "boolean"
  8088            default: false
  8089        tags: ["Image"]
  8090    /images/search:
  8091      get:
  8092        summary: "Search images"
  8093        description: "Search for an image on Docker Hub."
  8094        operationId: "ImageSearch"
  8095        produces:
  8096          - "application/json"
  8097        responses:
  8098          200:
  8099            description: "No error"
  8100            schema:
  8101              type: "array"
  8102              items:
  8103                type: "object"
  8104                title: "ImageSearchResponseItem"
  8105                properties:
  8106                  description:
  8107                    type: "string"
  8108                  is_official:
  8109                    type: "boolean"
  8110                  is_automated:
  8111                    type: "boolean"
  8112                  name:
  8113                    type: "string"
  8114                  star_count:
  8115                    type: "integer"
  8116            examples:
  8117              application/json:
  8118                - description: ""
  8119                  is_official: false
  8120                  is_automated: false
  8121                  name: "wma55/u1210sshd"
  8122                  star_count: 0
  8123                - description: ""
  8124                  is_official: false
  8125                  is_automated: false
  8126                  name: "jdswinbank/sshd"
  8127                  star_count: 0
  8128                - description: ""
  8129                  is_official: false
  8130                  is_automated: false
  8131                  name: "vgauthier/sshd"
  8132                  star_count: 0
  8133          500:
  8134            description: "Server error"
  8135            schema:
  8136              $ref: "#/definitions/ErrorResponse"
  8137        parameters:
  8138          - name: "term"
  8139            in: "query"
  8140            description: "Term to search"
  8141            type: "string"
  8142            required: true
  8143          - name: "limit"
  8144            in: "query"
  8145            description: "Maximum number of results to return"
  8146            type: "integer"
  8147          - name: "filters"
  8148            in: "query"
  8149            description: |
  8150              A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:
  8151  
  8152              - `is-automated=(true|false)`
  8153              - `is-official=(true|false)`
  8154              - `stars=<number>` Matches images that has at least 'number' stars.
  8155            type: "string"
  8156        tags: ["Image"]
  8157    /images/prune:
  8158      post:
  8159        summary: "Delete unused images"
  8160        produces:
  8161          - "application/json"
  8162        operationId: "ImagePrune"
  8163        parameters:
  8164          - name: "filters"
  8165            in: "query"
  8166            description: |
  8167              Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters:
  8168  
  8169              - `dangling=<boolean>` When set to `true` (or `1`), prune only
  8170                 unused *and* untagged images. When set to `false`
  8171                 (or `0`), all unused images are pruned.
  8172              - `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.
  8173              - `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.
  8174            type: "string"
  8175        responses:
  8176          200:
  8177            description: "No error"
  8178            schema:
  8179              type: "object"
  8180              title: "ImagePruneResponse"
  8181              properties:
  8182                ImagesDeleted:
  8183                  description: "Images that were deleted"
  8184                  type: "array"
  8185                  items:
  8186                    $ref: "#/definitions/ImageDeleteResponseItem"
  8187                SpaceReclaimed:
  8188                  description: "Disk space reclaimed in bytes"
  8189                  type: "integer"
  8190                  format: "int64"
  8191          500:
  8192            description: "Server error"
  8193            schema:
  8194              $ref: "#/definitions/ErrorResponse"
  8195        tags: ["Image"]
  8196    /auth:
  8197      post:
  8198        summary: "Check auth configuration"
  8199        description: |
  8200          Validate credentials for a registry and, if available, get an identity
  8201          token for accessing the registry without password.
  8202        operationId: "SystemAuth"
  8203        consumes: ["application/json"]
  8204        produces: ["application/json"]
  8205        responses:
  8206          200:
  8207            description: "An identity token was generated successfully."
  8208            schema:
  8209              type: "object"
  8210              title: "SystemAuthResponse"
  8211              required: [Status]
  8212              properties:
  8213                Status:
  8214                  description: "The status of the authentication"
  8215                  type: "string"
  8216                  x-nullable: false
  8217                IdentityToken:
  8218                  description: "An opaque token used to authenticate a user after a successful login"
  8219                  type: "string"
  8220                  x-nullable: false
  8221            examples:
  8222              application/json:
  8223                Status: "Login Succeeded"
  8224                IdentityToken: "9cbaf023786cd7..."
  8225          204:
  8226            description: "No error"
  8227          401:
  8228            description: "Auth error"
  8229            schema:
  8230              $ref: "#/definitions/ErrorResponse"
  8231          500:
  8232            description: "Server error"
  8233            schema:
  8234              $ref: "#/definitions/ErrorResponse"
  8235        parameters:
  8236          - name: "authConfig"
  8237            in: "body"
  8238            description: "Authentication to check"
  8239            schema:
  8240              $ref: "#/definitions/AuthConfig"
  8241        tags: ["System"]
  8242    /info:
  8243      get:
  8244        summary: "Get system information"
  8245        operationId: "SystemInfo"
  8246        produces:
  8247          - "application/json"
  8248        responses:
  8249          200:
  8250            description: "No error"
  8251            schema:
  8252              $ref: "#/definitions/SystemInfo"
  8253          500:
  8254            description: "Server error"
  8255            schema:
  8256              $ref: "#/definitions/ErrorResponse"
  8257        tags: ["System"]
  8258    /version:
  8259      get:
  8260        summary: "Get version"
  8261        description: "Returns the version of Docker that is running and various information about the system that Docker is running on."
  8262        operationId: "SystemVersion"
  8263        produces: ["application/json"]
  8264        responses:
  8265          200:
  8266            description: "no error"
  8267            schema:
  8268              $ref: "#/definitions/SystemVersion"
  8269          500:
  8270            description: "server error"
  8271            schema:
  8272              $ref: "#/definitions/ErrorResponse"
  8273        tags: ["System"]
  8274    /_ping:
  8275      get:
  8276        summary: "Ping"
  8277        description: "This is a dummy endpoint you can use to test if the server is accessible."
  8278        operationId: "SystemPing"
  8279        produces: ["text/plain"]
  8280        responses:
  8281          200:
  8282            description: "no error"
  8283            schema:
  8284              type: "string"
  8285              example: "OK"
  8286            headers:
  8287              API-Version:
  8288                type: "string"
  8289                description: "Max API Version the server supports"
  8290              Builder-Version:
  8291                type: "string"
  8292                description: "Default version of docker image builder"
  8293              Docker-Experimental:
  8294                type: "boolean"
  8295                description: "If the server is running with experimental mode enabled"
  8296              Cache-Control:
  8297                type: "string"
  8298                default: "no-cache, no-store, must-revalidate"
  8299              Pragma:
  8300                type: "string"
  8301                default: "no-cache"
  8302          500:
  8303            description: "server error"
  8304            schema:
  8305              $ref: "#/definitions/ErrorResponse"
  8306            headers:
  8307              Cache-Control:
  8308                type: "string"
  8309                default: "no-cache, no-store, must-revalidate"
  8310              Pragma:
  8311                type: "string"
  8312                default: "no-cache"
  8313        tags: ["System"]
  8314      head:
  8315        summary: "Ping"
  8316        description: "This is a dummy endpoint you can use to test if the server is accessible."
  8317        operationId: "SystemPingHead"
  8318        produces: ["text/plain"]
  8319        responses:
  8320          200:
  8321            description: "no error"
  8322            schema:
  8323              type: "string"
  8324              example: "(empty)"
  8325            headers:
  8326              API-Version:
  8327                type: "string"
  8328                description: "Max API Version the server supports"
  8329              Builder-Version:
  8330                type: "string"
  8331                description: "Default version of docker image builder"
  8332              Docker-Experimental:
  8333                type: "boolean"
  8334                description: "If the server is running with experimental mode enabled"
  8335              Cache-Control:
  8336                type: "string"
  8337                default: "no-cache, no-store, must-revalidate"
  8338              Pragma:
  8339                type: "string"
  8340                default: "no-cache"
  8341          500:
  8342            description: "server error"
  8343            schema:
  8344              $ref: "#/definitions/ErrorResponse"
  8345        tags: ["System"]
  8346    /commit:
  8347      post:
  8348        summary: "Create a new image from a container"
  8349        operationId: "ImageCommit"
  8350        consumes:
  8351          - "application/json"
  8352        produces:
  8353          - "application/json"
  8354        responses:
  8355          201:
  8356            description: "no error"
  8357            schema:
  8358              $ref: "#/definitions/IdResponse"
  8359          404:
  8360            description: "no such container"
  8361            schema:
  8362              $ref: "#/definitions/ErrorResponse"
  8363            examples:
  8364              application/json:
  8365                message: "No such container: c2ada9df5af8"
  8366          500:
  8367            description: "server error"
  8368            schema:
  8369              $ref: "#/definitions/ErrorResponse"
  8370        parameters:
  8371          - name: "containerConfig"
  8372            in: "body"
  8373            description: "The container configuration"
  8374            schema:
  8375              $ref: "#/definitions/ContainerConfig"
  8376          - name: "container"
  8377            in: "query"
  8378            description: "The ID or name of the container to commit"
  8379            type: "string"
  8380          - name: "repo"
  8381            in: "query"
  8382            description: "Repository name for the created image"
  8383            type: "string"
  8384          - name: "tag"
  8385            in: "query"
  8386            description: "Tag name for the create image"
  8387            type: "string"
  8388          - name: "comment"
  8389            in: "query"
  8390            description: "Commit message"
  8391            type: "string"
  8392          - name: "author"
  8393            in: "query"
  8394            description: "Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`)"
  8395            type: "string"
  8396          - name: "pause"
  8397            in: "query"
  8398            description: "Whether to pause the container before committing"
  8399            type: "boolean"
  8400            default: true
  8401          - name: "changes"
  8402            in: "query"
  8403            description: "`Dockerfile` instructions to apply while committing"
  8404            type: "string"
  8405        tags: ["Image"]
  8406    /events:
  8407      get:
  8408        summary: "Monitor events"
  8409        description: |
  8410          Stream real-time events from the server.
  8411  
  8412          Various objects within Docker report events when something happens to them.
  8413  
  8414          Containers report these events: `attach`, `commit`, `copy`, `create`, `destroy`, `detach`, `die`, `exec_create`, `exec_detach`, `exec_start`, `exec_die`, `export`, `health_status`, `kill`, `oom`, `pause`, `rename`, `resize`, `restart`, `start`, `stop`, `top`, `unpause`, and `update`
  8415  
  8416          Images report these events: `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, and `untag`
  8417  
  8418          Volumes report these events: `create`, `mount`, `unmount`, and `destroy`
  8419  
  8420          Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, and `remove`
  8421  
  8422          The Docker daemon reports these events: `reload`
  8423  
  8424          Services report these events: `create`, `update`, and `remove`
  8425  
  8426          Nodes report these events: `create`, `update`, and `remove`
  8427  
  8428          Secrets report these events: `create`, `update`, and `remove`
  8429  
  8430          Configs report these events: `create`, `update`, and `remove`
  8431  
  8432        operationId: "SystemEvents"
  8433        produces:
  8434          - "application/json"
  8435        responses:
  8436          200:
  8437            description: "no error"
  8438            schema:
  8439              $ref: "#/definitions/EventMessage"
  8440          400:
  8441            description: "bad parameter"
  8442            schema:
  8443              $ref: "#/definitions/ErrorResponse"
  8444          500:
  8445            description: "server error"
  8446            schema:
  8447              $ref: "#/definitions/ErrorResponse"
  8448        parameters:
  8449          - name: "since"
  8450            in: "query"
  8451            description: "Show events created since this timestamp then stream new events."
  8452            type: "string"
  8453          - name: "until"
  8454            in: "query"
  8455            description: "Show events created until this timestamp then stop streaming."
  8456            type: "string"
  8457          - name: "filters"
  8458            in: "query"
  8459            description: |
  8460              A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters:
  8461  
  8462              - `config=<string>` config name or ID
  8463              - `container=<string>` container name or ID
  8464              - `daemon=<string>` daemon name or ID
  8465              - `event=<string>` event type
  8466              - `image=<string>` image name or ID
  8467              - `label=<string>` image or container label
  8468              - `network=<string>` network name or ID
  8469              - `node=<string>` node ID
  8470              - `plugin`=<string> plugin name or ID
  8471              - `scope`=<string> local or swarm
  8472              - `secret=<string>` secret name or ID
  8473              - `service=<string>` service name or ID
  8474              - `type=<string>` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config`
  8475              - `volume=<string>` volume name
  8476            type: "string"
  8477        tags: ["System"]
  8478    /system/df:
  8479      get:
  8480        summary: "Get data usage information"
  8481        operationId: "SystemDataUsage"
  8482        responses:
  8483          200:
  8484            description: "no error"
  8485            schema:
  8486              type: "object"
  8487              title: "SystemDataUsageResponse"
  8488              properties:
  8489                LayersSize:
  8490                  type: "integer"
  8491                  format: "int64"
  8492                Images:
  8493                  type: "array"
  8494                  items:
  8495                    $ref: "#/definitions/ImageSummary"
  8496                Containers:
  8497                  type: "array"
  8498                  items:
  8499                    $ref: "#/definitions/ContainerSummary"
  8500                Volumes:
  8501                  type: "array"
  8502                  items:
  8503                    $ref: "#/definitions/Volume"
  8504                BuildCache:
  8505                  type: "array"
  8506                  items:
  8507                    $ref: "#/definitions/BuildCache"
  8508              example:
  8509                LayersSize: 1092588
  8510                Images:
  8511                  -
  8512                    Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
  8513                    ParentId: ""
  8514                    RepoTags:
  8515                      - "busybox:latest"
  8516                    RepoDigests:
  8517                      - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6"
  8518                    Created: 1466724217
  8519                    Size: 1092588
  8520                    SharedSize: 0
  8521                    VirtualSize: 1092588
  8522                    Labels: {}
  8523                    Containers: 1
  8524                Containers:
  8525                  -
  8526                    Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148"
  8527                    Names:
  8528                      - "/top"
  8529                    Image: "busybox"
  8530                    ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
  8531                    Command: "top"
  8532                    Created: 1472592424
  8533                    Ports: []
  8534                    SizeRootFs: 1092588
  8535                    Labels: {}
  8536                    State: "exited"
  8537                    Status: "Exited (0) 56 minutes ago"
  8538                    HostConfig:
  8539                      NetworkMode: "default"
  8540                    NetworkSettings:
  8541                      Networks:
  8542                        bridge:
  8543                          IPAMConfig: null
  8544                          Links: null
  8545                          Aliases: null
  8546                          NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92"
  8547                          EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a"
  8548                          Gateway: "172.18.0.1"
  8549                          IPAddress: "172.18.0.2"
  8550                          IPPrefixLen: 16
  8551                          IPv6Gateway: ""
  8552                          GlobalIPv6Address: ""
  8553                          GlobalIPv6PrefixLen: 0
  8554                          MacAddress: "02:42:ac:12:00:02"
  8555                    Mounts: []
  8556                Volumes:
  8557                  -
  8558                    Name: "my-volume"
  8559                    Driver: "local"
  8560                    Mountpoint: "/var/lib/docker/volumes/my-volume/_data"
  8561                    Labels: null
  8562                    Scope: "local"
  8563                    Options: null
  8564                    UsageData:
  8565                      Size: 10920104
  8566                      RefCount: 2
  8567                BuildCache:
  8568                  -
  8569                    ID: "hw53o5aio51xtltp5xjp8v7fx"
  8570                    Parent: ""
  8571                    Type: "regular"
  8572                    Description: "pulled from docker.io/library/debian@sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0"
  8573                    InUse: false
  8574                    Shared: true
  8575                    Size: 0
  8576                    CreatedAt: "2021-06-28T13:31:01.474619385Z"
  8577                    LastUsedAt: "2021-07-07T22:02:32.738075951Z"
  8578                    UsageCount: 26
  8579                  -
  8580                    ID: "ndlpt0hhvkqcdfkputsk4cq9c"
  8581                    Parent: "ndlpt0hhvkqcdfkputsk4cq9c"
  8582                    Type: "regular"
  8583                    Description: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache"
  8584                    InUse: false
  8585                    Shared: true
  8586                    Size: 51
  8587                    CreatedAt: "2021-06-28T13:31:03.002625487Z"
  8588                    LastUsedAt: "2021-07-07T22:02:32.773909517Z"
  8589                    UsageCount: 26
  8590          500:
  8591            description: "server error"
  8592            schema:
  8593              $ref: "#/definitions/ErrorResponse"
  8594        tags: ["System"]
  8595    /images/{name}/get:
  8596      get:
  8597        summary: "Export an image"
  8598        description: |
  8599          Get a tarball containing all images and metadata for a repository.
  8600  
  8601          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.
  8602  
  8603          ### Image tarball format
  8604  
  8605          An image tarball contains one directory per image layer (named using its long ID), each containing these files:
  8606  
  8607          - `VERSION`: currently `1.0` - the file format version
  8608          - `json`: detailed layer information, similar to `docker inspect layer_id`
  8609          - `layer.tar`: A tarfile containing the filesystem changes in this layer
  8610  
  8611          The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions.
  8612  
  8613          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.
  8614  
  8615          ```json
  8616          {
  8617            "hello-world": {
  8618              "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"
  8619            }
  8620          }
  8621          ```
  8622        operationId: "ImageGet"
  8623        produces:
  8624          - "application/x-tar"
  8625        responses:
  8626          200:
  8627            description: "no error"
  8628            schema:
  8629              type: "string"
  8630              format: "binary"
  8631          500:
  8632            description: "server error"
  8633            schema:
  8634              $ref: "#/definitions/ErrorResponse"
  8635        parameters:
  8636          - name: "name"
  8637            in: "path"
  8638            description: "Image name or ID"
  8639            type: "string"
  8640            required: true
  8641        tags: ["Image"]
  8642    /images/get:
  8643      get:
  8644        summary: "Export several images"
  8645        description: |
  8646          Get a tarball containing all images and metadata for several image
  8647          repositories.
  8648  
  8649          For each value of the `names` parameter: if it is a specific name and
  8650          tag (e.g. `ubuntu:latest`), then only that image (and its parents) are
  8651          returned; if it is an image ID, similarly only that image (and its parents)
  8652          are returned and there would be no names referenced in the 'repositories'
  8653          file for this image ID.
  8654  
  8655          For details on the format, see the [export image endpoint](#operation/ImageGet).
  8656        operationId: "ImageGetAll"
  8657        produces:
  8658          - "application/x-tar"
  8659        responses:
  8660          200:
  8661            description: "no error"
  8662            schema:
  8663              type: "string"
  8664              format: "binary"
  8665          500:
  8666            description: "server error"
  8667            schema:
  8668              $ref: "#/definitions/ErrorResponse"
  8669        parameters:
  8670          - name: "names"
  8671            in: "query"
  8672            description: "Image names to filter by"
  8673            type: "array"
  8674            items:
  8675              type: "string"
  8676        tags: ["Image"]
  8677    /images/load:
  8678      post:
  8679        summary: "Import images"
  8680        description: |
  8681          Load a set of images and tags into a repository.
  8682  
  8683          For details on the format, see the [export image endpoint](#operation/ImageGet).
  8684        operationId: "ImageLoad"
  8685        consumes:
  8686          - "application/x-tar"
  8687        produces:
  8688          - "application/json"
  8689        responses:
  8690          200:
  8691            description: "no error"
  8692          500:
  8693            description: "server error"
  8694            schema:
  8695              $ref: "#/definitions/ErrorResponse"
  8696        parameters:
  8697          - name: "imagesTarball"
  8698            in: "body"
  8699            description: "Tar archive containing images"
  8700            schema:
  8701              type: "string"
  8702              format: "binary"
  8703          - name: "quiet"
  8704            in: "query"
  8705            description: "Suppress progress details during load."
  8706            type: "boolean"
  8707            default: false
  8708        tags: ["Image"]
  8709    /containers/{id}/exec:
  8710      post:
  8711        summary: "Create an exec instance"
  8712        description: "Run a command inside a running container."
  8713        operationId: "ContainerExec"
  8714        consumes:
  8715          - "application/json"
  8716        produces:
  8717          - "application/json"
  8718        responses:
  8719          201:
  8720            description: "no error"
  8721            schema:
  8722              $ref: "#/definitions/IdResponse"
  8723          404:
  8724            description: "no such container"
  8725            schema:
  8726              $ref: "#/definitions/ErrorResponse"
  8727            examples:
  8728              application/json:
  8729                message: "No such container: c2ada9df5af8"
  8730          409:
  8731            description: "container is paused"
  8732            schema:
  8733              $ref: "#/definitions/ErrorResponse"
  8734          500:
  8735            description: "Server error"
  8736            schema:
  8737              $ref: "#/definitions/ErrorResponse"
  8738        parameters:
  8739          - name: "execConfig"
  8740            in: "body"
  8741            description: "Exec configuration"
  8742            schema:
  8743              type: "object"
  8744              title: "ExecConfig"
  8745              properties:
  8746                AttachStdin:
  8747                  type: "boolean"
  8748                  description: "Attach to `stdin` of the exec command."
  8749                AttachStdout:
  8750                  type: "boolean"
  8751                  description: "Attach to `stdout` of the exec command."
  8752                AttachStderr:
  8753                  type: "boolean"
  8754                  description: "Attach to `stderr` of the exec command."
  8755                DetachKeys:
  8756                  type: "string"
  8757                  description: |
  8758                    Override the key sequence for detaching a container. Format is
  8759                    a single character `[a-Z]` or `ctrl-<value>` where `<value>`
  8760                    is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
  8761                Tty:
  8762                  type: "boolean"
  8763                  description: "Allocate a pseudo-TTY."
  8764                Env:
  8765                  description: |
  8766                    A list of environment variables in the form `["VAR=value", ...]`.
  8767                  type: "array"
  8768                  items:
  8769                    type: "string"
  8770                Cmd:
  8771                  type: "array"
  8772                  description: "Command to run, as a string or array of strings."
  8773                  items:
  8774                    type: "string"
  8775                Privileged:
  8776                  type: "boolean"
  8777                  description: "Runs the exec process with extended privileges."
  8778                  default: false
  8779                User:
  8780                  type: "string"
  8781                  description: |
  8782                    The user, and optionally, group to run the exec process inside
  8783                    the container. Format is one of: `user`, `user:group`, `uid`,
  8784                    or `uid:gid`.
  8785                WorkingDir:
  8786                  type: "string"
  8787                  description: |
  8788                    The working directory for the exec process inside the container.
  8789              example:
  8790                AttachStdin: false
  8791                AttachStdout: true
  8792                AttachStderr: true
  8793                DetachKeys: "ctrl-p,ctrl-q"
  8794                Tty: false
  8795                Cmd:
  8796                  - "date"
  8797                Env:
  8798                  - "FOO=bar"
  8799                  - "BAZ=quux"
  8800            required: true
  8801          - name: "id"
  8802            in: "path"
  8803            description: "ID or name of container"
  8804            type: "string"
  8805            required: true
  8806        tags: ["Exec"]
  8807    /exec/{id}/start:
  8808      post:
  8809        summary: "Start an exec instance"
  8810        description: |
  8811          Starts a previously set up exec instance. If detach is true, this endpoint
  8812          returns immediately after starting the command. Otherwise, it sets up an
  8813          interactive session with the command.
  8814        operationId: "ExecStart"
  8815        consumes:
  8816          - "application/json"
  8817        produces:
  8818          - "application/vnd.docker.raw-stream"
  8819        responses:
  8820          200:
  8821            description: "No error"
  8822          404:
  8823            description: "No such exec instance"
  8824            schema:
  8825              $ref: "#/definitions/ErrorResponse"
  8826          409:
  8827            description: "Container is stopped or paused"
  8828            schema:
  8829              $ref: "#/definitions/ErrorResponse"
  8830        parameters:
  8831          - name: "execStartConfig"
  8832            in: "body"
  8833            schema:
  8834              type: "object"
  8835              title: "ExecStartConfig"
  8836              properties:
  8837                Detach:
  8838                  type: "boolean"
  8839                  description: "Detach from the command."
  8840                Tty:
  8841                  type: "boolean"
  8842                  description: "Allocate a pseudo-TTY."
  8843              example:
  8844                Detach: false
  8845                Tty: false
  8846          - name: "id"
  8847            in: "path"
  8848            description: "Exec instance ID"
  8849            required: true
  8850            type: "string"
  8851        tags: ["Exec"]
  8852    /exec/{id}/resize:
  8853      post:
  8854        summary: "Resize an exec instance"
  8855        description: |
  8856          Resize the TTY session used by an exec instance. This endpoint only works
  8857          if `tty` was specified as part of creating and starting the exec instance.
  8858        operationId: "ExecResize"
  8859        responses:
  8860          200:
  8861            description: "No error"
  8862          400:
  8863            description: "bad parameter"
  8864            schema:
  8865              $ref: "#/definitions/ErrorResponse"
  8866          404:
  8867            description: "No such exec instance"
  8868            schema:
  8869              $ref: "#/definitions/ErrorResponse"
  8870          500:
  8871            description: "Server error"
  8872            schema:
  8873              $ref: "#/definitions/ErrorResponse"
  8874        parameters:
  8875          - name: "id"
  8876            in: "path"
  8877            description: "Exec instance ID"
  8878            required: true
  8879            type: "string"
  8880          - name: "h"
  8881            in: "query"
  8882            description: "Height of the TTY session in characters"
  8883            type: "integer"
  8884          - name: "w"
  8885            in: "query"
  8886            description: "Width of the TTY session in characters"
  8887            type: "integer"
  8888        tags: ["Exec"]
  8889    /exec/{id}/json:
  8890      get:
  8891        summary: "Inspect an exec instance"
  8892        description: "Return low-level information about an exec instance."
  8893        operationId: "ExecInspect"
  8894        produces:
  8895          - "application/json"
  8896        responses:
  8897          200:
  8898            description: "No error"
  8899            schema:
  8900              type: "object"
  8901              title: "ExecInspectResponse"
  8902              properties:
  8903                CanRemove:
  8904                  type: "boolean"
  8905                DetachKeys:
  8906                  type: "string"
  8907                ID:
  8908                  type: "string"
  8909                Running:
  8910                  type: "boolean"
  8911                ExitCode:
  8912                  type: "integer"
  8913                ProcessConfig:
  8914                  $ref: "#/definitions/ProcessConfig"
  8915                OpenStdin:
  8916                  type: "boolean"
  8917                OpenStderr:
  8918                  type: "boolean"
  8919                OpenStdout:
  8920                  type: "boolean"
  8921                ContainerID:
  8922                  type: "string"
  8923                Pid:
  8924                  type: "integer"
  8925                  description: "The system process ID for the exec process."
  8926            examples:
  8927              application/json:
  8928                CanRemove: false
  8929                ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126"
  8930                DetachKeys: ""
  8931                ExitCode: 2
  8932                ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b"
  8933                OpenStderr: true
  8934                OpenStdin: true
  8935                OpenStdout: true
  8936                ProcessConfig:
  8937                  arguments:
  8938                    - "-c"
  8939                    - "exit 2"
  8940                  entrypoint: "sh"
  8941                  privileged: false
  8942                  tty: true
  8943                  user: "1000"
  8944                Running: false
  8945                Pid: 42000
  8946          404:
  8947            description: "No such exec instance"
  8948            schema:
  8949              $ref: "#/definitions/ErrorResponse"
  8950          500:
  8951            description: "Server error"
  8952            schema:
  8953              $ref: "#/definitions/ErrorResponse"
  8954        parameters:
  8955          - name: "id"
  8956            in: "path"
  8957            description: "Exec instance ID"
  8958            required: true
  8959            type: "string"
  8960        tags: ["Exec"]
  8961  
  8962    /volumes:
  8963      get:
  8964        summary: "List volumes"
  8965        operationId: "VolumeList"
  8966        produces: ["application/json"]
  8967        responses:
  8968          200:
  8969            description: "Summary volume data that matches the query"
  8970            schema:
  8971              $ref: "#/definitions/VolumeListResponse"
  8972          500:
  8973            description: "Server error"
  8974            schema:
  8975              $ref: "#/definitions/ErrorResponse"
  8976        parameters:
  8977          - name: "filters"
  8978            in: "query"
  8979            description: |
  8980              JSON encoded value of the filters (a `map[string][]string`) to
  8981              process on the volumes list. Available filters:
  8982  
  8983              - `dangling=<boolean>` When set to `true` (or `1`), returns all
  8984                 volumes that are not in use by a container. When set to `false`
  8985                 (or `0`), only volumes that are in use by one or more
  8986                 containers are returned.
  8987              - `driver=<volume-driver-name>` Matches volumes based on their driver.
  8988              - `label=<key>` or `label=<key>:<value>` Matches volumes based on
  8989                 the presence of a `label` alone or a `label` and a value.
  8990              - `name=<volume-name>` Matches all or part of a volume name.
  8991            type: "string"
  8992            format: "json"
  8993        tags: ["Volume"]
  8994  
  8995    /volumes/create:
  8996      post:
  8997        summary: "Create a volume"
  8998        operationId: "VolumeCreate"
  8999        consumes: ["application/json"]
  9000        produces: ["application/json"]
  9001        responses:
  9002          201:
  9003            description: "The volume was created successfully"
  9004            schema:
  9005              $ref: "#/definitions/Volume"
  9006          500:
  9007            description: "Server error"
  9008            schema:
  9009              $ref: "#/definitions/ErrorResponse"
  9010        parameters:
  9011          - name: "volumeConfig"
  9012            in: "body"
  9013            required: true
  9014            description: "Volume configuration"
  9015            schema:
  9016              $ref: "#/definitions/VolumeCreateOptions"
  9017        tags: ["Volume"]
  9018  
  9019    /volumes/{name}:
  9020      get:
  9021        summary: "Inspect a volume"
  9022        operationId: "VolumeInspect"
  9023        produces: ["application/json"]
  9024        responses:
  9025          200:
  9026            description: "No error"
  9027            schema:
  9028              $ref: "#/definitions/Volume"
  9029          404:
  9030            description: "No such volume"
  9031            schema:
  9032              $ref: "#/definitions/ErrorResponse"
  9033          500:
  9034            description: "Server error"
  9035            schema:
  9036              $ref: "#/definitions/ErrorResponse"
  9037        parameters:
  9038          - name: "name"
  9039            in: "path"
  9040            required: true
  9041            description: "Volume name or ID"
  9042            type: "string"
  9043        tags: ["Volume"]
  9044  
  9045      delete:
  9046        summary: "Remove a volume"
  9047        description: "Instruct the driver to remove the volume."
  9048        operationId: "VolumeDelete"
  9049        responses:
  9050          204:
  9051            description: "The volume was removed"
  9052          404:
  9053            description: "No such volume or volume driver"
  9054            schema:
  9055              $ref: "#/definitions/ErrorResponse"
  9056          409:
  9057            description: "Volume is in use and cannot be removed"
  9058            schema:
  9059              $ref: "#/definitions/ErrorResponse"
  9060          500:
  9061            description: "Server error"
  9062            schema:
  9063              $ref: "#/definitions/ErrorResponse"
  9064        parameters:
  9065          - name: "name"
  9066            in: "path"
  9067            required: true
  9068            description: "Volume name or ID"
  9069            type: "string"
  9070          - name: "force"
  9071            in: "query"
  9072            description: "Force the removal of the volume"
  9073            type: "boolean"
  9074            default: false
  9075        tags: ["Volume"]
  9076  
  9077    /volumes/prune:
  9078      post:
  9079        summary: "Delete unused volumes"
  9080        produces:
  9081          - "application/json"
  9082        operationId: "VolumePrune"
  9083        parameters:
  9084          - name: "filters"
  9085            in: "query"
  9086            description: |
  9087              Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  9088  
  9089              Available filters:
  9090              - `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.
  9091            type: "string"
  9092        responses:
  9093          200:
  9094            description: "No error"
  9095            schema:
  9096              type: "object"
  9097              title: "VolumePruneResponse"
  9098              properties:
  9099                VolumesDeleted:
  9100                  description: "Volumes that were deleted"
  9101                  type: "array"
  9102                  items:
  9103                    type: "string"
  9104                SpaceReclaimed:
  9105                  description: "Disk space reclaimed in bytes"
  9106                  type: "integer"
  9107                  format: "int64"
  9108          500:
  9109            description: "Server error"
  9110            schema:
  9111              $ref: "#/definitions/ErrorResponse"
  9112        tags: ["Volume"]
  9113    /networks:
  9114      get:
  9115        summary: "List networks"
  9116        description: |
  9117          Returns a list of networks. For details on the format, see the
  9118          [network inspect endpoint](#operation/NetworkInspect).
  9119  
  9120          Note that it uses a different, smaller representation of a network than
  9121          inspecting a single network. For example, the list of containers attached
  9122          to the network is not propagated in API versions 1.28 and up.
  9123        operationId: "NetworkList"
  9124        produces:
  9125          - "application/json"
  9126        responses:
  9127          200:
  9128            description: "No error"
  9129            schema:
  9130              type: "array"
  9131              items:
  9132                $ref: "#/definitions/Network"
  9133            examples:
  9134              application/json:
  9135                - Name: "bridge"
  9136                  Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566"
  9137                  Created: "2016-10-19T06:21:00.416543526Z"
  9138                  Scope: "local"
  9139                  Driver: "bridge"
  9140                  EnableIPv6: false
  9141                  Internal: false
  9142                  Attachable: false
  9143                  Ingress: false
  9144                  IPAM:
  9145                    Driver: "default"
  9146                    Config:
  9147                      -
  9148                        Subnet: "172.17.0.0/16"
  9149                  Options:
  9150                    com.docker.network.bridge.default_bridge: "true"
  9151                    com.docker.network.bridge.enable_icc: "true"
  9152                    com.docker.network.bridge.enable_ip_masquerade: "true"
  9153                    com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
  9154                    com.docker.network.bridge.name: "docker0"
  9155                    com.docker.network.driver.mtu: "1500"
  9156                - Name: "none"
  9157                  Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794"
  9158                  Created: "0001-01-01T00:00:00Z"
  9159                  Scope: "local"
  9160                  Driver: "null"
  9161                  EnableIPv6: false
  9162                  Internal: false
  9163                  Attachable: false
  9164                  Ingress: false
  9165                  IPAM:
  9166                    Driver: "default"
  9167                    Config: []
  9168                  Containers: {}
  9169                  Options: {}
  9170                - Name: "host"
  9171                  Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e"
  9172                  Created: "0001-01-01T00:00:00Z"
  9173                  Scope: "local"
  9174                  Driver: "host"
  9175                  EnableIPv6: false
  9176                  Internal: false
  9177                  Attachable: false
  9178                  Ingress: false
  9179                  IPAM:
  9180                    Driver: "default"
  9181                    Config: []
  9182                  Containers: {}
  9183                  Options: {}
  9184          500:
  9185            description: "Server error"
  9186            schema:
  9187              $ref: "#/definitions/ErrorResponse"
  9188        parameters:
  9189          - name: "filters"
  9190            in: "query"
  9191            description: |
  9192              JSON encoded value of the filters (a `map[string][]string`) to process
  9193              on the networks list.
  9194  
  9195              Available filters:
  9196  
  9197              - `dangling=<boolean>` When set to `true` (or `1`), returns all
  9198                 networks that are not in use by a container. When set to `false`
  9199                 (or `0`), only networks that are in use by one or more
  9200                 containers are returned.
  9201              - `driver=<driver-name>` Matches a network's driver.
  9202              - `id=<network-id>` Matches all or part of a network ID.
  9203              - `label=<key>` or `label=<key>=<value>` of a network label.
  9204              - `name=<network-name>` Matches all or part of a network name.
  9205              - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`).
  9206              - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks.
  9207            type: "string"
  9208        tags: ["Network"]
  9209  
  9210    /networks/{id}:
  9211      get:
  9212        summary: "Inspect a network"
  9213        operationId: "NetworkInspect"
  9214        produces:
  9215          - "application/json"
  9216        responses:
  9217          200:
  9218            description: "No error"
  9219            schema:
  9220              $ref: "#/definitions/Network"
  9221          404:
  9222            description: "Network not found"
  9223            schema:
  9224              $ref: "#/definitions/ErrorResponse"
  9225          500:
  9226            description: "Server error"
  9227            schema:
  9228              $ref: "#/definitions/ErrorResponse"
  9229        parameters:
  9230          - name: "id"
  9231            in: "path"
  9232            description: "Network ID or name"
  9233            required: true
  9234            type: "string"
  9235          - name: "verbose"
  9236            in: "query"
  9237            description: "Detailed inspect output for troubleshooting"
  9238            type: "boolean"
  9239            default: false
  9240          - name: "scope"
  9241            in: "query"
  9242            description: "Filter the network by scope (swarm, global, or local)"
  9243            type: "string"
  9244        tags: ["Network"]
  9245  
  9246      delete:
  9247        summary: "Remove a network"
  9248        operationId: "NetworkDelete"
  9249        responses:
  9250          204:
  9251            description: "No error"
  9252          403:
  9253            description: "operation not supported for pre-defined networks"
  9254            schema:
  9255              $ref: "#/definitions/ErrorResponse"
  9256          404:
  9257            description: "no such network"
  9258            schema:
  9259              $ref: "#/definitions/ErrorResponse"
  9260          500:
  9261            description: "Server error"
  9262            schema:
  9263              $ref: "#/definitions/ErrorResponse"
  9264        parameters:
  9265          - name: "id"
  9266            in: "path"
  9267            description: "Network ID or name"
  9268            required: true
  9269            type: "string"
  9270        tags: ["Network"]
  9271  
  9272    /networks/create:
  9273      post:
  9274        summary: "Create a network"
  9275        operationId: "NetworkCreate"
  9276        consumes:
  9277          - "application/json"
  9278        produces:
  9279          - "application/json"
  9280        responses:
  9281          201:
  9282            description: "No error"
  9283            schema:
  9284              type: "object"
  9285              title: "NetworkCreateResponse"
  9286              properties:
  9287                Id:
  9288                  description: "The ID of the created network."
  9289                  type: "string"
  9290                Warning:
  9291                  type: "string"
  9292              example:
  9293                Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30"
  9294                Warning: ""
  9295          400:
  9296            description: "bad parameter"
  9297            schema:
  9298              $ref: "#/definitions/ErrorResponse"
  9299          403:
  9300            description: "operation not supported for pre-defined networks"
  9301            schema:
  9302              $ref: "#/definitions/ErrorResponse"
  9303          404:
  9304            description: "plugin not found"
  9305            schema:
  9306              $ref: "#/definitions/ErrorResponse"
  9307          500:
  9308            description: "Server error"
  9309            schema:
  9310              $ref: "#/definitions/ErrorResponse"
  9311        parameters:
  9312          - name: "networkConfig"
  9313            in: "body"
  9314            description: "Network configuration"
  9315            required: true
  9316            schema:
  9317              type: "object"
  9318              title: "NetworkCreateRequest"
  9319              required: ["Name"]
  9320              properties:
  9321                Name:
  9322                  description: "The network's name."
  9323                  type: "string"
  9324                CheckDuplicate:
  9325                  description: |
  9326                    Check for networks with duplicate names. Since Network is
  9327                    primarily keyed based on a random ID and not on the name, and
  9328                    network name is strictly a user-friendly alias to the network
  9329                    which is uniquely identified using ID, there is no guaranteed
  9330                    way to check for duplicates. CheckDuplicate is there to provide
  9331                    a best effort checking of any networks which has the same name
  9332                    but it is not guaranteed to catch all name collisions.
  9333                  type: "boolean"
  9334                Driver:
  9335                  description: "Name of the network driver plugin to use."
  9336                  type: "string"
  9337                  default: "bridge"
  9338                Internal:
  9339                  description: "Restrict external access to the network."
  9340                  type: "boolean"
  9341                Attachable:
  9342                  description: |
  9343                    Globally scoped network is manually attachable by regular
  9344                    containers from workers in swarm mode.
  9345                  type: "boolean"
  9346                Ingress:
  9347                  description: |
  9348                    Ingress network is the network which provides the routing-mesh
  9349                    in swarm mode.
  9350                  type: "boolean"
  9351                IPAM:
  9352                  description: "Optional custom IP scheme for the network."
  9353                  $ref: "#/definitions/IPAM"
  9354                EnableIPv6:
  9355                  description: "Enable IPv6 on the network."
  9356                  type: "boolean"
  9357                Options:
  9358                  description: "Network specific options to be used by the drivers."
  9359                  type: "object"
  9360                  additionalProperties:
  9361                    type: "string"
  9362                Labels:
  9363                  description: "User-defined key/value metadata."
  9364                  type: "object"
  9365                  additionalProperties:
  9366                    type: "string"
  9367              example:
  9368                Name: "isolated_nw"
  9369                CheckDuplicate: false
  9370                Driver: "bridge"
  9371                EnableIPv6: true
  9372                IPAM:
  9373                  Driver: "default"
  9374                  Config:
  9375                    - Subnet: "172.20.0.0/16"
  9376                      IPRange: "172.20.10.0/24"
  9377                      Gateway: "172.20.10.11"
  9378                    - Subnet: "2001:db8:abcd::/64"
  9379                      Gateway: "2001:db8:abcd::1011"
  9380                  Options:
  9381                    foo: "bar"
  9382                Internal: true
  9383                Attachable: false
  9384                Ingress: false
  9385                Options:
  9386                  com.docker.network.bridge.default_bridge: "true"
  9387                  com.docker.network.bridge.enable_icc: "true"
  9388                  com.docker.network.bridge.enable_ip_masquerade: "true"
  9389                  com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
  9390                  com.docker.network.bridge.name: "docker0"
  9391                  com.docker.network.driver.mtu: "1500"
  9392                Labels:
  9393                  com.example.some-label: "some-value"
  9394                  com.example.some-other-label: "some-other-value"
  9395        tags: ["Network"]
  9396  
  9397    /networks/{id}/connect:
  9398      post:
  9399        summary: "Connect a container to a network"
  9400        operationId: "NetworkConnect"
  9401        consumes:
  9402          - "application/json"
  9403        responses:
  9404          200:
  9405            description: "No error"
  9406          403:
  9407            description: "Operation not supported for swarm scoped networks"
  9408            schema:
  9409              $ref: "#/definitions/ErrorResponse"
  9410          404:
  9411            description: "Network or container not found"
  9412            schema:
  9413              $ref: "#/definitions/ErrorResponse"
  9414          500:
  9415            description: "Server error"
  9416            schema:
  9417              $ref: "#/definitions/ErrorResponse"
  9418        parameters:
  9419          - name: "id"
  9420            in: "path"
  9421            description: "Network ID or name"
  9422            required: true
  9423            type: "string"
  9424          - name: "container"
  9425            in: "body"
  9426            required: true
  9427            schema:
  9428              type: "object"
  9429              title: "NetworkDisconnectRequest"
  9430              properties:
  9431                Container:
  9432                  type: "string"
  9433                  description: "The ID or name of the container to connect to the network."
  9434                EndpointConfig:
  9435                  $ref: "#/definitions/EndpointSettings"
  9436              example:
  9437                Container: "3613f73ba0e4"
  9438                EndpointConfig:
  9439                  IPAMConfig:
  9440                    IPv4Address: "172.24.56.89"
  9441                    IPv6Address: "2001:db8::5689"
  9442        tags: ["Network"]
  9443  
  9444    /networks/{id}/disconnect:
  9445      post:
  9446        summary: "Disconnect a container from a network"
  9447        operationId: "NetworkDisconnect"
  9448        consumes:
  9449          - "application/json"
  9450        responses:
  9451          200:
  9452            description: "No error"
  9453          403:
  9454            description: "Operation not supported for swarm scoped networks"
  9455            schema:
  9456              $ref: "#/definitions/ErrorResponse"
  9457          404:
  9458            description: "Network or container not found"
  9459            schema:
  9460              $ref: "#/definitions/ErrorResponse"
  9461          500:
  9462            description: "Server error"
  9463            schema:
  9464              $ref: "#/definitions/ErrorResponse"
  9465        parameters:
  9466          - name: "id"
  9467            in: "path"
  9468            description: "Network ID or name"
  9469            required: true
  9470            type: "string"
  9471          - name: "container"
  9472            in: "body"
  9473            required: true
  9474            schema:
  9475              type: "object"
  9476              title: "NetworkConnectRequest"
  9477              properties:
  9478                Container:
  9479                  type: "string"
  9480                  description: |
  9481                    The ID or name of the container to disconnect from the network.
  9482                Force:
  9483                  type: "boolean"
  9484                  description: |
  9485                    Force the container to disconnect from the network.
  9486        tags: ["Network"]
  9487    /networks/prune:
  9488      post:
  9489        summary: "Delete unused networks"
  9490        produces:
  9491          - "application/json"
  9492        operationId: "NetworkPrune"
  9493        parameters:
  9494          - name: "filters"
  9495            in: "query"
  9496            description: |
  9497              Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  9498  
  9499              Available filters:
  9500              - `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.
  9501              - `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.
  9502            type: "string"
  9503        responses:
  9504          200:
  9505            description: "No error"
  9506            schema:
  9507              type: "object"
  9508              title: "NetworkPruneResponse"
  9509              properties:
  9510                NetworksDeleted:
  9511                  description: "Networks that were deleted"
  9512                  type: "array"
  9513                  items:
  9514                    type: "string"
  9515          500:
  9516            description: "Server error"
  9517            schema:
  9518              $ref: "#/definitions/ErrorResponse"
  9519        tags: ["Network"]
  9520    /plugins:
  9521      get:
  9522        summary: "List plugins"
  9523        operationId: "PluginList"
  9524        description: "Returns information about installed plugins."
  9525        produces: ["application/json"]
  9526        responses:
  9527          200:
  9528            description: "No error"
  9529            schema:
  9530              type: "array"
  9531              items:
  9532                $ref: "#/definitions/Plugin"
  9533          500:
  9534            description: "Server error"
  9535            schema:
  9536              $ref: "#/definitions/ErrorResponse"
  9537        parameters:
  9538          - name: "filters"
  9539            in: "query"
  9540            type: "string"
  9541            description: |
  9542              A JSON encoded value of the filters (a `map[string][]string`) to
  9543              process on the plugin list.
  9544  
  9545              Available filters:
  9546  
  9547              - `capability=<capability name>`
  9548              - `enable=<true>|<false>`
  9549        tags: ["Plugin"]
  9550  
  9551    /plugins/privileges:
  9552      get:
  9553        summary: "Get plugin privileges"
  9554        operationId: "GetPluginPrivileges"
  9555        responses:
  9556          200:
  9557            description: "no error"
  9558            schema:
  9559              type: "array"
  9560              items:
  9561                $ref: "#/definitions/PluginPrivilege"
  9562              example:
  9563                - Name: "network"
  9564                  Description: ""
  9565                  Value:
  9566                    - "host"
  9567                - Name: "mount"
  9568                  Description: ""
  9569                  Value:
  9570                    - "/data"
  9571                - Name: "device"
  9572                  Description: ""
  9573                  Value:
  9574                    - "/dev/cpu_dma_latency"
  9575          500:
  9576            description: "server error"
  9577            schema:
  9578              $ref: "#/definitions/ErrorResponse"
  9579        parameters:
  9580          - name: "remote"
  9581            in: "query"
  9582            description: |
  9583              The name of the plugin. The `:latest` tag is optional, and is the
  9584              default if omitted.
  9585            required: true
  9586            type: "string"
  9587        tags:
  9588          - "Plugin"
  9589  
  9590    /plugins/pull:
  9591      post:
  9592        summary: "Install a plugin"
  9593        operationId: "PluginPull"
  9594        description: |
  9595          Pulls and installs a plugin. After the plugin is installed, it can be
  9596          enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable).
  9597        produces:
  9598          - "application/json"
  9599        responses:
  9600          204:
  9601            description: "no error"
  9602          500:
  9603            description: "server error"
  9604            schema:
  9605              $ref: "#/definitions/ErrorResponse"
  9606        parameters:
  9607          - name: "remote"
  9608            in: "query"
  9609            description: |
  9610              Remote reference for plugin to install.
  9611  
  9612              The `:latest` tag is optional, and is used as the default if omitted.
  9613            required: true
  9614            type: "string"
  9615          - name: "name"
  9616            in: "query"
  9617            description: |
  9618              Local name for the pulled plugin.
  9619  
  9620              The `:latest` tag is optional, and is used as the default if omitted.
  9621            required: false
  9622            type: "string"
  9623          - name: "X-Registry-Auth"
  9624            in: "header"
  9625            description: |
  9626              A base64url-encoded auth configuration to use when pulling a plugin
  9627              from a registry.
  9628  
  9629              Refer to the [authentication section](#section/Authentication) for
  9630              details.
  9631            type: "string"
  9632          - name: "body"
  9633            in: "body"
  9634            schema:
  9635              type: "array"
  9636              items:
  9637                $ref: "#/definitions/PluginPrivilege"
  9638              example:
  9639                - Name: "network"
  9640                  Description: ""
  9641                  Value:
  9642                    - "host"
  9643                - Name: "mount"
  9644                  Description: ""
  9645                  Value:
  9646                    - "/data"
  9647                - Name: "device"
  9648                  Description: ""
  9649                  Value:
  9650                    - "/dev/cpu_dma_latency"
  9651        tags: ["Plugin"]
  9652    /plugins/{name}/json:
  9653      get:
  9654        summary: "Inspect a plugin"
  9655        operationId: "PluginInspect"
  9656        responses:
  9657          200:
  9658            description: "no error"
  9659            schema:
  9660              $ref: "#/definitions/Plugin"
  9661          404:
  9662            description: "plugin is not installed"
  9663            schema:
  9664              $ref: "#/definitions/ErrorResponse"
  9665          500:
  9666            description: "server error"
  9667            schema:
  9668              $ref: "#/definitions/ErrorResponse"
  9669        parameters:
  9670          - name: "name"
  9671            in: "path"
  9672            description: |
  9673              The name of the plugin. The `:latest` tag is optional, and is the
  9674              default if omitted.
  9675            required: true
  9676            type: "string"
  9677        tags: ["Plugin"]
  9678    /plugins/{name}:
  9679      delete:
  9680        summary: "Remove a plugin"
  9681        operationId: "PluginDelete"
  9682        responses:
  9683          200:
  9684            description: "no error"
  9685            schema:
  9686              $ref: "#/definitions/Plugin"
  9687          404:
  9688            description: "plugin is not installed"
  9689            schema:
  9690              $ref: "#/definitions/ErrorResponse"
  9691          500:
  9692            description: "server error"
  9693            schema:
  9694              $ref: "#/definitions/ErrorResponse"
  9695        parameters:
  9696          - name: "name"
  9697            in: "path"
  9698            description: |
  9699              The name of the plugin. The `:latest` tag is optional, and is the
  9700              default if omitted.
  9701            required: true
  9702            type: "string"
  9703          - name: "force"
  9704            in: "query"
  9705            description: |
  9706              Disable the plugin before removing. This may result in issues if the
  9707              plugin is in use by a container.
  9708            type: "boolean"
  9709            default: false
  9710        tags: ["Plugin"]
  9711    /plugins/{name}/enable:
  9712      post:
  9713        summary: "Enable a plugin"
  9714        operationId: "PluginEnable"
  9715        responses:
  9716          200:
  9717            description: "no error"
  9718          404:
  9719            description: "plugin is not installed"
  9720            schema:
  9721              $ref: "#/definitions/ErrorResponse"
  9722          500:
  9723            description: "server error"
  9724            schema:
  9725              $ref: "#/definitions/ErrorResponse"
  9726        parameters:
  9727          - name: "name"
  9728            in: "path"
  9729            description: |
  9730              The name of the plugin. The `:latest` tag is optional, and is the
  9731              default if omitted.
  9732            required: true
  9733            type: "string"
  9734          - name: "timeout"
  9735            in: "query"
  9736            description: "Set the HTTP client timeout (in seconds)"
  9737            type: "integer"
  9738            default: 0
  9739        tags: ["Plugin"]
  9740    /plugins/{name}/disable:
  9741      post:
  9742        summary: "Disable a plugin"
  9743        operationId: "PluginDisable"
  9744        responses:
  9745          200:
  9746            description: "no error"
  9747          404:
  9748            description: "plugin is not installed"
  9749            schema:
  9750              $ref: "#/definitions/ErrorResponse"
  9751          500:
  9752            description: "server error"
  9753            schema:
  9754              $ref: "#/definitions/ErrorResponse"
  9755        parameters:
  9756          - name: "name"
  9757            in: "path"
  9758            description: |
  9759              The name of the plugin. The `:latest` tag is optional, and is the
  9760              default if omitted.
  9761            required: true
  9762            type: "string"
  9763          - name: "force"
  9764            in: "query"
  9765            description: |
  9766              Force disable a plugin even if still in use.
  9767            required: false
  9768            type: "boolean"
  9769        tags: ["Plugin"]
  9770    /plugins/{name}/upgrade:
  9771      post:
  9772        summary: "Upgrade a plugin"
  9773        operationId: "PluginUpgrade"
  9774        responses:
  9775          204:
  9776            description: "no error"
  9777          404:
  9778            description: "plugin not installed"
  9779            schema:
  9780              $ref: "#/definitions/ErrorResponse"
  9781          500:
  9782            description: "server error"
  9783            schema:
  9784              $ref: "#/definitions/ErrorResponse"
  9785        parameters:
  9786          - name: "name"
  9787            in: "path"
  9788            description: |
  9789              The name of the plugin. The `:latest` tag is optional, and is the
  9790              default if omitted.
  9791            required: true
  9792            type: "string"
  9793          - name: "remote"
  9794            in: "query"
  9795            description: |
  9796              Remote reference to upgrade to.
  9797  
  9798              The `:latest` tag is optional, and is used as the default if omitted.
  9799            required: true
  9800            type: "string"
  9801          - name: "X-Registry-Auth"
  9802            in: "header"
  9803            description: |
  9804              A base64url-encoded auth configuration to use when pulling a plugin
  9805              from a registry.
  9806  
  9807              Refer to the [authentication section](#section/Authentication) for
  9808              details.
  9809            type: "string"
  9810          - name: "body"
  9811            in: "body"
  9812            schema:
  9813              type: "array"
  9814              items:
  9815                $ref: "#/definitions/PluginPrivilege"
  9816              example:
  9817                - Name: "network"
  9818                  Description: ""
  9819                  Value:
  9820                    - "host"
  9821                - Name: "mount"
  9822                  Description: ""
  9823                  Value:
  9824                    - "/data"
  9825                - Name: "device"
  9826                  Description: ""
  9827                  Value:
  9828                    - "/dev/cpu_dma_latency"
  9829        tags: ["Plugin"]
  9830    /plugins/create:
  9831      post:
  9832        summary: "Create a plugin"
  9833        operationId: "PluginCreate"
  9834        consumes:
  9835          - "application/x-tar"
  9836        responses:
  9837          204:
  9838            description: "no error"
  9839          500:
  9840            description: "server error"
  9841            schema:
  9842              $ref: "#/definitions/ErrorResponse"
  9843        parameters:
  9844          - name: "name"
  9845            in: "query"
  9846            description: |
  9847              The name of the plugin. The `:latest` tag is optional, and is the
  9848              default if omitted.
  9849            required: true
  9850            type: "string"
  9851          - name: "tarContext"
  9852            in: "body"
  9853            description: "Path to tar containing plugin rootfs and manifest"
  9854            schema:
  9855              type: "string"
  9856              format: "binary"
  9857        tags: ["Plugin"]
  9858    /plugins/{name}/push:
  9859      post:
  9860        summary: "Push a plugin"
  9861        operationId: "PluginPush"
  9862        description: |
  9863          Push a plugin to the registry.
  9864        parameters:
  9865          - name: "name"
  9866            in: "path"
  9867            description: |
  9868              The name of the plugin. The `:latest` tag is optional, and is the
  9869              default if omitted.
  9870            required: true
  9871            type: "string"
  9872        responses:
  9873          200:
  9874            description: "no error"
  9875          404:
  9876            description: "plugin not installed"
  9877            schema:
  9878              $ref: "#/definitions/ErrorResponse"
  9879          500:
  9880            description: "server error"
  9881            schema:
  9882              $ref: "#/definitions/ErrorResponse"
  9883        tags: ["Plugin"]
  9884    /plugins/{name}/set:
  9885      post:
  9886        summary: "Configure a plugin"
  9887        operationId: "PluginSet"
  9888        consumes:
  9889          - "application/json"
  9890        parameters:
  9891          - name: "name"
  9892            in: "path"
  9893            description: |
  9894              The name of the plugin. The `:latest` tag is optional, and is the
  9895              default if omitted.
  9896            required: true
  9897            type: "string"
  9898          - name: "body"
  9899            in: "body"
  9900            schema:
  9901              type: "array"
  9902              items:
  9903                type: "string"
  9904              example: ["DEBUG=1"]
  9905        responses:
  9906          204:
  9907            description: "No error"
  9908          404:
  9909            description: "Plugin not installed"
  9910            schema:
  9911              $ref: "#/definitions/ErrorResponse"
  9912          500:
  9913            description: "Server error"
  9914            schema:
  9915              $ref: "#/definitions/ErrorResponse"
  9916        tags: ["Plugin"]
  9917    /nodes:
  9918      get:
  9919        summary: "List nodes"
  9920        operationId: "NodeList"
  9921        responses:
  9922          200:
  9923            description: "no error"
  9924            schema:
  9925              type: "array"
  9926              items:
  9927                $ref: "#/definitions/Node"
  9928          500:
  9929            description: "server error"
  9930            schema:
  9931              $ref: "#/definitions/ErrorResponse"
  9932          503:
  9933            description: "node is not part of a swarm"
  9934            schema:
  9935              $ref: "#/definitions/ErrorResponse"
  9936        parameters:
  9937          - name: "filters"
  9938            in: "query"
  9939            description: |
  9940              Filters to process on the nodes list, encoded as JSON (a `map[string][]string`).
  9941  
  9942              Available filters:
  9943              - `id=<node id>`
  9944              - `label=<engine label>`
  9945              - `membership=`(`accepted`|`pending`)`
  9946              - `name=<node name>`
  9947              - `node.label=<node label>`
  9948              - `role=`(`manager`|`worker`)`
  9949            type: "string"
  9950        tags: ["Node"]
  9951    /nodes/{id}:
  9952      get:
  9953        summary: "Inspect a node"
  9954        operationId: "NodeInspect"
  9955        responses:
  9956          200:
  9957            description: "no error"
  9958            schema:
  9959              $ref: "#/definitions/Node"
  9960          404:
  9961            description: "no such node"
  9962            schema:
  9963              $ref: "#/definitions/ErrorResponse"
  9964          500:
  9965            description: "server error"
  9966            schema:
  9967              $ref: "#/definitions/ErrorResponse"
  9968          503:
  9969            description: "node is not part of a swarm"
  9970            schema:
  9971              $ref: "#/definitions/ErrorResponse"
  9972        parameters:
  9973          - name: "id"
  9974            in: "path"
  9975            description: "The ID or name of the node"
  9976            type: "string"
  9977            required: true
  9978        tags: ["Node"]
  9979      delete:
  9980        summary: "Delete a node"
  9981        operationId: "NodeDelete"
  9982        responses:
  9983          200:
  9984            description: "no error"
  9985          404:
  9986            description: "no such node"
  9987            schema:
  9988              $ref: "#/definitions/ErrorResponse"
  9989          500:
  9990            description: "server error"
  9991            schema:
  9992              $ref: "#/definitions/ErrorResponse"
  9993          503:
  9994            description: "node is not part of a swarm"
  9995            schema:
  9996              $ref: "#/definitions/ErrorResponse"
  9997        parameters:
  9998          - name: "id"
  9999            in: "path"
 10000            description: "The ID or name of the node"
 10001            type: "string"
 10002            required: true
 10003          - name: "force"
 10004            in: "query"
 10005            description: "Force remove a node from the swarm"
 10006            default: false
 10007            type: "boolean"
 10008        tags: ["Node"]
 10009    /nodes/{id}/update:
 10010      post:
 10011        summary: "Update a node"
 10012        operationId: "NodeUpdate"
 10013        responses:
 10014          200:
 10015            description: "no error"
 10016          400:
 10017            description: "bad parameter"
 10018            schema:
 10019              $ref: "#/definitions/ErrorResponse"
 10020          404:
 10021            description: "no such node"
 10022            schema:
 10023              $ref: "#/definitions/ErrorResponse"
 10024          500:
 10025            description: "server error"
 10026            schema:
 10027              $ref: "#/definitions/ErrorResponse"
 10028          503:
 10029            description: "node is not part of a swarm"
 10030            schema:
 10031              $ref: "#/definitions/ErrorResponse"
 10032        parameters:
 10033          - name: "id"
 10034            in: "path"
 10035            description: "The ID of the node"
 10036            type: "string"
 10037            required: true
 10038          - name: "body"
 10039            in: "body"
 10040            schema:
 10041              $ref: "#/definitions/NodeSpec"
 10042          - name: "version"
 10043            in: "query"
 10044            description: |
 10045              The version number of the node object being updated. This is required
 10046              to avoid conflicting writes.
 10047            type: "integer"
 10048            format: "int64"
 10049            required: true
 10050        tags: ["Node"]
 10051    /swarm:
 10052      get:
 10053        summary: "Inspect swarm"
 10054        operationId: "SwarmInspect"
 10055        responses:
 10056          200:
 10057            description: "no error"
 10058            schema:
 10059              $ref: "#/definitions/Swarm"
 10060          404:
 10061            description: "no such swarm"
 10062            schema:
 10063              $ref: "#/definitions/ErrorResponse"
 10064          500:
 10065            description: "server error"
 10066            schema:
 10067              $ref: "#/definitions/ErrorResponse"
 10068          503:
 10069            description: "node is not part of a swarm"
 10070            schema:
 10071              $ref: "#/definitions/ErrorResponse"
 10072        tags: ["Swarm"]
 10073    /swarm/init:
 10074      post:
 10075        summary: "Initialize a new swarm"
 10076        operationId: "SwarmInit"
 10077        produces:
 10078          - "application/json"
 10079          - "text/plain"
 10080        responses:
 10081          200:
 10082            description: "no error"
 10083            schema:
 10084              description: "The node ID"
 10085              type: "string"
 10086              example: "7v2t30z9blmxuhnyo6s4cpenp"
 10087          400:
 10088            description: "bad parameter"
 10089            schema:
 10090              $ref: "#/definitions/ErrorResponse"
 10091          500:
 10092            description: "server error"
 10093            schema:
 10094              $ref: "#/definitions/ErrorResponse"
 10095          503:
 10096            description: "node is already part of a swarm"
 10097            schema:
 10098              $ref: "#/definitions/ErrorResponse"
 10099        parameters:
 10100          - name: "body"
 10101            in: "body"
 10102            required: true
 10103            schema:
 10104              type: "object"
 10105              title: "SwarmInitRequest"
 10106              properties:
 10107                ListenAddr:
 10108                  description: |
 10109                    Listen address used for inter-manager communication, as well
 10110                    as determining the networking interface used for the VXLAN
 10111                    Tunnel Endpoint (VTEP). This can either be an address/port
 10112                    combination in the form `192.168.1.1:4567`, or an interface
 10113                    followed by a port number, like `eth0:4567`. If the port number
 10114                    is omitted, the default swarm listening port is used.
 10115                  type: "string"
 10116                AdvertiseAddr:
 10117                  description: |
 10118                    Externally reachable address advertised to other nodes. This
 10119                    can either be an address/port combination in the form
 10120                    `192.168.1.1:4567`, or an interface followed by a port number,
 10121                    like `eth0:4567`. If the port number is omitted, the port
 10122                    number from the listen address is used. If `AdvertiseAddr` is
 10123                    not specified, it will be automatically detected when possible.
 10124                  type: "string"
 10125                DataPathAddr:
 10126                  description: |
 10127                    Address or interface to use for data path traffic (format:
 10128                    `<ip|interface>`), for example,  `192.168.1.1`, or an interface,
 10129                    like `eth0`. If `DataPathAddr` is unspecified, the same address
 10130                    as `AdvertiseAddr` is used.
 10131  
 10132                    The `DataPathAddr` specifies the address that global scope
 10133                    network drivers will publish towards other  nodes in order to
 10134                    reach the containers running on this node. Using this parameter
 10135                    it is possible to separate the container data traffic from the
 10136                    management traffic of the cluster.
 10137                  type: "string"
 10138                DataPathPort:
 10139                  description: |
 10140                    DataPathPort specifies the data path port number for data traffic.
 10141                    Acceptable port range is 1024 to 49151.
 10142                    if no port is set or is set to 0, default port 4789 will be used.
 10143                  type: "integer"
 10144                  format: "uint32"
 10145                DefaultAddrPool:
 10146                  description: |
 10147                    Default Address Pool specifies default subnet pools for global
 10148                    scope networks.
 10149                  type: "array"
 10150                  items:
 10151                    type: "string"
 10152                    example: ["10.10.0.0/16", "20.20.0.0/16"]
 10153                ForceNewCluster:
 10154                  description: "Force creation of a new swarm."
 10155                  type: "boolean"
 10156                SubnetSize:
 10157                  description: |
 10158                    SubnetSize specifies the subnet size of the networks created
 10159                    from the default subnet pool.
 10160                  type: "integer"
 10161                  format: "uint32"
 10162                Spec:
 10163                  $ref: "#/definitions/SwarmSpec"
 10164              example:
 10165                ListenAddr: "0.0.0.0:2377"
 10166                AdvertiseAddr: "192.168.1.1:2377"
 10167                DataPathPort: 4789
 10168                DefaultAddrPool: ["10.10.0.0/8", "20.20.0.0/8"]
 10169                SubnetSize: 24
 10170                ForceNewCluster: false
 10171                Spec:
 10172                  Orchestration: {}
 10173                  Raft: {}
 10174                  Dispatcher: {}
 10175                  CAConfig: {}
 10176                  EncryptionConfig:
 10177                    AutoLockManagers: false
 10178        tags: ["Swarm"]
 10179    /swarm/join:
 10180      post:
 10181        summary: "Join an existing swarm"
 10182        operationId: "SwarmJoin"
 10183        responses:
 10184          200:
 10185            description: "no error"
 10186          400:
 10187            description: "bad parameter"
 10188            schema:
 10189              $ref: "#/definitions/ErrorResponse"
 10190          500:
 10191            description: "server error"
 10192            schema:
 10193              $ref: "#/definitions/ErrorResponse"
 10194          503:
 10195            description: "node is already part of a swarm"
 10196            schema:
 10197              $ref: "#/definitions/ErrorResponse"
 10198        parameters:
 10199          - name: "body"
 10200            in: "body"
 10201            required: true
 10202            schema:
 10203              type: "object"
 10204              title: "SwarmJoinRequest"
 10205              properties:
 10206                ListenAddr:
 10207                  description: |
 10208                    Listen address used for inter-manager communication if the node
 10209                    gets promoted to manager, as well as determining the networking
 10210                    interface used for the VXLAN Tunnel Endpoint (VTEP).
 10211                  type: "string"
 10212                AdvertiseAddr:
 10213                  description: |
 10214                    Externally reachable address advertised to other nodes. This
 10215                    can either be an address/port combination in the form
 10216                    `192.168.1.1:4567`, or an interface followed by a port number,
 10217                    like `eth0:4567`. If the port number is omitted, the port
 10218                    number from the listen address is used. If `AdvertiseAddr` is
 10219                    not specified, it will be automatically detected when possible.
 10220                  type: "string"
 10221                DataPathAddr:
 10222                  description: |
 10223                    Address or interface to use for data path traffic (format:
 10224                    `<ip|interface>`), for example,  `192.168.1.1`, or an interface,
 10225                    like `eth0`. If `DataPathAddr` is unspecified, the same address
 10226                    as `AdvertiseAddr` is used.
 10227  
 10228                    The `DataPathAddr` specifies the address that global scope
 10229                    network drivers will publish towards other nodes in order to
 10230                    reach the containers running on this node. Using this parameter
 10231                    it is possible to separate the container data traffic from the
 10232                    management traffic of the cluster.
 10233  
 10234                  type: "string"
 10235                RemoteAddrs:
 10236                  description: |
 10237                    Addresses of manager nodes already participating in the swarm.
 10238                  type: "array"
 10239                  items:
 10240                    type: "string"
 10241                JoinToken:
 10242                  description: "Secret token for joining this swarm."
 10243                  type: "string"
 10244              example:
 10245                ListenAddr: "0.0.0.0:2377"
 10246                AdvertiseAddr: "192.168.1.1:2377"
 10247                RemoteAddrs:
 10248                  - "node1:2377"
 10249                JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2"
 10250        tags: ["Swarm"]
 10251    /swarm/leave:
 10252      post:
 10253        summary: "Leave a swarm"
 10254        operationId: "SwarmLeave"
 10255        responses:
 10256          200:
 10257            description: "no error"
 10258          500:
 10259            description: "server error"
 10260            schema:
 10261              $ref: "#/definitions/ErrorResponse"
 10262          503:
 10263            description: "node is not part of a swarm"
 10264            schema:
 10265              $ref: "#/definitions/ErrorResponse"
 10266        parameters:
 10267          - name: "force"
 10268            description: |
 10269              Force leave swarm, even if this is the last manager or that it will
 10270              break the cluster.
 10271            in: "query"
 10272            type: "boolean"
 10273            default: false
 10274        tags: ["Swarm"]
 10275    /swarm/update:
 10276      post:
 10277        summary: "Update a swarm"
 10278        operationId: "SwarmUpdate"
 10279        responses:
 10280          200:
 10281            description: "no error"
 10282          400:
 10283            description: "bad parameter"
 10284            schema:
 10285              $ref: "#/definitions/ErrorResponse"
 10286          500:
 10287            description: "server error"
 10288            schema:
 10289              $ref: "#/definitions/ErrorResponse"
 10290          503:
 10291            description: "node is not part of a swarm"
 10292            schema:
 10293              $ref: "#/definitions/ErrorResponse"
 10294        parameters:
 10295          - name: "body"
 10296            in: "body"
 10297            required: true
 10298            schema:
 10299              $ref: "#/definitions/SwarmSpec"
 10300          - name: "version"
 10301            in: "query"
 10302            description: |
 10303              The version number of the swarm object being updated. This is
 10304              required to avoid conflicting writes.
 10305            type: "integer"
 10306            format: "int64"
 10307            required: true
 10308          - name: "rotateWorkerToken"
 10309            in: "query"
 10310            description: "Rotate the worker join token."
 10311            type: "boolean"
 10312            default: false
 10313          - name: "rotateManagerToken"
 10314            in: "query"
 10315            description: "Rotate the manager join token."
 10316            type: "boolean"
 10317            default: false
 10318          - name: "rotateManagerUnlockKey"
 10319            in: "query"
 10320            description: "Rotate the manager unlock key."
 10321            type: "boolean"
 10322            default: false
 10323        tags: ["Swarm"]
 10324    /swarm/unlockkey:
 10325      get:
 10326        summary: "Get the unlock key"
 10327        operationId: "SwarmUnlockkey"
 10328        consumes:
 10329          - "application/json"
 10330        responses:
 10331          200:
 10332            description: "no error"
 10333            schema:
 10334              type: "object"
 10335              title: "UnlockKeyResponse"
 10336              properties:
 10337                UnlockKey:
 10338                  description: "The swarm's unlock key."
 10339                  type: "string"
 10340              example:
 10341                UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
 10342          500:
 10343            description: "server error"
 10344            schema:
 10345              $ref: "#/definitions/ErrorResponse"
 10346          503:
 10347            description: "node is not part of a swarm"
 10348            schema:
 10349              $ref: "#/definitions/ErrorResponse"
 10350        tags: ["Swarm"]
 10351    /swarm/unlock:
 10352      post:
 10353        summary: "Unlock a locked manager"
 10354        operationId: "SwarmUnlock"
 10355        consumes:
 10356          - "application/json"
 10357        produces:
 10358          - "application/json"
 10359        parameters:
 10360          - name: "body"
 10361            in: "body"
 10362            required: true
 10363            schema:
 10364              type: "object"
 10365              title: "SwarmUnlockRequest"
 10366              properties:
 10367                UnlockKey:
 10368                  description: "The swarm's unlock key."
 10369                  type: "string"
 10370              example:
 10371                UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
 10372        responses:
 10373          200:
 10374            description: "no error"
 10375          500:
 10376            description: "server error"
 10377            schema:
 10378              $ref: "#/definitions/ErrorResponse"
 10379          503:
 10380            description: "node is not part of a swarm"
 10381            schema:
 10382              $ref: "#/definitions/ErrorResponse"
 10383        tags: ["Swarm"]
 10384    /services:
 10385      get:
 10386        summary: "List services"
 10387        operationId: "ServiceList"
 10388        responses:
 10389          200:
 10390            description: "no error"
 10391            schema:
 10392              type: "array"
 10393              items:
 10394                $ref: "#/definitions/Service"
 10395          500:
 10396            description: "server error"
 10397            schema:
 10398              $ref: "#/definitions/ErrorResponse"
 10399          503:
 10400            description: "node is not part of a swarm"
 10401            schema:
 10402              $ref: "#/definitions/ErrorResponse"
 10403        parameters:
 10404          - name: "filters"
 10405            in: "query"
 10406            type: "string"
 10407            description: |
 10408              A JSON encoded value of the filters (a `map[string][]string`) to
 10409              process on the services list.
 10410  
 10411              Available filters:
 10412  
 10413              - `id=<service id>`
 10414              - `label=<service label>`
 10415              - `mode=["replicated"|"global"]`
 10416              - `name=<service name>`
 10417        tags: ["Service"]
 10418    /services/create:
 10419      post:
 10420        summary: "Create a service"
 10421        operationId: "ServiceCreate"
 10422        consumes:
 10423          - "application/json"
 10424        produces:
 10425          - "application/json"
 10426        responses:
 10427          201:
 10428            description: "no error"
 10429            schema:
 10430              type: "object"
 10431              title: "ServiceCreateResponse"
 10432              properties:
 10433                ID:
 10434                  description: "The ID of the created service."
 10435                  type: "string"
 10436                Warning:
 10437                  description: "Optional warning message"
 10438                  type: "string"
 10439              example:
 10440                ID: "ak7w3gjqoa3kuz8xcpnyy0pvl"
 10441                Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found"
 10442          400:
 10443            description: "bad parameter"
 10444            schema:
 10445              $ref: "#/definitions/ErrorResponse"
 10446          403:
 10447            description: "network is not eligible for services"
 10448            schema:
 10449              $ref: "#/definitions/ErrorResponse"
 10450          409:
 10451            description: "name conflicts with an existing service"
 10452            schema:
 10453              $ref: "#/definitions/ErrorResponse"
 10454          500:
 10455            description: "server error"
 10456            schema:
 10457              $ref: "#/definitions/ErrorResponse"
 10458          503:
 10459            description: "node is not part of a swarm"
 10460            schema:
 10461              $ref: "#/definitions/ErrorResponse"
 10462        parameters:
 10463          - name: "body"
 10464            in: "body"
 10465            required: true
 10466            schema:
 10467              allOf:
 10468                - $ref: "#/definitions/ServiceSpec"
 10469                - type: "object"
 10470                  example:
 10471                    Name: "web"
 10472                    TaskTemplate:
 10473                      ContainerSpec:
 10474                        Image: "nginx:alpine"
 10475                        Mounts:
 10476                          -
 10477                            ReadOnly: true
 10478                            Source: "web-data"
 10479                            Target: "/usr/share/nginx/html"
 10480                            Type: "volume"
 10481                            VolumeOptions:
 10482                              DriverConfig: {}
 10483                              Labels:
 10484                                com.example.something: "something-value"
 10485                        Hosts: ["10.10.10.10 host1", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2"]
 10486                        User: "33"
 10487                        DNSConfig:
 10488                          Nameservers: ["8.8.8.8"]
 10489                          Search: ["example.org"]
 10490                          Options: ["timeout:3"]
 10491                        Secrets:
 10492                          -
 10493                            File:
 10494                              Name: "www.example.org.key"
 10495                              UID: "33"
 10496                              GID: "33"
 10497                              Mode: 384
 10498                            SecretID: "fpjqlhnwb19zds35k8wn80lq9"
 10499                            SecretName: "example_org_domain_key"
 10500                      LogDriver:
 10501                        Name: "json-file"
 10502                        Options:
 10503                          max-file: "3"
 10504                          max-size: "10M"
 10505                      Placement: {}
 10506                      Resources:
 10507                        Limits:
 10508                          MemoryBytes: 104857600
 10509                        Reservations: {}
 10510                      RestartPolicy:
 10511                        Condition: "on-failure"
 10512                        Delay: 10000000000
 10513                        MaxAttempts: 10
 10514                    Mode:
 10515                      Replicated:
 10516                        Replicas: 4
 10517                    UpdateConfig:
 10518                      Parallelism: 2
 10519                      Delay: 1000000000
 10520                      FailureAction: "pause"
 10521                      Monitor: 15000000000
 10522                      MaxFailureRatio: 0.15
 10523                    RollbackConfig:
 10524                      Parallelism: 1
 10525                      Delay: 1000000000
 10526                      FailureAction: "pause"
 10527                      Monitor: 15000000000
 10528                      MaxFailureRatio: 0.15
 10529                    EndpointSpec:
 10530                      Ports:
 10531                        -
 10532                          Protocol: "tcp"
 10533                          PublishedPort: 8080
 10534                          TargetPort: 80
 10535                    Labels:
 10536                      foo: "bar"
 10537          - name: "X-Registry-Auth"
 10538            in: "header"
 10539            description: |
 10540              A base64url-encoded auth configuration for pulling from private
 10541              registries.
 10542  
 10543              Refer to the [authentication section](#section/Authentication) for
 10544              details.
 10545            type: "string"
 10546        tags: ["Service"]
 10547    /services/{id}:
 10548      get:
 10549        summary: "Inspect a service"
 10550        operationId: "ServiceInspect"
 10551        responses:
 10552          200:
 10553            description: "no error"
 10554            schema:
 10555              $ref: "#/definitions/Service"
 10556          404:
 10557            description: "no such service"
 10558            schema:
 10559              $ref: "#/definitions/ErrorResponse"
 10560          500:
 10561            description: "server error"
 10562            schema:
 10563              $ref: "#/definitions/ErrorResponse"
 10564          503:
 10565            description: "node is not part of a swarm"
 10566            schema:
 10567              $ref: "#/definitions/ErrorResponse"
 10568        parameters:
 10569          - name: "id"
 10570            in: "path"
 10571            description: "ID or name of service."
 10572            required: true
 10573            type: "string"
 10574          - name: "insertDefaults"
 10575            in: "query"
 10576            description: "Fill empty fields with default values."
 10577            type: "boolean"
 10578            default: false
 10579        tags: ["Service"]
 10580      delete:
 10581        summary: "Delete a service"
 10582        operationId: "ServiceDelete"
 10583        responses:
 10584          200:
 10585            description: "no error"
 10586          404:
 10587            description: "no such service"
 10588            schema:
 10589              $ref: "#/definitions/ErrorResponse"
 10590          500:
 10591            description: "server error"
 10592            schema:
 10593              $ref: "#/definitions/ErrorResponse"
 10594          503:
 10595            description: "node is not part of a swarm"
 10596            schema:
 10597              $ref: "#/definitions/ErrorResponse"
 10598        parameters:
 10599          - name: "id"
 10600            in: "path"
 10601            description: "ID or name of service."
 10602            required: true
 10603            type: "string"
 10604        tags: ["Service"]
 10605    /services/{id}/update:
 10606      post:
 10607        summary: "Update a service"
 10608        operationId: "ServiceUpdate"
 10609        consumes: ["application/json"]
 10610        produces: ["application/json"]
 10611        responses:
 10612          200:
 10613            description: "no error"
 10614            schema:
 10615              $ref: "#/definitions/ServiceUpdateResponse"
 10616          400:
 10617            description: "bad parameter"
 10618            schema:
 10619              $ref: "#/definitions/ErrorResponse"
 10620          404:
 10621            description: "no such service"
 10622            schema:
 10623              $ref: "#/definitions/ErrorResponse"
 10624          500:
 10625            description: "server error"
 10626            schema:
 10627              $ref: "#/definitions/ErrorResponse"
 10628          503:
 10629            description: "node is not part of a swarm"
 10630            schema:
 10631              $ref: "#/definitions/ErrorResponse"
 10632        parameters:
 10633          - name: "id"
 10634            in: "path"
 10635            description: "ID or name of service."
 10636            required: true
 10637            type: "string"
 10638          - name: "body"
 10639            in: "body"
 10640            required: true
 10641            schema:
 10642              allOf:
 10643                - $ref: "#/definitions/ServiceSpec"
 10644                - type: "object"
 10645                  example:
 10646                    Name: "top"
 10647                    TaskTemplate:
 10648                      ContainerSpec:
 10649                        Image: "busybox"
 10650                        Args:
 10651                          - "top"
 10652                      Resources:
 10653                        Limits: {}
 10654                        Reservations: {}
 10655                      RestartPolicy:
 10656                        Condition: "any"
 10657                        MaxAttempts: 0
 10658                      Placement: {}
 10659                      ForceUpdate: 0
 10660                    Mode:
 10661                      Replicated:
 10662                        Replicas: 1
 10663                    UpdateConfig:
 10664                      Parallelism: 2
 10665                      Delay: 1000000000
 10666                      FailureAction: "pause"
 10667                      Monitor: 15000000000
 10668                      MaxFailureRatio: 0.15
 10669                    RollbackConfig:
 10670                      Parallelism: 1
 10671                      Delay: 1000000000
 10672                      FailureAction: "pause"
 10673                      Monitor: 15000000000
 10674                      MaxFailureRatio: 0.15
 10675                    EndpointSpec:
 10676                      Mode: "vip"
 10677  
 10678          - name: "version"
 10679            in: "query"
 10680            description: |
 10681              The version number of the service object being updated. This is
 10682              required to avoid conflicting writes.
 10683              This version number should be the value as currently set on the
 10684              service *before* the update. You can find the current version by
 10685              calling `GET /services/{id}`
 10686            required: true
 10687            type: "integer"
 10688          - name: "registryAuthFrom"
 10689            in: "query"
 10690            description: |
 10691              If the `X-Registry-Auth` header is not specified, this parameter
 10692              indicates where to find registry authorization credentials.
 10693            type: "string"
 10694            enum: ["spec", "previous-spec"]
 10695            default: "spec"
 10696          - name: "rollback"
 10697            in: "query"
 10698            description: |
 10699              Set to this parameter to `previous` to cause a server-side rollback
 10700              to the previous service spec. The supplied spec will be ignored in
 10701              this case.
 10702            type: "string"
 10703          - name: "X-Registry-Auth"
 10704            in: "header"
 10705            description: |
 10706              A base64url-encoded auth configuration for pulling from private
 10707              registries.
 10708  
 10709              Refer to the [authentication section](#section/Authentication) for
 10710              details.
 10711            type: "string"
 10712  
 10713        tags: ["Service"]
 10714    /services/{id}/logs:
 10715      get:
 10716        summary: "Get service logs"
 10717        description: |
 10718          Get `stdout` and `stderr` logs from a service. See also
 10719          [`/containers/{id}/logs`](#operation/ContainerLogs).
 10720  
 10721          **Note**: This endpoint works only for services with the `local`,
 10722          `json-file` or `journald` logging drivers.
 10723        operationId: "ServiceLogs"
 10724        responses:
 10725          200:
 10726            description: "logs returned as a stream in response body"
 10727            schema:
 10728              type: "string"
 10729              format: "binary"
 10730          404:
 10731            description: "no such service"
 10732            schema:
 10733              $ref: "#/definitions/ErrorResponse"
 10734            examples:
 10735              application/json:
 10736                message: "No such service: c2ada9df5af8"
 10737          500:
 10738            description: "server error"
 10739            schema:
 10740              $ref: "#/definitions/ErrorResponse"
 10741          503:
 10742            description: "node is not part of a swarm"
 10743            schema:
 10744              $ref: "#/definitions/ErrorResponse"
 10745        parameters:
 10746          - name: "id"
 10747            in: "path"
 10748            required: true
 10749            description: "ID or name of the service"
 10750            type: "string"
 10751          - name: "details"
 10752            in: "query"
 10753            description: "Show service context and extra details provided to logs."
 10754            type: "boolean"
 10755            default: false
 10756          - name: "follow"
 10757            in: "query"
 10758            description: "Keep connection after returning logs."
 10759            type: "boolean"
 10760            default: false
 10761          - name: "stdout"
 10762            in: "query"
 10763            description: "Return logs from `stdout`"
 10764            type: "boolean"
 10765            default: false
 10766          - name: "stderr"
 10767            in: "query"
 10768            description: "Return logs from `stderr`"
 10769            type: "boolean"
 10770            default: false
 10771          - name: "since"
 10772            in: "query"
 10773            description: "Only return logs since this time, as a UNIX timestamp"
 10774            type: "integer"
 10775            default: 0
 10776          - name: "timestamps"
 10777            in: "query"
 10778            description: "Add timestamps to every log line"
 10779            type: "boolean"
 10780            default: false
 10781          - name: "tail"
 10782            in: "query"
 10783            description: |
 10784              Only return this number of log lines from the end of the logs.
 10785              Specify as an integer or `all` to output all log lines.
 10786            type: "string"
 10787            default: "all"
 10788        tags: ["Service"]
 10789    /tasks:
 10790      get:
 10791        summary: "List tasks"
 10792        operationId: "TaskList"
 10793        produces:
 10794          - "application/json"
 10795        responses:
 10796          200:
 10797            description: "no error"
 10798            schema:
 10799              type: "array"
 10800              items:
 10801                $ref: "#/definitions/Task"
 10802              example:
 10803                - ID: "0kzzo1i0y4jz6027t0k7aezc7"
 10804                  Version:
 10805                    Index: 71
 10806                  CreatedAt: "2016-06-07T21:07:31.171892745Z"
 10807                  UpdatedAt: "2016-06-07T21:07:31.376370513Z"
 10808                  Spec:
 10809                    ContainerSpec:
 10810                      Image: "redis"
 10811                    Resources:
 10812                      Limits: {}
 10813                      Reservations: {}
 10814                    RestartPolicy:
 10815                      Condition: "any"
 10816                      MaxAttempts: 0
 10817                    Placement: {}
 10818                  ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
 10819                  Slot: 1
 10820                  NodeID: "60gvrl6tm78dmak4yl7srz94v"
 10821                  Status:
 10822                    Timestamp: "2016-06-07T21:07:31.290032978Z"
 10823                    State: "running"
 10824                    Message: "started"
 10825                    ContainerStatus:
 10826                      ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035"
 10827                      PID: 677
 10828                  DesiredState: "running"
 10829                  NetworksAttachments:
 10830                    - Network:
 10831                        ID: "4qvuz4ko70xaltuqbt8956gd1"
 10832                        Version:
 10833                          Index: 18
 10834                        CreatedAt: "2016-06-07T20:31:11.912919752Z"
 10835                        UpdatedAt: "2016-06-07T21:07:29.955277358Z"
 10836                        Spec:
 10837                          Name: "ingress"
 10838                          Labels:
 10839                            com.docker.swarm.internal: "true"
 10840                          DriverConfiguration: {}
 10841                          IPAMOptions:
 10842                            Driver: {}
 10843                            Configs:
 10844                              - Subnet: "10.255.0.0/16"
 10845                                Gateway: "10.255.0.1"
 10846                        DriverState:
 10847                          Name: "overlay"
 10848                          Options:
 10849                            com.docker.network.driver.overlay.vxlanid_list: "256"
 10850                        IPAMOptions:
 10851                          Driver:
 10852                            Name: "default"
 10853                          Configs:
 10854                            - Subnet: "10.255.0.0/16"
 10855                              Gateway: "10.255.0.1"
 10856                      Addresses:
 10857                        - "10.255.0.10/16"
 10858                - ID: "1yljwbmlr8er2waf8orvqpwms"
 10859                  Version:
 10860                    Index: 30
 10861                  CreatedAt: "2016-06-07T21:07:30.019104782Z"
 10862                  UpdatedAt: "2016-06-07T21:07:30.231958098Z"
 10863                  Name: "hopeful_cori"
 10864                  Spec:
 10865                    ContainerSpec:
 10866                      Image: "redis"
 10867                    Resources:
 10868                      Limits: {}
 10869                      Reservations: {}
 10870                    RestartPolicy:
 10871                      Condition: "any"
 10872                      MaxAttempts: 0
 10873                    Placement: {}
 10874                  ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
 10875                  Slot: 1
 10876                  NodeID: "60gvrl6tm78dmak4yl7srz94v"
 10877                  Status:
 10878                    Timestamp: "2016-06-07T21:07:30.202183143Z"
 10879                    State: "shutdown"
 10880                    Message: "shutdown"
 10881                    ContainerStatus:
 10882                      ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213"
 10883                  DesiredState: "shutdown"
 10884                  NetworksAttachments:
 10885                    - Network:
 10886                        ID: "4qvuz4ko70xaltuqbt8956gd1"
 10887                        Version:
 10888                          Index: 18
 10889                        CreatedAt: "2016-06-07T20:31:11.912919752Z"
 10890                        UpdatedAt: "2016-06-07T21:07:29.955277358Z"
 10891                        Spec:
 10892                          Name: "ingress"
 10893                          Labels:
 10894                            com.docker.swarm.internal: "true"
 10895                          DriverConfiguration: {}
 10896                          IPAMOptions:
 10897                            Driver: {}
 10898                            Configs:
 10899                              - Subnet: "10.255.0.0/16"
 10900                                Gateway: "10.255.0.1"
 10901                        DriverState:
 10902                          Name: "overlay"
 10903                          Options:
 10904                            com.docker.network.driver.overlay.vxlanid_list: "256"
 10905                        IPAMOptions:
 10906                          Driver:
 10907                            Name: "default"
 10908                          Configs:
 10909                            - Subnet: "10.255.0.0/16"
 10910                              Gateway: "10.255.0.1"
 10911                      Addresses:
 10912                        - "10.255.0.5/16"
 10913          500:
 10914            description: "server error"
 10915            schema:
 10916              $ref: "#/definitions/ErrorResponse"
 10917          503:
 10918            description: "node is not part of a swarm"
 10919            schema:
 10920              $ref: "#/definitions/ErrorResponse"
 10921        parameters:
 10922          - name: "filters"
 10923            in: "query"
 10924            type: "string"
 10925            description: |
 10926              A JSON encoded value of the filters (a `map[string][]string`) to
 10927              process on the tasks list.
 10928  
 10929              Available filters:
 10930  
 10931              - `desired-state=(running | shutdown | accepted)`
 10932              - `id=<task id>`
 10933              - `label=key` or `label="key=value"`
 10934              - `name=<task name>`
 10935              - `node=<node id or name>`
 10936              - `service=<service name>`
 10937        tags: ["Task"]
 10938    /tasks/{id}:
 10939      get:
 10940        summary: "Inspect a task"
 10941        operationId: "TaskInspect"
 10942        produces:
 10943          - "application/json"
 10944        responses:
 10945          200:
 10946            description: "no error"
 10947            schema:
 10948              $ref: "#/definitions/Task"
 10949          404:
 10950            description: "no such task"
 10951            schema:
 10952              $ref: "#/definitions/ErrorResponse"
 10953          500:
 10954            description: "server error"
 10955            schema:
 10956              $ref: "#/definitions/ErrorResponse"
 10957          503:
 10958            description: "node is not part of a swarm"
 10959            schema:
 10960              $ref: "#/definitions/ErrorResponse"
 10961        parameters:
 10962          - name: "id"
 10963            in: "path"
 10964            description: "ID of the task"
 10965            required: true
 10966            type: "string"
 10967        tags: ["Task"]
 10968    /tasks/{id}/logs:
 10969      get:
 10970        summary: "Get task logs"
 10971        description: |
 10972          Get `stdout` and `stderr` logs from a task.
 10973          See also [`/containers/{id}/logs`](#operation/ContainerLogs).
 10974  
 10975          **Note**: This endpoint works only for services with the `local`,
 10976          `json-file` or `journald` logging drivers.
 10977        operationId: "TaskLogs"
 10978        responses:
 10979          200:
 10980            description: "logs returned as a stream in response body"
 10981            schema:
 10982              type: "string"
 10983              format: "binary"
 10984          404:
 10985            description: "no such task"
 10986            schema:
 10987              $ref: "#/definitions/ErrorResponse"
 10988            examples:
 10989              application/json:
 10990                message: "No such task: c2ada9df5af8"
 10991          500:
 10992            description: "server error"
 10993            schema:
 10994              $ref: "#/definitions/ErrorResponse"
 10995          503:
 10996            description: "node is not part of a swarm"
 10997            schema:
 10998              $ref: "#/definitions/ErrorResponse"
 10999        parameters:
 11000          - name: "id"
 11001            in: "path"
 11002            required: true
 11003            description: "ID of the task"
 11004            type: "string"
 11005          - name: "details"
 11006            in: "query"
 11007            description: "Show task context and extra details provided to logs."
 11008            type: "boolean"
 11009            default: false
 11010          - name: "follow"
 11011            in: "query"
 11012            description: "Keep connection after returning logs."
 11013            type: "boolean"
 11014            default: false
 11015          - name: "stdout"
 11016            in: "query"
 11017            description: "Return logs from `stdout`"
 11018            type: "boolean"
 11019            default: false
 11020          - name: "stderr"
 11021            in: "query"
 11022            description: "Return logs from `stderr`"
 11023            type: "boolean"
 11024            default: false
 11025          - name: "since"
 11026            in: "query"
 11027            description: "Only return logs since this time, as a UNIX timestamp"
 11028            type: "integer"
 11029            default: 0
 11030          - name: "timestamps"
 11031            in: "query"
 11032            description: "Add timestamps to every log line"
 11033            type: "boolean"
 11034            default: false
 11035          - name: "tail"
 11036            in: "query"
 11037            description: |
 11038              Only return this number of log lines from the end of the logs.
 11039              Specify as an integer or `all` to output all log lines.
 11040            type: "string"
 11041            default: "all"
 11042        tags: ["Task"]
 11043    /secrets:
 11044      get:
 11045        summary: "List secrets"
 11046        operationId: "SecretList"
 11047        produces:
 11048          - "application/json"
 11049        responses:
 11050          200:
 11051            description: "no error"
 11052            schema:
 11053              type: "array"
 11054              items:
 11055                $ref: "#/definitions/Secret"
 11056              example:
 11057                - ID: "blt1owaxmitz71s9v5zh81zun"
 11058                  Version:
 11059                    Index: 85
 11060                  CreatedAt: "2017-07-20T13:55:28.678958722Z"
 11061                  UpdatedAt: "2017-07-20T13:55:28.678958722Z"
 11062                  Spec:
 11063                    Name: "mysql-passwd"
 11064                    Labels:
 11065                      some.label: "some.value"
 11066                    Driver:
 11067                      Name: "secret-bucket"
 11068                      Options:
 11069                        OptionA: "value for driver option A"
 11070                        OptionB: "value for driver option B"
 11071                - ID: "ktnbjxoalbkvbvedmg1urrz8h"
 11072                  Version:
 11073                    Index: 11
 11074                  CreatedAt: "2016-11-05T01:20:17.327670065Z"
 11075                  UpdatedAt: "2016-11-05T01:20:17.327670065Z"
 11076                  Spec:
 11077                    Name: "app-dev.crt"
 11078                    Labels:
 11079                      foo: "bar"
 11080          500:
 11081            description: "server error"
 11082            schema:
 11083              $ref: "#/definitions/ErrorResponse"
 11084          503:
 11085            description: "node is not part of a swarm"
 11086            schema:
 11087              $ref: "#/definitions/ErrorResponse"
 11088        parameters:
 11089          - name: "filters"
 11090            in: "query"
 11091            type: "string"
 11092            description: |
 11093              A JSON encoded value of the filters (a `map[string][]string`) to
 11094              process on the secrets list.
 11095  
 11096              Available filters:
 11097  
 11098              - `id=<secret id>`
 11099              - `label=<key> or label=<key>=value`
 11100              - `name=<secret name>`
 11101              - `names=<secret name>`
 11102        tags: ["Secret"]
 11103    /secrets/create:
 11104      post:
 11105        summary: "Create a secret"
 11106        operationId: "SecretCreate"
 11107        consumes:
 11108          - "application/json"
 11109        produces:
 11110          - "application/json"
 11111        responses:
 11112          201:
 11113            description: "no error"
 11114            schema:
 11115              $ref: "#/definitions/IdResponse"
 11116          409:
 11117            description: "name conflicts with an existing object"
 11118            schema:
 11119              $ref: "#/definitions/ErrorResponse"
 11120          500:
 11121            description: "server error"
 11122            schema:
 11123              $ref: "#/definitions/ErrorResponse"
 11124          503:
 11125            description: "node is not part of a swarm"
 11126            schema:
 11127              $ref: "#/definitions/ErrorResponse"
 11128        parameters:
 11129          - name: "body"
 11130            in: "body"
 11131            schema:
 11132              allOf:
 11133                - $ref: "#/definitions/SecretSpec"
 11134                - type: "object"
 11135                  example:
 11136                    Name: "app-key.crt"
 11137                    Labels:
 11138                      foo: "bar"
 11139                    Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg=="
 11140                    Driver:
 11141                      Name: "secret-bucket"
 11142                      Options:
 11143                        OptionA: "value for driver option A"
 11144                        OptionB: "value for driver option B"
 11145        tags: ["Secret"]
 11146    /secrets/{id}:
 11147      get:
 11148        summary: "Inspect a secret"
 11149        operationId: "SecretInspect"
 11150        produces:
 11151          - "application/json"
 11152        responses:
 11153          200:
 11154            description: "no error"
 11155            schema:
 11156              $ref: "#/definitions/Secret"
 11157            examples:
 11158              application/json:
 11159                ID: "ktnbjxoalbkvbvedmg1urrz8h"
 11160                Version:
 11161                  Index: 11
 11162                CreatedAt: "2016-11-05T01:20:17.327670065Z"
 11163                UpdatedAt: "2016-11-05T01:20:17.327670065Z"
 11164                Spec:
 11165                  Name: "app-dev.crt"
 11166                  Labels:
 11167                    foo: "bar"
 11168                  Driver:
 11169                    Name: "secret-bucket"
 11170                    Options:
 11171                      OptionA: "value for driver option A"
 11172                      OptionB: "value for driver option B"
 11173  
 11174          404:
 11175            description: "secret not found"
 11176            schema:
 11177              $ref: "#/definitions/ErrorResponse"
 11178          500:
 11179            description: "server error"
 11180            schema:
 11181              $ref: "#/definitions/ErrorResponse"
 11182          503:
 11183            description: "node is not part of a swarm"
 11184            schema:
 11185              $ref: "#/definitions/ErrorResponse"
 11186        parameters:
 11187          - name: "id"
 11188            in: "path"
 11189            required: true
 11190            type: "string"
 11191            description: "ID of the secret"
 11192        tags: ["Secret"]
 11193      delete:
 11194        summary: "Delete a secret"
 11195        operationId: "SecretDelete"
 11196        produces:
 11197          - "application/json"
 11198        responses:
 11199          204:
 11200            description: "no error"
 11201          404:
 11202            description: "secret not found"
 11203            schema:
 11204              $ref: "#/definitions/ErrorResponse"
 11205          500:
 11206            description: "server error"
 11207            schema:
 11208              $ref: "#/definitions/ErrorResponse"
 11209          503:
 11210            description: "node is not part of a swarm"
 11211            schema:
 11212              $ref: "#/definitions/ErrorResponse"
 11213        parameters:
 11214          - name: "id"
 11215            in: "path"
 11216            required: true
 11217            type: "string"
 11218            description: "ID of the secret"
 11219        tags: ["Secret"]
 11220    /secrets/{id}/update:
 11221      post:
 11222        summary: "Update a Secret"
 11223        operationId: "SecretUpdate"
 11224        responses:
 11225          200:
 11226            description: "no error"
 11227          400:
 11228            description: "bad parameter"
 11229            schema:
 11230              $ref: "#/definitions/ErrorResponse"
 11231          404:
 11232            description: "no such secret"
 11233            schema:
 11234              $ref: "#/definitions/ErrorResponse"
 11235          500:
 11236            description: "server error"
 11237            schema:
 11238              $ref: "#/definitions/ErrorResponse"
 11239          503:
 11240            description: "node is not part of a swarm"
 11241            schema:
 11242              $ref: "#/definitions/ErrorResponse"
 11243        parameters:
 11244          - name: "id"
 11245            in: "path"
 11246            description: "The ID or name of the secret"
 11247            type: "string"
 11248            required: true
 11249          - name: "body"
 11250            in: "body"
 11251            schema:
 11252              $ref: "#/definitions/SecretSpec"
 11253            description: |
 11254              The spec of the secret to update. Currently, only the Labels field
 11255              can be updated. All other fields must remain unchanged from the
 11256              [SecretInspect endpoint](#operation/SecretInspect) response values.
 11257          - name: "version"
 11258            in: "query"
 11259            description: |
 11260              The version number of the secret object being updated. This is
 11261              required to avoid conflicting writes.
 11262            type: "integer"
 11263            format: "int64"
 11264            required: true
 11265        tags: ["Secret"]
 11266    /configs:
 11267      get:
 11268        summary: "List configs"
 11269        operationId: "ConfigList"
 11270        produces:
 11271          - "application/json"
 11272        responses:
 11273          200:
 11274            description: "no error"
 11275            schema:
 11276              type: "array"
 11277              items:
 11278                $ref: "#/definitions/Config"
 11279              example:
 11280                - ID: "ktnbjxoalbkvbvedmg1urrz8h"
 11281                  Version:
 11282                    Index: 11
 11283                  CreatedAt: "2016-11-05T01:20:17.327670065Z"
 11284                  UpdatedAt: "2016-11-05T01:20:17.327670065Z"
 11285                  Spec:
 11286                    Name: "server.conf"
 11287          500:
 11288            description: "server error"
 11289            schema:
 11290              $ref: "#/definitions/ErrorResponse"
 11291          503:
 11292            description: "node is not part of a swarm"
 11293            schema:
 11294              $ref: "#/definitions/ErrorResponse"
 11295        parameters:
 11296          - name: "filters"
 11297            in: "query"
 11298            type: "string"
 11299            description: |
 11300              A JSON encoded value of the filters (a `map[string][]string`) to
 11301              process on the configs list.
 11302  
 11303              Available filters:
 11304  
 11305              - `id=<config id>`
 11306              - `label=<key> or label=<key>=value`
 11307              - `name=<config name>`
 11308              - `names=<config name>`
 11309        tags: ["Config"]
 11310    /configs/create:
 11311      post:
 11312        summary: "Create a config"
 11313        operationId: "ConfigCreate"
 11314        consumes:
 11315          - "application/json"
 11316        produces:
 11317          - "application/json"
 11318        responses:
 11319          201:
 11320            description: "no error"
 11321            schema:
 11322              $ref: "#/definitions/IdResponse"
 11323          409:
 11324            description: "name conflicts with an existing object"
 11325            schema:
 11326              $ref: "#/definitions/ErrorResponse"
 11327          500:
 11328            description: "server error"
 11329            schema:
 11330              $ref: "#/definitions/ErrorResponse"
 11331          503:
 11332            description: "node is not part of a swarm"
 11333            schema:
 11334              $ref: "#/definitions/ErrorResponse"
 11335        parameters:
 11336          - name: "body"
 11337            in: "body"
 11338            schema:
 11339              allOf:
 11340                - $ref: "#/definitions/ConfigSpec"
 11341                - type: "object"
 11342                  example:
 11343                    Name: "server.conf"
 11344                    Labels:
 11345                      foo: "bar"
 11346                    Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg=="
 11347        tags: ["Config"]
 11348    /configs/{id}:
 11349      get:
 11350        summary: "Inspect a config"
 11351        operationId: "ConfigInspect"
 11352        produces:
 11353          - "application/json"
 11354        responses:
 11355          200:
 11356            description: "no error"
 11357            schema:
 11358              $ref: "#/definitions/Config"
 11359            examples:
 11360              application/json:
 11361                ID: "ktnbjxoalbkvbvedmg1urrz8h"
 11362                Version:
 11363                  Index: 11
 11364                CreatedAt: "2016-11-05T01:20:17.327670065Z"
 11365                UpdatedAt: "2016-11-05T01:20:17.327670065Z"
 11366                Spec:
 11367                  Name: "app-dev.crt"
 11368          404:
 11369            description: "config not found"
 11370            schema:
 11371              $ref: "#/definitions/ErrorResponse"
 11372          500:
 11373            description: "server error"
 11374            schema:
 11375              $ref: "#/definitions/ErrorResponse"
 11376          503:
 11377            description: "node is not part of a swarm"
 11378            schema:
 11379              $ref: "#/definitions/ErrorResponse"
 11380        parameters:
 11381          - name: "id"
 11382            in: "path"
 11383            required: true
 11384            type: "string"
 11385            description: "ID of the config"
 11386        tags: ["Config"]
 11387      delete:
 11388        summary: "Delete a config"
 11389        operationId: "ConfigDelete"
 11390        produces:
 11391          - "application/json"
 11392        responses:
 11393          204:
 11394            description: "no error"
 11395          404:
 11396            description: "config not found"
 11397            schema:
 11398              $ref: "#/definitions/ErrorResponse"
 11399          500:
 11400            description: "server error"
 11401            schema:
 11402              $ref: "#/definitions/ErrorResponse"
 11403          503:
 11404            description: "node is not part of a swarm"
 11405            schema:
 11406              $ref: "#/definitions/ErrorResponse"
 11407        parameters:
 11408          - name: "id"
 11409            in: "path"
 11410            required: true
 11411            type: "string"
 11412            description: "ID of the config"
 11413        tags: ["Config"]
 11414    /configs/{id}/update:
 11415      post:
 11416        summary: "Update a Config"
 11417        operationId: "ConfigUpdate"
 11418        responses:
 11419          200:
 11420            description: "no error"
 11421          400:
 11422            description: "bad parameter"
 11423            schema:
 11424              $ref: "#/definitions/ErrorResponse"
 11425          404:
 11426            description: "no such config"
 11427            schema:
 11428              $ref: "#/definitions/ErrorResponse"
 11429          500:
 11430            description: "server error"
 11431            schema:
 11432              $ref: "#/definitions/ErrorResponse"
 11433          503:
 11434            description: "node is not part of a swarm"
 11435            schema:
 11436              $ref: "#/definitions/ErrorResponse"
 11437        parameters:
 11438          - name: "id"
 11439            in: "path"
 11440            description: "The ID or name of the config"
 11441            type: "string"
 11442            required: true
 11443          - name: "body"
 11444            in: "body"
 11445            schema:
 11446              $ref: "#/definitions/ConfigSpec"
 11447            description: |
 11448              The spec of the config to update. Currently, only the Labels field
 11449              can be updated. All other fields must remain unchanged from the
 11450              [ConfigInspect endpoint](#operation/ConfigInspect) response values.
 11451          - name: "version"
 11452            in: "query"
 11453            description: |
 11454              The version number of the config object being updated. This is
 11455              required to avoid conflicting writes.
 11456            type: "integer"
 11457            format: "int64"
 11458            required: true
 11459        tags: ["Config"]
 11460    /distribution/{name}/json:
 11461      get:
 11462        summary: "Get image information from the registry"
 11463        description: |
 11464          Return image digest and platform information by contacting the registry.
 11465        operationId: "DistributionInspect"
 11466        produces:
 11467          - "application/json"
 11468        responses:
 11469          200:
 11470            description: "descriptor and platform information"
 11471            schema:
 11472              $ref: "#/definitions/DistributionInspect"
 11473          401:
 11474            description: "Failed authentication or no image found"
 11475            schema:
 11476              $ref: "#/definitions/ErrorResponse"
 11477            examples:
 11478              application/json:
 11479                message: "No such image: someimage (tag: latest)"
 11480          500:
 11481            description: "Server error"
 11482            schema:
 11483              $ref: "#/definitions/ErrorResponse"
 11484        parameters:
 11485          - name: "name"
 11486            in: "path"
 11487            description: "Image name or id"
 11488            type: "string"
 11489            required: true
 11490        tags: ["Distribution"]
 11491    /session:
 11492      post:
 11493        summary: "Initialize interactive session"
 11494        description: |
 11495          Start a new interactive session with a server. Session allows server to
 11496          call back to the client for advanced capabilities.
 11497  
 11498          ### Hijacking
 11499  
 11500          This endpoint hijacks the HTTP connection to HTTP2 transport that allows
 11501          the client to expose gPRC services on that connection.
 11502  
 11503          For example, the client sends this request to upgrade the connection:
 11504  
 11505          ```
 11506          POST /session HTTP/1.1
 11507          Upgrade: h2c
 11508          Connection: Upgrade
 11509          ```
 11510  
 11511          The Docker daemon responds with a `101 UPGRADED` response follow with
 11512          the raw stream:
 11513  
 11514          ```
 11515          HTTP/1.1 101 UPGRADED
 11516          Connection: Upgrade
 11517          Upgrade: h2c
 11518          ```
 11519        operationId: "Session"
 11520        produces:
 11521          - "application/vnd.docker.raw-stream"
 11522        responses:
 11523          101:
 11524            description: "no error, hijacking successful"
 11525          400:
 11526            description: "bad parameter"
 11527            schema:
 11528              $ref: "#/definitions/ErrorResponse"
 11529          500:
 11530            description: "server error"
 11531            schema:
 11532              $ref: "#/definitions/ErrorResponse"
 11533        tags: ["Session"]