github.com/rish1988/moby@v25.0.2+incompatible/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: "splunk"
  2923            - Type: "Log"
  2924              Name: "syslog"
  2925            - Type: "Network"
  2926              Name: "bridge"
  2927            - Type: "Network"
  2928              Name: "host"
  2929            - Type: "Network"
  2930              Name: "ipvlan"
  2931            - Type: "Network"
  2932              Name: "macvlan"
  2933            - Type: "Network"
  2934              Name: "null"
  2935            - Type: "Network"
  2936              Name: "overlay"
  2937            - Type: "Volume"
  2938              Name: "local"
  2939            - Type: "Volume"
  2940              Name: "localhost:5000/vieux/sshfs:latest"
  2941            - Type: "Volume"
  2942              Name: "vieux/sshfs:latest"
  2943  
  2944    TLSInfo:
  2945      description: |
  2946        Information about the issuer of leaf TLS certificates and the trusted root
  2947        CA certificate.
  2948      type: "object"
  2949      properties:
  2950        TrustRoot:
  2951          description: |
  2952            The root CA certificate(s) that are used to validate leaf TLS
  2953            certificates.
  2954          type: "string"
  2955        CertIssuerSubject:
  2956          description:
  2957            The base64-url-safe-encoded raw subject bytes of the issuer.
  2958          type: "string"
  2959        CertIssuerPublicKey:
  2960          description: |
  2961            The base64-url-safe-encoded raw public key bytes of the issuer.
  2962          type: "string"
  2963      example:
  2964        TrustRoot: |
  2965          -----BEGIN CERTIFICATE-----
  2966          MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw
  2967          EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0
  2968          MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH
  2969          A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf
  2970          3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB
  2971          Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO
  2972          PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz
  2973          pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H
  2974          -----END CERTIFICATE-----
  2975        CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh"
  2976        CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A=="
  2977  
  2978    NodeStatus:
  2979      description: |
  2980        NodeStatus represents the status of a node.
  2981  
  2982        It provides the current status of the node, as seen by the manager.
  2983      type: "object"
  2984      properties:
  2985        State:
  2986          $ref: "#/definitions/NodeState"
  2987        Message:
  2988          type: "string"
  2989          example: ""
  2990        Addr:
  2991          description: "IP address of the node."
  2992          type: "string"
  2993          example: "172.17.0.2"
  2994  
  2995    NodeState:
  2996      description: "NodeState represents the state of a node."
  2997      type: "string"
  2998      enum:
  2999        - "unknown"
  3000        - "down"
  3001        - "ready"
  3002        - "disconnected"
  3003      example: "ready"
  3004  
  3005    ManagerStatus:
  3006      description: |
  3007        ManagerStatus represents the status of a manager.
  3008  
  3009        It provides the current status of a node's manager component, if the node
  3010        is a manager.
  3011      x-nullable: true
  3012      type: "object"
  3013      properties:
  3014        Leader:
  3015          type: "boolean"
  3016          default: false
  3017          example: true
  3018        Reachability:
  3019          $ref: "#/definitions/Reachability"
  3020        Addr:
  3021          description: |
  3022            The IP address and port at which the manager is reachable.
  3023          type: "string"
  3024          example: "10.0.0.46:2377"
  3025  
  3026    Reachability:
  3027      description: "Reachability represents the reachability of a node."
  3028      type: "string"
  3029      enum:
  3030        - "unknown"
  3031        - "unreachable"
  3032        - "reachable"
  3033      example: "reachable"
  3034  
  3035    SwarmSpec:
  3036      description: "User modifiable swarm configuration."
  3037      type: "object"
  3038      properties:
  3039        Name:
  3040          description: "Name of the swarm."
  3041          type: "string"
  3042          example: "default"
  3043        Labels:
  3044          description: "User-defined key/value metadata."
  3045          type: "object"
  3046          additionalProperties:
  3047            type: "string"
  3048          example:
  3049            com.example.corp.type: "production"
  3050            com.example.corp.department: "engineering"
  3051        Orchestration:
  3052          description: "Orchestration configuration."
  3053          type: "object"
  3054          x-nullable: true
  3055          properties:
  3056            TaskHistoryRetentionLimit:
  3057              description: |
  3058                The number of historic tasks to keep per instance or node. If
  3059                negative, never remove completed or failed tasks.
  3060              type: "integer"
  3061              format: "int64"
  3062              example: 10
  3063        Raft:
  3064          description: "Raft configuration."
  3065          type: "object"
  3066          properties:
  3067            SnapshotInterval:
  3068              description: "The number of log entries between snapshots."
  3069              type: "integer"
  3070              format: "uint64"
  3071              example: 10000
  3072            KeepOldSnapshots:
  3073              description: |
  3074                The number of snapshots to keep beyond the current snapshot.
  3075              type: "integer"
  3076              format: "uint64"
  3077            LogEntriesForSlowFollowers:
  3078              description: |
  3079                The number of log entries to keep around to sync up slow followers
  3080                after a snapshot is created.
  3081              type: "integer"
  3082              format: "uint64"
  3083              example: 500
  3084            ElectionTick:
  3085              description: |
  3086                The number of ticks that a follower will wait for a message from
  3087                the leader before becoming a candidate and starting an election.
  3088                `ElectionTick` must be greater than `HeartbeatTick`.
  3089  
  3090                A tick currently defaults to one second, so these translate
  3091                directly to seconds currently, but this is NOT guaranteed.
  3092              type: "integer"
  3093              example: 3
  3094            HeartbeatTick:
  3095              description: |
  3096                The number of ticks between heartbeats. Every HeartbeatTick ticks,
  3097                the leader will send a heartbeat to the followers.
  3098  
  3099                A tick currently defaults to one second, so these translate
  3100                directly to seconds currently, but this is NOT guaranteed.
  3101              type: "integer"
  3102              example: 1
  3103        Dispatcher:
  3104          description: "Dispatcher configuration."
  3105          type: "object"
  3106          x-nullable: true
  3107          properties:
  3108            HeartbeatPeriod:
  3109              description: |
  3110                The delay for an agent to send a heartbeat to the dispatcher.
  3111              type: "integer"
  3112              format: "int64"
  3113              example: 5000000000
  3114        CAConfig:
  3115          description: "CA configuration."
  3116          type: "object"
  3117          x-nullable: true
  3118          properties:
  3119            NodeCertExpiry:
  3120              description: "The duration node certificates are issued for."
  3121              type: "integer"
  3122              format: "int64"
  3123              example: 7776000000000000
  3124            ExternalCAs:
  3125              description: |
  3126                Configuration for forwarding signing requests to an external
  3127                certificate authority.
  3128              type: "array"
  3129              items:
  3130                type: "object"
  3131                properties:
  3132                  Protocol:
  3133                    description: |
  3134                      Protocol for communication with the external CA (currently
  3135                      only `cfssl` is supported).
  3136                    type: "string"
  3137                    enum:
  3138                      - "cfssl"
  3139                    default: "cfssl"
  3140                  URL:
  3141                    description: |
  3142                      URL where certificate signing requests should be sent.
  3143                    type: "string"
  3144                  Options:
  3145                    description: |
  3146                      An object with key/value pairs that are interpreted as
  3147                      protocol-specific options for the external CA driver.
  3148                    type: "object"
  3149                    additionalProperties:
  3150                      type: "string"
  3151                  CACert:
  3152                    description: |
  3153                      The root CA certificate (in PEM format) this external CA uses
  3154                      to issue TLS certificates (assumed to be to the current swarm
  3155                      root CA certificate if not provided).
  3156                    type: "string"
  3157            SigningCACert:
  3158              description: |
  3159                The desired signing CA certificate for all swarm node TLS leaf
  3160                certificates, in PEM format.
  3161              type: "string"
  3162            SigningCAKey:
  3163              description: |
  3164                The desired signing CA key for all swarm node TLS leaf certificates,
  3165                in PEM format.
  3166              type: "string"
  3167            ForceRotate:
  3168              description: |
  3169                An integer whose purpose is to force swarm to generate a new
  3170                signing CA certificate and key, if none have been specified in
  3171                `SigningCACert` and `SigningCAKey`
  3172              format: "uint64"
  3173              type: "integer"
  3174        EncryptionConfig:
  3175          description: "Parameters related to encryption-at-rest."
  3176          type: "object"
  3177          properties:
  3178            AutoLockManagers:
  3179              description: |
  3180                If set, generate a key and use it to lock data stored on the
  3181                managers.
  3182              type: "boolean"
  3183              example: false
  3184        TaskDefaults:
  3185          description: "Defaults for creating tasks in this cluster."
  3186          type: "object"
  3187          properties:
  3188            LogDriver:
  3189              description: |
  3190                The log driver to use for tasks created in the orchestrator if
  3191                unspecified by a service.
  3192  
  3193                Updating this value only affects new tasks. Existing tasks continue
  3194                to use their previously configured log driver until recreated.
  3195              type: "object"
  3196              properties:
  3197                Name:
  3198                  description: |
  3199                    The log driver to use as a default for new tasks.
  3200                  type: "string"
  3201                  example: "json-file"
  3202                Options:
  3203                  description: |
  3204                    Driver-specific options for the selectd log driver, specified
  3205                    as key/value pairs.
  3206                  type: "object"
  3207                  additionalProperties:
  3208                    type: "string"
  3209                  example:
  3210                    "max-file": "10"
  3211                    "max-size": "100m"
  3212  
  3213    # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but
  3214    # without `JoinTokens`.
  3215    ClusterInfo:
  3216      description: |
  3217        ClusterInfo represents information about the swarm as is returned by the
  3218        "/info" endpoint. Join-tokens are not included.
  3219      x-nullable: true
  3220      type: "object"
  3221      properties:
  3222        ID:
  3223          description: "The ID of the swarm."
  3224          type: "string"
  3225          example: "abajmipo7b4xz5ip2nrla6b11"
  3226        Version:
  3227          $ref: "#/definitions/ObjectVersion"
  3228        CreatedAt:
  3229          description: |
  3230            Date and time at which the swarm was initialised in
  3231            [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
  3232          type: "string"
  3233          format: "dateTime"
  3234          example: "2016-08-18T10:44:24.496525531Z"
  3235        UpdatedAt:
  3236          description: |
  3237            Date and time at which the swarm was last updated in
  3238            [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
  3239          type: "string"
  3240          format: "dateTime"
  3241          example: "2017-08-09T07:09:37.632105588Z"
  3242        Spec:
  3243          $ref: "#/definitions/SwarmSpec"
  3244        TLSInfo:
  3245          $ref: "#/definitions/TLSInfo"
  3246        RootRotationInProgress:
  3247          description: |
  3248            Whether there is currently a root CA rotation in progress for the swarm
  3249          type: "boolean"
  3250          example: false
  3251        DataPathPort:
  3252          description: |
  3253            DataPathPort specifies the data path port number for data traffic.
  3254            Acceptable port range is 1024 to 49151.
  3255            If no port is set or is set to 0, the default port (4789) is used.
  3256          type: "integer"
  3257          format: "uint32"
  3258          default: 4789
  3259          example: 4789
  3260        DefaultAddrPool:
  3261          description: |
  3262            Default Address Pool specifies default subnet pools for global scope
  3263            networks.
  3264          type: "array"
  3265          items:
  3266            type: "string"
  3267            format: "CIDR"
  3268            example: ["10.10.0.0/16", "20.20.0.0/16"]
  3269        SubnetSize:
  3270          description: |
  3271            SubnetSize specifies the subnet size of the networks created from the
  3272            default subnet pool.
  3273          type: "integer"
  3274          format: "uint32"
  3275          maximum: 29
  3276          default: 24
  3277          example: 24
  3278  
  3279    JoinTokens:
  3280      description: |
  3281        JoinTokens contains the tokens workers and managers need to join the swarm.
  3282      type: "object"
  3283      properties:
  3284        Worker:
  3285          description: |
  3286            The token workers can use to join the swarm.
  3287          type: "string"
  3288          example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx"
  3289        Manager:
  3290          description: |
  3291            The token managers can use to join the swarm.
  3292          type: "string"
  3293          example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2"
  3294  
  3295    Swarm:
  3296      type: "object"
  3297      allOf:
  3298        - $ref: "#/definitions/ClusterInfo"
  3299        - type: "object"
  3300          properties:
  3301            JoinTokens:
  3302              $ref: "#/definitions/JoinTokens"
  3303  
  3304    TaskSpec:
  3305      description: "User modifiable task configuration."
  3306      type: "object"
  3307      properties:
  3308        PluginSpec:
  3309          type: "object"
  3310          description: |
  3311            Plugin spec for the service.  *(Experimental release only.)*
  3312  
  3313            <p><br /></p>
  3314  
  3315            > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
  3316            > mutually exclusive. PluginSpec is only used when the Runtime field
  3317            > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime
  3318            > field is set to `attachment`.
  3319          properties:
  3320            Name:
  3321              description: "The name or 'alias' to use for the plugin."
  3322              type: "string"
  3323            Remote:
  3324              description: "The plugin image reference to use."
  3325              type: "string"
  3326            Disabled:
  3327              description: "Disable the plugin once scheduled."
  3328              type: "boolean"
  3329            PluginPrivilege:
  3330              type: "array"
  3331              items:
  3332                $ref: "#/definitions/PluginPrivilege"
  3333        ContainerSpec:
  3334          type: "object"
  3335          description: |
  3336            Container spec for the service.
  3337  
  3338            <p><br /></p>
  3339  
  3340            > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
  3341            > mutually exclusive. PluginSpec is only used when the Runtime field
  3342            > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime
  3343            > field is set to `attachment`.
  3344          properties:
  3345            Image:
  3346              description: "The image name to use for the container"
  3347              type: "string"
  3348            Labels:
  3349              description: "User-defined key/value data."
  3350              type: "object"
  3351              additionalProperties:
  3352                type: "string"
  3353            Command:
  3354              description: "The command to be run in the image."
  3355              type: "array"
  3356              items:
  3357                type: "string"
  3358            Args:
  3359              description: "Arguments to the command."
  3360              type: "array"
  3361              items:
  3362                type: "string"
  3363            Hostname:
  3364              description: |
  3365                The hostname to use for the container, as a valid
  3366                [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname.
  3367              type: "string"
  3368            Env:
  3369              description: |
  3370                A list of environment variables in the form `VAR=value`.
  3371              type: "array"
  3372              items:
  3373                type: "string"
  3374            Dir:
  3375              description: "The working directory for commands to run in."
  3376              type: "string"
  3377            User:
  3378              description: "The user inside the container."
  3379              type: "string"
  3380            Groups:
  3381              type: "array"
  3382              description: |
  3383                A list of additional groups that the container process will run as.
  3384              items:
  3385                type: "string"
  3386            Privileges:
  3387              type: "object"
  3388              description: "Security options for the container"
  3389              properties:
  3390                CredentialSpec:
  3391                  type: "object"
  3392                  description: "CredentialSpec for managed service account (Windows only)"
  3393                  properties:
  3394                    Config:
  3395                      type: "string"
  3396                      example: "0bt9dmxjvjiqermk6xrop3ekq"
  3397                      description: |
  3398                        Load credential spec from a Swarm Config with the given ID.
  3399                        The specified config must also be present in the Configs
  3400                        field with the Runtime property set.
  3401  
  3402                        <p><br /></p>
  3403  
  3404  
  3405                        > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`,
  3406                        > and `CredentialSpec.Config` are mutually exclusive.
  3407                    File:
  3408                      type: "string"
  3409                      example: "spec.json"
  3410                      description: |
  3411                        Load credential spec from this file. The file is read by
  3412                        the daemon, and must be present in the `CredentialSpecs`
  3413                        subdirectory in the docker data directory, which defaults
  3414                        to `C:\ProgramData\Docker\` on Windows.
  3415  
  3416                        For example, specifying `spec.json` loads
  3417                        `C:\ProgramData\Docker\CredentialSpecs\spec.json`.
  3418  
  3419                        <p><br /></p>
  3420  
  3421                        > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`,
  3422                        > and `CredentialSpec.Config` are mutually exclusive.
  3423                    Registry:
  3424                      type: "string"
  3425                      description: |
  3426                        Load credential spec from this value in the Windows
  3427                        registry. The specified registry value must be located in:
  3428  
  3429                        `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs`
  3430  
  3431                        <p><br /></p>
  3432  
  3433  
  3434                        > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`,
  3435                        > and `CredentialSpec.Config` are mutually exclusive.
  3436                SELinuxContext:
  3437                  type: "object"
  3438                  description: "SELinux labels of the container"
  3439                  properties:
  3440                    Disable:
  3441                      type: "boolean"
  3442                      description: "Disable SELinux"
  3443                    User:
  3444                      type: "string"
  3445                      description: "SELinux user label"
  3446                    Role:
  3447                      type: "string"
  3448                      description: "SELinux role label"
  3449                    Type:
  3450                      type: "string"
  3451                      description: "SELinux type label"
  3452                    Level:
  3453                      type: "string"
  3454                      description: "SELinux level label"
  3455            TTY:
  3456              description: "Whether a pseudo-TTY should be allocated."
  3457              type: "boolean"
  3458            OpenStdin:
  3459              description: "Open `stdin`"
  3460              type: "boolean"
  3461            ReadOnly:
  3462              description: "Mount the container's root filesystem as read only."
  3463              type: "boolean"
  3464            Mounts:
  3465              description: |
  3466                Specification for mounts to be added to containers created as part
  3467                of the service.
  3468              type: "array"
  3469              items:
  3470                $ref: "#/definitions/Mount"
  3471            StopSignal:
  3472              description: "Signal to stop the container."
  3473              type: "string"
  3474            StopGracePeriod:
  3475              description: |
  3476                Amount of time to wait for the container to terminate before
  3477                forcefully killing it.
  3478              type: "integer"
  3479              format: "int64"
  3480            HealthCheck:
  3481              $ref: "#/definitions/HealthConfig"
  3482            Hosts:
  3483              type: "array"
  3484              description: |
  3485                A list of hostname/IP mappings to add to the container's `hosts`
  3486                file. The format of extra hosts is specified in the
  3487                [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html)
  3488                man page:
  3489  
  3490                    IP_address canonical_hostname [aliases...]
  3491              items:
  3492                type: "string"
  3493            DNSConfig:
  3494              description: |
  3495                Specification for DNS related configurations in resolver configuration
  3496                file (`resolv.conf`).
  3497              type: "object"
  3498              properties:
  3499                Nameservers:
  3500                  description: "The IP addresses of the name servers."
  3501                  type: "array"
  3502                  items:
  3503                    type: "string"
  3504                Search:
  3505                  description: "A search list for host-name lookup."
  3506                  type: "array"
  3507                  items:
  3508                    type: "string"
  3509                Options:
  3510                  description: |
  3511                    A list of internal resolver variables to be modified (e.g.,
  3512                    `debug`, `ndots:3`, etc.).
  3513                  type: "array"
  3514                  items:
  3515                    type: "string"
  3516            Secrets:
  3517              description: |
  3518                Secrets contains references to zero or more secrets that will be
  3519                exposed to the service.
  3520              type: "array"
  3521              items:
  3522                type: "object"
  3523                properties:
  3524                  File:
  3525                    description: |
  3526                      File represents a specific target that is backed by a file.
  3527                    type: "object"
  3528                    properties:
  3529                      Name:
  3530                        description: |
  3531                          Name represents the final filename in the filesystem.
  3532                        type: "string"
  3533                      UID:
  3534                        description: "UID represents the file UID."
  3535                        type: "string"
  3536                      GID:
  3537                        description: "GID represents the file GID."
  3538                        type: "string"
  3539                      Mode:
  3540                        description: "Mode represents the FileMode of the file."
  3541                        type: "integer"
  3542                        format: "uint32"
  3543                  SecretID:
  3544                    description: |
  3545                      SecretID represents the ID of the specific secret that we're
  3546                      referencing.
  3547                    type: "string"
  3548                  SecretName:
  3549                    description: |
  3550                      SecretName is the name of the secret that this references,
  3551                      but this is just provided for lookup/display purposes. The
  3552                      secret in the reference will be identified by its ID.
  3553                    type: "string"
  3554            Configs:
  3555              description: |
  3556                Configs contains references to zero or more configs that will be
  3557                exposed to the service.
  3558              type: "array"
  3559              items:
  3560                type: "object"
  3561                properties:
  3562                  File:
  3563                    description: |
  3564                      File represents a specific target that is backed by a file.
  3565  
  3566                      <p><br /><p>
  3567  
  3568                      > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive
  3569                    type: "object"
  3570                    properties:
  3571                      Name:
  3572                        description: |
  3573                          Name represents the final filename in the filesystem.
  3574                        type: "string"
  3575                      UID:
  3576                        description: "UID represents the file UID."
  3577                        type: "string"
  3578                      GID:
  3579                        description: "GID represents the file GID."
  3580                        type: "string"
  3581                      Mode:
  3582                        description: "Mode represents the FileMode of the file."
  3583                        type: "integer"
  3584                        format: "uint32"
  3585                  Runtime:
  3586                    description: |
  3587                      Runtime represents a target that is not mounted into the
  3588                      container but is used by the task
  3589  
  3590                      <p><br /><p>
  3591  
  3592                      > **Note**: `Configs.File` and `Configs.Runtime` are mutually
  3593                      > exclusive
  3594                    type: "object"
  3595                  ConfigID:
  3596                    description: |
  3597                      ConfigID represents the ID of the specific config that we're
  3598                      referencing.
  3599                    type: "string"
  3600                  ConfigName:
  3601                    description: |
  3602                      ConfigName is the name of the config that this references,
  3603                      but this is just provided for lookup/display purposes. The
  3604                      config in the reference will be identified by its ID.
  3605                    type: "string"
  3606            Isolation:
  3607              type: "string"
  3608              description: |
  3609                Isolation technology of the containers running the service.
  3610                (Windows only)
  3611              enum:
  3612                - "default"
  3613                - "process"
  3614                - "hyperv"
  3615            Init:
  3616              description: |
  3617                Run an init inside the container that forwards signals and reaps
  3618                processes. This field is omitted if empty, and the default (as
  3619                configured on the daemon) is used.
  3620              type: "boolean"
  3621              x-nullable: true
  3622            Sysctls:
  3623              description: |
  3624                Set kernel namedspaced parameters (sysctls) in the container.
  3625                The Sysctls option on services accepts the same sysctls as the
  3626                are supported on containers. Note that while the same sysctls are
  3627                supported, no guarantees or checks are made about their
  3628                suitability for a clustered environment, and it's up to the user
  3629                to determine whether a given sysctl will work properly in a
  3630                Service.
  3631              type: "object"
  3632              additionalProperties:
  3633                type: "string"
  3634        NetworkAttachmentSpec:
  3635          description: |
  3636            Read-only spec type for non-swarm containers attached to swarm overlay
  3637            networks.
  3638  
  3639            <p><br /></p>
  3640  
  3641            > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
  3642            > mutually exclusive. PluginSpec is only used when the Runtime field
  3643            > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime
  3644            > field is set to `attachment`.
  3645          type: "object"
  3646          properties:
  3647            ContainerID:
  3648              description: "ID of the container represented by this task"
  3649              type: "string"
  3650        Resources:
  3651          description: |
  3652            Resource requirements which apply to each individual container created
  3653            as part of the service.
  3654          type: "object"
  3655          properties:
  3656            Limits:
  3657              description: "Define resources limits."
  3658              $ref: "#/definitions/ResourceObject"
  3659            Reservations:
  3660              description: "Define resources reservation."
  3661              $ref: "#/definitions/ResourceObject"
  3662        RestartPolicy:
  3663          description: |
  3664            Specification for the restart policy which applies to containers
  3665            created as part of this service.
  3666          type: "object"
  3667          properties:
  3668            Condition:
  3669              description: "Condition for restart."
  3670              type: "string"
  3671              enum:
  3672                - "none"
  3673                - "on-failure"
  3674                - "any"
  3675            Delay:
  3676              description: "Delay between restart attempts."
  3677              type: "integer"
  3678              format: "int64"
  3679            MaxAttempts:
  3680              description: |
  3681                Maximum attempts to restart a given container before giving up
  3682                (default value is 0, which is ignored).
  3683              type: "integer"
  3684              format: "int64"
  3685              default: 0
  3686            Window:
  3687              description: |
  3688                Windows is the time window used to evaluate the restart policy
  3689                (default value is 0, which is unbounded).
  3690              type: "integer"
  3691              format: "int64"
  3692              default: 0
  3693        Placement:
  3694          type: "object"
  3695          properties:
  3696            Constraints:
  3697              description: |
  3698                An array of constraint expressions to limit the set of nodes where
  3699                a task can be scheduled. Constraint expressions can either use a
  3700                _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find
  3701                nodes that satisfy every expression (AND match). Constraints can
  3702                match node or Docker Engine labels as follows:
  3703  
  3704                node attribute       | matches                        | example
  3705                ---------------------|--------------------------------|-----------------------------------------------
  3706                `node.id`            | Node ID                        | `node.id==2ivku8v2gvtg4`
  3707                `node.hostname`      | Node hostname                  | `node.hostname!=node-2`
  3708                `node.role`          | Node role (`manager`/`worker`) | `node.role==manager`
  3709                `node.platform.os`   | Node operating system          | `node.platform.os==windows`
  3710                `node.platform.arch` | Node architecture              | `node.platform.arch==x86_64`
  3711                `node.labels`        | User-defined node labels       | `node.labels.security==high`
  3712                `engine.labels`      | Docker Engine's labels         | `engine.labels.operatingsystem==ubuntu-14.04`
  3713  
  3714                `engine.labels` apply to Docker Engine labels like operating system,
  3715                drivers, etc. Swarm administrators add `node.labels` for operational
  3716                purposes by using the [`node update endpoint`](#operation/NodeUpdate).
  3717  
  3718              type: "array"
  3719              items:
  3720                type: "string"
  3721              example:
  3722                - "node.hostname!=node3.corp.example.com"
  3723                - "node.role!=manager"
  3724                - "node.labels.type==production"
  3725                - "node.platform.os==linux"
  3726                - "node.platform.arch==x86_64"
  3727            Preferences:
  3728              description: |
  3729                Preferences provide a way to make the scheduler aware of factors
  3730                such as topology. They are provided in order from highest to
  3731                lowest precedence.
  3732              type: "array"
  3733              items:
  3734                type: "object"
  3735                properties:
  3736                  Spread:
  3737                    type: "object"
  3738                    properties:
  3739                      SpreadDescriptor:
  3740                        description: |
  3741                          label descriptor, such as `engine.labels.az`.
  3742                        type: "string"
  3743              example:
  3744                - Spread:
  3745                    SpreadDescriptor: "node.labels.datacenter"
  3746                - Spread:
  3747                    SpreadDescriptor: "node.labels.rack"
  3748            MaxReplicas:
  3749              description: |
  3750                Maximum number of replicas for per node (default value is 0, which
  3751                is unlimited)
  3752              type: "integer"
  3753              format: "int64"
  3754              default: 0
  3755            Platforms:
  3756              description: |
  3757                Platforms stores all the platforms that the service's image can
  3758                run on. This field is used in the platform filter for scheduling.
  3759                If empty, then the platform filter is off, meaning there are no
  3760                scheduling restrictions.
  3761              type: "array"
  3762              items:
  3763                $ref: "#/definitions/Platform"
  3764        ForceUpdate:
  3765          description: |
  3766            A counter that triggers an update even if no relevant parameters have
  3767            been changed.
  3768          type: "integer"
  3769        Runtime:
  3770          description: |
  3771            Runtime is the type of runtime specified for the task executor.
  3772          type: "string"
  3773        Networks:
  3774          description: "Specifies which networks the service should attach to."
  3775          type: "array"
  3776          items:
  3777            $ref: "#/definitions/NetworkAttachmentConfig"
  3778        LogDriver:
  3779          description: |
  3780            Specifies the log driver to use for tasks created from this spec. If
  3781            not present, the default one for the swarm will be used, finally
  3782            falling back to the engine default if not specified.
  3783          type: "object"
  3784          properties:
  3785            Name:
  3786              type: "string"
  3787            Options:
  3788              type: "object"
  3789              additionalProperties:
  3790                type: "string"
  3791  
  3792    TaskState:
  3793      type: "string"
  3794      enum:
  3795        - "new"
  3796        - "allocated"
  3797        - "pending"
  3798        - "assigned"
  3799        - "accepted"
  3800        - "preparing"
  3801        - "ready"
  3802        - "starting"
  3803        - "running"
  3804        - "complete"
  3805        - "shutdown"
  3806        - "failed"
  3807        - "rejected"
  3808        - "remove"
  3809        - "orphaned"
  3810  
  3811    Task:
  3812      type: "object"
  3813      properties:
  3814        ID:
  3815          description: "The ID of the task."
  3816          type: "string"
  3817        Version:
  3818          $ref: "#/definitions/ObjectVersion"
  3819        CreatedAt:
  3820          type: "string"
  3821          format: "dateTime"
  3822        UpdatedAt:
  3823          type: "string"
  3824          format: "dateTime"
  3825        Name:
  3826          description: "Name of the task."
  3827          type: "string"
  3828        Labels:
  3829          description: "User-defined key/value metadata."
  3830          type: "object"
  3831          additionalProperties:
  3832            type: "string"
  3833        Spec:
  3834          $ref: "#/definitions/TaskSpec"
  3835        ServiceID:
  3836          description: "The ID of the service this task is part of."
  3837          type: "string"
  3838        Slot:
  3839          type: "integer"
  3840        NodeID:
  3841          description: "The ID of the node that this task is on."
  3842          type: "string"
  3843        AssignedGenericResources:
  3844          $ref: "#/definitions/GenericResources"
  3845        Status:
  3846          type: "object"
  3847          properties:
  3848            Timestamp:
  3849              type: "string"
  3850              format: "dateTime"
  3851            State:
  3852              $ref: "#/definitions/TaskState"
  3853            Message:
  3854              type: "string"
  3855            Err:
  3856              type: "string"
  3857            ContainerStatus:
  3858              type: "object"
  3859              properties:
  3860                ContainerID:
  3861                  type: "string"
  3862                PID:
  3863                  type: "integer"
  3864                ExitCode:
  3865                  type: "integer"
  3866        DesiredState:
  3867          $ref: "#/definitions/TaskState"
  3868      example:
  3869        ID: "0kzzo1i0y4jz6027t0k7aezc7"
  3870        Version:
  3871          Index: 71
  3872        CreatedAt: "2016-06-07T21:07:31.171892745Z"
  3873        UpdatedAt: "2016-06-07T21:07:31.376370513Z"
  3874        Spec:
  3875          ContainerSpec:
  3876            Image: "redis"
  3877          Resources:
  3878            Limits: {}
  3879            Reservations: {}
  3880          RestartPolicy:
  3881            Condition: "any"
  3882            MaxAttempts: 0
  3883          Placement: {}
  3884        ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
  3885        Slot: 1
  3886        NodeID: "60gvrl6tm78dmak4yl7srz94v"
  3887        Status:
  3888          Timestamp: "2016-06-07T21:07:31.290032978Z"
  3889          State: "running"
  3890          Message: "started"
  3891          ContainerStatus:
  3892            ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035"
  3893            PID: 677
  3894        DesiredState: "running"
  3895        NetworksAttachments:
  3896          - Network:
  3897              ID: "4qvuz4ko70xaltuqbt8956gd1"
  3898              Version:
  3899                Index: 18
  3900              CreatedAt: "2016-06-07T20:31:11.912919752Z"
  3901              UpdatedAt: "2016-06-07T21:07:29.955277358Z"
  3902              Spec:
  3903                Name: "ingress"
  3904                Labels:
  3905                  com.docker.swarm.internal: "true"
  3906                DriverConfiguration: {}
  3907                IPAMOptions:
  3908                  Driver: {}
  3909                  Configs:
  3910                    - Subnet: "10.255.0.0/16"
  3911                      Gateway: "10.255.0.1"
  3912              DriverState:
  3913                Name: "overlay"
  3914                Options:
  3915                  com.docker.network.driver.overlay.vxlanid_list: "256"
  3916              IPAMOptions:
  3917                Driver:
  3918                  Name: "default"
  3919                Configs:
  3920                  - Subnet: "10.255.0.0/16"
  3921                    Gateway: "10.255.0.1"
  3922            Addresses:
  3923              - "10.255.0.10/16"
  3924        AssignedGenericResources:
  3925          - DiscreteResourceSpec:
  3926              Kind: "SSD"
  3927              Value: 3
  3928          - NamedResourceSpec:
  3929              Kind: "GPU"
  3930              Value: "UUID1"
  3931          - NamedResourceSpec:
  3932              Kind: "GPU"
  3933              Value: "UUID2"
  3934  
  3935    ServiceSpec:
  3936      description: "User modifiable configuration for a service."
  3937      type: object
  3938      properties:
  3939        Name:
  3940          description: "Name of the service."
  3941          type: "string"
  3942        Labels:
  3943          description: "User-defined key/value metadata."
  3944          type: "object"
  3945          additionalProperties:
  3946            type: "string"
  3947        TaskTemplate:
  3948          $ref: "#/definitions/TaskSpec"
  3949        Mode:
  3950          description: "Scheduling mode for the service."
  3951          type: "object"
  3952          properties:
  3953            Replicated:
  3954              type: "object"
  3955              properties:
  3956                Replicas:
  3957                  type: "integer"
  3958                  format: "int64"
  3959            Global:
  3960              type: "object"
  3961        UpdateConfig:
  3962          description: "Specification for the update strategy of the service."
  3963          type: "object"
  3964          properties:
  3965            Parallelism:
  3966              description: |
  3967                Maximum number of tasks to be updated in one iteration (0 means
  3968                unlimited parallelism).
  3969              type: "integer"
  3970              format: "int64"
  3971            Delay:
  3972              description: "Amount of time between updates, in nanoseconds."
  3973              type: "integer"
  3974              format: "int64"
  3975            FailureAction:
  3976              description: |
  3977                Action to take if an updated task fails to run, or stops running
  3978                during the update.
  3979              type: "string"
  3980              enum:
  3981                - "continue"
  3982                - "pause"
  3983                - "rollback"
  3984            Monitor:
  3985              description: |
  3986                Amount of time to monitor each updated task for failures, in
  3987                nanoseconds.
  3988              type: "integer"
  3989              format: "int64"
  3990            MaxFailureRatio:
  3991              description: |
  3992                The fraction of tasks that may fail during an update before the
  3993                failure action is invoked, specified as a floating point number
  3994                between 0 and 1.
  3995              type: "number"
  3996              default: 0
  3997            Order:
  3998              description: |
  3999                The order of operations when rolling out an updated task. Either
  4000                the old task is shut down before the new task is started, or the
  4001                new task is started before the old task is shut down.
  4002              type: "string"
  4003              enum:
  4004                - "stop-first"
  4005                - "start-first"
  4006        RollbackConfig:
  4007          description: "Specification for the rollback strategy of the service."
  4008          type: "object"
  4009          properties:
  4010            Parallelism:
  4011              description: |
  4012                Maximum number of tasks to be rolled back in one iteration (0 means
  4013                unlimited parallelism).
  4014              type: "integer"
  4015              format: "int64"
  4016            Delay:
  4017              description: |
  4018                Amount of time between rollback iterations, in nanoseconds.
  4019              type: "integer"
  4020              format: "int64"
  4021            FailureAction:
  4022              description: |
  4023                Action to take if an rolled back task fails to run, or stops
  4024                running during the rollback.
  4025              type: "string"
  4026              enum:
  4027                - "continue"
  4028                - "pause"
  4029            Monitor:
  4030              description: |
  4031                Amount of time to monitor each rolled back task for failures, in
  4032                nanoseconds.
  4033              type: "integer"
  4034              format: "int64"
  4035            MaxFailureRatio:
  4036              description: |
  4037                The fraction of tasks that may fail during a rollback before the
  4038                failure action is invoked, specified as a floating point number
  4039                between 0 and 1.
  4040              type: "number"
  4041              default: 0
  4042            Order:
  4043              description: |
  4044                The order of operations when rolling back a task. Either the old
  4045                task is shut down before the new task is started, or the new task
  4046                is started before the old task is shut down.
  4047              type: "string"
  4048              enum:
  4049                - "stop-first"
  4050                - "start-first"
  4051        Networks:
  4052          description: "Specifies which networks the service should attach to."
  4053          type: "array"
  4054          items:
  4055            $ref: "#/definitions/NetworkAttachmentConfig"
  4056  
  4057        EndpointSpec:
  4058          $ref: "#/definitions/EndpointSpec"
  4059  
  4060    EndpointPortConfig:
  4061      type: "object"
  4062      properties:
  4063        Name:
  4064          type: "string"
  4065        Protocol:
  4066          type: "string"
  4067          enum:
  4068            - "tcp"
  4069            - "udp"
  4070            - "sctp"
  4071        TargetPort:
  4072          description: "The port inside the container."
  4073          type: "integer"
  4074        PublishedPort:
  4075          description: "The port on the swarm hosts."
  4076          type: "integer"
  4077        PublishMode:
  4078          description: |
  4079            The mode in which port is published.
  4080  
  4081            <p><br /></p>
  4082  
  4083            - "ingress" makes the target port accessible on every node,
  4084              regardless of whether there is a task for the service running on
  4085              that node or not.
  4086            - "host" bypasses the routing mesh and publish the port directly on
  4087              the swarm node where that service is running.
  4088  
  4089          type: "string"
  4090          enum:
  4091            - "ingress"
  4092            - "host"
  4093          default: "ingress"
  4094          example: "ingress"
  4095  
  4096    EndpointSpec:
  4097      description: "Properties that can be configured to access and load balance a service."
  4098      type: "object"
  4099      properties:
  4100        Mode:
  4101          description: |
  4102            The mode of resolution to use for internal load balancing between tasks.
  4103          type: "string"
  4104          enum:
  4105            - "vip"
  4106            - "dnsrr"
  4107          default: "vip"
  4108        Ports:
  4109          description: |
  4110            List of exposed ports that this service is accessible on from the
  4111            outside. Ports can only be provided if `vip` resolution mode is used.
  4112          type: "array"
  4113          items:
  4114            $ref: "#/definitions/EndpointPortConfig"
  4115  
  4116    Service:
  4117      type: "object"
  4118      properties:
  4119        ID:
  4120          type: "string"
  4121        Version:
  4122          $ref: "#/definitions/ObjectVersion"
  4123        CreatedAt:
  4124          type: "string"
  4125          format: "dateTime"
  4126        UpdatedAt:
  4127          type: "string"
  4128          format: "dateTime"
  4129        Spec:
  4130          $ref: "#/definitions/ServiceSpec"
  4131        Endpoint:
  4132          type: "object"
  4133          properties:
  4134            Spec:
  4135              $ref: "#/definitions/EndpointSpec"
  4136            Ports:
  4137              type: "array"
  4138              items:
  4139                $ref: "#/definitions/EndpointPortConfig"
  4140            VirtualIPs:
  4141              type: "array"
  4142              items:
  4143                type: "object"
  4144                properties:
  4145                  NetworkID:
  4146                    type: "string"
  4147                  Addr:
  4148                    type: "string"
  4149        UpdateStatus:
  4150          description: "The status of a service update."
  4151          type: "object"
  4152          properties:
  4153            State:
  4154              type: "string"
  4155              enum:
  4156                - "updating"
  4157                - "paused"
  4158                - "completed"
  4159            StartedAt:
  4160              type: "string"
  4161              format: "dateTime"
  4162            CompletedAt:
  4163              type: "string"
  4164              format: "dateTime"
  4165            Message:
  4166              type: "string"
  4167      example:
  4168        ID: "9mnpnzenvg8p8tdbtq4wvbkcz"
  4169        Version:
  4170          Index: 19
  4171        CreatedAt: "2016-06-07T21:05:51.880065305Z"
  4172        UpdatedAt: "2016-06-07T21:07:29.962229872Z"
  4173        Spec:
  4174          Name: "hopeful_cori"
  4175          TaskTemplate:
  4176            ContainerSpec:
  4177              Image: "redis"
  4178            Resources:
  4179              Limits: {}
  4180              Reservations: {}
  4181            RestartPolicy:
  4182              Condition: "any"
  4183              MaxAttempts: 0
  4184            Placement: {}
  4185            ForceUpdate: 0
  4186          Mode:
  4187            Replicated:
  4188              Replicas: 1
  4189          UpdateConfig:
  4190            Parallelism: 1
  4191            Delay: 1000000000
  4192            FailureAction: "pause"
  4193            Monitor: 15000000000
  4194            MaxFailureRatio: 0.15
  4195          RollbackConfig:
  4196            Parallelism: 1
  4197            Delay: 1000000000
  4198            FailureAction: "pause"
  4199            Monitor: 15000000000
  4200            MaxFailureRatio: 0.15
  4201          EndpointSpec:
  4202            Mode: "vip"
  4203            Ports:
  4204              -
  4205                Protocol: "tcp"
  4206                TargetPort: 6379
  4207                PublishedPort: 30001
  4208        Endpoint:
  4209          Spec:
  4210            Mode: "vip"
  4211            Ports:
  4212              -
  4213                Protocol: "tcp"
  4214                TargetPort: 6379
  4215                PublishedPort: 30001
  4216          Ports:
  4217            -
  4218              Protocol: "tcp"
  4219              TargetPort: 6379
  4220              PublishedPort: 30001
  4221          VirtualIPs:
  4222            -
  4223              NetworkID: "4qvuz4ko70xaltuqbt8956gd1"
  4224              Addr: "10.255.0.2/16"
  4225            -
  4226              NetworkID: "4qvuz4ko70xaltuqbt8956gd1"
  4227              Addr: "10.255.0.3/16"
  4228  
  4229    ImageDeleteResponseItem:
  4230      type: "object"
  4231      properties:
  4232        Untagged:
  4233          description: "The image ID of an image that was untagged"
  4234          type: "string"
  4235        Deleted:
  4236          description: "The image ID of an image that was deleted"
  4237          type: "string"
  4238  
  4239    ServiceUpdateResponse:
  4240      type: "object"
  4241      properties:
  4242        Warnings:
  4243          description: "Optional warning messages"
  4244          type: "array"
  4245          items:
  4246            type: "string"
  4247      example:
  4248        Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found"
  4249  
  4250    ContainerSummary:
  4251      type: "object"
  4252      properties:
  4253        Id:
  4254          description: "The ID of this container"
  4255          type: "string"
  4256          x-go-name: "ID"
  4257        Names:
  4258          description: "The names that this container has been given"
  4259          type: "array"
  4260          items:
  4261            type: "string"
  4262        Image:
  4263          description: "The name of the image used when creating this container"
  4264          type: "string"
  4265        ImageID:
  4266          description: "The ID of the image that this container was created from"
  4267          type: "string"
  4268        Command:
  4269          description: "Command to run when starting the container"
  4270          type: "string"
  4271        Created:
  4272          description: "When the container was created"
  4273          type: "integer"
  4274          format: "int64"
  4275        Ports:
  4276          description: "The ports exposed by this container"
  4277          type: "array"
  4278          items:
  4279            $ref: "#/definitions/Port"
  4280        SizeRw:
  4281          description: "The size of files that have been created or changed by this container"
  4282          type: "integer"
  4283          format: "int64"
  4284        SizeRootFs:
  4285          description: "The total size of all the files in this container"
  4286          type: "integer"
  4287          format: "int64"
  4288        Labels:
  4289          description: "User-defined key/value metadata."
  4290          type: "object"
  4291          additionalProperties:
  4292            type: "string"
  4293        State:
  4294          description: "The state of this container (e.g. `Exited`)"
  4295          type: "string"
  4296        Status:
  4297          description: "Additional human-readable status of this container (e.g. `Exit 0`)"
  4298          type: "string"
  4299        HostConfig:
  4300          type: "object"
  4301          properties:
  4302            NetworkMode:
  4303              type: "string"
  4304        NetworkSettings:
  4305          description: "A summary of the container's network settings"
  4306          type: "object"
  4307          properties:
  4308            Networks:
  4309              type: "object"
  4310              additionalProperties:
  4311                $ref: "#/definitions/EndpointSettings"
  4312        Mounts:
  4313          type: "array"
  4314          items:
  4315            $ref: "#/definitions/MountPoint"
  4316  
  4317    Driver:
  4318      description: "Driver represents a driver (network, logging, secrets)."
  4319      type: "object"
  4320      required: [Name]
  4321      properties:
  4322        Name:
  4323          description: "Name of the driver."
  4324          type: "string"
  4325          x-nullable: false
  4326          example: "some-driver"
  4327        Options:
  4328          description: "Key/value map of driver-specific options."
  4329          type: "object"
  4330          x-nullable: false
  4331          additionalProperties:
  4332            type: "string"
  4333          example:
  4334            OptionA: "value for driver-specific option A"
  4335            OptionB: "value for driver-specific option B"
  4336  
  4337    SecretSpec:
  4338      type: "object"
  4339      properties:
  4340        Name:
  4341          description: "User-defined name of the secret."
  4342          type: "string"
  4343        Labels:
  4344          description: "User-defined key/value metadata."
  4345          type: "object"
  4346          additionalProperties:
  4347            type: "string"
  4348          example:
  4349            com.example.some-label: "some-value"
  4350            com.example.some-other-label: "some-other-value"
  4351        Data:
  4352          description: |
  4353            Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5))
  4354            data to store as secret.
  4355  
  4356            This field is only used to _create_ a secret, and is not returned by
  4357            other endpoints.
  4358          type: "string"
  4359          example: ""
  4360        Driver:
  4361          description: |
  4362            Name of the secrets driver used to fetch the secret's value from an
  4363            external secret store.
  4364          $ref: "#/definitions/Driver"
  4365        Templating:
  4366          description: |
  4367            Templating driver, if applicable
  4368  
  4369            Templating controls whether and how to evaluate the config payload as
  4370            a template. If no driver is set, no templating is used.
  4371          $ref: "#/definitions/Driver"
  4372  
  4373    Secret:
  4374      type: "object"
  4375      properties:
  4376        ID:
  4377          type: "string"
  4378          example: "blt1owaxmitz71s9v5zh81zun"
  4379        Version:
  4380          $ref: "#/definitions/ObjectVersion"
  4381        CreatedAt:
  4382          type: "string"
  4383          format: "dateTime"
  4384          example: "2017-07-20T13:55:28.678958722Z"
  4385        UpdatedAt:
  4386          type: "string"
  4387          format: "dateTime"
  4388          example: "2017-07-20T13:55:28.678958722Z"
  4389        Spec:
  4390          $ref: "#/definitions/SecretSpec"
  4391  
  4392    ConfigSpec:
  4393      type: "object"
  4394      properties:
  4395        Name:
  4396          description: "User-defined name of the config."
  4397          type: "string"
  4398        Labels:
  4399          description: "User-defined key/value metadata."
  4400          type: "object"
  4401          additionalProperties:
  4402            type: "string"
  4403        Data:
  4404          description: |
  4405            Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5))
  4406            config data.
  4407          type: "string"
  4408        Templating:
  4409          description: |
  4410            Templating driver, if applicable
  4411  
  4412            Templating controls whether and how to evaluate the config payload as
  4413            a template. If no driver is set, no templating is used.
  4414          $ref: "#/definitions/Driver"
  4415  
  4416    Config:
  4417      type: "object"
  4418      properties:
  4419        ID:
  4420          type: "string"
  4421        Version:
  4422          $ref: "#/definitions/ObjectVersion"
  4423        CreatedAt:
  4424          type: "string"
  4425          format: "dateTime"
  4426        UpdatedAt:
  4427          type: "string"
  4428          format: "dateTime"
  4429        Spec:
  4430          $ref: "#/definitions/ConfigSpec"
  4431  
  4432    ContainerState:
  4433      description: |
  4434        ContainerState stores container's running state. It's part of ContainerJSONBase
  4435        and will be returned by the "inspect" command.
  4436      type: "object"
  4437      x-nullable: true
  4438      properties:
  4439        Status:
  4440          description: |
  4441            String representation of the container state. Can be one of "created",
  4442            "running", "paused", "restarting", "removing", "exited", or "dead".
  4443          type: "string"
  4444          enum: ["created", "running", "paused", "restarting", "removing", "exited", "dead"]
  4445          example: "running"
  4446        Running:
  4447          description: |
  4448            Whether this container is running.
  4449  
  4450            Note that a running container can be _paused_. The `Running` and `Paused`
  4451            booleans are not mutually exclusive:
  4452  
  4453            When pausing a container (on Linux), the freezer cgroup is used to suspend
  4454            all processes in the container. Freezing the process requires the process to
  4455            be running. As a result, paused containers are both `Running` _and_ `Paused`.
  4456  
  4457            Use the `Status` field instead to determine if a container's state is "running".
  4458          type: "boolean"
  4459          example: true
  4460        Paused:
  4461          description: "Whether this container is paused."
  4462          type: "boolean"
  4463          example: false
  4464        Restarting:
  4465          description: "Whether this container is restarting."
  4466          type: "boolean"
  4467          example: false
  4468        OOMKilled:
  4469          description: |
  4470            Whether this container has been killed because it ran out of memory.
  4471          type: "boolean"
  4472          example: false
  4473        Dead:
  4474          type: "boolean"
  4475          example: false
  4476        Pid:
  4477          description: "The process ID of this container"
  4478          type: "integer"
  4479          example: 1234
  4480        ExitCode:
  4481          description: "The last exit code of this container"
  4482          type: "integer"
  4483          example: 0
  4484        Error:
  4485          type: "string"
  4486        StartedAt:
  4487          description: "The time when this container was last started."
  4488          type: "string"
  4489          example: "2020-01-06T09:06:59.461876391Z"
  4490        FinishedAt:
  4491          description: "The time when this container last exited."
  4492          type: "string"
  4493          example: "2020-01-06T09:07:59.461876391Z"
  4494        Health:
  4495          $ref: "#/definitions/Health"
  4496  
  4497    ContainerWaitResponse:
  4498      description: "OK response to ContainerWait operation"
  4499      type: "object"
  4500      x-go-name: "ContainerWaitOKBody"
  4501      title: "ContainerWaitResponse"
  4502      required: [StatusCode]
  4503      properties:
  4504        StatusCode:
  4505          description: "Exit code of the container"
  4506          type: "integer"
  4507          format: "int64"
  4508          x-nullable: false
  4509        Error:
  4510          $ref: "#/definitions/ContainerWaitExitError"
  4511  
  4512    ContainerWaitExitError:
  4513      description: "container waiting error, if any"
  4514      type: "object"
  4515      x-go-name: "ContainerWaitOKBodyError"
  4516      properties:
  4517        Message:
  4518          description: "Details of an error"
  4519          type: "string"
  4520  
  4521    SystemVersion:
  4522      type: "object"
  4523      description: |
  4524        Response of Engine API: GET "/version"
  4525      properties:
  4526        Platform:
  4527          type: "object"
  4528          required: [Name]
  4529          properties:
  4530            Name:
  4531              type: "string"
  4532        Components:
  4533          type: "array"
  4534          description: |
  4535            Information about system components
  4536          items:
  4537            type: "object"
  4538            x-go-name: ComponentVersion
  4539            required: [Name, Version]
  4540            properties:
  4541              Name:
  4542                description: |
  4543                  Name of the component
  4544                type: "string"
  4545                example: "Engine"
  4546              Version:
  4547                description: |
  4548                  Version of the component
  4549                type: "string"
  4550                x-nullable: false
  4551                example: "19.03.12"
  4552              Details:
  4553                description: |
  4554                  Key/value pairs of strings with additional information about the
  4555                  component. These values are intended for informational purposes
  4556                  only, and their content is not defined, and not part of the API
  4557                  specification.
  4558  
  4559                  These messages can be printed by the client as information to the user.
  4560                type: "object"
  4561                x-nullable: true
  4562        Version:
  4563          description: "The version of the daemon"
  4564          type: "string"
  4565          example: "19.03.12"
  4566        ApiVersion:
  4567          description: |
  4568            The default (and highest) API version that is supported by the daemon
  4569          type: "string"
  4570          example: "1.40"
  4571        MinAPIVersion:
  4572          description: |
  4573            The minimum API version that is supported by the daemon
  4574          type: "string"
  4575          example: "1.12"
  4576        GitCommit:
  4577          description: |
  4578            The Git commit of the source code that was used to build the daemon
  4579          type: "string"
  4580          example: "48a66213fe"
  4581        GoVersion:
  4582          description: |
  4583            The version Go used to compile the daemon, and the version of the Go
  4584            runtime in use.
  4585          type: "string"
  4586          example: "go1.13.14"
  4587        Os:
  4588          description: |
  4589            The operating system that the daemon is running on ("linux" or "windows")
  4590          type: "string"
  4591          example: "linux"
  4592        Arch:
  4593          description: |
  4594            The architecture that the daemon is running on
  4595          type: "string"
  4596          example: "amd64"
  4597        KernelVersion:
  4598          description: |
  4599            The kernel version (`uname -r`) that the daemon is running on.
  4600  
  4601            This field is omitted when empty.
  4602          type: "string"
  4603          example: "4.19.76-linuxkit"
  4604        Experimental:
  4605          description: |
  4606            Indicates if the daemon is started with experimental features enabled.
  4607  
  4608            This field is omitted when empty / false.
  4609          type: "boolean"
  4610          example: true
  4611        BuildTime:
  4612          description: |
  4613            The date and time that the daemon was compiled.
  4614          type: "string"
  4615          example: "2020-06-22T15:49:27.000000000+00:00"
  4616  
  4617    SystemInfo:
  4618      type: "object"
  4619      properties:
  4620        ID:
  4621          description: |
  4622            Unique identifier of the daemon.
  4623  
  4624            <p><br /></p>
  4625  
  4626            > **Note**: The format of the ID itself is not part of the API, and
  4627            > should not be considered stable.
  4628          type: "string"
  4629          example: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS"
  4630        Containers:
  4631          description: "Total number of containers on the host."
  4632          type: "integer"
  4633          example: 14
  4634        ContainersRunning:
  4635          description: |
  4636            Number of containers with status `"running"`.
  4637          type: "integer"
  4638          example: 3
  4639        ContainersPaused:
  4640          description: |
  4641            Number of containers with status `"paused"`.
  4642          type: "integer"
  4643          example: 1
  4644        ContainersStopped:
  4645          description: |
  4646            Number of containers with status `"stopped"`.
  4647          type: "integer"
  4648          example: 10
  4649        Images:
  4650          description: |
  4651            Total number of images on the host.
  4652  
  4653            Both _tagged_ and _untagged_ (dangling) images are counted.
  4654          type: "integer"
  4655          example: 508
  4656        Driver:
  4657          description: "Name of the storage driver in use."
  4658          type: "string"
  4659          example: "overlay2"
  4660        DriverStatus:
  4661          description: |
  4662            Information specific to the storage driver, provided as
  4663            "label" / "value" pairs.
  4664  
  4665            This information is provided by the storage driver, and formatted
  4666            in a way consistent with the output of `docker info` on the command
  4667            line.
  4668  
  4669            <p><br /></p>
  4670  
  4671            > **Note**: The information returned in this field, including the
  4672            > formatting of values and labels, should not be considered stable,
  4673            > and may change without notice.
  4674          type: "array"
  4675          items:
  4676            type: "array"
  4677            items:
  4678              type: "string"
  4679          example:
  4680            - ["Backing Filesystem", "extfs"]
  4681            - ["Supports d_type", "true"]
  4682            - ["Native Overlay Diff", "true"]
  4683        DockerRootDir:
  4684          description: |
  4685            Root directory of persistent Docker state.
  4686  
  4687            Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker`
  4688            on Windows.
  4689          type: "string"
  4690          example: "/var/lib/docker"
  4691        SystemStatus:
  4692          description: |
  4693            Status information about this node (standalone Swarm API).
  4694  
  4695            <p><br /></p>
  4696  
  4697            > **Note**: The information returned in this field is only propagated
  4698            > by the Swarm standalone API, and is empty (`null`) when using
  4699            > built-in swarm mode.
  4700          type: "array"
  4701          items:
  4702            type: "array"
  4703            items:
  4704              type: "string"
  4705          example:
  4706            - ["Role", "primary"]
  4707            - ["State", "Healthy"]
  4708            - ["Strategy", "spread"]
  4709            - ["Filters", "health, port, containerslots, dependency, affinity, constraint, whitelist"]
  4710            - ["Nodes", "2"]
  4711            - [" swarm-agent-00", "192.168.99.102:2376"]
  4712            - ["  â”” ID", "5CT6:FBGO:RVGO:CZL4:PB2K:WCYN:2JSV:KSHH:GGFW:QOPG:6J5Q:IOZ2|192.168.99.102:2376"]
  4713            - ["  â”” Status", "Healthy"]
  4714            - ["  â”” Containers", "1 (1 Running, 0 Paused, 0 Stopped)"]
  4715            - ["  â”” Reserved CPUs", "0 / 1"]
  4716            - ["  â”” Reserved Memory", "0 B / 1.021 GiB"]
  4717            - ["  â”” 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"]
  4718            - ["  â”” UpdatedAt", "2017-08-09T10:03:46Z"]
  4719            - ["  â”” ServerVersion", "17.06.0-ce"]
  4720            - [" swarm-manager", "192.168.99.101:2376"]
  4721            - ["  â”” ID", "TAMD:7LL3:SEF7:LW2W:4Q2X:WVFH:RTXX:JSYS:XY2P:JEHL:ZMJK:JGIW|192.168.99.101:2376"]
  4722            - ["  â”” Status", "Healthy"]
  4723            - ["  â”” Containers", "2 (2 Running, 0 Paused, 0 Stopped)"]
  4724            - ["  â”” Reserved CPUs", "0 / 1"]
  4725            - ["  â”” Reserved Memory", "0 B / 1.021 GiB"]
  4726            - ["  â”” 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"]
  4727            - ["  â”” UpdatedAt", "2017-08-09T10:04:11Z"]
  4728            - ["  â”” ServerVersion", "17.06.0-ce"]
  4729        Plugins:
  4730          $ref: "#/definitions/PluginsInfo"
  4731        MemoryLimit:
  4732          description: "Indicates if the host has memory limit support enabled."
  4733          type: "boolean"
  4734          example: true
  4735        SwapLimit:
  4736          description: "Indicates if the host has memory swap limit support enabled."
  4737          type: "boolean"
  4738          example: true
  4739        KernelMemory:
  4740          description: "Indicates if the host has kernel memory limit support enabled."
  4741          type: "boolean"
  4742          example: true
  4743        KernelMemoryTCP:
  4744          description: |
  4745            Indicates if the host has kernel memory TCP limit support enabled.
  4746  
  4747            Kernel memory TCP limits are not supported when using cgroups v2, which
  4748            does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup.
  4749          type: "boolean"
  4750          example: true
  4751        CpuCfsPeriod:
  4752          description: |
  4753            Indicates if CPU CFS(Completely Fair Scheduler) period is supported by
  4754            the host.
  4755          type: "boolean"
  4756          example: true
  4757        CpuCfsQuota:
  4758          description: |
  4759            Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by
  4760            the host.
  4761          type: "boolean"
  4762          example: true
  4763        CPUShares:
  4764          description: |
  4765            Indicates if CPU Shares limiting is supported by the host.
  4766          type: "boolean"
  4767          example: true
  4768        CPUSet:
  4769          description: |
  4770            Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host.
  4771  
  4772            See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt)
  4773          type: "boolean"
  4774          example: true
  4775        PidsLimit:
  4776          description: "Indicates if the host kernel has PID limit support enabled."
  4777          type: "boolean"
  4778          example: true
  4779        OomKillDisable:
  4780          description: "Indicates if OOM killer disable is supported on the host."
  4781          type: "boolean"
  4782        IPv4Forwarding:
  4783          description: "Indicates IPv4 forwarding is enabled."
  4784          type: "boolean"
  4785          example: true
  4786        BridgeNfIptables:
  4787          description: "Indicates if `bridge-nf-call-iptables` is available on the host."
  4788          type: "boolean"
  4789          example: true
  4790        BridgeNfIp6tables:
  4791          description: "Indicates if `bridge-nf-call-ip6tables` is available on the host."
  4792          type: "boolean"
  4793          example: true
  4794        Debug:
  4795          description: |
  4796            Indicates if the daemon is running in debug-mode / with debug-level
  4797            logging enabled.
  4798          type: "boolean"
  4799          example: true
  4800        NFd:
  4801          description: |
  4802            The total number of file Descriptors in use by the daemon process.
  4803  
  4804            This information is only returned if debug-mode is enabled.
  4805          type: "integer"
  4806          example: 64
  4807        NGoroutines:
  4808          description: |
  4809            The  number of goroutines that currently exist.
  4810  
  4811            This information is only returned if debug-mode is enabled.
  4812          type: "integer"
  4813          example: 174
  4814        SystemTime:
  4815          description: |
  4816            Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt)
  4817            format with nano-seconds.
  4818          type: "string"
  4819          example: "2017-08-08T20:28:29.06202363Z"
  4820        LoggingDriver:
  4821          description: |
  4822            The logging driver to use as a default for new containers.
  4823          type: "string"
  4824        CgroupDriver:
  4825          description: |
  4826            The driver to use for managing cgroups.
  4827          type: "string"
  4828          enum: ["cgroupfs", "systemd", "none"]
  4829          default: "cgroupfs"
  4830          example: "cgroupfs"
  4831        NEventsListener:
  4832          description: "Number of event listeners subscribed."
  4833          type: "integer"
  4834          example: 30
  4835        KernelVersion:
  4836          description: |
  4837            Kernel version of the host.
  4838  
  4839            On Linux, this information obtained from `uname`. On Windows this
  4840            information is queried from the <kbd>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\</kbd>
  4841            registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_.
  4842          type: "string"
  4843          example: "4.9.38-moby"
  4844        OperatingSystem:
  4845          description: |
  4846            Name of the host's operating system, for example: "Ubuntu 16.04.2 LTS"
  4847            or "Windows Server 2016 Datacenter"
  4848          type: "string"
  4849          example: "Alpine Linux v3.5"
  4850        OSType:
  4851          description: |
  4852            Generic type of the operating system of the host, as returned by the
  4853            Go runtime (`GOOS`).
  4854  
  4855            Currently returned values are "linux" and "windows". A full list of
  4856            possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment).
  4857          type: "string"
  4858          example: "linux"
  4859        Architecture:
  4860          description: |
  4861            Hardware architecture of the host, as returned by the Go runtime
  4862            (`GOARCH`).
  4863  
  4864            A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment).
  4865          type: "string"
  4866          example: "x86_64"
  4867        NCPU:
  4868          description: |
  4869            The number of logical CPUs usable by the daemon.
  4870  
  4871            The number of available CPUs is checked by querying the operating
  4872            system when the daemon starts. Changes to operating system CPU
  4873            allocation after the daemon is started are not reflected.
  4874          type: "integer"
  4875          example: 4
  4876        MemTotal:
  4877          description: |
  4878            Total amount of physical memory available on the host, in bytes.
  4879          type: "integer"
  4880          format: "int64"
  4881          example: 2095882240
  4882  
  4883        IndexServerAddress:
  4884          description: |
  4885            Address / URL of the index server that is used for image search,
  4886            and as a default for user authentication for Docker Hub and Docker Cloud.
  4887          default: "https://index.docker.io/v1/"
  4888          type: "string"
  4889          example: "https://index.docker.io/v1/"
  4890        RegistryConfig:
  4891          $ref: "#/definitions/RegistryServiceConfig"
  4892        GenericResources:
  4893          $ref: "#/definitions/GenericResources"
  4894        HttpProxy:
  4895          description: |
  4896            HTTP-proxy configured for the daemon. This value is obtained from the
  4897            [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable.
  4898            Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL
  4899            are masked in the API response.
  4900  
  4901            Containers do not automatically inherit this configuration.
  4902          type: "string"
  4903          example: "http://xxxxx:xxxxx@proxy.corp.example.com:8080"
  4904        HttpsProxy:
  4905          description: |
  4906            HTTPS-proxy configured for the daemon. This value is obtained from the
  4907            [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable.
  4908            Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL
  4909            are masked in the API response.
  4910  
  4911            Containers do not automatically inherit this configuration.
  4912          type: "string"
  4913          example: "https://xxxxx:xxxxx@proxy.corp.example.com:4443"
  4914        NoProxy:
  4915          description: |
  4916            Comma-separated list of domain extensions for which no proxy should be
  4917            used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html)
  4918            environment variable.
  4919  
  4920            Containers do not automatically inherit this configuration.
  4921          type: "string"
  4922          example: "*.local, 169.254/16"
  4923        Name:
  4924          description: "Hostname of the host."
  4925          type: "string"
  4926          example: "node5.corp.example.com"
  4927        Labels:
  4928          description: |
  4929            User-defined labels (key/value metadata) as set on the daemon.
  4930  
  4931            <p><br /></p>
  4932  
  4933            > **Note**: When part of a Swarm, nodes can both have _daemon_ labels,
  4934            > set through the daemon configuration, and _node_ labels, set from a
  4935            > manager node in the Swarm. Node labels are not included in this
  4936            > field. Node labels can be retrieved using the `/nodes/(id)` endpoint
  4937            > on a manager node in the Swarm.
  4938          type: "array"
  4939          items:
  4940            type: "string"
  4941          example: ["storage=ssd", "production"]
  4942        ExperimentalBuild:
  4943          description: |
  4944            Indicates if experimental features are enabled on the daemon.
  4945          type: "boolean"
  4946          example: true
  4947        ServerVersion:
  4948          description: |
  4949            Version string of the daemon.
  4950          type: "string"
  4951          example: "17.06.0-ce"
  4952        ClusterStore:
  4953          description: |
  4954            URL of the distributed storage backend.
  4955  
  4956  
  4957            The storage backend is used for multihost networking (to store
  4958            network and endpoint information) and by the node discovery mechanism.
  4959  
  4960            <p><br /></p>
  4961  
  4962            > **Note**: This field is only propagated when using standalone Swarm
  4963            > mode, and overlay networking using an external k/v store. Overlay
  4964            > networks with Swarm mode enabled use the built-in raft store, and
  4965            > this field will be empty.
  4966          type: "string"
  4967          example: "consul://consul.corp.example.com:8600/some/path"
  4968        ClusterAdvertise:
  4969          description: |
  4970            The network endpoint that the Engine advertises for the purpose of
  4971            node discovery. ClusterAdvertise is a `host:port` combination on which
  4972            the daemon is reachable by other hosts.
  4973  
  4974            <p><br /></p>
  4975  
  4976            > **Note**: This field is only propagated when using standalone Swarm
  4977            > mode, and overlay networking using an external k/v store. Overlay
  4978            > networks with Swarm mode enabled use the built-in raft store, and
  4979            > this field will be empty.
  4980          type: "string"
  4981          example: "node5.corp.example.com:8000"
  4982        Runtimes:
  4983          description: |
  4984            List of [OCI compliant](https://github.com/opencontainers/runtime-spec)
  4985            runtimes configured on the daemon. Keys hold the "name" used to
  4986            reference the runtime.
  4987  
  4988            The Docker daemon relies on an OCI compliant runtime (invoked via the
  4989            `containerd` daemon) as its interface to the Linux kernel namespaces,
  4990            cgroups, and SELinux.
  4991  
  4992            The default runtime is `runc`, and automatically configured. Additional
  4993            runtimes can be configured by the user and will be listed here.
  4994          type: "object"
  4995          additionalProperties:
  4996            $ref: "#/definitions/Runtime"
  4997          default:
  4998            runc:
  4999              path: "runc"
  5000          example:
  5001            runc:
  5002              path: "runc"
  5003            runc-master:
  5004              path: "/go/bin/runc"
  5005            custom:
  5006              path: "/usr/local/bin/my-oci-runtime"
  5007              runtimeArgs: ["--debug", "--systemd-cgroup=false"]
  5008        DefaultRuntime:
  5009          description: |
  5010            Name of the default OCI runtime that is used when starting containers.
  5011  
  5012            The default can be overridden per-container at create time.
  5013          type: "string"
  5014          default: "runc"
  5015          example: "runc"
  5016        Swarm:
  5017          $ref: "#/definitions/SwarmInfo"
  5018        LiveRestoreEnabled:
  5019          description: |
  5020            Indicates if live restore is enabled.
  5021  
  5022            If enabled, containers are kept running when the daemon is shutdown
  5023            or upon daemon start if running containers are detected.
  5024          type: "boolean"
  5025          default: false
  5026          example: false
  5027        Isolation:
  5028          description: |
  5029            Represents the isolation technology to use as a default for containers.
  5030            The supported values are platform-specific.
  5031  
  5032            If no isolation value is specified on daemon start, on Windows client,
  5033            the default is `hyperv`, and on Windows server, the default is `process`.
  5034  
  5035            This option is currently not used on other platforms.
  5036          default: "default"
  5037          type: "string"
  5038          enum:
  5039            - "default"
  5040            - "hyperv"
  5041            - "process"
  5042        InitBinary:
  5043          description: |
  5044            Name and, optional, path of the `docker-init` binary.
  5045  
  5046            If the path is omitted, the daemon searches the host's `$PATH` for the
  5047            binary and uses the first result.
  5048          type: "string"
  5049          example: "docker-init"
  5050        ContainerdCommit:
  5051          $ref: "#/definitions/Commit"
  5052        RuncCommit:
  5053          $ref: "#/definitions/Commit"
  5054        InitCommit:
  5055          $ref: "#/definitions/Commit"
  5056        SecurityOptions:
  5057          description: |
  5058            List of security features that are enabled on the daemon, such as
  5059            apparmor, seccomp, SELinux, user-namespaces (userns), and rootless.
  5060  
  5061            Additional configuration options for each security feature may
  5062            be present, and are included as a comma-separated list of key/value
  5063            pairs.
  5064          type: "array"
  5065          items:
  5066            type: "string"
  5067          example:
  5068            - "name=apparmor"
  5069            - "name=seccomp,profile=default"
  5070            - "name=selinux"
  5071            - "name=userns"
  5072            - "name=rootless"
  5073        ProductLicense:
  5074          description: |
  5075            Reports a summary of the product license on the daemon.
  5076  
  5077            If a commercial license has been applied to the daemon, information
  5078            such as number of nodes, and expiration are included.
  5079          type: "string"
  5080          example: "Community Engine"
  5081        Warnings:
  5082          description: |
  5083            List of warnings / informational messages about missing features, or
  5084            issues related to the daemon configuration.
  5085  
  5086            These messages can be printed by the client as information to the user.
  5087          type: "array"
  5088          items:
  5089            type: "string"
  5090          example:
  5091            - "WARNING: No memory limit support"
  5092            - "WARNING: bridge-nf-call-iptables is disabled"
  5093            - "WARNING: bridge-nf-call-ip6tables is disabled"
  5094  
  5095  
  5096    # PluginsInfo is a temp struct holding Plugins name
  5097    # registered with docker daemon. It is used by Info struct
  5098    PluginsInfo:
  5099      description: |
  5100        Available plugins per type.
  5101  
  5102        <p><br /></p>
  5103  
  5104        > **Note**: Only unmanaged (V1) plugins are included in this list.
  5105        > V1 plugins are "lazily" loaded, and are not returned in this list
  5106        > if there is no resource using the plugin.
  5107      type: "object"
  5108      properties:
  5109        Volume:
  5110          description: "Names of available volume-drivers, and network-driver plugins."
  5111          type: "array"
  5112          items:
  5113            type: "string"
  5114          example: ["local"]
  5115        Network:
  5116          description: "Names of available network-drivers, and network-driver plugins."
  5117          type: "array"
  5118          items:
  5119            type: "string"
  5120          example: ["bridge", "host", "ipvlan", "macvlan", "null", "overlay"]
  5121        Authorization:
  5122          description: "Names of available authorization plugins."
  5123          type: "array"
  5124          items:
  5125            type: "string"
  5126          example: ["img-authz-plugin", "hbm"]
  5127        Log:
  5128          description: "Names of available logging-drivers, and logging-driver plugins."
  5129          type: "array"
  5130          items:
  5131            type: "string"
  5132          example: ["awslogs", "fluentd", "gcplogs", "gelf", "journald", "json-file", "splunk", "syslog"]
  5133  
  5134  
  5135    RegistryServiceConfig:
  5136      description: |
  5137        RegistryServiceConfig stores daemon registry services configuration.
  5138      type: "object"
  5139      x-nullable: true
  5140      properties:
  5141        AllowNondistributableArtifactsCIDRs:
  5142          description: |
  5143            List of IP ranges to which nondistributable artifacts can be pushed,
  5144            using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632).
  5145  
  5146            Some images (for example, Windows base images) contain artifacts
  5147            whose distribution is restricted by license. When these images are
  5148            pushed to a registry, restricted artifacts are not included.
  5149  
  5150            This configuration override this behavior, and enables the daemon to
  5151            push nondistributable artifacts to all registries whose resolved IP
  5152            address is within the subnet described by the CIDR syntax.
  5153  
  5154            This option is useful when pushing images containing
  5155            nondistributable artifacts to a registry on an air-gapped network so
  5156            hosts on that network can pull the images without connecting to
  5157            another server.
  5158  
  5159            > **Warning**: Nondistributable artifacts typically have restrictions
  5160            > on how and where they can be distributed and shared. Only use this
  5161            > feature to push artifacts to private registries and ensure that you
  5162            > are in compliance with any terms that cover redistributing
  5163            > nondistributable artifacts.
  5164  
  5165          type: "array"
  5166          items:
  5167            type: "string"
  5168          example: ["::1/128", "127.0.0.0/8"]
  5169        AllowNondistributableArtifactsHostnames:
  5170          description: |
  5171            List of registry hostnames to which nondistributable artifacts can be
  5172            pushed, using the format `<hostname>[:<port>]` or `<IP address>[:<port>]`.
  5173  
  5174            Some images (for example, Windows base images) contain artifacts
  5175            whose distribution is restricted by license. When these images are
  5176            pushed to a registry, restricted artifacts are not included.
  5177  
  5178            This configuration override this behavior for the specified
  5179            registries.
  5180  
  5181            This option is useful when pushing images containing
  5182            nondistributable artifacts to a registry on an air-gapped network so
  5183            hosts on that network can pull the images without connecting to
  5184            another server.
  5185  
  5186            > **Warning**: Nondistributable artifacts typically have restrictions
  5187            > on how and where they can be distributed and shared. Only use this
  5188            > feature to push artifacts to private registries and ensure that you
  5189            > are in compliance with any terms that cover redistributing
  5190            > nondistributable artifacts.
  5191          type: "array"
  5192          items:
  5193            type: "string"
  5194          example: ["registry.internal.corp.example.com:3000", "[2001:db8:a0b:12f0::1]:443"]
  5195        InsecureRegistryCIDRs:
  5196          description: |
  5197            List of IP ranges of insecure registries, using the CIDR syntax
  5198            ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries
  5199            accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates
  5200            from unknown CAs) communication.
  5201  
  5202            By default, local registries (`127.0.0.0/8`) are configured as
  5203            insecure. All other registries are secure. Communicating with an
  5204            insecure registry is not possible if the daemon assumes that registry
  5205            is secure.
  5206  
  5207            This configuration override this behavior, insecure communication with
  5208            registries whose resolved IP address is within the subnet described by
  5209            the CIDR syntax.
  5210  
  5211            Registries can also be marked insecure by hostname. Those registries
  5212            are listed under `IndexConfigs` and have their `Secure` field set to
  5213            `false`.
  5214  
  5215            > **Warning**: Using this option can be useful when running a local
  5216            > registry, but introduces security vulnerabilities. This option
  5217            > should therefore ONLY be used for testing purposes. For increased
  5218            > security, users should add their CA to their system's list of trusted
  5219            > CAs instead of enabling this option.
  5220          type: "array"
  5221          items:
  5222            type: "string"
  5223          example: ["::1/128", "127.0.0.0/8"]
  5224        IndexConfigs:
  5225          type: "object"
  5226          additionalProperties:
  5227            $ref: "#/definitions/IndexInfo"
  5228          example:
  5229            "127.0.0.1:5000":
  5230              "Name": "127.0.0.1:5000"
  5231              "Mirrors": []
  5232              "Secure": false
  5233              "Official": false
  5234            "[2001:db8:a0b:12f0::1]:80":
  5235              "Name": "[2001:db8:a0b:12f0::1]:80"
  5236              "Mirrors": []
  5237              "Secure": false
  5238              "Official": false
  5239            "docker.io":
  5240              Name: "docker.io"
  5241              Mirrors: ["https://hub-mirror.corp.example.com:5000/"]
  5242              Secure: true
  5243              Official: true
  5244            "registry.internal.corp.example.com:3000":
  5245              Name: "registry.internal.corp.example.com:3000"
  5246              Mirrors: []
  5247              Secure: false
  5248              Official: false
  5249        Mirrors:
  5250          description: |
  5251            List of registry URLs that act as a mirror for the official
  5252            (`docker.io`) registry.
  5253  
  5254          type: "array"
  5255          items:
  5256            type: "string"
  5257          example:
  5258            - "https://hub-mirror.corp.example.com:5000/"
  5259            - "https://[2001:db8:a0b:12f0::1]/"
  5260  
  5261    IndexInfo:
  5262      description:
  5263        IndexInfo contains information about a registry.
  5264      type: "object"
  5265      x-nullable: true
  5266      properties:
  5267        Name:
  5268          description: |
  5269            Name of the registry, such as "docker.io".
  5270          type: "string"
  5271          example: "docker.io"
  5272        Mirrors:
  5273          description: |
  5274            List of mirrors, expressed as URIs.
  5275          type: "array"
  5276          items:
  5277            type: "string"
  5278          example:
  5279            - "https://hub-mirror.corp.example.com:5000/"
  5280            - "https://registry-2.docker.io/"
  5281            - "https://registry-3.docker.io/"
  5282        Secure:
  5283          description: |
  5284            Indicates if the registry is part of the list of insecure
  5285            registries.
  5286  
  5287            If `false`, the registry is insecure. Insecure registries accept
  5288            un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from
  5289            unknown CAs) communication.
  5290  
  5291            > **Warning**: Insecure registries can be useful when running a local
  5292            > registry. However, because its use creates security vulnerabilities
  5293            > it should ONLY be enabled for testing purposes. For increased
  5294            > security, users should add their CA to their system's list of
  5295            > trusted CAs instead of enabling this option.
  5296          type: "boolean"
  5297          example: true
  5298        Official:
  5299          description: |
  5300            Indicates whether this is an official registry (i.e., Docker Hub / docker.io)
  5301          type: "boolean"
  5302          example: true
  5303  
  5304    Runtime:
  5305      description: |
  5306        Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec)
  5307        runtime.
  5308  
  5309        The runtime is invoked by the daemon via the `containerd` daemon. OCI
  5310        runtimes act as an interface to the Linux kernel namespaces, cgroups,
  5311        and SELinux.
  5312      type: "object"
  5313      properties:
  5314        path:
  5315          description: |
  5316            Name and, optional, path, of the OCI executable binary.
  5317  
  5318            If the path is omitted, the daemon searches the host's `$PATH` for the
  5319            binary and uses the first result.
  5320          type: "string"
  5321          example: "/usr/local/bin/my-oci-runtime"
  5322        runtimeArgs:
  5323          description: |
  5324            List of command-line arguments to pass to the runtime when invoked.
  5325          type: "array"
  5326          x-nullable: true
  5327          items:
  5328            type: "string"
  5329          example: ["--debug", "--systemd-cgroup=false"]
  5330  
  5331    Commit:
  5332      description: |
  5333        Commit holds the Git-commit (SHA1) that a binary was built from, as
  5334        reported in the version-string of external tools, such as `containerd`,
  5335        or `runC`.
  5336      type: "object"
  5337      properties:
  5338        ID:
  5339          description: "Actual commit ID of external tool."
  5340          type: "string"
  5341          example: "cfb82a876ecc11b5ca0977d1733adbe58599088a"
  5342        Expected:
  5343          description: |
  5344            Commit ID of external tool expected by dockerd as set at build time.
  5345          type: "string"
  5346          example: "2d41c047c83e09a6d61d464906feb2a2f3c52aa4"
  5347  
  5348    SwarmInfo:
  5349      description: |
  5350        Represents generic information about swarm.
  5351      type: "object"
  5352      properties:
  5353        NodeID:
  5354          description: "Unique identifier of for this node in the swarm."
  5355          type: "string"
  5356          default: ""
  5357          example: "k67qz4598weg5unwwffg6z1m1"
  5358        NodeAddr:
  5359          description: |
  5360            IP address at which this node can be reached by other nodes in the
  5361            swarm.
  5362          type: "string"
  5363          default: ""
  5364          example: "10.0.0.46"
  5365        LocalNodeState:
  5366          $ref: "#/definitions/LocalNodeState"
  5367        ControlAvailable:
  5368          type: "boolean"
  5369          default: false
  5370          example: true
  5371        Error:
  5372          type: "string"
  5373          default: ""
  5374        RemoteManagers:
  5375          description: |
  5376            List of ID's and addresses of other managers in the swarm.
  5377          type: "array"
  5378          default: null
  5379          x-nullable: true
  5380          items:
  5381            $ref: "#/definitions/PeerNode"
  5382          example:
  5383            - NodeID: "71izy0goik036k48jg985xnds"
  5384              Addr: "10.0.0.158:2377"
  5385            - NodeID: "79y6h1o4gv8n120drcprv5nmc"
  5386              Addr: "10.0.0.159:2377"
  5387            - NodeID: "k67qz4598weg5unwwffg6z1m1"
  5388              Addr: "10.0.0.46:2377"
  5389        Nodes:
  5390          description: "Total number of nodes in the swarm."
  5391          type: "integer"
  5392          x-nullable: true
  5393          example: 4
  5394        Managers:
  5395          description: "Total number of managers in the swarm."
  5396          type: "integer"
  5397          x-nullable: true
  5398          example: 3
  5399        Cluster:
  5400          $ref: "#/definitions/ClusterInfo"
  5401  
  5402    LocalNodeState:
  5403      description: "Current local status of this node."
  5404      type: "string"
  5405      default: ""
  5406      enum:
  5407        - ""
  5408        - "inactive"
  5409        - "pending"
  5410        - "active"
  5411        - "error"
  5412        - "locked"
  5413      example: "active"
  5414  
  5415    PeerNode:
  5416      description: "Represents a peer-node in the swarm"
  5417      type: "object"
  5418      properties:
  5419        NodeID:
  5420          description: "Unique identifier of for this node in the swarm."
  5421          type: "string"
  5422        Addr:
  5423          description: |
  5424            IP address and ports at which this node can be reached.
  5425          type: "string"
  5426  
  5427    NetworkAttachmentConfig:
  5428      description: |
  5429        Specifies how a service should be attached to a particular network.
  5430      type: "object"
  5431      properties:
  5432        Target:
  5433          description: |
  5434            The target network for attachment. Must be a network name or ID.
  5435          type: "string"
  5436        Aliases:
  5437          description: |
  5438            Discoverable alternate names for the service on this network.
  5439          type: "array"
  5440          items:
  5441            type: "string"
  5442        DriverOpts:
  5443          description: |
  5444            Driver attachment options for the network target.
  5445          type: "object"
  5446          additionalProperties:
  5447            type: "string"
  5448  
  5449    EventActor:
  5450      description: |
  5451        Actor describes something that generates events, like a container, network,
  5452        or a volume.
  5453      type: "object"
  5454      properties:
  5455        ID:
  5456          description: "The ID of the object emitting the event"
  5457          type: "string"
  5458          example: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743"
  5459        Attributes:
  5460          description: |
  5461            Various key/value attributes of the object, depending on its type.
  5462          type: "object"
  5463          additionalProperties:
  5464            type: "string"
  5465          example:
  5466            com.example.some-label: "some-label-value"
  5467            image: "alpine:latest"
  5468            name: "my-container"
  5469  
  5470    EventMessage:
  5471      description: |
  5472        EventMessage represents the information an event contains.
  5473      type: "object"
  5474      title: "SystemEventsResponse"
  5475      properties:
  5476        Type:
  5477          description: "The type of object emitting the event"
  5478          type: "string"
  5479          enum: ["builder", "config", "container", "daemon", "image", "network", "node", "plugin", "secret", "service", "volume"]
  5480          example: "container"
  5481        Action:
  5482          description: "The type of event"
  5483          type: "string"
  5484          example: "create"
  5485        Actor:
  5486          $ref: "#/definitions/EventActor"
  5487        scope:
  5488          description: |
  5489            Scope of the event. Engine events are `local` scope. Cluster (Swarm)
  5490            events are `swarm` scope.
  5491          type: "string"
  5492          enum: ["local", "swarm"]
  5493        time:
  5494          description: "Timestamp of event"
  5495          type: "integer"
  5496          format: "int64"
  5497          example: 1629574695
  5498        timeNano:
  5499          description: "Timestamp of event, with nanosecond accuracy"
  5500          type: "integer"
  5501          format: "int64"
  5502          example: 1629574695515050031
  5503  
  5504    OCIDescriptor:
  5505      type: "object"
  5506      x-go-name: Descriptor
  5507      description: |
  5508        A descriptor struct containing digest, media type, and size, as defined in
  5509        the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md).
  5510      properties:
  5511        mediaType:
  5512          description: |
  5513            The media type of the object this schema refers to.
  5514          type: "string"
  5515          example: "application/vnd.docker.distribution.manifest.v2+json"
  5516        digest:
  5517          description: |
  5518            The digest of the targeted content.
  5519          type: "string"
  5520          example: "sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96"
  5521        size:
  5522          description: |
  5523            The size in bytes of the blob.
  5524          type: "integer"
  5525          format: "int64"
  5526          example: 3987495
  5527          # TODO Not yet including these fields for now, as they are nil / omitted in our response.
  5528          # urls:
  5529          #   description: |
  5530          #     List of URLs from which this object MAY be downloaded.
  5531          #   type: "array"
  5532          #   items:
  5533          #     type: "string"
  5534          #     format: "uri"
  5535          # annotations:
  5536          #   description: |
  5537          #     Arbitrary metadata relating to the targeted content.
  5538          #   type: "object"
  5539          #   additionalProperties:
  5540          #     type: "string"
  5541          # platform:
  5542          #   $ref: "#/definitions/OCIPlatform"
  5543  
  5544    OCIPlatform:
  5545      type: "object"
  5546      x-go-name: Platform
  5547      description: |
  5548        Describes the platform which the image in the manifest runs on, as defined
  5549        in the [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md).
  5550      properties:
  5551        architecture:
  5552          description: |
  5553            The CPU architecture, for example `amd64` or `ppc64`.
  5554          type: "string"
  5555          example: "arm"
  5556        os:
  5557          description: |
  5558            The operating system, for example `linux` or `windows`.
  5559          type: "string"
  5560          example: "windows"
  5561        os.version:
  5562          description: |
  5563            Optional field specifying the operating system version, for example on
  5564            Windows `10.0.19041.1165`.
  5565          type: "string"
  5566          example: "10.0.19041.1165"
  5567        os.features:
  5568          description: |
  5569            Optional field specifying an array of strings, each listing a required
  5570            OS feature (for example on Windows `win32k`).
  5571          type: "array"
  5572          items:
  5573            type: "string"
  5574          example:
  5575            - "win32k"
  5576        variant:
  5577          description: |
  5578            Optional field specifying a variant of the CPU, for example `v7` to
  5579            specify ARMv7 when architecture is `arm`.
  5580          type: "string"
  5581          example: "v7"
  5582  
  5583    DistributionInspect:
  5584      type: "object"
  5585      x-go-name: DistributionInspect
  5586      title: "DistributionInspectResponse"
  5587      required: [Descriptor, Platforms]
  5588      description: |
  5589        Describes the result obtained from contacting the registry to retrieve
  5590        image metadata.
  5591      properties:
  5592        Descriptor:
  5593          $ref: "#/definitions/OCIDescriptor"
  5594        Platforms:
  5595          type: "array"
  5596          description: |
  5597            An array containing all platforms supported by the image.
  5598          items:
  5599            $ref: "#/definitions/OCIPlatform"
  5600  
  5601  paths:
  5602    /containers/json:
  5603      get:
  5604        summary: "List containers"
  5605        description: |
  5606          Returns a list of containers. For details on the format, see the
  5607          [inspect endpoint](#operation/ContainerInspect).
  5608  
  5609          Note that it uses a different, smaller representation of a container
  5610          than inspecting a single container. For example, the list of linked
  5611          containers is not propagated .
  5612        operationId: "ContainerList"
  5613        produces:
  5614          - "application/json"
  5615        parameters:
  5616          - name: "all"
  5617            in: "query"
  5618            description: |
  5619              Return all containers. By default, only running containers are shown.
  5620            type: "boolean"
  5621            default: false
  5622          - name: "limit"
  5623            in: "query"
  5624            description: |
  5625              Return this number of most recently created containers, including
  5626              non-running ones.
  5627            type: "integer"
  5628          - name: "size"
  5629            in: "query"
  5630            description: |
  5631              Return the size of container as fields `SizeRw` and `SizeRootFs`.
  5632            type: "boolean"
  5633            default: false
  5634          - name: "filters"
  5635            in: "query"
  5636            description: |
  5637              Filters to process on the container list, encoded as JSON (a
  5638              `map[string][]string`). For example, `{"status": ["paused"]}` will
  5639              only return paused containers.
  5640  
  5641              Available filters:
  5642  
  5643              - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`)
  5644              - `before`=(`<container id>` or `<container name>`)
  5645              - `expose`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`)
  5646              - `exited=<int>` containers with exit code of `<int>`
  5647              - `health`=(`starting`|`healthy`|`unhealthy`|`none`)
  5648              - `id=<ID>` a container's ID
  5649              - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only)
  5650              - `is-task=`(`true`|`false`)
  5651              - `label=key` or `label="key=value"` of a container label
  5652              - `name=<name>` a container's name
  5653              - `network`=(`<network id>` or `<network name>`)
  5654              - `publish`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`)
  5655              - `since`=(`<container id>` or `<container name>`)
  5656              - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`)
  5657              - `volume`=(`<volume name>` or `<mount point destination>`)
  5658            type: "string"
  5659        responses:
  5660          200:
  5661            description: "no error"
  5662            schema:
  5663              type: "array"
  5664              items:
  5665                $ref: "#/definitions/ContainerSummary"
  5666            examples:
  5667              application/json:
  5668                - Id: "8dfafdbc3a40"
  5669                  Names:
  5670                    - "/boring_feynman"
  5671                  Image: "ubuntu:latest"
  5672                  ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  5673                  Command: "echo 1"
  5674                  Created: 1367854155
  5675                  State: "Exited"
  5676                  Status: "Exit 0"
  5677                  Ports:
  5678                    - PrivatePort: 2222
  5679                      PublicPort: 3333
  5680                      Type: "tcp"
  5681                  Labels:
  5682                    com.example.vendor: "Acme"
  5683                    com.example.license: "GPL"
  5684                    com.example.version: "1.0"
  5685                  SizeRw: 12288
  5686                  SizeRootFs: 0
  5687                  HostConfig:
  5688                    NetworkMode: "default"
  5689                  NetworkSettings:
  5690                    Networks:
  5691                      bridge:
  5692                        NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  5693                        EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f"
  5694                        Gateway: "172.17.0.1"
  5695                        IPAddress: "172.17.0.2"
  5696                        IPPrefixLen: 16
  5697                        IPv6Gateway: ""
  5698                        GlobalIPv6Address: ""
  5699                        GlobalIPv6PrefixLen: 0
  5700                        MacAddress: "02:42:ac:11:00:02"
  5701                  Mounts:
  5702                    - Name: "fac362...80535"
  5703                      Source: "/data"
  5704                      Destination: "/data"
  5705                      Driver: "local"
  5706                      Mode: "ro,Z"
  5707                      RW: false
  5708                      Propagation: ""
  5709                - Id: "9cd87474be90"
  5710                  Names:
  5711                    - "/coolName"
  5712                  Image: "ubuntu:latest"
  5713                  ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  5714                  Command: "echo 222222"
  5715                  Created: 1367854155
  5716                  State: "Exited"
  5717                  Status: "Exit 0"
  5718                  Ports: []
  5719                  Labels: {}
  5720                  SizeRw: 12288
  5721                  SizeRootFs: 0
  5722                  HostConfig:
  5723                    NetworkMode: "default"
  5724                  NetworkSettings:
  5725                    Networks:
  5726                      bridge:
  5727                        NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  5728                        EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a"
  5729                        Gateway: "172.17.0.1"
  5730                        IPAddress: "172.17.0.8"
  5731                        IPPrefixLen: 16
  5732                        IPv6Gateway: ""
  5733                        GlobalIPv6Address: ""
  5734                        GlobalIPv6PrefixLen: 0
  5735                        MacAddress: "02:42:ac:11:00:08"
  5736                  Mounts: []
  5737                - Id: "3176a2479c92"
  5738                  Names:
  5739                    - "/sleepy_dog"
  5740                  Image: "ubuntu:latest"
  5741                  ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  5742                  Command: "echo 3333333333333333"
  5743                  Created: 1367854154
  5744                  State: "Exited"
  5745                  Status: "Exit 0"
  5746                  Ports: []
  5747                  Labels: {}
  5748                  SizeRw: 12288
  5749                  SizeRootFs: 0
  5750                  HostConfig:
  5751                    NetworkMode: "default"
  5752                  NetworkSettings:
  5753                    Networks:
  5754                      bridge:
  5755                        NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  5756                        EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d"
  5757                        Gateway: "172.17.0.1"
  5758                        IPAddress: "172.17.0.6"
  5759                        IPPrefixLen: 16
  5760                        IPv6Gateway: ""
  5761                        GlobalIPv6Address: ""
  5762                        GlobalIPv6PrefixLen: 0
  5763                        MacAddress: "02:42:ac:11:00:06"
  5764                  Mounts: []
  5765                - Id: "4cb07b47f9fb"
  5766                  Names:
  5767                    - "/running_cat"
  5768                  Image: "ubuntu:latest"
  5769                  ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  5770                  Command: "echo 444444444444444444444444444444444"
  5771                  Created: 1367854152
  5772                  State: "Exited"
  5773                  Status: "Exit 0"
  5774                  Ports: []
  5775                  Labels: {}
  5776                  SizeRw: 12288
  5777                  SizeRootFs: 0
  5778                  HostConfig:
  5779                    NetworkMode: "default"
  5780                  NetworkSettings:
  5781                    Networks:
  5782                      bridge:
  5783                        NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  5784                        EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9"
  5785                        Gateway: "172.17.0.1"
  5786                        IPAddress: "172.17.0.5"
  5787                        IPPrefixLen: 16
  5788                        IPv6Gateway: ""
  5789                        GlobalIPv6Address: ""
  5790                        GlobalIPv6PrefixLen: 0
  5791                        MacAddress: "02:42:ac:11:00:05"
  5792                  Mounts: []
  5793          400:
  5794            description: "bad parameter"
  5795            schema:
  5796              $ref: "#/definitions/ErrorResponse"
  5797          500:
  5798            description: "server error"
  5799            schema:
  5800              $ref: "#/definitions/ErrorResponse"
  5801        tags: ["Container"]
  5802    /containers/create:
  5803      post:
  5804        summary: "Create a container"
  5805        operationId: "ContainerCreate"
  5806        consumes:
  5807          - "application/json"
  5808          - "application/octet-stream"
  5809        produces:
  5810          - "application/json"
  5811        parameters:
  5812          - name: "name"
  5813            in: "query"
  5814            description: |
  5815              Assign the specified name to the container. Must match
  5816              `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`.
  5817            type: "string"
  5818            pattern: "^/?[a-zA-Z0-9][a-zA-Z0-9_.-]+$"
  5819          - name: "body"
  5820            in: "body"
  5821            description: "Container to create"
  5822            schema:
  5823              allOf:
  5824                - $ref: "#/definitions/ContainerConfig"
  5825                - type: "object"
  5826                  properties:
  5827                    HostConfig:
  5828                      $ref: "#/definitions/HostConfig"
  5829                    NetworkingConfig:
  5830                      $ref: "#/definitions/NetworkingConfig"
  5831              example:
  5832                Hostname: ""
  5833                Domainname: ""
  5834                User: ""
  5835                AttachStdin: false
  5836                AttachStdout: true
  5837                AttachStderr: true
  5838                Tty: false
  5839                OpenStdin: false
  5840                StdinOnce: false
  5841                Env:
  5842                  - "FOO=bar"
  5843                  - "BAZ=quux"
  5844                Cmd:
  5845                  - "date"
  5846                Entrypoint: ""
  5847                Image: "ubuntu"
  5848                Labels:
  5849                  com.example.vendor: "Acme"
  5850                  com.example.license: "GPL"
  5851                  com.example.version: "1.0"
  5852                Volumes:
  5853                  /volumes/data: {}
  5854                WorkingDir: ""
  5855                NetworkDisabled: false
  5856                MacAddress: "12:34:56:78:9a:bc"
  5857                ExposedPorts:
  5858                  22/tcp: {}
  5859                StopSignal: "SIGTERM"
  5860                StopTimeout: 10
  5861                HostConfig:
  5862                  Binds:
  5863                    - "/tmp:/tmp"
  5864                  Links:
  5865                    - "redis3:redis"
  5866                  Memory: 0
  5867                  MemorySwap: 0
  5868                  MemoryReservation: 0
  5869                  KernelMemory: 0
  5870                  NanoCpus: 500000
  5871                  CpuPercent: 80
  5872                  CpuShares: 512
  5873                  CpuPeriod: 100000
  5874                  CpuRealtimePeriod: 1000000
  5875                  CpuRealtimeRuntime: 10000
  5876                  CpuQuota: 50000
  5877                  CpusetCpus: "0,1"
  5878                  CpusetMems: "0,1"
  5879                  MaximumIOps: 0
  5880                  MaximumIOBps: 0
  5881                  BlkioWeight: 300
  5882                  BlkioWeightDevice:
  5883                    - {}
  5884                  BlkioDeviceReadBps:
  5885                    - {}
  5886                  BlkioDeviceReadIOps:
  5887                    - {}
  5888                  BlkioDeviceWriteBps:
  5889                    - {}
  5890                  BlkioDeviceWriteIOps:
  5891                    - {}
  5892                  DeviceRequests:
  5893                    - Driver: "nvidia"
  5894                      Count: -1
  5895                      DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"]
  5896                      Capabilities: [["gpu", "nvidia", "compute"]]
  5897                      Options:
  5898                        property1: "string"
  5899                        property2: "string"
  5900                  MemorySwappiness: 60
  5901                  OomKillDisable: false
  5902                  OomScoreAdj: 500
  5903                  PidMode: ""
  5904                  PidsLimit: 0
  5905                  PortBindings:
  5906                    22/tcp:
  5907                      - HostPort: "11022"
  5908                  PublishAllPorts: false
  5909                  Privileged: false
  5910                  ReadonlyRootfs: false
  5911                  Dns:
  5912                    - "8.8.8.8"
  5913                  DnsOptions:
  5914                    - ""
  5915                  DnsSearch:
  5916                    - ""
  5917                  VolumesFrom:
  5918                    - "parent"
  5919                    - "other:ro"
  5920                  CapAdd:
  5921                    - "NET_ADMIN"
  5922                  CapDrop:
  5923                    - "MKNOD"
  5924                  GroupAdd:
  5925                    - "newgroup"
  5926                  RestartPolicy:
  5927                    Name: ""
  5928                    MaximumRetryCount: 0
  5929                  AutoRemove: true
  5930                  NetworkMode: "bridge"
  5931                  Devices: []
  5932                  Ulimits:
  5933                    - {}
  5934                  LogConfig:
  5935                    Type: "json-file"
  5936                    Config: {}
  5937                  SecurityOpt: []
  5938                  StorageOpt: {}
  5939                  CgroupParent: ""
  5940                  VolumeDriver: ""
  5941                  ShmSize: 67108864
  5942                NetworkingConfig:
  5943                  EndpointsConfig:
  5944                    isolated_nw:
  5945                      IPAMConfig:
  5946                        IPv4Address: "172.20.30.33"
  5947                        IPv6Address: "2001:db8:abcd::3033"
  5948                        LinkLocalIPs:
  5949                          - "169.254.34.68"
  5950                          - "fe80::3468"
  5951                      Links:
  5952                        - "container_1"
  5953                        - "container_2"
  5954                      Aliases:
  5955                        - "server_x"
  5956                        - "server_y"
  5957  
  5958            required: true
  5959        responses:
  5960          201:
  5961            description: "Container created successfully"
  5962            schema:
  5963              type: "object"
  5964              title: "ContainerCreateResponse"
  5965              description: "OK response to ContainerCreate operation"
  5966              required: [Id, Warnings]
  5967              properties:
  5968                Id:
  5969                  description: "The ID of the created container"
  5970                  type: "string"
  5971                  x-nullable: false
  5972                Warnings:
  5973                  description: "Warnings encountered when creating the container"
  5974                  type: "array"
  5975                  x-nullable: false
  5976                  items:
  5977                    type: "string"
  5978            examples:
  5979              application/json:
  5980                Id: "e90e34656806"
  5981                Warnings: []
  5982          400:
  5983            description: "bad parameter"
  5984            schema:
  5985              $ref: "#/definitions/ErrorResponse"
  5986          404:
  5987            description: "no such image"
  5988            schema:
  5989              $ref: "#/definitions/ErrorResponse"
  5990            examples:
  5991              application/json:
  5992                message: "No such image: c2ada9df5af8"
  5993          409:
  5994            description: "conflict"
  5995            schema:
  5996              $ref: "#/definitions/ErrorResponse"
  5997          500:
  5998            description: "server error"
  5999            schema:
  6000              $ref: "#/definitions/ErrorResponse"
  6001        tags: ["Container"]
  6002    /containers/{id}/json:
  6003      get:
  6004        summary: "Inspect a container"
  6005        description: "Return low-level information about a container."
  6006        operationId: "ContainerInspect"
  6007        produces:
  6008          - "application/json"
  6009        responses:
  6010          200:
  6011            description: "no error"
  6012            schema:
  6013              type: "object"
  6014              title: "ContainerInspectResponse"
  6015              properties:
  6016                Id:
  6017                  description: "The ID of the container"
  6018                  type: "string"
  6019                Created:
  6020                  description: "The time the container was created"
  6021                  type: "string"
  6022                Path:
  6023                  description: "The path to the command being run"
  6024                  type: "string"
  6025                Args:
  6026                  description: "The arguments to the command being run"
  6027                  type: "array"
  6028                  items:
  6029                    type: "string"
  6030                State:
  6031                  $ref: "#/definitions/ContainerState"
  6032                Image:
  6033                  description: "The container's image ID"
  6034                  type: "string"
  6035                ResolvConfPath:
  6036                  type: "string"
  6037                HostnamePath:
  6038                  type: "string"
  6039                HostsPath:
  6040                  type: "string"
  6041                LogPath:
  6042                  type: "string"
  6043                Name:
  6044                  type: "string"
  6045                RestartCount:
  6046                  type: "integer"
  6047                Driver:
  6048                  type: "string"
  6049                Platform:
  6050                  type: "string"
  6051                MountLabel:
  6052                  type: "string"
  6053                ProcessLabel:
  6054                  type: "string"
  6055                AppArmorProfile:
  6056                  type: "string"
  6057                ExecIDs:
  6058                  description: "IDs of exec instances that are running in the container."
  6059                  type: "array"
  6060                  items:
  6061                    type: "string"
  6062                  x-nullable: true
  6063                HostConfig:
  6064                  $ref: "#/definitions/HostConfig"
  6065                GraphDriver:
  6066                  $ref: "#/definitions/GraphDriverData"
  6067                SizeRw:
  6068                  description: |
  6069                    The size of files that have been created or changed by this
  6070                    container.
  6071                  type: "integer"
  6072                  format: "int64"
  6073                SizeRootFs:
  6074                  description: "The total size of all the files in this container."
  6075                  type: "integer"
  6076                  format: "int64"
  6077                Mounts:
  6078                  type: "array"
  6079                  items:
  6080                    $ref: "#/definitions/MountPoint"
  6081                Config:
  6082                  $ref: "#/definitions/ContainerConfig"
  6083                NetworkSettings:
  6084                  $ref: "#/definitions/NetworkSettings"
  6085            examples:
  6086              application/json:
  6087                AppArmorProfile: ""
  6088                Args:
  6089                  - "-c"
  6090                  - "exit 9"
  6091                Config:
  6092                  AttachStderr: true
  6093                  AttachStdin: false
  6094                  AttachStdout: true
  6095                  Cmd:
  6096                    - "/bin/sh"
  6097                    - "-c"
  6098                    - "exit 9"
  6099                  Domainname: ""
  6100                  Env:
  6101                    - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  6102                  Healthcheck:
  6103                    Test: ["CMD-SHELL", "exit 0"]
  6104                  Hostname: "ba033ac44011"
  6105                  Image: "ubuntu"
  6106                  Labels:
  6107                    com.example.vendor: "Acme"
  6108                    com.example.license: "GPL"
  6109                    com.example.version: "1.0"
  6110                  MacAddress: ""
  6111                  NetworkDisabled: false
  6112                  OpenStdin: false
  6113                  StdinOnce: false
  6114                  Tty: false
  6115                  User: ""
  6116                  Volumes:
  6117                    /volumes/data: {}
  6118                  WorkingDir: ""
  6119                  StopSignal: "SIGTERM"
  6120                  StopTimeout: 10
  6121                Created: "2015-01-06T15:47:31.485331387Z"
  6122                Driver: "overlay2"
  6123                ExecIDs:
  6124                  - "b35395de42bc8abd327f9dd65d913b9ba28c74d2f0734eeeae84fa1c616a0fca"
  6125                  - "3fc1232e5cd20c8de182ed81178503dc6437f4e7ef12b52cc5e8de020652f1c4"
  6126                HostConfig:
  6127                  MaximumIOps: 0
  6128                  MaximumIOBps: 0
  6129                  BlkioWeight: 0
  6130                  BlkioWeightDevice:
  6131                    - {}
  6132                  BlkioDeviceReadBps:
  6133                    - {}
  6134                  BlkioDeviceWriteBps:
  6135                    - {}
  6136                  BlkioDeviceReadIOps:
  6137                    - {}
  6138                  BlkioDeviceWriteIOps:
  6139                    - {}
  6140                  ContainerIDFile: ""
  6141                  CpusetCpus: ""
  6142                  CpusetMems: ""
  6143                  CpuPercent: 80
  6144                  CpuShares: 0
  6145                  CpuPeriod: 100000
  6146                  CpuRealtimePeriod: 1000000
  6147                  CpuRealtimeRuntime: 10000
  6148                  Devices: []
  6149                  DeviceRequests:
  6150                    - Driver: "nvidia"
  6151                      Count: -1
  6152                      DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"]
  6153                      Capabilities: [["gpu", "nvidia", "compute"]]
  6154                      Options:
  6155                        property1: "string"
  6156                        property2: "string"
  6157                  IpcMode: ""
  6158                  Memory: 0
  6159                  MemorySwap: 0
  6160                  MemoryReservation: 0
  6161                  KernelMemory: 0
  6162                  OomKillDisable: false
  6163                  OomScoreAdj: 500
  6164                  NetworkMode: "bridge"
  6165                  PidMode: ""
  6166                  PortBindings: {}
  6167                  Privileged: false
  6168                  ReadonlyRootfs: false
  6169                  PublishAllPorts: false
  6170                  RestartPolicy:
  6171                    MaximumRetryCount: 2
  6172                    Name: "on-failure"
  6173                  LogConfig:
  6174                    Type: "json-file"
  6175                  Sysctls:
  6176                    net.ipv4.ip_forward: "1"
  6177                  Ulimits:
  6178                    - {}
  6179                  VolumeDriver: ""
  6180                  ShmSize: 67108864
  6181                HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname"
  6182                HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts"
  6183                LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log"
  6184                Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39"
  6185                Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2"
  6186                MountLabel: ""
  6187                Name: "/boring_euclid"
  6188                NetworkSettings:
  6189                  Bridge: ""
  6190                  SandboxID: ""
  6191                  HairpinMode: false
  6192                  LinkLocalIPv6Address: ""
  6193                  LinkLocalIPv6PrefixLen: 0
  6194                  SandboxKey: ""
  6195                  EndpointID: ""
  6196                  Gateway: ""
  6197                  GlobalIPv6Address: ""
  6198                  GlobalIPv6PrefixLen: 0
  6199                  IPAddress: ""
  6200                  IPPrefixLen: 0
  6201                  IPv6Gateway: ""
  6202                  MacAddress: ""
  6203                  Networks:
  6204                    bridge:
  6205                      NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  6206                      EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d"
  6207                      Gateway: "172.17.0.1"
  6208                      IPAddress: "172.17.0.2"
  6209                      IPPrefixLen: 16
  6210                      IPv6Gateway: ""
  6211                      GlobalIPv6Address: ""
  6212                      GlobalIPv6PrefixLen: 0
  6213                      MacAddress: "02:42:ac:12:00:02"
  6214                Path: "/bin/sh"
  6215                ProcessLabel: ""
  6216                ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf"
  6217                RestartCount: 1
  6218                State:
  6219                  Error: ""
  6220                  ExitCode: 9
  6221                  FinishedAt: "2015-01-06T15:47:32.080254511Z"
  6222                  Health:
  6223                    Status: "healthy"
  6224                    FailingStreak: 0
  6225                    Log:
  6226                      - Start: "2019-12-22T10:59:05.6385933Z"
  6227                        End: "2019-12-22T10:59:05.8078452Z"
  6228                        ExitCode: 0
  6229                        Output: ""
  6230                  OOMKilled: false
  6231                  Dead: false
  6232                  Paused: false
  6233                  Pid: 0
  6234                  Restarting: false
  6235                  Running: true
  6236                  StartedAt: "2015-01-06T15:47:32.072697474Z"
  6237                  Status: "running"
  6238                Mounts:
  6239                  - Name: "fac362...80535"
  6240                    Source: "/data"
  6241                    Destination: "/data"
  6242                    Driver: "local"
  6243                    Mode: "ro,Z"
  6244                    RW: false
  6245                    Propagation: ""
  6246          404:
  6247            description: "no such container"
  6248            schema:
  6249              $ref: "#/definitions/ErrorResponse"
  6250            examples:
  6251              application/json:
  6252                message: "No such container: c2ada9df5af8"
  6253          500:
  6254            description: "server error"
  6255            schema:
  6256              $ref: "#/definitions/ErrorResponse"
  6257        parameters:
  6258          - name: "id"
  6259            in: "path"
  6260            required: true
  6261            description: "ID or name of the container"
  6262            type: "string"
  6263          - name: "size"
  6264            in: "query"
  6265            type: "boolean"
  6266            default: false
  6267            description: "Return the size of container as fields `SizeRw` and `SizeRootFs`"
  6268        tags: ["Container"]
  6269    /containers/{id}/top:
  6270      get:
  6271        summary: "List processes running inside a container"
  6272        description: |
  6273          On Unix systems, this is done by running the `ps` command. This endpoint
  6274          is not supported on Windows.
  6275        operationId: "ContainerTop"
  6276        responses:
  6277          200:
  6278            description: "no error"
  6279            schema:
  6280              type: "object"
  6281              title: "ContainerTopResponse"
  6282              description: "OK response to ContainerTop operation"
  6283              properties:
  6284                Titles:
  6285                  description: "The ps column titles"
  6286                  type: "array"
  6287                  items:
  6288                    type: "string"
  6289                Processes:
  6290                  description: |
  6291                    Each process running in the container, where each is process
  6292                    is an array of values corresponding to the titles.
  6293                  type: "array"
  6294                  items:
  6295                    type: "array"
  6296                    items:
  6297                      type: "string"
  6298            examples:
  6299              application/json:
  6300                Titles:
  6301                  - "UID"
  6302                  - "PID"
  6303                  - "PPID"
  6304                  - "C"
  6305                  - "STIME"
  6306                  - "TTY"
  6307                  - "TIME"
  6308                  - "CMD"
  6309                Processes:
  6310                  -
  6311                    - "root"
  6312                    - "13642"
  6313                    - "882"
  6314                    - "0"
  6315                    - "17:03"
  6316                    - "pts/0"
  6317                    - "00:00:00"
  6318                    - "/bin/bash"
  6319                  -
  6320                    - "root"
  6321                    - "13735"
  6322                    - "13642"
  6323                    - "0"
  6324                    - "17:06"
  6325                    - "pts/0"
  6326                    - "00:00:00"
  6327                    - "sleep 10"
  6328          404:
  6329            description: "no such container"
  6330            schema:
  6331              $ref: "#/definitions/ErrorResponse"
  6332            examples:
  6333              application/json:
  6334                message: "No such container: c2ada9df5af8"
  6335          500:
  6336            description: "server error"
  6337            schema:
  6338              $ref: "#/definitions/ErrorResponse"
  6339        parameters:
  6340          - name: "id"
  6341            in: "path"
  6342            required: true
  6343            description: "ID or name of the container"
  6344            type: "string"
  6345          - name: "ps_args"
  6346            in: "query"
  6347            description: "The arguments to pass to `ps`. For example, `aux`"
  6348            type: "string"
  6349            default: "-ef"
  6350        tags: ["Container"]
  6351    /containers/{id}/logs:
  6352      get:
  6353        summary: "Get container logs"
  6354        description: |
  6355          Get `stdout` and `stderr` logs from a container.
  6356  
  6357          Note: This endpoint works only for containers with the `json-file` or
  6358          `journald` logging driver.
  6359        operationId: "ContainerLogs"
  6360        responses:
  6361          200:
  6362            description: |
  6363              logs returned as a stream in response body.
  6364              For the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach).
  6365              Note that unlike the attach endpoint, the logs endpoint does not
  6366              upgrade the connection and does not set Content-Type.
  6367            schema:
  6368              type: "string"
  6369              format: "binary"
  6370          404:
  6371            description: "no such container"
  6372            schema:
  6373              $ref: "#/definitions/ErrorResponse"
  6374            examples:
  6375              application/json:
  6376                message: "No such container: c2ada9df5af8"
  6377          500:
  6378            description: "server error"
  6379            schema:
  6380              $ref: "#/definitions/ErrorResponse"
  6381        parameters:
  6382          - name: "id"
  6383            in: "path"
  6384            required: true
  6385            description: "ID or name of the container"
  6386            type: "string"
  6387          - name: "follow"
  6388            in: "query"
  6389            description: "Keep connection after returning logs."
  6390            type: "boolean"
  6391            default: false
  6392          - name: "stdout"
  6393            in: "query"
  6394            description: "Return logs from `stdout`"
  6395            type: "boolean"
  6396            default: false
  6397          - name: "stderr"
  6398            in: "query"
  6399            description: "Return logs from `stderr`"
  6400            type: "boolean"
  6401            default: false
  6402          - name: "since"
  6403            in: "query"
  6404            description: "Only return logs since this time, as a UNIX timestamp"
  6405            type: "integer"
  6406            default: 0
  6407          - name: "until"
  6408            in: "query"
  6409            description: "Only return logs before this time, as a UNIX timestamp"
  6410            type: "integer"
  6411            default: 0
  6412          - name: "timestamps"
  6413            in: "query"
  6414            description: "Add timestamps to every log line"
  6415            type: "boolean"
  6416            default: false
  6417          - name: "tail"
  6418            in: "query"
  6419            description: |
  6420              Only return this number of log lines from the end of the logs.
  6421              Specify as an integer or `all` to output all log lines.
  6422            type: "string"
  6423            default: "all"
  6424        tags: ["Container"]
  6425    /containers/{id}/changes:
  6426      get:
  6427        summary: "Get changes on a container’s filesystem"
  6428        description: |
  6429          Returns which files in a container's filesystem have been added, deleted,
  6430          or modified. The `Kind` of modification can be one of:
  6431  
  6432          - `0`: Modified
  6433          - `1`: Added
  6434          - `2`: Deleted
  6435        operationId: "ContainerChanges"
  6436        produces: ["application/json"]
  6437        responses:
  6438          200:
  6439            description: "The list of changes"
  6440            schema:
  6441              type: "array"
  6442              items:
  6443                type: "object"
  6444                x-go-name: "ContainerChangeResponseItem"
  6445                title: "ContainerChangeResponseItem"
  6446                description: "change item in response to ContainerChanges operation"
  6447                required: [Path, Kind]
  6448                properties:
  6449                  Path:
  6450                    description: "Path to file that has changed"
  6451                    type: "string"
  6452                    x-nullable: false
  6453                  Kind:
  6454                    description: "Kind of change"
  6455                    type: "integer"
  6456                    format: "uint8"
  6457                    enum: [0, 1, 2]
  6458                    x-nullable: false
  6459            examples:
  6460              application/json:
  6461                - Path: "/dev"
  6462                  Kind: 0
  6463                - Path: "/dev/kmsg"
  6464                  Kind: 1
  6465                - Path: "/test"
  6466                  Kind: 1
  6467          404:
  6468            description: "no such container"
  6469            schema:
  6470              $ref: "#/definitions/ErrorResponse"
  6471            examples:
  6472              application/json:
  6473                message: "No such container: c2ada9df5af8"
  6474          500:
  6475            description: "server error"
  6476            schema:
  6477              $ref: "#/definitions/ErrorResponse"
  6478        parameters:
  6479          - name: "id"
  6480            in: "path"
  6481            required: true
  6482            description: "ID or name of the container"
  6483            type: "string"
  6484        tags: ["Container"]
  6485    /containers/{id}/export:
  6486      get:
  6487        summary: "Export a container"
  6488        description: "Export the contents of a container as a tarball."
  6489        operationId: "ContainerExport"
  6490        produces:
  6491          - "application/octet-stream"
  6492        responses:
  6493          200:
  6494            description: "no error"
  6495          404:
  6496            description: "no such container"
  6497            schema:
  6498              $ref: "#/definitions/ErrorResponse"
  6499            examples:
  6500              application/json:
  6501                message: "No such container: c2ada9df5af8"
  6502          500:
  6503            description: "server error"
  6504            schema:
  6505              $ref: "#/definitions/ErrorResponse"
  6506        parameters:
  6507          - name: "id"
  6508            in: "path"
  6509            required: true
  6510            description: "ID or name of the container"
  6511            type: "string"
  6512        tags: ["Container"]
  6513    /containers/{id}/stats:
  6514      get:
  6515        summary: "Get container stats based on resource usage"
  6516        description: |
  6517          This endpoint returns a live stream of a container’s resource usage
  6518          statistics.
  6519  
  6520          The `precpu_stats` is the CPU statistic of the *previous* read, and is
  6521          used to calculate the CPU usage percentage. It is not an exact copy
  6522          of the `cpu_stats` field.
  6523  
  6524          If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is
  6525          nil then for compatibility with older daemons the length of the
  6526          corresponding `cpu_usage.percpu_usage` array should be used.
  6527  
  6528          To calculate the values shown by the `stats` command of the docker cli tool
  6529          the following formulas can be used:
  6530          * used_memory = `memory_stats.usage - memory_stats.stats.cache`
  6531          * available_memory = `memory_stats.limit`
  6532          * Memory usage % = `(used_memory / available_memory) * 100.0`
  6533          * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
  6534          * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
  6535          * number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
  6536          * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
  6537        operationId: "ContainerStats"
  6538        produces: ["application/json"]
  6539        responses:
  6540          200:
  6541            description: "no error"
  6542            schema:
  6543              type: "object"
  6544            examples:
  6545              application/json:
  6546                read: "2015-01-08T22:57:31.547920715Z"
  6547                pids_stats:
  6548                  current: 3
  6549                networks:
  6550                  eth0:
  6551                    rx_bytes: 5338
  6552                    rx_dropped: 0
  6553                    rx_errors: 0
  6554                    rx_packets: 36
  6555                    tx_bytes: 648
  6556                    tx_dropped: 0
  6557                    tx_errors: 0
  6558                    tx_packets: 8
  6559                  eth5:
  6560                    rx_bytes: 4641
  6561                    rx_dropped: 0
  6562                    rx_errors: 0
  6563                    rx_packets: 26
  6564                    tx_bytes: 690
  6565                    tx_dropped: 0
  6566                    tx_errors: 0
  6567                    tx_packets: 9
  6568                memory_stats:
  6569                  stats:
  6570                    total_pgmajfault: 0
  6571                    cache: 0
  6572                    mapped_file: 0
  6573                    total_inactive_file: 0
  6574                    pgpgout: 414
  6575                    rss: 6537216
  6576                    total_mapped_file: 0
  6577                    writeback: 0
  6578                    unevictable: 0
  6579                    pgpgin: 477
  6580                    total_unevictable: 0
  6581                    pgmajfault: 0
  6582                    total_rss: 6537216
  6583                    total_rss_huge: 6291456
  6584                    total_writeback: 0
  6585                    total_inactive_anon: 0
  6586                    rss_huge: 6291456
  6587                    hierarchical_memory_limit: 67108864
  6588                    total_pgfault: 964
  6589                    total_active_file: 0
  6590                    active_anon: 6537216
  6591                    total_active_anon: 6537216
  6592                    total_pgpgout: 414
  6593                    total_cache: 0
  6594                    inactive_anon: 0
  6595                    active_file: 0
  6596                    pgfault: 964
  6597                    inactive_file: 0
  6598                    total_pgpgin: 477
  6599                  max_usage: 6651904
  6600                  usage: 6537216
  6601                  failcnt: 0
  6602                  limit: 67108864
  6603                blkio_stats: {}
  6604                cpu_stats:
  6605                  cpu_usage:
  6606                    percpu_usage:
  6607                      - 8646879
  6608                      - 24472255
  6609                      - 36438778
  6610                      - 30657443
  6611                    usage_in_usermode: 50000000
  6612                    total_usage: 100215355
  6613                    usage_in_kernelmode: 30000000
  6614                  system_cpu_usage: 739306590000000
  6615                  online_cpus: 4
  6616                  throttling_data:
  6617                    periods: 0
  6618                    throttled_periods: 0
  6619                    throttled_time: 0
  6620                precpu_stats:
  6621                  cpu_usage:
  6622                    percpu_usage:
  6623                      - 8646879
  6624                      - 24350896
  6625                      - 36438778
  6626                      - 30657443
  6627                    usage_in_usermode: 50000000
  6628                    total_usage: 100093996
  6629                    usage_in_kernelmode: 30000000
  6630                  system_cpu_usage: 9492140000000
  6631                  online_cpus: 4
  6632                  throttling_data:
  6633                    periods: 0
  6634                    throttled_periods: 0
  6635                    throttled_time: 0
  6636          404:
  6637            description: "no such container"
  6638            schema:
  6639              $ref: "#/definitions/ErrorResponse"
  6640            examples:
  6641              application/json:
  6642                message: "No such container: c2ada9df5af8"
  6643          500:
  6644            description: "server error"
  6645            schema:
  6646              $ref: "#/definitions/ErrorResponse"
  6647        parameters:
  6648          - name: "id"
  6649            in: "path"
  6650            required: true
  6651            description: "ID or name of the container"
  6652            type: "string"
  6653          - name: "stream"
  6654            in: "query"
  6655            description: |
  6656              Stream the output. If false, the stats will be output once and then
  6657              it will disconnect.
  6658            type: "boolean"
  6659            default: true
  6660        tags: ["Container"]
  6661    /containers/{id}/resize:
  6662      post:
  6663        summary: "Resize a container TTY"
  6664        description: "Resize the TTY for a container."
  6665        operationId: "ContainerResize"
  6666        consumes:
  6667          - "application/octet-stream"
  6668        produces:
  6669          - "text/plain"
  6670        responses:
  6671          200:
  6672            description: "no error"
  6673          404:
  6674            description: "no such container"
  6675            schema:
  6676              $ref: "#/definitions/ErrorResponse"
  6677            examples:
  6678              application/json:
  6679                message: "No such container: c2ada9df5af8"
  6680          500:
  6681            description: "cannot resize container"
  6682            schema:
  6683              $ref: "#/definitions/ErrorResponse"
  6684        parameters:
  6685          - name: "id"
  6686            in: "path"
  6687            required: true
  6688            description: "ID or name of the container"
  6689            type: "string"
  6690          - name: "h"
  6691            in: "query"
  6692            description: "Height of the TTY session in characters"
  6693            type: "integer"
  6694          - name: "w"
  6695            in: "query"
  6696            description: "Width of the TTY session in characters"
  6697            type: "integer"
  6698        tags: ["Container"]
  6699    /containers/{id}/start:
  6700      post:
  6701        summary: "Start a container"
  6702        operationId: "ContainerStart"
  6703        responses:
  6704          204:
  6705            description: "no error"
  6706          304:
  6707            description: "container already started"
  6708          404:
  6709            description: "no such container"
  6710            schema:
  6711              $ref: "#/definitions/ErrorResponse"
  6712            examples:
  6713              application/json:
  6714                message: "No such container: c2ada9df5af8"
  6715          500:
  6716            description: "server error"
  6717            schema:
  6718              $ref: "#/definitions/ErrorResponse"
  6719        parameters:
  6720          - name: "id"
  6721            in: "path"
  6722            required: true
  6723            description: "ID or name of the container"
  6724            type: "string"
  6725          - name: "detachKeys"
  6726            in: "query"
  6727            description: |
  6728              Override the key sequence for detaching a container. Format is a
  6729              single character `[a-Z]` or `ctrl-<value>` where `<value>` is one
  6730              of: `a-z`, `@`, `^`, `[`, `,` or `_`.
  6731            type: "string"
  6732        tags: ["Container"]
  6733    /containers/{id}/stop:
  6734      post:
  6735        summary: "Stop a container"
  6736        operationId: "ContainerStop"
  6737        responses:
  6738          204:
  6739            description: "no error"
  6740          304:
  6741            description: "container already stopped"
  6742          404:
  6743            description: "no such container"
  6744            schema:
  6745              $ref: "#/definitions/ErrorResponse"
  6746            examples:
  6747              application/json:
  6748                message: "No such container: c2ada9df5af8"
  6749          500:
  6750            description: "server error"
  6751            schema:
  6752              $ref: "#/definitions/ErrorResponse"
  6753        parameters:
  6754          - name: "id"
  6755            in: "path"
  6756            required: true
  6757            description: "ID or name of the container"
  6758            type: "string"
  6759          - name: "t"
  6760            in: "query"
  6761            description: "Number of seconds to wait before killing the container"
  6762            type: "integer"
  6763        tags: ["Container"]
  6764    /containers/{id}/restart:
  6765      post:
  6766        summary: "Restart a container"
  6767        operationId: "ContainerRestart"
  6768        responses:
  6769          204:
  6770            description: "no error"
  6771          404:
  6772            description: "no such container"
  6773            schema:
  6774              $ref: "#/definitions/ErrorResponse"
  6775            examples:
  6776              application/json:
  6777                message: "No such container: c2ada9df5af8"
  6778          500:
  6779            description: "server error"
  6780            schema:
  6781              $ref: "#/definitions/ErrorResponse"
  6782        parameters:
  6783          - name: "id"
  6784            in: "path"
  6785            required: true
  6786            description: "ID or name of the container"
  6787            type: "string"
  6788          - name: "t"
  6789            in: "query"
  6790            description: "Number of seconds to wait before killing the container"
  6791            type: "integer"
  6792        tags: ["Container"]
  6793    /containers/{id}/kill:
  6794      post:
  6795        summary: "Kill a container"
  6796        description: |
  6797          Send a POSIX signal to a container, defaulting to killing to the
  6798          container.
  6799        operationId: "ContainerKill"
  6800        responses:
  6801          204:
  6802            description: "no error"
  6803          404:
  6804            description: "no such container"
  6805            schema:
  6806              $ref: "#/definitions/ErrorResponse"
  6807            examples:
  6808              application/json:
  6809                message: "No such container: c2ada9df5af8"
  6810          409:
  6811            description: "container is not running"
  6812            schema:
  6813              $ref: "#/definitions/ErrorResponse"
  6814            examples:
  6815              application/json:
  6816                message: "Container d37cde0fe4ad63c3a7252023b2f9800282894247d145cb5933ddf6e52cc03a28 is not running"
  6817          500:
  6818            description: "server error"
  6819            schema:
  6820              $ref: "#/definitions/ErrorResponse"
  6821        parameters:
  6822          - name: "id"
  6823            in: "path"
  6824            required: true
  6825            description: "ID or name of the container"
  6826            type: "string"
  6827          - name: "signal"
  6828            in: "query"
  6829            description: |
  6830              Signal to send to the container as an integer or string (e.g. `SIGINT`).
  6831            type: "string"
  6832            default: "SIGKILL"
  6833        tags: ["Container"]
  6834    /containers/{id}/update:
  6835      post:
  6836        summary: "Update a container"
  6837        description: |
  6838          Change various configuration options of a container without having to
  6839          recreate it.
  6840        operationId: "ContainerUpdate"
  6841        consumes: ["application/json"]
  6842        produces: ["application/json"]
  6843        responses:
  6844          200:
  6845            description: "The container has been updated."
  6846            schema:
  6847              type: "object"
  6848              title: "ContainerUpdateResponse"
  6849              description: "OK response to ContainerUpdate operation"
  6850              properties:
  6851                Warnings:
  6852                  type: "array"
  6853                  items:
  6854                    type: "string"
  6855          404:
  6856            description: "no such container"
  6857            schema:
  6858              $ref: "#/definitions/ErrorResponse"
  6859            examples:
  6860              application/json:
  6861                message: "No such container: c2ada9df5af8"
  6862          500:
  6863            description: "server error"
  6864            schema:
  6865              $ref: "#/definitions/ErrorResponse"
  6866        parameters:
  6867          - name: "id"
  6868            in: "path"
  6869            required: true
  6870            description: "ID or name of the container"
  6871            type: "string"
  6872          - name: "update"
  6873            in: "body"
  6874            required: true
  6875            schema:
  6876              allOf:
  6877                - $ref: "#/definitions/Resources"
  6878                - type: "object"
  6879                  properties:
  6880                    RestartPolicy:
  6881                      $ref: "#/definitions/RestartPolicy"
  6882              example:
  6883                BlkioWeight: 300
  6884                CpuShares: 512
  6885                CpuPeriod: 100000
  6886                CpuQuota: 50000
  6887                CpuRealtimePeriod: 1000000
  6888                CpuRealtimeRuntime: 10000
  6889                CpusetCpus: "0,1"
  6890                CpusetMems: "0"
  6891                Memory: 314572800
  6892                MemorySwap: 514288000
  6893                MemoryReservation: 209715200
  6894                KernelMemory: 52428800
  6895                RestartPolicy:
  6896                  MaximumRetryCount: 4
  6897                  Name: "on-failure"
  6898        tags: ["Container"]
  6899    /containers/{id}/rename:
  6900      post:
  6901        summary: "Rename a container"
  6902        operationId: "ContainerRename"
  6903        responses:
  6904          204:
  6905            description: "no error"
  6906          404:
  6907            description: "no such container"
  6908            schema:
  6909              $ref: "#/definitions/ErrorResponse"
  6910            examples:
  6911              application/json:
  6912                message: "No such container: c2ada9df5af8"
  6913          409:
  6914            description: "name already in use"
  6915            schema:
  6916              $ref: "#/definitions/ErrorResponse"
  6917          500:
  6918            description: "server error"
  6919            schema:
  6920              $ref: "#/definitions/ErrorResponse"
  6921        parameters:
  6922          - name: "id"
  6923            in: "path"
  6924            required: true
  6925            description: "ID or name of the container"
  6926            type: "string"
  6927          - name: "name"
  6928            in: "query"
  6929            required: true
  6930            description: "New name for the container"
  6931            type: "string"
  6932        tags: ["Container"]
  6933    /containers/{id}/pause:
  6934      post:
  6935        summary: "Pause a container"
  6936        description: |
  6937          Use the freezer cgroup to suspend all processes in a container.
  6938  
  6939          Traditionally, when suspending a process the `SIGSTOP` signal is used,
  6940          which is observable by the process being suspended. With the freezer
  6941          cgroup the process is unaware, and unable to capture, that it is being
  6942          suspended, and subsequently resumed.
  6943        operationId: "ContainerPause"
  6944        responses:
  6945          204:
  6946            description: "no error"
  6947          404:
  6948            description: "no such container"
  6949            schema:
  6950              $ref: "#/definitions/ErrorResponse"
  6951            examples:
  6952              application/json:
  6953                message: "No such container: c2ada9df5af8"
  6954          500:
  6955            description: "server error"
  6956            schema:
  6957              $ref: "#/definitions/ErrorResponse"
  6958        parameters:
  6959          - name: "id"
  6960            in: "path"
  6961            required: true
  6962            description: "ID or name of the container"
  6963            type: "string"
  6964        tags: ["Container"]
  6965    /containers/{id}/unpause:
  6966      post:
  6967        summary: "Unpause a container"
  6968        description: "Resume a container which has been paused."
  6969        operationId: "ContainerUnpause"
  6970        responses:
  6971          204:
  6972            description: "no error"
  6973          404:
  6974            description: "no such container"
  6975            schema:
  6976              $ref: "#/definitions/ErrorResponse"
  6977            examples:
  6978              application/json:
  6979                message: "No such container: c2ada9df5af8"
  6980          500:
  6981            description: "server error"
  6982            schema:
  6983              $ref: "#/definitions/ErrorResponse"
  6984        parameters:
  6985          - name: "id"
  6986            in: "path"
  6987            required: true
  6988            description: "ID or name of the container"
  6989            type: "string"
  6990        tags: ["Container"]
  6991    /containers/{id}/attach:
  6992      post:
  6993        summary: "Attach to a container"
  6994        description: |
  6995          Attach to a container to read its output or send it input. You can attach
  6996          to the same container multiple times and you can reattach to containers
  6997          that have been detached.
  6998  
  6999          Either the `stream` or `logs` parameter must be `true` for this endpoint
  7000          to do anything.
  7001  
  7002          See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/)
  7003          for more details.
  7004  
  7005          ### Hijacking
  7006  
  7007          This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`,
  7008          and `stderr` on the same socket.
  7009  
  7010          This is the response from the daemon for an attach request:
  7011  
  7012          ```
  7013          HTTP/1.1 200 OK
  7014          Content-Type: application/vnd.docker.raw-stream
  7015  
  7016          [STREAM]
  7017          ```
  7018  
  7019          After the headers and two new lines, the TCP connection can now be used
  7020          for raw, bidirectional communication between the client and server.
  7021  
  7022          To hint potential proxies about connection hijacking, the Docker client
  7023          can also optionally send connection upgrade headers.
  7024  
  7025          For example, the client sends this request to upgrade the connection:
  7026  
  7027          ```
  7028          POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1
  7029          Upgrade: tcp
  7030          Connection: Upgrade
  7031          ```
  7032  
  7033          The Docker daemon will respond with a `101 UPGRADED` response, and will
  7034          similarly follow with the raw stream:
  7035  
  7036          ```
  7037          HTTP/1.1 101 UPGRADED
  7038          Content-Type: application/vnd.docker.raw-stream
  7039          Connection: Upgrade
  7040          Upgrade: tcp
  7041  
  7042          [STREAM]
  7043          ```
  7044  
  7045          ### Stream format
  7046  
  7047          When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate),
  7048          the stream over the hijacked connected is multiplexed to separate out
  7049          `stdout` and `stderr`. The stream consists of a series of frames, each
  7050          containing a header and a payload.
  7051  
  7052          The header contains the information which the stream writes (`stdout` or
  7053          `stderr`). It also contains the size of the associated frame encoded in
  7054          the last four bytes (`uint32`).
  7055  
  7056          It is encoded on the first eight bytes like this:
  7057  
  7058          ```go
  7059          header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}
  7060          ```
  7061  
  7062          `STREAM_TYPE` can be:
  7063  
  7064          - 0: `stdin` (is written on `stdout`)
  7065          - 1: `stdout`
  7066          - 2: `stderr`
  7067  
  7068          `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size
  7069          encoded as big endian.
  7070  
  7071          Following the header is the payload, which is the specified number of
  7072          bytes of `STREAM_TYPE`.
  7073  
  7074          The simplest way to implement this protocol is the following:
  7075  
  7076          1. Read 8 bytes.
  7077          2. Choose `stdout` or `stderr` depending on the first byte.
  7078          3. Extract the frame size from the last four bytes.
  7079          4. Read the extracted size and output it on the correct output.
  7080          5. Goto 1.
  7081  
  7082          ### Stream format when using a TTY
  7083  
  7084          When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate),
  7085          the stream is not multiplexed. The data exchanged over the hijacked
  7086          connection is simply the raw data from the process PTY and client's
  7087          `stdin`.
  7088  
  7089        operationId: "ContainerAttach"
  7090        produces:
  7091          - "application/vnd.docker.raw-stream"
  7092        responses:
  7093          101:
  7094            description: "no error, hints proxy about hijacking"
  7095          200:
  7096            description: "no error, no upgrade header found"
  7097          400:
  7098            description: "bad parameter"
  7099            schema:
  7100              $ref: "#/definitions/ErrorResponse"
  7101          404:
  7102            description: "no such container"
  7103            schema:
  7104              $ref: "#/definitions/ErrorResponse"
  7105            examples:
  7106              application/json:
  7107                message: "No such container: c2ada9df5af8"
  7108          500:
  7109            description: "server error"
  7110            schema:
  7111              $ref: "#/definitions/ErrorResponse"
  7112        parameters:
  7113          - name: "id"
  7114            in: "path"
  7115            required: true
  7116            description: "ID or name of the container"
  7117            type: "string"
  7118          - name: "detachKeys"
  7119            in: "query"
  7120            description: |
  7121              Override the key sequence for detaching a container.Format is a single
  7122              character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`,
  7123              `@`, `^`, `[`, `,` or `_`.
  7124            type: "string"
  7125          - name: "logs"
  7126            in: "query"
  7127            description: |
  7128              Replay previous logs from the container.
  7129  
  7130              This is useful for attaching to a container that has started and you
  7131              want to output everything since the container started.
  7132  
  7133              If `stream` is also enabled, once all the previous output has been
  7134              returned, it will seamlessly transition into streaming current
  7135              output.
  7136            type: "boolean"
  7137            default: false
  7138          - name: "stream"
  7139            in: "query"
  7140            description: |
  7141              Stream attached streams from the time the request was made onwards.
  7142            type: "boolean"
  7143            default: false
  7144          - name: "stdin"
  7145            in: "query"
  7146            description: "Attach to `stdin`"
  7147            type: "boolean"
  7148            default: false
  7149          - name: "stdout"
  7150            in: "query"
  7151            description: "Attach to `stdout`"
  7152            type: "boolean"
  7153            default: false
  7154          - name: "stderr"
  7155            in: "query"
  7156            description: "Attach to `stderr`"
  7157            type: "boolean"
  7158            default: false
  7159        tags: ["Container"]
  7160    /containers/{id}/attach/ws:
  7161      get:
  7162        summary: "Attach to a container via a websocket"
  7163        operationId: "ContainerAttachWebsocket"
  7164        responses:
  7165          101:
  7166            description: "no error, hints proxy about hijacking"
  7167          200:
  7168            description: "no error, no upgrade header found"
  7169          400:
  7170            description: "bad parameter"
  7171            schema:
  7172              $ref: "#/definitions/ErrorResponse"
  7173          404:
  7174            description: "no such container"
  7175            schema:
  7176              $ref: "#/definitions/ErrorResponse"
  7177            examples:
  7178              application/json:
  7179                message: "No such container: c2ada9df5af8"
  7180          500:
  7181            description: "server error"
  7182            schema:
  7183              $ref: "#/definitions/ErrorResponse"
  7184        parameters:
  7185          - name: "id"
  7186            in: "path"
  7187            required: true
  7188            description: "ID or name of the container"
  7189            type: "string"
  7190          - name: "detachKeys"
  7191            in: "query"
  7192            description: |
  7193              Override the key sequence for detaching a container.Format is a single
  7194              character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`,
  7195              `@`, `^`, `[`, `,`, or `_`.
  7196            type: "string"
  7197          - name: "logs"
  7198            in: "query"
  7199            description: "Return logs"
  7200            type: "boolean"
  7201            default: false
  7202          - name: "stream"
  7203            in: "query"
  7204            description: "Return stream"
  7205            type: "boolean"
  7206            default: false
  7207        tags: ["Container"]
  7208    /containers/{id}/wait:
  7209      post:
  7210        summary: "Wait for a container"
  7211        description: "Block until a container stops, then returns the exit code."
  7212        operationId: "ContainerWait"
  7213        produces: ["application/json"]
  7214        responses:
  7215          200:
  7216            description: "The container has exit."
  7217            schema:
  7218              $ref: "#/definitions/ContainerWaitResponse"
  7219          400:
  7220            description: "bad parameter"
  7221            schema:
  7222              $ref: "#/definitions/ErrorResponse"
  7223          404:
  7224            description: "no such container"
  7225            schema:
  7226              $ref: "#/definitions/ErrorResponse"
  7227            examples:
  7228              application/json:
  7229                message: "No such container: c2ada9df5af8"
  7230          500:
  7231            description: "server error"
  7232            schema:
  7233              $ref: "#/definitions/ErrorResponse"
  7234        parameters:
  7235          - name: "id"
  7236            in: "path"
  7237            required: true
  7238            description: "ID or name of the container"
  7239            type: "string"
  7240          - name: "condition"
  7241            in: "query"
  7242            description: |
  7243              Wait until a container state reaches the given condition.
  7244  
  7245              Defaults to `not-running` if omitted or empty.
  7246            type: "string"
  7247            enum:
  7248              - "not-running"
  7249              - "next-exit"
  7250              - "removed"
  7251            default: "not-running"
  7252        tags: ["Container"]
  7253    /containers/{id}:
  7254      delete:
  7255        summary: "Remove a container"
  7256        operationId: "ContainerDelete"
  7257        responses:
  7258          204:
  7259            description: "no error"
  7260          400:
  7261            description: "bad parameter"
  7262            schema:
  7263              $ref: "#/definitions/ErrorResponse"
  7264          404:
  7265            description: "no such container"
  7266            schema:
  7267              $ref: "#/definitions/ErrorResponse"
  7268            examples:
  7269              application/json:
  7270                message: "No such container: c2ada9df5af8"
  7271          409:
  7272            description: "conflict"
  7273            schema:
  7274              $ref: "#/definitions/ErrorResponse"
  7275            examples:
  7276              application/json:
  7277                message: |
  7278                  You cannot remove a running container: c2ada9df5af8. Stop the
  7279                  container before attempting removal or force remove
  7280          500:
  7281            description: "server error"
  7282            schema:
  7283              $ref: "#/definitions/ErrorResponse"
  7284        parameters:
  7285          - name: "id"
  7286            in: "path"
  7287            required: true
  7288            description: "ID or name of the container"
  7289            type: "string"
  7290          - name: "v"
  7291            in: "query"
  7292            description: "Remove anonymous volumes associated with the container."
  7293            type: "boolean"
  7294            default: false
  7295          - name: "force"
  7296            in: "query"
  7297            description: "If the container is running, kill it before removing it."
  7298            type: "boolean"
  7299            default: false
  7300          - name: "link"
  7301            in: "query"
  7302            description: "Remove the specified link associated with the container."
  7303            type: "boolean"
  7304            default: false
  7305        tags: ["Container"]
  7306    /containers/{id}/archive:
  7307      head:
  7308        summary: "Get information about files in a container"
  7309        description: |
  7310          A response header `X-Docker-Container-Path-Stat` is returned, containing
  7311          a base64 - encoded JSON object with some filesystem header information
  7312          about the path.
  7313        operationId: "ContainerArchiveInfo"
  7314        responses:
  7315          200:
  7316            description: "no error"
  7317            headers:
  7318              X-Docker-Container-Path-Stat:
  7319                type: "string"
  7320                description: |
  7321                  A base64 - encoded JSON object with some filesystem header
  7322                  information about the path
  7323          400:
  7324            description: "Bad parameter"
  7325            schema:
  7326              $ref: "#/definitions/ErrorResponse"
  7327          404:
  7328            description: "Container or path does not exist"
  7329            schema:
  7330              $ref: "#/definitions/ErrorResponse"
  7331            examples:
  7332              application/json:
  7333                message: "No such container: c2ada9df5af8"
  7334          500:
  7335            description: "Server error"
  7336            schema:
  7337              $ref: "#/definitions/ErrorResponse"
  7338        parameters:
  7339          - name: "id"
  7340            in: "path"
  7341            required: true
  7342            description: "ID or name of the container"
  7343            type: "string"
  7344          - name: "path"
  7345            in: "query"
  7346            required: true
  7347            description: "Resource in the container’s filesystem to archive."
  7348            type: "string"
  7349        tags: ["Container"]
  7350      get:
  7351        summary: "Get an archive of a filesystem resource in a container"
  7352        description: "Get a tar archive of a resource in the filesystem of container id."
  7353        operationId: "ContainerArchive"
  7354        produces: ["application/x-tar"]
  7355        responses:
  7356          200:
  7357            description: "no error"
  7358          400:
  7359            description: "Bad parameter"
  7360            schema:
  7361              $ref: "#/definitions/ErrorResponse"
  7362          404:
  7363            description: "Container or path does not exist"
  7364            schema:
  7365              $ref: "#/definitions/ErrorResponse"
  7366            examples:
  7367              application/json:
  7368                message: "No such container: c2ada9df5af8"
  7369          500:
  7370            description: "server error"
  7371            schema:
  7372              $ref: "#/definitions/ErrorResponse"
  7373        parameters:
  7374          - name: "id"
  7375            in: "path"
  7376            required: true
  7377            description: "ID or name of the container"
  7378            type: "string"
  7379          - name: "path"
  7380            in: "query"
  7381            required: true
  7382            description: "Resource in the container’s filesystem to archive."
  7383            type: "string"
  7384        tags: ["Container"]
  7385      put:
  7386        summary: "Extract an archive of files or folders to a directory in a container"
  7387        description: |
  7388          Upload a tar archive to be extracted to a path in the filesystem of container id.
  7389          `path` parameter is asserted to be a directory. If it exists as a file, 400 error
  7390          will be returned with message "not a directory".
  7391        operationId: "PutContainerArchive"
  7392        consumes: ["application/x-tar", "application/octet-stream"]
  7393        responses:
  7394          200:
  7395            description: "The content was extracted successfully"
  7396          400:
  7397            description: "Bad parameter"
  7398            schema:
  7399              $ref: "#/definitions/ErrorResponse"
  7400            examples:
  7401              application/json:
  7402                message: "not a directory"
  7403          403:
  7404            description: "Permission denied, the volume or container rootfs is marked as read-only."
  7405            schema:
  7406              $ref: "#/definitions/ErrorResponse"
  7407          404:
  7408            description: "No such container or path does not exist inside the container"
  7409            schema:
  7410              $ref: "#/definitions/ErrorResponse"
  7411            examples:
  7412              application/json:
  7413                message: "No such container: c2ada9df5af8"
  7414          500:
  7415            description: "Server error"
  7416            schema:
  7417              $ref: "#/definitions/ErrorResponse"
  7418        parameters:
  7419          - name: "id"
  7420            in: "path"
  7421            required: true
  7422            description: "ID or name of the container"
  7423            type: "string"
  7424          - name: "path"
  7425            in: "query"
  7426            required: true
  7427            description: "Path to a directory in the container to extract the archive’s contents into. "
  7428            type: "string"
  7429          - name: "noOverwriteDirNonDir"
  7430            in: "query"
  7431            description: |
  7432              If `1`, `true`, or `True` then it will be an error if unpacking the
  7433              given content would cause an existing directory to be replaced with
  7434              a non-directory and vice versa.
  7435            type: "string"
  7436          - name: "copyUIDGID"
  7437            in: "query"
  7438            description: |
  7439              If `1`, `true`, then it will copy UID/GID maps to the dest file or
  7440              dir
  7441            type: "string"
  7442          - name: "inputStream"
  7443            in: "body"
  7444            required: true
  7445            description: |
  7446              The input stream must be a tar archive compressed with one of the
  7447              following algorithms: `identity` (no compression), `gzip`, `bzip2`,
  7448              or `xz`.
  7449            schema:
  7450              type: "string"
  7451              format: "binary"
  7452        tags: ["Container"]
  7453    /containers/prune:
  7454      post:
  7455        summary: "Delete stopped containers"
  7456        produces:
  7457          - "application/json"
  7458        operationId: "ContainerPrune"
  7459        parameters:
  7460          - name: "filters"
  7461            in: "query"
  7462            description: |
  7463              Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  7464  
  7465              Available filters:
  7466              - `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.
  7467              - `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.
  7468            type: "string"
  7469        responses:
  7470          200:
  7471            description: "No error"
  7472            schema:
  7473              type: "object"
  7474              title: "ContainerPruneResponse"
  7475              properties:
  7476                ContainersDeleted:
  7477                  description: "Container IDs that were deleted"
  7478                  type: "array"
  7479                  items:
  7480                    type: "string"
  7481                SpaceReclaimed:
  7482                  description: "Disk space reclaimed in bytes"
  7483                  type: "integer"
  7484                  format: "int64"
  7485          500:
  7486            description: "Server error"
  7487            schema:
  7488              $ref: "#/definitions/ErrorResponse"
  7489        tags: ["Container"]
  7490    /images/json:
  7491      get:
  7492        summary: "List Images"
  7493        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."
  7494        operationId: "ImageList"
  7495        produces:
  7496          - "application/json"
  7497        responses:
  7498          200:
  7499            description: "Summary image data for the images matching the query"
  7500            schema:
  7501              type: "array"
  7502              items:
  7503                $ref: "#/definitions/ImageSummary"
  7504          500:
  7505            description: "server error"
  7506            schema:
  7507              $ref: "#/definitions/ErrorResponse"
  7508        parameters:
  7509          - name: "all"
  7510            in: "query"
  7511            description: "Show all images. Only images from a final layer (no children) are shown by default."
  7512            type: "boolean"
  7513            default: false
  7514          - name: "filters"
  7515            in: "query"
  7516            description: |
  7517              A JSON encoded value of the filters (a `map[string][]string`) to
  7518              process on the images list.
  7519  
  7520              Available filters:
  7521  
  7522              - `before`=(`<image-name>[:<tag>]`,  `<image id>` or `<image@digest>`)
  7523              - `dangling=true`
  7524              - `label=key` or `label="key=value"` of an image label
  7525              - `reference`=(`<image-name>[:<tag>]`)
  7526              - `since`=(`<image-name>[:<tag>]`,  `<image id>` or `<image@digest>`)
  7527            type: "string"
  7528          - name: "digests"
  7529            in: "query"
  7530            description: "Show digest information as a `RepoDigests` field on each image."
  7531            type: "boolean"
  7532            default: false
  7533        tags: ["Image"]
  7534    /build:
  7535      post:
  7536        summary: "Build an image"
  7537        description: |
  7538          Build an image from a tar archive with a `Dockerfile` in it.
  7539  
  7540          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/).
  7541  
  7542          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.
  7543  
  7544          The build is canceled if the client drops the connection by quitting or being killed.
  7545        operationId: "ImageBuild"
  7546        consumes:
  7547          - "application/octet-stream"
  7548        produces:
  7549          - "application/json"
  7550        parameters:
  7551          - name: "inputStream"
  7552            in: "body"
  7553            description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz."
  7554            schema:
  7555              type: "string"
  7556              format: "binary"
  7557          - name: "dockerfile"
  7558            in: "query"
  7559            description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`."
  7560            type: "string"
  7561            default: "Dockerfile"
  7562          - name: "t"
  7563            in: "query"
  7564            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."
  7565            type: "string"
  7566          - name: "extrahosts"
  7567            in: "query"
  7568            description: "Extra hosts to add to /etc/hosts"
  7569            type: "string"
  7570          - name: "remote"
  7571            in: "query"
  7572            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."
  7573            type: "string"
  7574          - name: "q"
  7575            in: "query"
  7576            description: "Suppress verbose build output."
  7577            type: "boolean"
  7578            default: false
  7579          - name: "nocache"
  7580            in: "query"
  7581            description: "Do not use the cache when building the image."
  7582            type: "boolean"
  7583            default: false
  7584          - name: "cachefrom"
  7585            in: "query"
  7586            description: "JSON array of images used for build cache resolution."
  7587            type: "string"
  7588          - name: "pull"
  7589            in: "query"
  7590            description: "Attempt to pull the image even if an older image exists locally."
  7591            type: "string"
  7592          - name: "rm"
  7593            in: "query"
  7594            description: "Remove intermediate containers after a successful build."
  7595            type: "boolean"
  7596            default: true
  7597          - name: "forcerm"
  7598            in: "query"
  7599            description: "Always remove intermediate containers, even upon failure."
  7600            type: "boolean"
  7601            default: false
  7602          - name: "memory"
  7603            in: "query"
  7604            description: "Set memory limit for build."
  7605            type: "integer"
  7606          - name: "memswap"
  7607            in: "query"
  7608            description: "Total memory (memory + swap). Set as `-1` to disable swap."
  7609            type: "integer"
  7610          - name: "cpushares"
  7611            in: "query"
  7612            description: "CPU shares (relative weight)."
  7613            type: "integer"
  7614          - name: "cpusetcpus"
  7615            in: "query"
  7616            description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)."
  7617            type: "string"
  7618          - name: "cpuperiod"
  7619            in: "query"
  7620            description: "The length of a CPU period in microseconds."
  7621            type: "integer"
  7622          - name: "cpuquota"
  7623            in: "query"
  7624            description: "Microseconds of CPU time that the container can get in a CPU period."
  7625            type: "integer"
  7626          - name: "buildargs"
  7627            in: "query"
  7628            description: >
  7629              JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker
  7630              uses the buildargs as the environment context for commands run via the `Dockerfile` RUN
  7631              instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for
  7632              passing secret values.
  7633  
  7634  
  7635              For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the
  7636              query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded.
  7637  
  7638  
  7639              [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)
  7640            type: "string"
  7641          - name: "shmsize"
  7642            in: "query"
  7643            description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB."
  7644            type: "integer"
  7645          - name: "squash"
  7646            in: "query"
  7647            description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*"
  7648            type: "boolean"
  7649          - name: "labels"
  7650            in: "query"
  7651            description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs."
  7652            type: "string"
  7653          - name: "networkmode"
  7654            in: "query"
  7655            description: |
  7656              Sets the networking mode for the run commands during build. Supported
  7657              standard values are: `bridge`, `host`, `none`, and `container:<name|id>`.
  7658              Any other value is taken as a custom network's name or ID to which this
  7659              container should connect to.
  7660            type: "string"
  7661          - name: "Content-type"
  7662            in: "header"
  7663            type: "string"
  7664            enum:
  7665              - "application/x-tar"
  7666            default: "application/x-tar"
  7667          - name: "X-Registry-Config"
  7668            in: "header"
  7669            description: |
  7670              This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to.
  7671  
  7672              The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example:
  7673  
  7674              ```
  7675              {
  7676                "docker.example.com": {
  7677                  "username": "janedoe",
  7678                  "password": "hunter2"
  7679                },
  7680                "https://index.docker.io/v1/": {
  7681                  "username": "mobydock",
  7682                  "password": "conta1n3rize14"
  7683                }
  7684              }
  7685              ```
  7686  
  7687              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.
  7688            type: "string"
  7689          - name: "platform"
  7690            in: "query"
  7691            description: "Platform in the format os[/arch[/variant]]"
  7692            type: "string"
  7693            default: ""
  7694          - name: "target"
  7695            in: "query"
  7696            description: "Target build stage"
  7697            type: "string"
  7698            default: ""
  7699          - name: "outputs"
  7700            in: "query"
  7701            description: "BuildKit output configuration"
  7702            type: "string"
  7703            default: ""
  7704        responses:
  7705          200:
  7706            description: "no error"
  7707          400:
  7708            description: "Bad parameter"
  7709            schema:
  7710              $ref: "#/definitions/ErrorResponse"
  7711          500:
  7712            description: "server error"
  7713            schema:
  7714              $ref: "#/definitions/ErrorResponse"
  7715        tags: ["Image"]
  7716    /build/prune:
  7717      post:
  7718        summary: "Delete builder cache"
  7719        produces:
  7720          - "application/json"
  7721        operationId: "BuildPrune"
  7722        parameters:
  7723          - name: "keep-storage"
  7724            in: "query"
  7725            description: "Amount of disk space in bytes to keep for cache"
  7726            type: "integer"
  7727            format: "int64"
  7728          - name: "all"
  7729            in: "query"
  7730            type: "boolean"
  7731            description: "Remove all types of build cache"
  7732          - name: "filters"
  7733            in: "query"
  7734            type: "string"
  7735            description: |
  7736              A JSON encoded value of the filters (a `map[string][]string`) to
  7737              process on the list of build cache objects.
  7738  
  7739              Available filters:
  7740  
  7741              - `until=<duration>`: duration relative to daemon's time, during which build cache was not used, in Go's duration format (e.g., '24h')
  7742              - `id=<id>`
  7743              - `parent=<id>`
  7744              - `type=<string>`
  7745              - `description=<string>`
  7746              - `inuse`
  7747              - `shared`
  7748              - `private`
  7749        responses:
  7750          200:
  7751            description: "No error"
  7752            schema:
  7753              type: "object"
  7754              title: "BuildPruneResponse"
  7755              properties:
  7756                CachesDeleted:
  7757                  type: "array"
  7758                  items:
  7759                    description: "ID of build cache object"
  7760                    type: "string"
  7761                SpaceReclaimed:
  7762                  description: "Disk space reclaimed in bytes"
  7763                  type: "integer"
  7764                  format: "int64"
  7765          500:
  7766            description: "Server error"
  7767            schema:
  7768              $ref: "#/definitions/ErrorResponse"
  7769        tags: ["Image"]
  7770    /images/create:
  7771      post:
  7772        summary: "Create an image"
  7773        description: "Create an image by either pulling it from a registry or importing it."
  7774        operationId: "ImageCreate"
  7775        consumes:
  7776          - "text/plain"
  7777          - "application/octet-stream"
  7778        produces:
  7779          - "application/json"
  7780        responses:
  7781          200:
  7782            description: "no error"
  7783          404:
  7784            description: "repository does not exist or no read access"
  7785            schema:
  7786              $ref: "#/definitions/ErrorResponse"
  7787          500:
  7788            description: "server error"
  7789            schema:
  7790              $ref: "#/definitions/ErrorResponse"
  7791        parameters:
  7792          - name: "fromImage"
  7793            in: "query"
  7794            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."
  7795            type: "string"
  7796          - name: "fromSrc"
  7797            in: "query"
  7798            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."
  7799            type: "string"
  7800          - name: "repo"
  7801            in: "query"
  7802            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."
  7803            type: "string"
  7804          - name: "tag"
  7805            in: "query"
  7806            description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled."
  7807            type: "string"
  7808          - name: "message"
  7809            in: "query"
  7810            description: "Set commit message for imported image."
  7811            type: "string"
  7812          - name: "inputImage"
  7813            in: "body"
  7814            description: "Image content if the value `-` has been specified in fromSrc query parameter"
  7815            schema:
  7816              type: "string"
  7817            required: false
  7818          - name: "X-Registry-Auth"
  7819            in: "header"
  7820            description: |
  7821              A base64url-encoded auth configuration.
  7822  
  7823              Refer to the [authentication section](#section/Authentication) for
  7824              details.
  7825            type: "string"
  7826          - name: "changes"
  7827            in: "query"
  7828            description: |
  7829              Apply `Dockerfile` instructions to the image that is created,
  7830              for example: `changes=ENV DEBUG=true`.
  7831              Note that `ENV DEBUG=true` should be URI component encoded.
  7832  
  7833              Supported `Dockerfile` instructions:
  7834              `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
  7835            type: "array"
  7836            items:
  7837              type: "string"
  7838          - name: "platform"
  7839            in: "query"
  7840            description: "Platform in the format os[/arch[/variant]]"
  7841            type: "string"
  7842            default: ""
  7843        tags: ["Image"]
  7844    /images/{name}/json:
  7845      get:
  7846        summary: "Inspect an image"
  7847        description: "Return low-level information about an image."
  7848        operationId: "ImageInspect"
  7849        produces:
  7850          - "application/json"
  7851        responses:
  7852          200:
  7853            description: "No error"
  7854            schema:
  7855              $ref: "#/definitions/ImageInspect"
  7856          404:
  7857            description: "No such image"
  7858            schema:
  7859              $ref: "#/definitions/ErrorResponse"
  7860            examples:
  7861              application/json:
  7862                message: "No such image: someimage (tag: latest)"
  7863          500:
  7864            description: "Server error"
  7865            schema:
  7866              $ref: "#/definitions/ErrorResponse"
  7867        parameters:
  7868          - name: "name"
  7869            in: "path"
  7870            description: "Image name or id"
  7871            type: "string"
  7872            required: true
  7873        tags: ["Image"]
  7874    /images/{name}/history:
  7875      get:
  7876        summary: "Get the history of an image"
  7877        description: "Return parent layers of an image."
  7878        operationId: "ImageHistory"
  7879        produces: ["application/json"]
  7880        responses:
  7881          200:
  7882            description: "List of image layers"
  7883            schema:
  7884              type: "array"
  7885              items:
  7886                type: "object"
  7887                x-go-name: HistoryResponseItem
  7888                title: "HistoryResponseItem"
  7889                description: "individual image layer information in response to ImageHistory operation"
  7890                required: [Id, Created, CreatedBy, Tags, Size, Comment]
  7891                properties:
  7892                  Id:
  7893                    type: "string"
  7894                    x-nullable: false
  7895                  Created:
  7896                    type: "integer"
  7897                    format: "int64"
  7898                    x-nullable: false
  7899                  CreatedBy:
  7900                    type: "string"
  7901                    x-nullable: false
  7902                  Tags:
  7903                    type: "array"
  7904                    items:
  7905                      type: "string"
  7906                  Size:
  7907                    type: "integer"
  7908                    format: "int64"
  7909                    x-nullable: false
  7910                  Comment:
  7911                    type: "string"
  7912                    x-nullable: false
  7913            examples:
  7914              application/json:
  7915                - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710"
  7916                  Created: 1398108230
  7917                  CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /"
  7918                  Tags:
  7919                    - "ubuntu:lucid"
  7920                    - "ubuntu:10.04"
  7921                  Size: 182964289
  7922                  Comment: ""
  7923                - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8"
  7924                  Created: 1398108222
  7925                  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/"
  7926                  Tags: []
  7927                  Size: 0
  7928                  Comment: ""
  7929                - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158"
  7930                  Created: 1371157430
  7931                  CreatedBy: ""
  7932                  Tags:
  7933                    - "scratch12:latest"
  7934                    - "scratch:latest"
  7935                  Size: 0
  7936                  Comment: "Imported from -"
  7937          404:
  7938            description: "No such image"
  7939            schema:
  7940              $ref: "#/definitions/ErrorResponse"
  7941          500:
  7942            description: "Server error"
  7943            schema:
  7944              $ref: "#/definitions/ErrorResponse"
  7945        parameters:
  7946          - name: "name"
  7947            in: "path"
  7948            description: "Image name or ID"
  7949            type: "string"
  7950            required: true
  7951        tags: ["Image"]
  7952    /images/{name}/push:
  7953      post:
  7954        summary: "Push an image"
  7955        description: |
  7956          Push an image to a registry.
  7957  
  7958          If you wish to push an image on to a private registry, that image must
  7959          already have a tag which references the registry. For example,
  7960          `registry.example.com/myimage:latest`.
  7961  
  7962          The push is cancelled if the HTTP connection is closed.
  7963        operationId: "ImagePush"
  7964        consumes:
  7965          - "application/octet-stream"
  7966        responses:
  7967          200:
  7968            description: "No error"
  7969          404:
  7970            description: "No such image"
  7971            schema:
  7972              $ref: "#/definitions/ErrorResponse"
  7973          500:
  7974            description: "Server error"
  7975            schema:
  7976              $ref: "#/definitions/ErrorResponse"
  7977        parameters:
  7978          - name: "name"
  7979            in: "path"
  7980            description: "Image name or ID."
  7981            type: "string"
  7982            required: true
  7983          - name: "tag"
  7984            in: "query"
  7985            description: "The tag to associate with the image on the registry."
  7986            type: "string"
  7987          - name: "X-Registry-Auth"
  7988            in: "header"
  7989            description: |
  7990              A base64url-encoded auth configuration.
  7991  
  7992              Refer to the [authentication section](#section/Authentication) for
  7993              details.
  7994            type: "string"
  7995            required: true
  7996        tags: ["Image"]
  7997    /images/{name}/tag:
  7998      post:
  7999        summary: "Tag an image"
  8000        description: "Tag an image so that it becomes part of a repository."
  8001        operationId: "ImageTag"
  8002        responses:
  8003          201:
  8004            description: "No error"
  8005          400:
  8006            description: "Bad parameter"
  8007            schema:
  8008              $ref: "#/definitions/ErrorResponse"
  8009          404:
  8010            description: "No such image"
  8011            schema:
  8012              $ref: "#/definitions/ErrorResponse"
  8013          409:
  8014            description: "Conflict"
  8015            schema:
  8016              $ref: "#/definitions/ErrorResponse"
  8017          500:
  8018            description: "Server error"
  8019            schema:
  8020              $ref: "#/definitions/ErrorResponse"
  8021        parameters:
  8022          - name: "name"
  8023            in: "path"
  8024            description: "Image name or ID to tag."
  8025            type: "string"
  8026            required: true
  8027          - name: "repo"
  8028            in: "query"
  8029            description: "The repository to tag in. For example, `someuser/someimage`."
  8030            type: "string"
  8031          - name: "tag"
  8032            in: "query"
  8033            description: "The name of the new tag."
  8034            type: "string"
  8035        tags: ["Image"]
  8036    /images/{name}:
  8037      delete:
  8038        summary: "Remove an image"
  8039        description: |
  8040          Remove an image, along with any untagged parent images that were
  8041          referenced by that image.
  8042  
  8043          Images can't be removed if they have descendant images, are being
  8044          used by a running container or are being used by a build.
  8045        operationId: "ImageDelete"
  8046        produces: ["application/json"]
  8047        responses:
  8048          200:
  8049            description: "The image was deleted successfully"
  8050            schema:
  8051              type: "array"
  8052              items:
  8053                $ref: "#/definitions/ImageDeleteResponseItem"
  8054            examples:
  8055              application/json:
  8056                - Untagged: "3e2f21a89f"
  8057                - Deleted: "3e2f21a89f"
  8058                - Deleted: "53b4f83ac9"
  8059          404:
  8060            description: "No such image"
  8061            schema:
  8062              $ref: "#/definitions/ErrorResponse"
  8063          409:
  8064            description: "Conflict"
  8065            schema:
  8066              $ref: "#/definitions/ErrorResponse"
  8067          500:
  8068            description: "Server error"
  8069            schema:
  8070              $ref: "#/definitions/ErrorResponse"
  8071        parameters:
  8072          - name: "name"
  8073            in: "path"
  8074            description: "Image name or ID"
  8075            type: "string"
  8076            required: true
  8077          - name: "force"
  8078            in: "query"
  8079            description: "Remove the image even if it is being used by stopped containers or has other tags"
  8080            type: "boolean"
  8081            default: false
  8082          - name: "noprune"
  8083            in: "query"
  8084            description: "Do not delete untagged parent images"
  8085            type: "boolean"
  8086            default: false
  8087        tags: ["Image"]
  8088    /images/search:
  8089      get:
  8090        summary: "Search images"
  8091        description: "Search for an image on Docker Hub."
  8092        operationId: "ImageSearch"
  8093        produces:
  8094          - "application/json"
  8095        responses:
  8096          200:
  8097            description: "No error"
  8098            schema:
  8099              type: "array"
  8100              items:
  8101                type: "object"
  8102                title: "ImageSearchResponseItem"
  8103                properties:
  8104                  description:
  8105                    type: "string"
  8106                  is_official:
  8107                    type: "boolean"
  8108                  is_automated:
  8109                    type: "boolean"
  8110                  name:
  8111                    type: "string"
  8112                  star_count:
  8113                    type: "integer"
  8114            examples:
  8115              application/json:
  8116                - description: ""
  8117                  is_official: false
  8118                  is_automated: false
  8119                  name: "wma55/u1210sshd"
  8120                  star_count: 0
  8121                - description: ""
  8122                  is_official: false
  8123                  is_automated: false
  8124                  name: "jdswinbank/sshd"
  8125                  star_count: 0
  8126                - description: ""
  8127                  is_official: false
  8128                  is_automated: false
  8129                  name: "vgauthier/sshd"
  8130                  star_count: 0
  8131          500:
  8132            description: "Server error"
  8133            schema:
  8134              $ref: "#/definitions/ErrorResponse"
  8135        parameters:
  8136          - name: "term"
  8137            in: "query"
  8138            description: "Term to search"
  8139            type: "string"
  8140            required: true
  8141          - name: "limit"
  8142            in: "query"
  8143            description: "Maximum number of results to return"
  8144            type: "integer"
  8145          - name: "filters"
  8146            in: "query"
  8147            description: |
  8148              A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:
  8149  
  8150              - `is-automated=(true|false)`
  8151              - `is-official=(true|false)`
  8152              - `stars=<number>` Matches images that has at least 'number' stars.
  8153            type: "string"
  8154        tags: ["Image"]
  8155    /images/prune:
  8156      post:
  8157        summary: "Delete unused images"
  8158        produces:
  8159          - "application/json"
  8160        operationId: "ImagePrune"
  8161        parameters:
  8162          - name: "filters"
  8163            in: "query"
  8164            description: |
  8165              Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters:
  8166  
  8167              - `dangling=<boolean>` When set to `true` (or `1`), prune only
  8168                 unused *and* untagged images. When set to `false`
  8169                 (or `0`), all unused images are pruned.
  8170              - `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.
  8171              - `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.
  8172            type: "string"
  8173        responses:
  8174          200:
  8175            description: "No error"
  8176            schema:
  8177              type: "object"
  8178              title: "ImagePruneResponse"
  8179              properties:
  8180                ImagesDeleted:
  8181                  description: "Images that were deleted"
  8182                  type: "array"
  8183                  items:
  8184                    $ref: "#/definitions/ImageDeleteResponseItem"
  8185                SpaceReclaimed:
  8186                  description: "Disk space reclaimed in bytes"
  8187                  type: "integer"
  8188                  format: "int64"
  8189          500:
  8190            description: "Server error"
  8191            schema:
  8192              $ref: "#/definitions/ErrorResponse"
  8193        tags: ["Image"]
  8194    /auth:
  8195      post:
  8196        summary: "Check auth configuration"
  8197        description: |
  8198          Validate credentials for a registry and, if available, get an identity
  8199          token for accessing the registry without password.
  8200        operationId: "SystemAuth"
  8201        consumes: ["application/json"]
  8202        produces: ["application/json"]
  8203        responses:
  8204          200:
  8205            description: "An identity token was generated successfully."
  8206            schema:
  8207              type: "object"
  8208              title: "SystemAuthResponse"
  8209              required: [Status]
  8210              properties:
  8211                Status:
  8212                  description: "The status of the authentication"
  8213                  type: "string"
  8214                  x-nullable: false
  8215                IdentityToken:
  8216                  description: "An opaque token used to authenticate a user after a successful login"
  8217                  type: "string"
  8218                  x-nullable: false
  8219            examples:
  8220              application/json:
  8221                Status: "Login Succeeded"
  8222                IdentityToken: "9cbaf023786cd7..."
  8223          204:
  8224            description: "No error"
  8225          401:
  8226            description: "Auth error"
  8227            schema:
  8228              $ref: "#/definitions/ErrorResponse"
  8229          500:
  8230            description: "Server error"
  8231            schema:
  8232              $ref: "#/definitions/ErrorResponse"
  8233        parameters:
  8234          - name: "authConfig"
  8235            in: "body"
  8236            description: "Authentication to check"
  8237            schema:
  8238              $ref: "#/definitions/AuthConfig"
  8239        tags: ["System"]
  8240    /info:
  8241      get:
  8242        summary: "Get system information"
  8243        operationId: "SystemInfo"
  8244        produces:
  8245          - "application/json"
  8246        responses:
  8247          200:
  8248            description: "No error"
  8249            schema:
  8250              $ref: "#/definitions/SystemInfo"
  8251          500:
  8252            description: "Server error"
  8253            schema:
  8254              $ref: "#/definitions/ErrorResponse"
  8255        tags: ["System"]
  8256    /version:
  8257      get:
  8258        summary: "Get version"
  8259        description: "Returns the version of Docker that is running and various information about the system that Docker is running on."
  8260        operationId: "SystemVersion"
  8261        produces: ["application/json"]
  8262        responses:
  8263          200:
  8264            description: "no error"
  8265            schema:
  8266              $ref: "#/definitions/SystemVersion"
  8267          500:
  8268            description: "server error"
  8269            schema:
  8270              $ref: "#/definitions/ErrorResponse"
  8271        tags: ["System"]
  8272    /_ping:
  8273      get:
  8274        summary: "Ping"
  8275        description: "This is a dummy endpoint you can use to test if the server is accessible."
  8276        operationId: "SystemPing"
  8277        produces: ["text/plain"]
  8278        responses:
  8279          200:
  8280            description: "no error"
  8281            schema:
  8282              type: "string"
  8283              example: "OK"
  8284            headers:
  8285              API-Version:
  8286                type: "string"
  8287                description: "Max API Version the server supports"
  8288              Builder-Version:
  8289                type: "string"
  8290                description: "Default version of docker image builder"
  8291              Docker-Experimental:
  8292                type: "boolean"
  8293                description: "If the server is running with experimental mode enabled"
  8294              Cache-Control:
  8295                type: "string"
  8296                default: "no-cache, no-store, must-revalidate"
  8297              Pragma:
  8298                type: "string"
  8299                default: "no-cache"
  8300          500:
  8301            description: "server error"
  8302            schema:
  8303              $ref: "#/definitions/ErrorResponse"
  8304            headers:
  8305              Cache-Control:
  8306                type: "string"
  8307                default: "no-cache, no-store, must-revalidate"
  8308              Pragma:
  8309                type: "string"
  8310                default: "no-cache"
  8311        tags: ["System"]
  8312      head:
  8313        summary: "Ping"
  8314        description: "This is a dummy endpoint you can use to test if the server is accessible."
  8315        operationId: "SystemPingHead"
  8316        produces: ["text/plain"]
  8317        responses:
  8318          200:
  8319            description: "no error"
  8320            schema:
  8321              type: "string"
  8322              example: "(empty)"
  8323            headers:
  8324              API-Version:
  8325                type: "string"
  8326                description: "Max API Version the server supports"
  8327              Builder-Version:
  8328                type: "string"
  8329                description: "Default version of docker image builder"
  8330              Docker-Experimental:
  8331                type: "boolean"
  8332                description: "If the server is running with experimental mode enabled"
  8333              Cache-Control:
  8334                type: "string"
  8335                default: "no-cache, no-store, must-revalidate"
  8336              Pragma:
  8337                type: "string"
  8338                default: "no-cache"
  8339          500:
  8340            description: "server error"
  8341            schema:
  8342              $ref: "#/definitions/ErrorResponse"
  8343        tags: ["System"]
  8344    /commit:
  8345      post:
  8346        summary: "Create a new image from a container"
  8347        operationId: "ImageCommit"
  8348        consumes:
  8349          - "application/json"
  8350        produces:
  8351          - "application/json"
  8352        responses:
  8353          201:
  8354            description: "no error"
  8355            schema:
  8356              $ref: "#/definitions/IdResponse"
  8357          404:
  8358            description: "no such container"
  8359            schema:
  8360              $ref: "#/definitions/ErrorResponse"
  8361            examples:
  8362              application/json:
  8363                message: "No such container: c2ada9df5af8"
  8364          500:
  8365            description: "server error"
  8366            schema:
  8367              $ref: "#/definitions/ErrorResponse"
  8368        parameters:
  8369          - name: "containerConfig"
  8370            in: "body"
  8371            description: "The container configuration"
  8372            schema:
  8373              $ref: "#/definitions/ContainerConfig"
  8374          - name: "container"
  8375            in: "query"
  8376            description: "The ID or name of the container to commit"
  8377            type: "string"
  8378          - name: "repo"
  8379            in: "query"
  8380            description: "Repository name for the created image"
  8381            type: "string"
  8382          - name: "tag"
  8383            in: "query"
  8384            description: "Tag name for the create image"
  8385            type: "string"
  8386          - name: "comment"
  8387            in: "query"
  8388            description: "Commit message"
  8389            type: "string"
  8390          - name: "author"
  8391            in: "query"
  8392            description: "Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`)"
  8393            type: "string"
  8394          - name: "pause"
  8395            in: "query"
  8396            description: "Whether to pause the container before committing"
  8397            type: "boolean"
  8398            default: true
  8399          - name: "changes"
  8400            in: "query"
  8401            description: "`Dockerfile` instructions to apply while committing"
  8402            type: "string"
  8403        tags: ["Image"]
  8404    /events:
  8405      get:
  8406        summary: "Monitor events"
  8407        description: |
  8408          Stream real-time events from the server.
  8409  
  8410          Various objects within Docker report events when something happens to them.
  8411  
  8412          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`
  8413  
  8414          Images report these events: `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, and `untag`
  8415  
  8416          Volumes report these events: `create`, `mount`, `unmount`, and `destroy`
  8417  
  8418          Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, and `remove`
  8419  
  8420          The Docker daemon reports these events: `reload`
  8421  
  8422          Services report these events: `create`, `update`, and `remove`
  8423  
  8424          Nodes report these events: `create`, `update`, and `remove`
  8425  
  8426          Secrets report these events: `create`, `update`, and `remove`
  8427  
  8428          Configs report these events: `create`, `update`, and `remove`
  8429  
  8430        operationId: "SystemEvents"
  8431        produces:
  8432          - "application/json"
  8433        responses:
  8434          200:
  8435            description: "no error"
  8436            schema:
  8437              $ref: "#/definitions/EventMessage"
  8438          400:
  8439            description: "bad parameter"
  8440            schema:
  8441              $ref: "#/definitions/ErrorResponse"
  8442          500:
  8443            description: "server error"
  8444            schema:
  8445              $ref: "#/definitions/ErrorResponse"
  8446        parameters:
  8447          - name: "since"
  8448            in: "query"
  8449            description: "Show events created since this timestamp then stream new events."
  8450            type: "string"
  8451          - name: "until"
  8452            in: "query"
  8453            description: "Show events created until this timestamp then stop streaming."
  8454            type: "string"
  8455          - name: "filters"
  8456            in: "query"
  8457            description: |
  8458              A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters:
  8459  
  8460              - `config=<string>` config name or ID
  8461              - `container=<string>` container name or ID
  8462              - `daemon=<string>` daemon name or ID
  8463              - `event=<string>` event type
  8464              - `image=<string>` image name or ID
  8465              - `label=<string>` image or container label
  8466              - `network=<string>` network name or ID
  8467              - `node=<string>` node ID
  8468              - `plugin`=<string> plugin name or ID
  8469              - `scope`=<string> local or swarm
  8470              - `secret=<string>` secret name or ID
  8471              - `service=<string>` service name or ID
  8472              - `type=<string>` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config`
  8473              - `volume=<string>` volume name
  8474            type: "string"
  8475        tags: ["System"]
  8476    /system/df:
  8477      get:
  8478        summary: "Get data usage information"
  8479        operationId: "SystemDataUsage"
  8480        responses:
  8481          200:
  8482            description: "no error"
  8483            schema:
  8484              type: "object"
  8485              title: "SystemDataUsageResponse"
  8486              properties:
  8487                LayersSize:
  8488                  type: "integer"
  8489                  format: "int64"
  8490                Images:
  8491                  type: "array"
  8492                  items:
  8493                    $ref: "#/definitions/ImageSummary"
  8494                Containers:
  8495                  type: "array"
  8496                  items:
  8497                    $ref: "#/definitions/ContainerSummary"
  8498                Volumes:
  8499                  type: "array"
  8500                  items:
  8501                    $ref: "#/definitions/Volume"
  8502                BuildCache:
  8503                  type: "array"
  8504                  items:
  8505                    $ref: "#/definitions/BuildCache"
  8506              example:
  8507                LayersSize: 1092588
  8508                Images:
  8509                  -
  8510                    Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
  8511                    ParentId: ""
  8512                    RepoTags:
  8513                      - "busybox:latest"
  8514                    RepoDigests:
  8515                      - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6"
  8516                    Created: 1466724217
  8517                    Size: 1092588
  8518                    SharedSize: 0
  8519                    VirtualSize: 1092588
  8520                    Labels: {}
  8521                    Containers: 1
  8522                Containers:
  8523                  -
  8524                    Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148"
  8525                    Names:
  8526                      - "/top"
  8527                    Image: "busybox"
  8528                    ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
  8529                    Command: "top"
  8530                    Created: 1472592424
  8531                    Ports: []
  8532                    SizeRootFs: 1092588
  8533                    Labels: {}
  8534                    State: "exited"
  8535                    Status: "Exited (0) 56 minutes ago"
  8536                    HostConfig:
  8537                      NetworkMode: "default"
  8538                    NetworkSettings:
  8539                      Networks:
  8540                        bridge:
  8541                          IPAMConfig: null
  8542                          Links: null
  8543                          Aliases: null
  8544                          NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92"
  8545                          EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a"
  8546                          Gateway: "172.18.0.1"
  8547                          IPAddress: "172.18.0.2"
  8548                          IPPrefixLen: 16
  8549                          IPv6Gateway: ""
  8550                          GlobalIPv6Address: ""
  8551                          GlobalIPv6PrefixLen: 0
  8552                          MacAddress: "02:42:ac:12:00:02"
  8553                    Mounts: []
  8554                Volumes:
  8555                  -
  8556                    Name: "my-volume"
  8557                    Driver: "local"
  8558                    Mountpoint: "/var/lib/docker/volumes/my-volume/_data"
  8559                    Labels: null
  8560                    Scope: "local"
  8561                    Options: null
  8562                    UsageData:
  8563                      Size: 10920104
  8564                      RefCount: 2
  8565                BuildCache:
  8566                  -
  8567                    ID: "hw53o5aio51xtltp5xjp8v7fx"
  8568                    Parent: ""
  8569                    Type: "regular"
  8570                    Description: "pulled from docker.io/library/debian@sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0"
  8571                    InUse: false
  8572                    Shared: true
  8573                    Size: 0
  8574                    CreatedAt: "2021-06-28T13:31:01.474619385Z"
  8575                    LastUsedAt: "2021-07-07T22:02:32.738075951Z"
  8576                    UsageCount: 26
  8577                  -
  8578                    ID: "ndlpt0hhvkqcdfkputsk4cq9c"
  8579                    Parent: "ndlpt0hhvkqcdfkputsk4cq9c"
  8580                    Type: "regular"
  8581                    Description: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache"
  8582                    InUse: false
  8583                    Shared: true
  8584                    Size: 51
  8585                    CreatedAt: "2021-06-28T13:31:03.002625487Z"
  8586                    LastUsedAt: "2021-07-07T22:02:32.773909517Z"
  8587                    UsageCount: 26
  8588          500:
  8589            description: "server error"
  8590            schema:
  8591              $ref: "#/definitions/ErrorResponse"
  8592        tags: ["System"]
  8593    /images/{name}/get:
  8594      get:
  8595        summary: "Export an image"
  8596        description: |
  8597          Get a tarball containing all images and metadata for a repository.
  8598  
  8599          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.
  8600  
  8601          ### Image tarball format
  8602  
  8603          An image tarball contains one directory per image layer (named using its long ID), each containing these files:
  8604  
  8605          - `VERSION`: currently `1.0` - the file format version
  8606          - `json`: detailed layer information, similar to `docker inspect layer_id`
  8607          - `layer.tar`: A tarfile containing the filesystem changes in this layer
  8608  
  8609          The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions.
  8610  
  8611          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.
  8612  
  8613          ```json
  8614          {
  8615            "hello-world": {
  8616              "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"
  8617            }
  8618          }
  8619          ```
  8620        operationId: "ImageGet"
  8621        produces:
  8622          - "application/x-tar"
  8623        responses:
  8624          200:
  8625            description: "no error"
  8626            schema:
  8627              type: "string"
  8628              format: "binary"
  8629          500:
  8630            description: "server error"
  8631            schema:
  8632              $ref: "#/definitions/ErrorResponse"
  8633        parameters:
  8634          - name: "name"
  8635            in: "path"
  8636            description: "Image name or ID"
  8637            type: "string"
  8638            required: true
  8639        tags: ["Image"]
  8640    /images/get:
  8641      get:
  8642        summary: "Export several images"
  8643        description: |
  8644          Get a tarball containing all images and metadata for several image
  8645          repositories.
  8646  
  8647          For each value of the `names` parameter: if it is a specific name and
  8648          tag (e.g. `ubuntu:latest`), then only that image (and its parents) are
  8649          returned; if it is an image ID, similarly only that image (and its parents)
  8650          are returned and there would be no names referenced in the 'repositories'
  8651          file for this image ID.
  8652  
  8653          For details on the format, see the [export image endpoint](#operation/ImageGet).
  8654        operationId: "ImageGetAll"
  8655        produces:
  8656          - "application/x-tar"
  8657        responses:
  8658          200:
  8659            description: "no error"
  8660            schema:
  8661              type: "string"
  8662              format: "binary"
  8663          500:
  8664            description: "server error"
  8665            schema:
  8666              $ref: "#/definitions/ErrorResponse"
  8667        parameters:
  8668          - name: "names"
  8669            in: "query"
  8670            description: "Image names to filter by"
  8671            type: "array"
  8672            items:
  8673              type: "string"
  8674        tags: ["Image"]
  8675    /images/load:
  8676      post:
  8677        summary: "Import images"
  8678        description: |
  8679          Load a set of images and tags into a repository.
  8680  
  8681          For details on the format, see the [export image endpoint](#operation/ImageGet).
  8682        operationId: "ImageLoad"
  8683        consumes:
  8684          - "application/x-tar"
  8685        produces:
  8686          - "application/json"
  8687        responses:
  8688          200:
  8689            description: "no error"
  8690          500:
  8691            description: "server error"
  8692            schema:
  8693              $ref: "#/definitions/ErrorResponse"
  8694        parameters:
  8695          - name: "imagesTarball"
  8696            in: "body"
  8697            description: "Tar archive containing images"
  8698            schema:
  8699              type: "string"
  8700              format: "binary"
  8701          - name: "quiet"
  8702            in: "query"
  8703            description: "Suppress progress details during load."
  8704            type: "boolean"
  8705            default: false
  8706        tags: ["Image"]
  8707    /containers/{id}/exec:
  8708      post:
  8709        summary: "Create an exec instance"
  8710        description: "Run a command inside a running container."
  8711        operationId: "ContainerExec"
  8712        consumes:
  8713          - "application/json"
  8714        produces:
  8715          - "application/json"
  8716        responses:
  8717          201:
  8718            description: "no error"
  8719            schema:
  8720              $ref: "#/definitions/IdResponse"
  8721          404:
  8722            description: "no such container"
  8723            schema:
  8724              $ref: "#/definitions/ErrorResponse"
  8725            examples:
  8726              application/json:
  8727                message: "No such container: c2ada9df5af8"
  8728          409:
  8729            description: "container is paused"
  8730            schema:
  8731              $ref: "#/definitions/ErrorResponse"
  8732          500:
  8733            description: "Server error"
  8734            schema:
  8735              $ref: "#/definitions/ErrorResponse"
  8736        parameters:
  8737          - name: "execConfig"
  8738            in: "body"
  8739            description: "Exec configuration"
  8740            schema:
  8741              type: "object"
  8742              title: "ExecConfig"
  8743              properties:
  8744                AttachStdin:
  8745                  type: "boolean"
  8746                  description: "Attach to `stdin` of the exec command."
  8747                AttachStdout:
  8748                  type: "boolean"
  8749                  description: "Attach to `stdout` of the exec command."
  8750                AttachStderr:
  8751                  type: "boolean"
  8752                  description: "Attach to `stderr` of the exec command."
  8753                DetachKeys:
  8754                  type: "string"
  8755                  description: |
  8756                    Override the key sequence for detaching a container. Format is
  8757                    a single character `[a-Z]` or `ctrl-<value>` where `<value>`
  8758                    is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
  8759                Tty:
  8760                  type: "boolean"
  8761                  description: "Allocate a pseudo-TTY."
  8762                Env:
  8763                  description: |
  8764                    A list of environment variables in the form `["VAR=value", ...]`.
  8765                  type: "array"
  8766                  items:
  8767                    type: "string"
  8768                Cmd:
  8769                  type: "array"
  8770                  description: "Command to run, as a string or array of strings."
  8771                  items:
  8772                    type: "string"
  8773                Privileged:
  8774                  type: "boolean"
  8775                  description: "Runs the exec process with extended privileges."
  8776                  default: false
  8777                User:
  8778                  type: "string"
  8779                  description: |
  8780                    The user, and optionally, group to run the exec process inside
  8781                    the container. Format is one of: `user`, `user:group`, `uid`,
  8782                    or `uid:gid`.
  8783                WorkingDir:
  8784                  type: "string"
  8785                  description: |
  8786                    The working directory for the exec process inside the container.
  8787              example:
  8788                AttachStdin: false
  8789                AttachStdout: true
  8790                AttachStderr: true
  8791                DetachKeys: "ctrl-p,ctrl-q"
  8792                Tty: false
  8793                Cmd:
  8794                  - "date"
  8795                Env:
  8796                  - "FOO=bar"
  8797                  - "BAZ=quux"
  8798            required: true
  8799          - name: "id"
  8800            in: "path"
  8801            description: "ID or name of container"
  8802            type: "string"
  8803            required: true
  8804        tags: ["Exec"]
  8805    /exec/{id}/start:
  8806      post:
  8807        summary: "Start an exec instance"
  8808        description: |
  8809          Starts a previously set up exec instance. If detach is true, this endpoint
  8810          returns immediately after starting the command. Otherwise, it sets up an
  8811          interactive session with the command.
  8812        operationId: "ExecStart"
  8813        consumes:
  8814          - "application/json"
  8815        produces:
  8816          - "application/vnd.docker.raw-stream"
  8817        responses:
  8818          200:
  8819            description: "No error"
  8820          404:
  8821            description: "No such exec instance"
  8822            schema:
  8823              $ref: "#/definitions/ErrorResponse"
  8824          409:
  8825            description: "Container is stopped or paused"
  8826            schema:
  8827              $ref: "#/definitions/ErrorResponse"
  8828        parameters:
  8829          - name: "execStartConfig"
  8830            in: "body"
  8831            schema:
  8832              type: "object"
  8833              title: "ExecStartConfig"
  8834              properties:
  8835                Detach:
  8836                  type: "boolean"
  8837                  description: "Detach from the command."
  8838                Tty:
  8839                  type: "boolean"
  8840                  description: "Allocate a pseudo-TTY."
  8841              example:
  8842                Detach: false
  8843                Tty: false
  8844          - name: "id"
  8845            in: "path"
  8846            description: "Exec instance ID"
  8847            required: true
  8848            type: "string"
  8849        tags: ["Exec"]
  8850    /exec/{id}/resize:
  8851      post:
  8852        summary: "Resize an exec instance"
  8853        description: |
  8854          Resize the TTY session used by an exec instance. This endpoint only works
  8855          if `tty` was specified as part of creating and starting the exec instance.
  8856        operationId: "ExecResize"
  8857        responses:
  8858          200:
  8859            description: "No error"
  8860          400:
  8861            description: "bad parameter"
  8862            schema:
  8863              $ref: "#/definitions/ErrorResponse"
  8864          404:
  8865            description: "No such exec instance"
  8866            schema:
  8867              $ref: "#/definitions/ErrorResponse"
  8868          500:
  8869            description: "Server error"
  8870            schema:
  8871              $ref: "#/definitions/ErrorResponse"
  8872        parameters:
  8873          - name: "id"
  8874            in: "path"
  8875            description: "Exec instance ID"
  8876            required: true
  8877            type: "string"
  8878          - name: "h"
  8879            in: "query"
  8880            description: "Height of the TTY session in characters"
  8881            type: "integer"
  8882          - name: "w"
  8883            in: "query"
  8884            description: "Width of the TTY session in characters"
  8885            type: "integer"
  8886        tags: ["Exec"]
  8887    /exec/{id}/json:
  8888      get:
  8889        summary: "Inspect an exec instance"
  8890        description: "Return low-level information about an exec instance."
  8891        operationId: "ExecInspect"
  8892        produces:
  8893          - "application/json"
  8894        responses:
  8895          200:
  8896            description: "No error"
  8897            schema:
  8898              type: "object"
  8899              title: "ExecInspectResponse"
  8900              properties:
  8901                CanRemove:
  8902                  type: "boolean"
  8903                DetachKeys:
  8904                  type: "string"
  8905                ID:
  8906                  type: "string"
  8907                Running:
  8908                  type: "boolean"
  8909                ExitCode:
  8910                  type: "integer"
  8911                ProcessConfig:
  8912                  $ref: "#/definitions/ProcessConfig"
  8913                OpenStdin:
  8914                  type: "boolean"
  8915                OpenStderr:
  8916                  type: "boolean"
  8917                OpenStdout:
  8918                  type: "boolean"
  8919                ContainerID:
  8920                  type: "string"
  8921                Pid:
  8922                  type: "integer"
  8923                  description: "The system process ID for the exec process."
  8924            examples:
  8925              application/json:
  8926                CanRemove: false
  8927                ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126"
  8928                DetachKeys: ""
  8929                ExitCode: 2
  8930                ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b"
  8931                OpenStderr: true
  8932                OpenStdin: true
  8933                OpenStdout: true
  8934                ProcessConfig:
  8935                  arguments:
  8936                    - "-c"
  8937                    - "exit 2"
  8938                  entrypoint: "sh"
  8939                  privileged: false
  8940                  tty: true
  8941                  user: "1000"
  8942                Running: false
  8943                Pid: 42000
  8944          404:
  8945            description: "No such exec instance"
  8946            schema:
  8947              $ref: "#/definitions/ErrorResponse"
  8948          500:
  8949            description: "Server error"
  8950            schema:
  8951              $ref: "#/definitions/ErrorResponse"
  8952        parameters:
  8953          - name: "id"
  8954            in: "path"
  8955            description: "Exec instance ID"
  8956            required: true
  8957            type: "string"
  8958        tags: ["Exec"]
  8959  
  8960    /volumes:
  8961      get:
  8962        summary: "List volumes"
  8963        operationId: "VolumeList"
  8964        produces: ["application/json"]
  8965        responses:
  8966          200:
  8967            description: "Summary volume data that matches the query"
  8968            schema:
  8969              $ref: "#/definitions/VolumeListResponse"
  8970          500:
  8971            description: "Server error"
  8972            schema:
  8973              $ref: "#/definitions/ErrorResponse"
  8974        parameters:
  8975          - name: "filters"
  8976            in: "query"
  8977            description: |
  8978              JSON encoded value of the filters (a `map[string][]string`) to
  8979              process on the volumes list. Available filters:
  8980  
  8981              - `dangling=<boolean>` When set to `true` (or `1`), returns all
  8982                 volumes that are not in use by a container. When set to `false`
  8983                 (or `0`), only volumes that are in use by one or more
  8984                 containers are returned.
  8985              - `driver=<volume-driver-name>` Matches volumes based on their driver.
  8986              - `label=<key>` or `label=<key>:<value>` Matches volumes based on
  8987                 the presence of a `label` alone or a `label` and a value.
  8988              - `name=<volume-name>` Matches all or part of a volume name.
  8989            type: "string"
  8990            format: "json"
  8991        tags: ["Volume"]
  8992  
  8993    /volumes/create:
  8994      post:
  8995        summary: "Create a volume"
  8996        operationId: "VolumeCreate"
  8997        consumes: ["application/json"]
  8998        produces: ["application/json"]
  8999        responses:
  9000          201:
  9001            description: "The volume was created successfully"
  9002            schema:
  9003              $ref: "#/definitions/Volume"
  9004          500:
  9005            description: "Server error"
  9006            schema:
  9007              $ref: "#/definitions/ErrorResponse"
  9008        parameters:
  9009          - name: "volumeConfig"
  9010            in: "body"
  9011            required: true
  9012            description: "Volume configuration"
  9013            schema:
  9014              $ref: "#/definitions/VolumeCreateOptions"
  9015        tags: ["Volume"]
  9016  
  9017    /volumes/{name}:
  9018      get:
  9019        summary: "Inspect a volume"
  9020        operationId: "VolumeInspect"
  9021        produces: ["application/json"]
  9022        responses:
  9023          200:
  9024            description: "No error"
  9025            schema:
  9026              $ref: "#/definitions/Volume"
  9027          404:
  9028            description: "No such volume"
  9029            schema:
  9030              $ref: "#/definitions/ErrorResponse"
  9031          500:
  9032            description: "Server error"
  9033            schema:
  9034              $ref: "#/definitions/ErrorResponse"
  9035        parameters:
  9036          - name: "name"
  9037            in: "path"
  9038            required: true
  9039            description: "Volume name or ID"
  9040            type: "string"
  9041        tags: ["Volume"]
  9042  
  9043      delete:
  9044        summary: "Remove a volume"
  9045        description: "Instruct the driver to remove the volume."
  9046        operationId: "VolumeDelete"
  9047        responses:
  9048          204:
  9049            description: "The volume was removed"
  9050          404:
  9051            description: "No such volume or volume driver"
  9052            schema:
  9053              $ref: "#/definitions/ErrorResponse"
  9054          409:
  9055            description: "Volume is in use and cannot be removed"
  9056            schema:
  9057              $ref: "#/definitions/ErrorResponse"
  9058          500:
  9059            description: "Server error"
  9060            schema:
  9061              $ref: "#/definitions/ErrorResponse"
  9062        parameters:
  9063          - name: "name"
  9064            in: "path"
  9065            required: true
  9066            description: "Volume name or ID"
  9067            type: "string"
  9068          - name: "force"
  9069            in: "query"
  9070            description: "Force the removal of the volume"
  9071            type: "boolean"
  9072            default: false
  9073        tags: ["Volume"]
  9074  
  9075    /volumes/prune:
  9076      post:
  9077        summary: "Delete unused volumes"
  9078        produces:
  9079          - "application/json"
  9080        operationId: "VolumePrune"
  9081        parameters:
  9082          - name: "filters"
  9083            in: "query"
  9084            description: |
  9085              Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  9086  
  9087              Available filters:
  9088              - `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.
  9089            type: "string"
  9090        responses:
  9091          200:
  9092            description: "No error"
  9093            schema:
  9094              type: "object"
  9095              title: "VolumePruneResponse"
  9096              properties:
  9097                VolumesDeleted:
  9098                  description: "Volumes that were deleted"
  9099                  type: "array"
  9100                  items:
  9101                    type: "string"
  9102                SpaceReclaimed:
  9103                  description: "Disk space reclaimed in bytes"
  9104                  type: "integer"
  9105                  format: "int64"
  9106          500:
  9107            description: "Server error"
  9108            schema:
  9109              $ref: "#/definitions/ErrorResponse"
  9110        tags: ["Volume"]
  9111    /networks:
  9112      get:
  9113        summary: "List networks"
  9114        description: |
  9115          Returns a list of networks. For details on the format, see the
  9116          [network inspect endpoint](#operation/NetworkInspect).
  9117  
  9118          Note that it uses a different, smaller representation of a network than
  9119          inspecting a single network. For example, the list of containers attached
  9120          to the network is not propagated in API versions 1.28 and up.
  9121        operationId: "NetworkList"
  9122        produces:
  9123          - "application/json"
  9124        responses:
  9125          200:
  9126            description: "No error"
  9127            schema:
  9128              type: "array"
  9129              items:
  9130                $ref: "#/definitions/Network"
  9131            examples:
  9132              application/json:
  9133                - Name: "bridge"
  9134                  Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566"
  9135                  Created: "2016-10-19T06:21:00.416543526Z"
  9136                  Scope: "local"
  9137                  Driver: "bridge"
  9138                  EnableIPv6: false
  9139                  Internal: false
  9140                  Attachable: false
  9141                  Ingress: false
  9142                  IPAM:
  9143                    Driver: "default"
  9144                    Config:
  9145                      -
  9146                        Subnet: "172.17.0.0/16"
  9147                  Options:
  9148                    com.docker.network.bridge.default_bridge: "true"
  9149                    com.docker.network.bridge.enable_icc: "true"
  9150                    com.docker.network.bridge.enable_ip_masquerade: "true"
  9151                    com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
  9152                    com.docker.network.bridge.name: "docker0"
  9153                    com.docker.network.driver.mtu: "1500"
  9154                - Name: "none"
  9155                  Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794"
  9156                  Created: "0001-01-01T00:00:00Z"
  9157                  Scope: "local"
  9158                  Driver: "null"
  9159                  EnableIPv6: false
  9160                  Internal: false
  9161                  Attachable: false
  9162                  Ingress: false
  9163                  IPAM:
  9164                    Driver: "default"
  9165                    Config: []
  9166                  Containers: {}
  9167                  Options: {}
  9168                - Name: "host"
  9169                  Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e"
  9170                  Created: "0001-01-01T00:00:00Z"
  9171                  Scope: "local"
  9172                  Driver: "host"
  9173                  EnableIPv6: false
  9174                  Internal: false
  9175                  Attachable: false
  9176                  Ingress: false
  9177                  IPAM:
  9178                    Driver: "default"
  9179                    Config: []
  9180                  Containers: {}
  9181                  Options: {}
  9182          500:
  9183            description: "Server error"
  9184            schema:
  9185              $ref: "#/definitions/ErrorResponse"
  9186        parameters:
  9187          - name: "filters"
  9188            in: "query"
  9189            description: |
  9190              JSON encoded value of the filters (a `map[string][]string`) to process
  9191              on the networks list.
  9192  
  9193              Available filters:
  9194  
  9195              - `dangling=<boolean>` When set to `true` (or `1`), returns all
  9196                 networks that are not in use by a container. When set to `false`
  9197                 (or `0`), only networks that are in use by one or more
  9198                 containers are returned.
  9199              - `driver=<driver-name>` Matches a network's driver.
  9200              - `id=<network-id>` Matches all or part of a network ID.
  9201              - `label=<key>` or `label=<key>=<value>` of a network label.
  9202              - `name=<network-name>` Matches all or part of a network name.
  9203              - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`).
  9204              - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks.
  9205            type: "string"
  9206        tags: ["Network"]
  9207  
  9208    /networks/{id}:
  9209      get:
  9210        summary: "Inspect a network"
  9211        operationId: "NetworkInspect"
  9212        produces:
  9213          - "application/json"
  9214        responses:
  9215          200:
  9216            description: "No error"
  9217            schema:
  9218              $ref: "#/definitions/Network"
  9219          404:
  9220            description: "Network not found"
  9221            schema:
  9222              $ref: "#/definitions/ErrorResponse"
  9223          500:
  9224            description: "Server error"
  9225            schema:
  9226              $ref: "#/definitions/ErrorResponse"
  9227        parameters:
  9228          - name: "id"
  9229            in: "path"
  9230            description: "Network ID or name"
  9231            required: true
  9232            type: "string"
  9233          - name: "verbose"
  9234            in: "query"
  9235            description: "Detailed inspect output for troubleshooting"
  9236            type: "boolean"
  9237            default: false
  9238          - name: "scope"
  9239            in: "query"
  9240            description: "Filter the network by scope (swarm, global, or local)"
  9241            type: "string"
  9242        tags: ["Network"]
  9243  
  9244      delete:
  9245        summary: "Remove a network"
  9246        operationId: "NetworkDelete"
  9247        responses:
  9248          204:
  9249            description: "No error"
  9250          403:
  9251            description: "operation not supported for pre-defined networks"
  9252            schema:
  9253              $ref: "#/definitions/ErrorResponse"
  9254          404:
  9255            description: "no such network"
  9256            schema:
  9257              $ref: "#/definitions/ErrorResponse"
  9258          500:
  9259            description: "Server error"
  9260            schema:
  9261              $ref: "#/definitions/ErrorResponse"
  9262        parameters:
  9263          - name: "id"
  9264            in: "path"
  9265            description: "Network ID or name"
  9266            required: true
  9267            type: "string"
  9268        tags: ["Network"]
  9269  
  9270    /networks/create:
  9271      post:
  9272        summary: "Create a network"
  9273        operationId: "NetworkCreate"
  9274        consumes:
  9275          - "application/json"
  9276        produces:
  9277          - "application/json"
  9278        responses:
  9279          201:
  9280            description: "No error"
  9281            schema:
  9282              type: "object"
  9283              title: "NetworkCreateResponse"
  9284              properties:
  9285                Id:
  9286                  description: "The ID of the created network."
  9287                  type: "string"
  9288                Warning:
  9289                  type: "string"
  9290              example:
  9291                Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30"
  9292                Warning: ""
  9293          400:
  9294            description: "bad parameter"
  9295            schema:
  9296              $ref: "#/definitions/ErrorResponse"
  9297          403:
  9298            description: "operation not supported for pre-defined networks"
  9299            schema:
  9300              $ref: "#/definitions/ErrorResponse"
  9301          404:
  9302            description: "plugin not found"
  9303            schema:
  9304              $ref: "#/definitions/ErrorResponse"
  9305          500:
  9306            description: "Server error"
  9307            schema:
  9308              $ref: "#/definitions/ErrorResponse"
  9309        parameters:
  9310          - name: "networkConfig"
  9311            in: "body"
  9312            description: "Network configuration"
  9313            required: true
  9314            schema:
  9315              type: "object"
  9316              title: "NetworkCreateRequest"
  9317              required: ["Name"]
  9318              properties:
  9319                Name:
  9320                  description: "The network's name."
  9321                  type: "string"
  9322                CheckDuplicate:
  9323                  description: |
  9324                    Check for networks with duplicate names. Since Network is
  9325                    primarily keyed based on a random ID and not on the name, and
  9326                    network name is strictly a user-friendly alias to the network
  9327                    which is uniquely identified using ID, there is no guaranteed
  9328                    way to check for duplicates. CheckDuplicate is there to provide
  9329                    a best effort checking of any networks which has the same name
  9330                    but it is not guaranteed to catch all name collisions.
  9331                  type: "boolean"
  9332                Driver:
  9333                  description: "Name of the network driver plugin to use."
  9334                  type: "string"
  9335                  default: "bridge"
  9336                Internal:
  9337                  description: "Restrict external access to the network."
  9338                  type: "boolean"
  9339                Attachable:
  9340                  description: |
  9341                    Globally scoped network is manually attachable by regular
  9342                    containers from workers in swarm mode.
  9343                  type: "boolean"
  9344                Ingress:
  9345                  description: |
  9346                    Ingress network is the network which provides the routing-mesh
  9347                    in swarm mode.
  9348                  type: "boolean"
  9349                IPAM:
  9350                  description: "Optional custom IP scheme for the network."
  9351                  $ref: "#/definitions/IPAM"
  9352                EnableIPv6:
  9353                  description: "Enable IPv6 on the network."
  9354                  type: "boolean"
  9355                Options:
  9356                  description: "Network specific options to be used by the drivers."
  9357                  type: "object"
  9358                  additionalProperties:
  9359                    type: "string"
  9360                Labels:
  9361                  description: "User-defined key/value metadata."
  9362                  type: "object"
  9363                  additionalProperties:
  9364                    type: "string"
  9365              example:
  9366                Name: "isolated_nw"
  9367                CheckDuplicate: false
  9368                Driver: "bridge"
  9369                EnableIPv6: true
  9370                IPAM:
  9371                  Driver: "default"
  9372                  Config:
  9373                    - Subnet: "172.20.0.0/16"
  9374                      IPRange: "172.20.10.0/24"
  9375                      Gateway: "172.20.10.11"
  9376                    - Subnet: "2001:db8:abcd::/64"
  9377                      Gateway: "2001:db8:abcd::1011"
  9378                  Options:
  9379                    foo: "bar"
  9380                Internal: true
  9381                Attachable: false
  9382                Ingress: false
  9383                Options:
  9384                  com.docker.network.bridge.default_bridge: "true"
  9385                  com.docker.network.bridge.enable_icc: "true"
  9386                  com.docker.network.bridge.enable_ip_masquerade: "true"
  9387                  com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
  9388                  com.docker.network.bridge.name: "docker0"
  9389                  com.docker.network.driver.mtu: "1500"
  9390                Labels:
  9391                  com.example.some-label: "some-value"
  9392                  com.example.some-other-label: "some-other-value"
  9393        tags: ["Network"]
  9394  
  9395    /networks/{id}/connect:
  9396      post:
  9397        summary: "Connect a container to a network"
  9398        operationId: "NetworkConnect"
  9399        consumes:
  9400          - "application/json"
  9401        responses:
  9402          200:
  9403            description: "No error"
  9404          403:
  9405            description: "Operation not supported for swarm scoped networks"
  9406            schema:
  9407              $ref: "#/definitions/ErrorResponse"
  9408          404:
  9409            description: "Network or container not found"
  9410            schema:
  9411              $ref: "#/definitions/ErrorResponse"
  9412          500:
  9413            description: "Server error"
  9414            schema:
  9415              $ref: "#/definitions/ErrorResponse"
  9416        parameters:
  9417          - name: "id"
  9418            in: "path"
  9419            description: "Network ID or name"
  9420            required: true
  9421            type: "string"
  9422          - name: "container"
  9423            in: "body"
  9424            required: true
  9425            schema:
  9426              type: "object"
  9427              title: "NetworkDisconnectRequest"
  9428              properties:
  9429                Container:
  9430                  type: "string"
  9431                  description: "The ID or name of the container to connect to the network."
  9432                EndpointConfig:
  9433                  $ref: "#/definitions/EndpointSettings"
  9434              example:
  9435                Container: "3613f73ba0e4"
  9436                EndpointConfig:
  9437                  IPAMConfig:
  9438                    IPv4Address: "172.24.56.89"
  9439                    IPv6Address: "2001:db8::5689"
  9440        tags: ["Network"]
  9441  
  9442    /networks/{id}/disconnect:
  9443      post:
  9444        summary: "Disconnect a container from a network"
  9445        operationId: "NetworkDisconnect"
  9446        consumes:
  9447          - "application/json"
  9448        responses:
  9449          200:
  9450            description: "No error"
  9451          403:
  9452            description: "Operation not supported for swarm scoped networks"
  9453            schema:
  9454              $ref: "#/definitions/ErrorResponse"
  9455          404:
  9456            description: "Network or container not found"
  9457            schema:
  9458              $ref: "#/definitions/ErrorResponse"
  9459          500:
  9460            description: "Server error"
  9461            schema:
  9462              $ref: "#/definitions/ErrorResponse"
  9463        parameters:
  9464          - name: "id"
  9465            in: "path"
  9466            description: "Network ID or name"
  9467            required: true
  9468            type: "string"
  9469          - name: "container"
  9470            in: "body"
  9471            required: true
  9472            schema:
  9473              type: "object"
  9474              title: "NetworkConnectRequest"
  9475              properties:
  9476                Container:
  9477                  type: "string"
  9478                  description: |
  9479                    The ID or name of the container to disconnect from the network.
  9480                Force:
  9481                  type: "boolean"
  9482                  description: |
  9483                    Force the container to disconnect from the network.
  9484        tags: ["Network"]
  9485    /networks/prune:
  9486      post:
  9487        summary: "Delete unused networks"
  9488        produces:
  9489          - "application/json"
  9490        operationId: "NetworkPrune"
  9491        parameters:
  9492          - name: "filters"
  9493            in: "query"
  9494            description: |
  9495              Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  9496  
  9497              Available filters:
  9498              - `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.
  9499              - `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.
  9500            type: "string"
  9501        responses:
  9502          200:
  9503            description: "No error"
  9504            schema:
  9505              type: "object"
  9506              title: "NetworkPruneResponse"
  9507              properties:
  9508                NetworksDeleted:
  9509                  description: "Networks that were deleted"
  9510                  type: "array"
  9511                  items:
  9512                    type: "string"
  9513          500:
  9514            description: "Server error"
  9515            schema:
  9516              $ref: "#/definitions/ErrorResponse"
  9517        tags: ["Network"]
  9518    /plugins:
  9519      get:
  9520        summary: "List plugins"
  9521        operationId: "PluginList"
  9522        description: "Returns information about installed plugins."
  9523        produces: ["application/json"]
  9524        responses:
  9525          200:
  9526            description: "No error"
  9527            schema:
  9528              type: "array"
  9529              items:
  9530                $ref: "#/definitions/Plugin"
  9531          500:
  9532            description: "Server error"
  9533            schema:
  9534              $ref: "#/definitions/ErrorResponse"
  9535        parameters:
  9536          - name: "filters"
  9537            in: "query"
  9538            type: "string"
  9539            description: |
  9540              A JSON encoded value of the filters (a `map[string][]string`) to
  9541              process on the plugin list.
  9542  
  9543              Available filters:
  9544  
  9545              - `capability=<capability name>`
  9546              - `enable=<true>|<false>`
  9547        tags: ["Plugin"]
  9548  
  9549    /plugins/privileges:
  9550      get:
  9551        summary: "Get plugin privileges"
  9552        operationId: "GetPluginPrivileges"
  9553        responses:
  9554          200:
  9555            description: "no error"
  9556            schema:
  9557              type: "array"
  9558              items:
  9559                $ref: "#/definitions/PluginPrivilege"
  9560              example:
  9561                - Name: "network"
  9562                  Description: ""
  9563                  Value:
  9564                    - "host"
  9565                - Name: "mount"
  9566                  Description: ""
  9567                  Value:
  9568                    - "/data"
  9569                - Name: "device"
  9570                  Description: ""
  9571                  Value:
  9572                    - "/dev/cpu_dma_latency"
  9573          500:
  9574            description: "server error"
  9575            schema:
  9576              $ref: "#/definitions/ErrorResponse"
  9577        parameters:
  9578          - name: "remote"
  9579            in: "query"
  9580            description: |
  9581              The name of the plugin. The `:latest` tag is optional, and is the
  9582              default if omitted.
  9583            required: true
  9584            type: "string"
  9585        tags:
  9586          - "Plugin"
  9587  
  9588    /plugins/pull:
  9589      post:
  9590        summary: "Install a plugin"
  9591        operationId: "PluginPull"
  9592        description: |
  9593          Pulls and installs a plugin. After the plugin is installed, it can be
  9594          enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable).
  9595        produces:
  9596          - "application/json"
  9597        responses:
  9598          204:
  9599            description: "no error"
  9600          500:
  9601            description: "server error"
  9602            schema:
  9603              $ref: "#/definitions/ErrorResponse"
  9604        parameters:
  9605          - name: "remote"
  9606            in: "query"
  9607            description: |
  9608              Remote reference for plugin to install.
  9609  
  9610              The `:latest` tag is optional, and is used as the default if omitted.
  9611            required: true
  9612            type: "string"
  9613          - name: "name"
  9614            in: "query"
  9615            description: |
  9616              Local name for the pulled plugin.
  9617  
  9618              The `:latest` tag is optional, and is used as the default if omitted.
  9619            required: false
  9620            type: "string"
  9621          - name: "X-Registry-Auth"
  9622            in: "header"
  9623            description: |
  9624              A base64url-encoded auth configuration to use when pulling a plugin
  9625              from a registry.
  9626  
  9627              Refer to the [authentication section](#section/Authentication) for
  9628              details.
  9629            type: "string"
  9630          - name: "body"
  9631            in: "body"
  9632            schema:
  9633              type: "array"
  9634              items:
  9635                $ref: "#/definitions/PluginPrivilege"
  9636              example:
  9637                - Name: "network"
  9638                  Description: ""
  9639                  Value:
  9640                    - "host"
  9641                - Name: "mount"
  9642                  Description: ""
  9643                  Value:
  9644                    - "/data"
  9645                - Name: "device"
  9646                  Description: ""
  9647                  Value:
  9648                    - "/dev/cpu_dma_latency"
  9649        tags: ["Plugin"]
  9650    /plugins/{name}/json:
  9651      get:
  9652        summary: "Inspect a plugin"
  9653        operationId: "PluginInspect"
  9654        responses:
  9655          200:
  9656            description: "no error"
  9657            schema:
  9658              $ref: "#/definitions/Plugin"
  9659          404:
  9660            description: "plugin is not installed"
  9661            schema:
  9662              $ref: "#/definitions/ErrorResponse"
  9663          500:
  9664            description: "server error"
  9665            schema:
  9666              $ref: "#/definitions/ErrorResponse"
  9667        parameters:
  9668          - name: "name"
  9669            in: "path"
  9670            description: |
  9671              The name of the plugin. The `:latest` tag is optional, and is the
  9672              default if omitted.
  9673            required: true
  9674            type: "string"
  9675        tags: ["Plugin"]
  9676    /plugins/{name}:
  9677      delete:
  9678        summary: "Remove a plugin"
  9679        operationId: "PluginDelete"
  9680        responses:
  9681          200:
  9682            description: "no error"
  9683            schema:
  9684              $ref: "#/definitions/Plugin"
  9685          404:
  9686            description: "plugin is not installed"
  9687            schema:
  9688              $ref: "#/definitions/ErrorResponse"
  9689          500:
  9690            description: "server error"
  9691            schema:
  9692              $ref: "#/definitions/ErrorResponse"
  9693        parameters:
  9694          - name: "name"
  9695            in: "path"
  9696            description: |
  9697              The name of the plugin. The `:latest` tag is optional, and is the
  9698              default if omitted.
  9699            required: true
  9700            type: "string"
  9701          - name: "force"
  9702            in: "query"
  9703            description: |
  9704              Disable the plugin before removing. This may result in issues if the
  9705              plugin is in use by a container.
  9706            type: "boolean"
  9707            default: false
  9708        tags: ["Plugin"]
  9709    /plugins/{name}/enable:
  9710      post:
  9711        summary: "Enable a plugin"
  9712        operationId: "PluginEnable"
  9713        responses:
  9714          200:
  9715            description: "no error"
  9716          404:
  9717            description: "plugin is not installed"
  9718            schema:
  9719              $ref: "#/definitions/ErrorResponse"
  9720          500:
  9721            description: "server error"
  9722            schema:
  9723              $ref: "#/definitions/ErrorResponse"
  9724        parameters:
  9725          - name: "name"
  9726            in: "path"
  9727            description: |
  9728              The name of the plugin. The `:latest` tag is optional, and is the
  9729              default if omitted.
  9730            required: true
  9731            type: "string"
  9732          - name: "timeout"
  9733            in: "query"
  9734            description: "Set the HTTP client timeout (in seconds)"
  9735            type: "integer"
  9736            default: 0
  9737        tags: ["Plugin"]
  9738    /plugins/{name}/disable:
  9739      post:
  9740        summary: "Disable a plugin"
  9741        operationId: "PluginDisable"
  9742        responses:
  9743          200:
  9744            description: "no error"
  9745          404:
  9746            description: "plugin is not installed"
  9747            schema:
  9748              $ref: "#/definitions/ErrorResponse"
  9749          500:
  9750            description: "server error"
  9751            schema:
  9752              $ref: "#/definitions/ErrorResponse"
  9753        parameters:
  9754          - name: "name"
  9755            in: "path"
  9756            description: |
  9757              The name of the plugin. The `:latest` tag is optional, and is the
  9758              default if omitted.
  9759            required: true
  9760            type: "string"
  9761          - name: "force"
  9762            in: "query"
  9763            description: |
  9764              Force disable a plugin even if still in use.
  9765            required: false
  9766            type: "boolean"
  9767        tags: ["Plugin"]
  9768    /plugins/{name}/upgrade:
  9769      post:
  9770        summary: "Upgrade a plugin"
  9771        operationId: "PluginUpgrade"
  9772        responses:
  9773          204:
  9774            description: "no error"
  9775          404:
  9776            description: "plugin not installed"
  9777            schema:
  9778              $ref: "#/definitions/ErrorResponse"
  9779          500:
  9780            description: "server error"
  9781            schema:
  9782              $ref: "#/definitions/ErrorResponse"
  9783        parameters:
  9784          - name: "name"
  9785            in: "path"
  9786            description: |
  9787              The name of the plugin. The `:latest` tag is optional, and is the
  9788              default if omitted.
  9789            required: true
  9790            type: "string"
  9791          - name: "remote"
  9792            in: "query"
  9793            description: |
  9794              Remote reference to upgrade to.
  9795  
  9796              The `:latest` tag is optional, and is used as the default if omitted.
  9797            required: true
  9798            type: "string"
  9799          - name: "X-Registry-Auth"
  9800            in: "header"
  9801            description: |
  9802              A base64url-encoded auth configuration to use when pulling a plugin
  9803              from a registry.
  9804  
  9805              Refer to the [authentication section](#section/Authentication) for
  9806              details.
  9807            type: "string"
  9808          - name: "body"
  9809            in: "body"
  9810            schema:
  9811              type: "array"
  9812              items:
  9813                $ref: "#/definitions/PluginPrivilege"
  9814              example:
  9815                - Name: "network"
  9816                  Description: ""
  9817                  Value:
  9818                    - "host"
  9819                - Name: "mount"
  9820                  Description: ""
  9821                  Value:
  9822                    - "/data"
  9823                - Name: "device"
  9824                  Description: ""
  9825                  Value:
  9826                    - "/dev/cpu_dma_latency"
  9827        tags: ["Plugin"]
  9828    /plugins/create:
  9829      post:
  9830        summary: "Create a plugin"
  9831        operationId: "PluginCreate"
  9832        consumes:
  9833          - "application/x-tar"
  9834        responses:
  9835          204:
  9836            description: "no error"
  9837          500:
  9838            description: "server error"
  9839            schema:
  9840              $ref: "#/definitions/ErrorResponse"
  9841        parameters:
  9842          - name: "name"
  9843            in: "query"
  9844            description: |
  9845              The name of the plugin. The `:latest` tag is optional, and is the
  9846              default if omitted.
  9847            required: true
  9848            type: "string"
  9849          - name: "tarContext"
  9850            in: "body"
  9851            description: "Path to tar containing plugin rootfs and manifest"
  9852            schema:
  9853              type: "string"
  9854              format: "binary"
  9855        tags: ["Plugin"]
  9856    /plugins/{name}/push:
  9857      post:
  9858        summary: "Push a plugin"
  9859        operationId: "PluginPush"
  9860        description: |
  9861          Push a plugin to the registry.
  9862        parameters:
  9863          - name: "name"
  9864            in: "path"
  9865            description: |
  9866              The name of the plugin. The `:latest` tag is optional, and is the
  9867              default if omitted.
  9868            required: true
  9869            type: "string"
  9870        responses:
  9871          200:
  9872            description: "no error"
  9873          404:
  9874            description: "plugin not installed"
  9875            schema:
  9876              $ref: "#/definitions/ErrorResponse"
  9877          500:
  9878            description: "server error"
  9879            schema:
  9880              $ref: "#/definitions/ErrorResponse"
  9881        tags: ["Plugin"]
  9882    /plugins/{name}/set:
  9883      post:
  9884        summary: "Configure a plugin"
  9885        operationId: "PluginSet"
  9886        consumes:
  9887          - "application/json"
  9888        parameters:
  9889          - name: "name"
  9890            in: "path"
  9891            description: |
  9892              The name of the plugin. The `:latest` tag is optional, and is the
  9893              default if omitted.
  9894            required: true
  9895            type: "string"
  9896          - name: "body"
  9897            in: "body"
  9898            schema:
  9899              type: "array"
  9900              items:
  9901                type: "string"
  9902              example: ["DEBUG=1"]
  9903        responses:
  9904          204:
  9905            description: "No error"
  9906          404:
  9907            description: "Plugin not installed"
  9908            schema:
  9909              $ref: "#/definitions/ErrorResponse"
  9910          500:
  9911            description: "Server error"
  9912            schema:
  9913              $ref: "#/definitions/ErrorResponse"
  9914        tags: ["Plugin"]
  9915    /nodes:
  9916      get:
  9917        summary: "List nodes"
  9918        operationId: "NodeList"
  9919        responses:
  9920          200:
  9921            description: "no error"
  9922            schema:
  9923              type: "array"
  9924              items:
  9925                $ref: "#/definitions/Node"
  9926          500:
  9927            description: "server error"
  9928            schema:
  9929              $ref: "#/definitions/ErrorResponse"
  9930          503:
  9931            description: "node is not part of a swarm"
  9932            schema:
  9933              $ref: "#/definitions/ErrorResponse"
  9934        parameters:
  9935          - name: "filters"
  9936            in: "query"
  9937            description: |
  9938              Filters to process on the nodes list, encoded as JSON (a `map[string][]string`).
  9939  
  9940              Available filters:
  9941              - `id=<node id>`
  9942              - `label=<engine label>`
  9943              - `membership=`(`accepted`|`pending`)`
  9944              - `name=<node name>`
  9945              - `node.label=<node label>`
  9946              - `role=`(`manager`|`worker`)`
  9947            type: "string"
  9948        tags: ["Node"]
  9949    /nodes/{id}:
  9950      get:
  9951        summary: "Inspect a node"
  9952        operationId: "NodeInspect"
  9953        responses:
  9954          200:
  9955            description: "no error"
  9956            schema:
  9957              $ref: "#/definitions/Node"
  9958          404:
  9959            description: "no such node"
  9960            schema:
  9961              $ref: "#/definitions/ErrorResponse"
  9962          500:
  9963            description: "server error"
  9964            schema:
  9965              $ref: "#/definitions/ErrorResponse"
  9966          503:
  9967            description: "node is not part of a swarm"
  9968            schema:
  9969              $ref: "#/definitions/ErrorResponse"
  9970        parameters:
  9971          - name: "id"
  9972            in: "path"
  9973            description: "The ID or name of the node"
  9974            type: "string"
  9975            required: true
  9976        tags: ["Node"]
  9977      delete:
  9978        summary: "Delete a node"
  9979        operationId: "NodeDelete"
  9980        responses:
  9981          200:
  9982            description: "no error"
  9983          404:
  9984            description: "no such node"
  9985            schema:
  9986              $ref: "#/definitions/ErrorResponse"
  9987          500:
  9988            description: "server error"
  9989            schema:
  9990              $ref: "#/definitions/ErrorResponse"
  9991          503:
  9992            description: "node is not part of a swarm"
  9993            schema:
  9994              $ref: "#/definitions/ErrorResponse"
  9995        parameters:
  9996          - name: "id"
  9997            in: "path"
  9998            description: "The ID or name of the node"
  9999            type: "string"
 10000            required: true
 10001          - name: "force"
 10002            in: "query"
 10003            description: "Force remove a node from the swarm"
 10004            default: false
 10005            type: "boolean"
 10006        tags: ["Node"]
 10007    /nodes/{id}/update:
 10008      post:
 10009        summary: "Update a node"
 10010        operationId: "NodeUpdate"
 10011        responses:
 10012          200:
 10013            description: "no error"
 10014          400:
 10015            description: "bad parameter"
 10016            schema:
 10017              $ref: "#/definitions/ErrorResponse"
 10018          404:
 10019            description: "no such node"
 10020            schema:
 10021              $ref: "#/definitions/ErrorResponse"
 10022          500:
 10023            description: "server error"
 10024            schema:
 10025              $ref: "#/definitions/ErrorResponse"
 10026          503:
 10027            description: "node is not part of a swarm"
 10028            schema:
 10029              $ref: "#/definitions/ErrorResponse"
 10030        parameters:
 10031          - name: "id"
 10032            in: "path"
 10033            description: "The ID of the node"
 10034            type: "string"
 10035            required: true
 10036          - name: "body"
 10037            in: "body"
 10038            schema:
 10039              $ref: "#/definitions/NodeSpec"
 10040          - name: "version"
 10041            in: "query"
 10042            description: |
 10043              The version number of the node object being updated. This is required
 10044              to avoid conflicting writes.
 10045            type: "integer"
 10046            format: "int64"
 10047            required: true
 10048        tags: ["Node"]
 10049    /swarm:
 10050      get:
 10051        summary: "Inspect swarm"
 10052        operationId: "SwarmInspect"
 10053        responses:
 10054          200:
 10055            description: "no error"
 10056            schema:
 10057              $ref: "#/definitions/Swarm"
 10058          404:
 10059            description: "no such swarm"
 10060            schema:
 10061              $ref: "#/definitions/ErrorResponse"
 10062          500:
 10063            description: "server error"
 10064            schema:
 10065              $ref: "#/definitions/ErrorResponse"
 10066          503:
 10067            description: "node is not part of a swarm"
 10068            schema:
 10069              $ref: "#/definitions/ErrorResponse"
 10070        tags: ["Swarm"]
 10071    /swarm/init:
 10072      post:
 10073        summary: "Initialize a new swarm"
 10074        operationId: "SwarmInit"
 10075        produces:
 10076          - "application/json"
 10077          - "text/plain"
 10078        responses:
 10079          200:
 10080            description: "no error"
 10081            schema:
 10082              description: "The node ID"
 10083              type: "string"
 10084              example: "7v2t30z9blmxuhnyo6s4cpenp"
 10085          400:
 10086            description: "bad parameter"
 10087            schema:
 10088              $ref: "#/definitions/ErrorResponse"
 10089          500:
 10090            description: "server error"
 10091            schema:
 10092              $ref: "#/definitions/ErrorResponse"
 10093          503:
 10094            description: "node is already part of a swarm"
 10095            schema:
 10096              $ref: "#/definitions/ErrorResponse"
 10097        parameters:
 10098          - name: "body"
 10099            in: "body"
 10100            required: true
 10101            schema:
 10102              type: "object"
 10103              title: "SwarmInitRequest"
 10104              properties:
 10105                ListenAddr:
 10106                  description: |
 10107                    Listen address used for inter-manager communication, as well
 10108                    as determining the networking interface used for the VXLAN
 10109                    Tunnel Endpoint (VTEP). This can either be an address/port
 10110                    combination in the form `192.168.1.1:4567`, or an interface
 10111                    followed by a port number, like `eth0:4567`. If the port number
 10112                    is omitted, the default swarm listening port is used.
 10113                  type: "string"
 10114                AdvertiseAddr:
 10115                  description: |
 10116                    Externally reachable address advertised to other nodes. This
 10117                    can either be an address/port combination in the form
 10118                    `192.168.1.1:4567`, or an interface followed by a port number,
 10119                    like `eth0:4567`. If the port number is omitted, the port
 10120                    number from the listen address is used. If `AdvertiseAddr` is
 10121                    not specified, it will be automatically detected when possible.
 10122                  type: "string"
 10123                DataPathAddr:
 10124                  description: |
 10125                    Address or interface to use for data path traffic (format:
 10126                    `<ip|interface>`), for example,  `192.168.1.1`, or an interface,
 10127                    like `eth0`. If `DataPathAddr` is unspecified, the same address
 10128                    as `AdvertiseAddr` is used.
 10129  
 10130                    The `DataPathAddr` specifies the address that global scope
 10131                    network drivers will publish towards other  nodes in order to
 10132                    reach the containers running on this node. Using this parameter
 10133                    it is possible to separate the container data traffic from the
 10134                    management traffic of the cluster.
 10135                  type: "string"
 10136                DataPathPort:
 10137                  description: |
 10138                    DataPathPort specifies the data path port number for data traffic.
 10139                    Acceptable port range is 1024 to 49151.
 10140                    if no port is set or is set to 0, default port 4789 will be used.
 10141                  type: "integer"
 10142                  format: "uint32"
 10143                DefaultAddrPool:
 10144                  description: |
 10145                    Default Address Pool specifies default subnet pools for global
 10146                    scope networks.
 10147                  type: "array"
 10148                  items:
 10149                    type: "string"
 10150                    example: ["10.10.0.0/16", "20.20.0.0/16"]
 10151                ForceNewCluster:
 10152                  description: "Force creation of a new swarm."
 10153                  type: "boolean"
 10154                SubnetSize:
 10155                  description: |
 10156                    SubnetSize specifies the subnet size of the networks created
 10157                    from the default subnet pool.
 10158                  type: "integer"
 10159                  format: "uint32"
 10160                Spec:
 10161                  $ref: "#/definitions/SwarmSpec"
 10162              example:
 10163                ListenAddr: "0.0.0.0:2377"
 10164                AdvertiseAddr: "192.168.1.1:2377"
 10165                DataPathPort: 4789
 10166                DefaultAddrPool: ["10.10.0.0/8", "20.20.0.0/8"]
 10167                SubnetSize: 24
 10168                ForceNewCluster: false
 10169                Spec:
 10170                  Orchestration: {}
 10171                  Raft: {}
 10172                  Dispatcher: {}
 10173                  CAConfig: {}
 10174                  EncryptionConfig:
 10175                    AutoLockManagers: false
 10176        tags: ["Swarm"]
 10177    /swarm/join:
 10178      post:
 10179        summary: "Join an existing swarm"
 10180        operationId: "SwarmJoin"
 10181        responses:
 10182          200:
 10183            description: "no error"
 10184          400:
 10185            description: "bad parameter"
 10186            schema:
 10187              $ref: "#/definitions/ErrorResponse"
 10188          500:
 10189            description: "server error"
 10190            schema:
 10191              $ref: "#/definitions/ErrorResponse"
 10192          503:
 10193            description: "node is already part of a swarm"
 10194            schema:
 10195              $ref: "#/definitions/ErrorResponse"
 10196        parameters:
 10197          - name: "body"
 10198            in: "body"
 10199            required: true
 10200            schema:
 10201              type: "object"
 10202              title: "SwarmJoinRequest"
 10203              properties:
 10204                ListenAddr:
 10205                  description: |
 10206                    Listen address used for inter-manager communication if the node
 10207                    gets promoted to manager, as well as determining the networking
 10208                    interface used for the VXLAN Tunnel Endpoint (VTEP).
 10209                  type: "string"
 10210                AdvertiseAddr:
 10211                  description: |
 10212                    Externally reachable address advertised to other nodes. This
 10213                    can either be an address/port combination in the form
 10214                    `192.168.1.1:4567`, or an interface followed by a port number,
 10215                    like `eth0:4567`. If the port number is omitted, the port
 10216                    number from the listen address is used. If `AdvertiseAddr` is
 10217                    not specified, it will be automatically detected when possible.
 10218                  type: "string"
 10219                DataPathAddr:
 10220                  description: |
 10221                    Address or interface to use for data path traffic (format:
 10222                    `<ip|interface>`), for example,  `192.168.1.1`, or an interface,
 10223                    like `eth0`. If `DataPathAddr` is unspecified, the same address
 10224                    as `AdvertiseAddr` is used.
 10225  
 10226                    The `DataPathAddr` specifies the address that global scope
 10227                    network drivers will publish towards other nodes in order to
 10228                    reach the containers running on this node. Using this parameter
 10229                    it is possible to separate the container data traffic from the
 10230                    management traffic of the cluster.
 10231  
 10232                  type: "string"
 10233                RemoteAddrs:
 10234                  description: |
 10235                    Addresses of manager nodes already participating in the swarm.
 10236                  type: "array"
 10237                  items:
 10238                    type: "string"
 10239                JoinToken:
 10240                  description: "Secret token for joining this swarm."
 10241                  type: "string"
 10242              example:
 10243                ListenAddr: "0.0.0.0:2377"
 10244                AdvertiseAddr: "192.168.1.1:2377"
 10245                RemoteAddrs:
 10246                  - "node1:2377"
 10247                JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2"
 10248        tags: ["Swarm"]
 10249    /swarm/leave:
 10250      post:
 10251        summary: "Leave a swarm"
 10252        operationId: "SwarmLeave"
 10253        responses:
 10254          200:
 10255            description: "no error"
 10256          500:
 10257            description: "server error"
 10258            schema:
 10259              $ref: "#/definitions/ErrorResponse"
 10260          503:
 10261            description: "node is not part of a swarm"
 10262            schema:
 10263              $ref: "#/definitions/ErrorResponse"
 10264        parameters:
 10265          - name: "force"
 10266            description: |
 10267              Force leave swarm, even if this is the last manager or that it will
 10268              break the cluster.
 10269            in: "query"
 10270            type: "boolean"
 10271            default: false
 10272        tags: ["Swarm"]
 10273    /swarm/update:
 10274      post:
 10275        summary: "Update a swarm"
 10276        operationId: "SwarmUpdate"
 10277        responses:
 10278          200:
 10279            description: "no error"
 10280          400:
 10281            description: "bad parameter"
 10282            schema:
 10283              $ref: "#/definitions/ErrorResponse"
 10284          500:
 10285            description: "server error"
 10286            schema:
 10287              $ref: "#/definitions/ErrorResponse"
 10288          503:
 10289            description: "node is not part of a swarm"
 10290            schema:
 10291              $ref: "#/definitions/ErrorResponse"
 10292        parameters:
 10293          - name: "body"
 10294            in: "body"
 10295            required: true
 10296            schema:
 10297              $ref: "#/definitions/SwarmSpec"
 10298          - name: "version"
 10299            in: "query"
 10300            description: |
 10301              The version number of the swarm object being updated. This is
 10302              required to avoid conflicting writes.
 10303            type: "integer"
 10304            format: "int64"
 10305            required: true
 10306          - name: "rotateWorkerToken"
 10307            in: "query"
 10308            description: "Rotate the worker join token."
 10309            type: "boolean"
 10310            default: false
 10311          - name: "rotateManagerToken"
 10312            in: "query"
 10313            description: "Rotate the manager join token."
 10314            type: "boolean"
 10315            default: false
 10316          - name: "rotateManagerUnlockKey"
 10317            in: "query"
 10318            description: "Rotate the manager unlock key."
 10319            type: "boolean"
 10320            default: false
 10321        tags: ["Swarm"]
 10322    /swarm/unlockkey:
 10323      get:
 10324        summary: "Get the unlock key"
 10325        operationId: "SwarmUnlockkey"
 10326        consumes:
 10327          - "application/json"
 10328        responses:
 10329          200:
 10330            description: "no error"
 10331            schema:
 10332              type: "object"
 10333              title: "UnlockKeyResponse"
 10334              properties:
 10335                UnlockKey:
 10336                  description: "The swarm's unlock key."
 10337                  type: "string"
 10338              example:
 10339                UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
 10340          500:
 10341            description: "server error"
 10342            schema:
 10343              $ref: "#/definitions/ErrorResponse"
 10344          503:
 10345            description: "node is not part of a swarm"
 10346            schema:
 10347              $ref: "#/definitions/ErrorResponse"
 10348        tags: ["Swarm"]
 10349    /swarm/unlock:
 10350      post:
 10351        summary: "Unlock a locked manager"
 10352        operationId: "SwarmUnlock"
 10353        consumes:
 10354          - "application/json"
 10355        produces:
 10356          - "application/json"
 10357        parameters:
 10358          - name: "body"
 10359            in: "body"
 10360            required: true
 10361            schema:
 10362              type: "object"
 10363              title: "SwarmUnlockRequest"
 10364              properties:
 10365                UnlockKey:
 10366                  description: "The swarm's unlock key."
 10367                  type: "string"
 10368              example:
 10369                UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
 10370        responses:
 10371          200:
 10372            description: "no error"
 10373          500:
 10374            description: "server error"
 10375            schema:
 10376              $ref: "#/definitions/ErrorResponse"
 10377          503:
 10378            description: "node is not part of a swarm"
 10379            schema:
 10380              $ref: "#/definitions/ErrorResponse"
 10381        tags: ["Swarm"]
 10382    /services:
 10383      get:
 10384        summary: "List services"
 10385        operationId: "ServiceList"
 10386        responses:
 10387          200:
 10388            description: "no error"
 10389            schema:
 10390              type: "array"
 10391              items:
 10392                $ref: "#/definitions/Service"
 10393          500:
 10394            description: "server error"
 10395            schema:
 10396              $ref: "#/definitions/ErrorResponse"
 10397          503:
 10398            description: "node is not part of a swarm"
 10399            schema:
 10400              $ref: "#/definitions/ErrorResponse"
 10401        parameters:
 10402          - name: "filters"
 10403            in: "query"
 10404            type: "string"
 10405            description: |
 10406              A JSON encoded value of the filters (a `map[string][]string`) to
 10407              process on the services list.
 10408  
 10409              Available filters:
 10410  
 10411              - `id=<service id>`
 10412              - `label=<service label>`
 10413              - `mode=["replicated"|"global"]`
 10414              - `name=<service name>`
 10415        tags: ["Service"]
 10416    /services/create:
 10417      post:
 10418        summary: "Create a service"
 10419        operationId: "ServiceCreate"
 10420        consumes:
 10421          - "application/json"
 10422        produces:
 10423          - "application/json"
 10424        responses:
 10425          201:
 10426            description: "no error"
 10427            schema:
 10428              type: "object"
 10429              title: "ServiceCreateResponse"
 10430              properties:
 10431                ID:
 10432                  description: "The ID of the created service."
 10433                  type: "string"
 10434                Warning:
 10435                  description: "Optional warning message"
 10436                  type: "string"
 10437              example:
 10438                ID: "ak7w3gjqoa3kuz8xcpnyy0pvl"
 10439                Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found"
 10440          400:
 10441            description: "bad parameter"
 10442            schema:
 10443              $ref: "#/definitions/ErrorResponse"
 10444          403:
 10445            description: "network is not eligible for services"
 10446            schema:
 10447              $ref: "#/definitions/ErrorResponse"
 10448          409:
 10449            description: "name conflicts with an existing service"
 10450            schema:
 10451              $ref: "#/definitions/ErrorResponse"
 10452          500:
 10453            description: "server error"
 10454            schema:
 10455              $ref: "#/definitions/ErrorResponse"
 10456          503:
 10457            description: "node is not part of a swarm"
 10458            schema:
 10459              $ref: "#/definitions/ErrorResponse"
 10460        parameters:
 10461          - name: "body"
 10462            in: "body"
 10463            required: true
 10464            schema:
 10465              allOf:
 10466                - $ref: "#/definitions/ServiceSpec"
 10467                - type: "object"
 10468                  example:
 10469                    Name: "web"
 10470                    TaskTemplate:
 10471                      ContainerSpec:
 10472                        Image: "nginx:alpine"
 10473                        Mounts:
 10474                          -
 10475                            ReadOnly: true
 10476                            Source: "web-data"
 10477                            Target: "/usr/share/nginx/html"
 10478                            Type: "volume"
 10479                            VolumeOptions:
 10480                              DriverConfig: {}
 10481                              Labels:
 10482                                com.example.something: "something-value"
 10483                        Hosts: ["10.10.10.10 host1", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2"]
 10484                        User: "33"
 10485                        DNSConfig:
 10486                          Nameservers: ["8.8.8.8"]
 10487                          Search: ["example.org"]
 10488                          Options: ["timeout:3"]
 10489                        Secrets:
 10490                          -
 10491                            File:
 10492                              Name: "www.example.org.key"
 10493                              UID: "33"
 10494                              GID: "33"
 10495                              Mode: 384
 10496                            SecretID: "fpjqlhnwb19zds35k8wn80lq9"
 10497                            SecretName: "example_org_domain_key"
 10498                      LogDriver:
 10499                        Name: "json-file"
 10500                        Options:
 10501                          max-file: "3"
 10502                          max-size: "10M"
 10503                      Placement: {}
 10504                      Resources:
 10505                        Limits:
 10506                          MemoryBytes: 104857600
 10507                        Reservations: {}
 10508                      RestartPolicy:
 10509                        Condition: "on-failure"
 10510                        Delay: 10000000000
 10511                        MaxAttempts: 10
 10512                    Mode:
 10513                      Replicated:
 10514                        Replicas: 4
 10515                    UpdateConfig:
 10516                      Parallelism: 2
 10517                      Delay: 1000000000
 10518                      FailureAction: "pause"
 10519                      Monitor: 15000000000
 10520                      MaxFailureRatio: 0.15
 10521                    RollbackConfig:
 10522                      Parallelism: 1
 10523                      Delay: 1000000000
 10524                      FailureAction: "pause"
 10525                      Monitor: 15000000000
 10526                      MaxFailureRatio: 0.15
 10527                    EndpointSpec:
 10528                      Ports:
 10529                        -
 10530                          Protocol: "tcp"
 10531                          PublishedPort: 8080
 10532                          TargetPort: 80
 10533                    Labels:
 10534                      foo: "bar"
 10535          - name: "X-Registry-Auth"
 10536            in: "header"
 10537            description: |
 10538              A base64url-encoded auth configuration for pulling from private
 10539              registries.
 10540  
 10541              Refer to the [authentication section](#section/Authentication) for
 10542              details.
 10543            type: "string"
 10544        tags: ["Service"]
 10545    /services/{id}:
 10546      get:
 10547        summary: "Inspect a service"
 10548        operationId: "ServiceInspect"
 10549        responses:
 10550          200:
 10551            description: "no error"
 10552            schema:
 10553              $ref: "#/definitions/Service"
 10554          404:
 10555            description: "no such service"
 10556            schema:
 10557              $ref: "#/definitions/ErrorResponse"
 10558          500:
 10559            description: "server error"
 10560            schema:
 10561              $ref: "#/definitions/ErrorResponse"
 10562          503:
 10563            description: "node is not part of a swarm"
 10564            schema:
 10565              $ref: "#/definitions/ErrorResponse"
 10566        parameters:
 10567          - name: "id"
 10568            in: "path"
 10569            description: "ID or name of service."
 10570            required: true
 10571            type: "string"
 10572          - name: "insertDefaults"
 10573            in: "query"
 10574            description: "Fill empty fields with default values."
 10575            type: "boolean"
 10576            default: false
 10577        tags: ["Service"]
 10578      delete:
 10579        summary: "Delete a service"
 10580        operationId: "ServiceDelete"
 10581        responses:
 10582          200:
 10583            description: "no error"
 10584          404:
 10585            description: "no such service"
 10586            schema:
 10587              $ref: "#/definitions/ErrorResponse"
 10588          500:
 10589            description: "server error"
 10590            schema:
 10591              $ref: "#/definitions/ErrorResponse"
 10592          503:
 10593            description: "node is not part of a swarm"
 10594            schema:
 10595              $ref: "#/definitions/ErrorResponse"
 10596        parameters:
 10597          - name: "id"
 10598            in: "path"
 10599            description: "ID or name of service."
 10600            required: true
 10601            type: "string"
 10602        tags: ["Service"]
 10603    /services/{id}/update:
 10604      post:
 10605        summary: "Update a service"
 10606        operationId: "ServiceUpdate"
 10607        consumes: ["application/json"]
 10608        produces: ["application/json"]
 10609        responses:
 10610          200:
 10611            description: "no error"
 10612            schema:
 10613              $ref: "#/definitions/ServiceUpdateResponse"
 10614          400:
 10615            description: "bad parameter"
 10616            schema:
 10617              $ref: "#/definitions/ErrorResponse"
 10618          404:
 10619            description: "no such service"
 10620            schema:
 10621              $ref: "#/definitions/ErrorResponse"
 10622          500:
 10623            description: "server error"
 10624            schema:
 10625              $ref: "#/definitions/ErrorResponse"
 10626          503:
 10627            description: "node is not part of a swarm"
 10628            schema:
 10629              $ref: "#/definitions/ErrorResponse"
 10630        parameters:
 10631          - name: "id"
 10632            in: "path"
 10633            description: "ID or name of service."
 10634            required: true
 10635            type: "string"
 10636          - name: "body"
 10637            in: "body"
 10638            required: true
 10639            schema:
 10640              allOf:
 10641                - $ref: "#/definitions/ServiceSpec"
 10642                - type: "object"
 10643                  example:
 10644                    Name: "top"
 10645                    TaskTemplate:
 10646                      ContainerSpec:
 10647                        Image: "busybox"
 10648                        Args:
 10649                          - "top"
 10650                      Resources:
 10651                        Limits: {}
 10652                        Reservations: {}
 10653                      RestartPolicy:
 10654                        Condition: "any"
 10655                        MaxAttempts: 0
 10656                      Placement: {}
 10657                      ForceUpdate: 0
 10658                    Mode:
 10659                      Replicated:
 10660                        Replicas: 1
 10661                    UpdateConfig:
 10662                      Parallelism: 2
 10663                      Delay: 1000000000
 10664                      FailureAction: "pause"
 10665                      Monitor: 15000000000
 10666                      MaxFailureRatio: 0.15
 10667                    RollbackConfig:
 10668                      Parallelism: 1
 10669                      Delay: 1000000000
 10670                      FailureAction: "pause"
 10671                      Monitor: 15000000000
 10672                      MaxFailureRatio: 0.15
 10673                    EndpointSpec:
 10674                      Mode: "vip"
 10675  
 10676          - name: "version"
 10677            in: "query"
 10678            description: |
 10679              The version number of the service object being updated. This is
 10680              required to avoid conflicting writes.
 10681              This version number should be the value as currently set on the
 10682              service *before* the update. You can find the current version by
 10683              calling `GET /services/{id}`
 10684            required: true
 10685            type: "integer"
 10686          - name: "registryAuthFrom"
 10687            in: "query"
 10688            description: |
 10689              If the `X-Registry-Auth` header is not specified, this parameter
 10690              indicates where to find registry authorization credentials.
 10691            type: "string"
 10692            enum: ["spec", "previous-spec"]
 10693            default: "spec"
 10694          - name: "rollback"
 10695            in: "query"
 10696            description: |
 10697              Set to this parameter to `previous` to cause a server-side rollback
 10698              to the previous service spec. The supplied spec will be ignored in
 10699              this case.
 10700            type: "string"
 10701          - name: "X-Registry-Auth"
 10702            in: "header"
 10703            description: |
 10704              A base64url-encoded auth configuration for pulling from private
 10705              registries.
 10706  
 10707              Refer to the [authentication section](#section/Authentication) for
 10708              details.
 10709            type: "string"
 10710  
 10711        tags: ["Service"]
 10712    /services/{id}/logs:
 10713      get:
 10714        summary: "Get service logs"
 10715        description: |
 10716          Get `stdout` and `stderr` logs from a service. See also
 10717          [`/containers/{id}/logs`](#operation/ContainerLogs).
 10718  
 10719          **Note**: This endpoint works only for services with the `local`,
 10720          `json-file` or `journald` logging drivers.
 10721        operationId: "ServiceLogs"
 10722        responses:
 10723          200:
 10724            description: "logs returned as a stream in response body"
 10725            schema:
 10726              type: "string"
 10727              format: "binary"
 10728          404:
 10729            description: "no such service"
 10730            schema:
 10731              $ref: "#/definitions/ErrorResponse"
 10732            examples:
 10733              application/json:
 10734                message: "No such service: c2ada9df5af8"
 10735          500:
 10736            description: "server error"
 10737            schema:
 10738              $ref: "#/definitions/ErrorResponse"
 10739          503:
 10740            description: "node is not part of a swarm"
 10741            schema:
 10742              $ref: "#/definitions/ErrorResponse"
 10743        parameters:
 10744          - name: "id"
 10745            in: "path"
 10746            required: true
 10747            description: "ID or name of the service"
 10748            type: "string"
 10749          - name: "details"
 10750            in: "query"
 10751            description: "Show service context and extra details provided to logs."
 10752            type: "boolean"
 10753            default: false
 10754          - name: "follow"
 10755            in: "query"
 10756            description: "Keep connection after returning logs."
 10757            type: "boolean"
 10758            default: false
 10759          - name: "stdout"
 10760            in: "query"
 10761            description: "Return logs from `stdout`"
 10762            type: "boolean"
 10763            default: false
 10764          - name: "stderr"
 10765            in: "query"
 10766            description: "Return logs from `stderr`"
 10767            type: "boolean"
 10768            default: false
 10769          - name: "since"
 10770            in: "query"
 10771            description: "Only return logs since this time, as a UNIX timestamp"
 10772            type: "integer"
 10773            default: 0
 10774          - name: "timestamps"
 10775            in: "query"
 10776            description: "Add timestamps to every log line"
 10777            type: "boolean"
 10778            default: false
 10779          - name: "tail"
 10780            in: "query"
 10781            description: |
 10782              Only return this number of log lines from the end of the logs.
 10783              Specify as an integer or `all` to output all log lines.
 10784            type: "string"
 10785            default: "all"
 10786        tags: ["Service"]
 10787    /tasks:
 10788      get:
 10789        summary: "List tasks"
 10790        operationId: "TaskList"
 10791        produces:
 10792          - "application/json"
 10793        responses:
 10794          200:
 10795            description: "no error"
 10796            schema:
 10797              type: "array"
 10798              items:
 10799                $ref: "#/definitions/Task"
 10800              example:
 10801                - ID: "0kzzo1i0y4jz6027t0k7aezc7"
 10802                  Version:
 10803                    Index: 71
 10804                  CreatedAt: "2016-06-07T21:07:31.171892745Z"
 10805                  UpdatedAt: "2016-06-07T21:07:31.376370513Z"
 10806                  Spec:
 10807                    ContainerSpec:
 10808                      Image: "redis"
 10809                    Resources:
 10810                      Limits: {}
 10811                      Reservations: {}
 10812                    RestartPolicy:
 10813                      Condition: "any"
 10814                      MaxAttempts: 0
 10815                    Placement: {}
 10816                  ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
 10817                  Slot: 1
 10818                  NodeID: "60gvrl6tm78dmak4yl7srz94v"
 10819                  Status:
 10820                    Timestamp: "2016-06-07T21:07:31.290032978Z"
 10821                    State: "running"
 10822                    Message: "started"
 10823                    ContainerStatus:
 10824                      ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035"
 10825                      PID: 677
 10826                  DesiredState: "running"
 10827                  NetworksAttachments:
 10828                    - Network:
 10829                        ID: "4qvuz4ko70xaltuqbt8956gd1"
 10830                        Version:
 10831                          Index: 18
 10832                        CreatedAt: "2016-06-07T20:31:11.912919752Z"
 10833                        UpdatedAt: "2016-06-07T21:07:29.955277358Z"
 10834                        Spec:
 10835                          Name: "ingress"
 10836                          Labels:
 10837                            com.docker.swarm.internal: "true"
 10838                          DriverConfiguration: {}
 10839                          IPAMOptions:
 10840                            Driver: {}
 10841                            Configs:
 10842                              - Subnet: "10.255.0.0/16"
 10843                                Gateway: "10.255.0.1"
 10844                        DriverState:
 10845                          Name: "overlay"
 10846                          Options:
 10847                            com.docker.network.driver.overlay.vxlanid_list: "256"
 10848                        IPAMOptions:
 10849                          Driver:
 10850                            Name: "default"
 10851                          Configs:
 10852                            - Subnet: "10.255.0.0/16"
 10853                              Gateway: "10.255.0.1"
 10854                      Addresses:
 10855                        - "10.255.0.10/16"
 10856                - ID: "1yljwbmlr8er2waf8orvqpwms"
 10857                  Version:
 10858                    Index: 30
 10859                  CreatedAt: "2016-06-07T21:07:30.019104782Z"
 10860                  UpdatedAt: "2016-06-07T21:07:30.231958098Z"
 10861                  Name: "hopeful_cori"
 10862                  Spec:
 10863                    ContainerSpec:
 10864                      Image: "redis"
 10865                    Resources:
 10866                      Limits: {}
 10867                      Reservations: {}
 10868                    RestartPolicy:
 10869                      Condition: "any"
 10870                      MaxAttempts: 0
 10871                    Placement: {}
 10872                  ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
 10873                  Slot: 1
 10874                  NodeID: "60gvrl6tm78dmak4yl7srz94v"
 10875                  Status:
 10876                    Timestamp: "2016-06-07T21:07:30.202183143Z"
 10877                    State: "shutdown"
 10878                    Message: "shutdown"
 10879                    ContainerStatus:
 10880                      ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213"
 10881                  DesiredState: "shutdown"
 10882                  NetworksAttachments:
 10883                    - Network:
 10884                        ID: "4qvuz4ko70xaltuqbt8956gd1"
 10885                        Version:
 10886                          Index: 18
 10887                        CreatedAt: "2016-06-07T20:31:11.912919752Z"
 10888                        UpdatedAt: "2016-06-07T21:07:29.955277358Z"
 10889                        Spec:
 10890                          Name: "ingress"
 10891                          Labels:
 10892                            com.docker.swarm.internal: "true"
 10893                          DriverConfiguration: {}
 10894                          IPAMOptions:
 10895                            Driver: {}
 10896                            Configs:
 10897                              - Subnet: "10.255.0.0/16"
 10898                                Gateway: "10.255.0.1"
 10899                        DriverState:
 10900                          Name: "overlay"
 10901                          Options:
 10902                            com.docker.network.driver.overlay.vxlanid_list: "256"
 10903                        IPAMOptions:
 10904                          Driver:
 10905                            Name: "default"
 10906                          Configs:
 10907                            - Subnet: "10.255.0.0/16"
 10908                              Gateway: "10.255.0.1"
 10909                      Addresses:
 10910                        - "10.255.0.5/16"
 10911          500:
 10912            description: "server error"
 10913            schema:
 10914              $ref: "#/definitions/ErrorResponse"
 10915          503:
 10916            description: "node is not part of a swarm"
 10917            schema:
 10918              $ref: "#/definitions/ErrorResponse"
 10919        parameters:
 10920          - name: "filters"
 10921            in: "query"
 10922            type: "string"
 10923            description: |
 10924              A JSON encoded value of the filters (a `map[string][]string`) to
 10925              process on the tasks list.
 10926  
 10927              Available filters:
 10928  
 10929              - `desired-state=(running | shutdown | accepted)`
 10930              - `id=<task id>`
 10931              - `label=key` or `label="key=value"`
 10932              - `name=<task name>`
 10933              - `node=<node id or name>`
 10934              - `service=<service name>`
 10935        tags: ["Task"]
 10936    /tasks/{id}:
 10937      get:
 10938        summary: "Inspect a task"
 10939        operationId: "TaskInspect"
 10940        produces:
 10941          - "application/json"
 10942        responses:
 10943          200:
 10944            description: "no error"
 10945            schema:
 10946              $ref: "#/definitions/Task"
 10947          404:
 10948            description: "no such task"
 10949            schema:
 10950              $ref: "#/definitions/ErrorResponse"
 10951          500:
 10952            description: "server error"
 10953            schema:
 10954              $ref: "#/definitions/ErrorResponse"
 10955          503:
 10956            description: "node is not part of a swarm"
 10957            schema:
 10958              $ref: "#/definitions/ErrorResponse"
 10959        parameters:
 10960          - name: "id"
 10961            in: "path"
 10962            description: "ID of the task"
 10963            required: true
 10964            type: "string"
 10965        tags: ["Task"]
 10966    /tasks/{id}/logs:
 10967      get:
 10968        summary: "Get task logs"
 10969        description: |
 10970          Get `stdout` and `stderr` logs from a task.
 10971          See also [`/containers/{id}/logs`](#operation/ContainerLogs).
 10972  
 10973          **Note**: This endpoint works only for services with the `local`,
 10974          `json-file` or `journald` logging drivers.
 10975        operationId: "TaskLogs"
 10976        responses:
 10977          200:
 10978            description: "logs returned as a stream in response body"
 10979            schema:
 10980              type: "string"
 10981              format: "binary"
 10982          404:
 10983            description: "no such task"
 10984            schema:
 10985              $ref: "#/definitions/ErrorResponse"
 10986            examples:
 10987              application/json:
 10988                message: "No such task: c2ada9df5af8"
 10989          500:
 10990            description: "server error"
 10991            schema:
 10992              $ref: "#/definitions/ErrorResponse"
 10993          503:
 10994            description: "node is not part of a swarm"
 10995            schema:
 10996              $ref: "#/definitions/ErrorResponse"
 10997        parameters:
 10998          - name: "id"
 10999            in: "path"
 11000            required: true
 11001            description: "ID of the task"
 11002            type: "string"
 11003          - name: "details"
 11004            in: "query"
 11005            description: "Show task context and extra details provided to logs."
 11006            type: "boolean"
 11007            default: false
 11008          - name: "follow"
 11009            in: "query"
 11010            description: "Keep connection after returning logs."
 11011            type: "boolean"
 11012            default: false
 11013          - name: "stdout"
 11014            in: "query"
 11015            description: "Return logs from `stdout`"
 11016            type: "boolean"
 11017            default: false
 11018          - name: "stderr"
 11019            in: "query"
 11020            description: "Return logs from `stderr`"
 11021            type: "boolean"
 11022            default: false
 11023          - name: "since"
 11024            in: "query"
 11025            description: "Only return logs since this time, as a UNIX timestamp"
 11026            type: "integer"
 11027            default: 0
 11028          - name: "timestamps"
 11029            in: "query"
 11030            description: "Add timestamps to every log line"
 11031            type: "boolean"
 11032            default: false
 11033          - name: "tail"
 11034            in: "query"
 11035            description: |
 11036              Only return this number of log lines from the end of the logs.
 11037              Specify as an integer or `all` to output all log lines.
 11038            type: "string"
 11039            default: "all"
 11040        tags: ["Task"]
 11041    /secrets:
 11042      get:
 11043        summary: "List secrets"
 11044        operationId: "SecretList"
 11045        produces:
 11046          - "application/json"
 11047        responses:
 11048          200:
 11049            description: "no error"
 11050            schema:
 11051              type: "array"
 11052              items:
 11053                $ref: "#/definitions/Secret"
 11054              example:
 11055                - ID: "blt1owaxmitz71s9v5zh81zun"
 11056                  Version:
 11057                    Index: 85
 11058                  CreatedAt: "2017-07-20T13:55:28.678958722Z"
 11059                  UpdatedAt: "2017-07-20T13:55:28.678958722Z"
 11060                  Spec:
 11061                    Name: "mysql-passwd"
 11062                    Labels:
 11063                      some.label: "some.value"
 11064                    Driver:
 11065                      Name: "secret-bucket"
 11066                      Options:
 11067                        OptionA: "value for driver option A"
 11068                        OptionB: "value for driver option B"
 11069                - ID: "ktnbjxoalbkvbvedmg1urrz8h"
 11070                  Version:
 11071                    Index: 11
 11072                  CreatedAt: "2016-11-05T01:20:17.327670065Z"
 11073                  UpdatedAt: "2016-11-05T01:20:17.327670065Z"
 11074                  Spec:
 11075                    Name: "app-dev.crt"
 11076                    Labels:
 11077                      foo: "bar"
 11078          500:
 11079            description: "server error"
 11080            schema:
 11081              $ref: "#/definitions/ErrorResponse"
 11082          503:
 11083            description: "node is not part of a swarm"
 11084            schema:
 11085              $ref: "#/definitions/ErrorResponse"
 11086        parameters:
 11087          - name: "filters"
 11088            in: "query"
 11089            type: "string"
 11090            description: |
 11091              A JSON encoded value of the filters (a `map[string][]string`) to
 11092              process on the secrets list.
 11093  
 11094              Available filters:
 11095  
 11096              - `id=<secret id>`
 11097              - `label=<key> or label=<key>=value`
 11098              - `name=<secret name>`
 11099              - `names=<secret name>`
 11100        tags: ["Secret"]
 11101    /secrets/create:
 11102      post:
 11103        summary: "Create a secret"
 11104        operationId: "SecretCreate"
 11105        consumes:
 11106          - "application/json"
 11107        produces:
 11108          - "application/json"
 11109        responses:
 11110          201:
 11111            description: "no error"
 11112            schema:
 11113              $ref: "#/definitions/IdResponse"
 11114          409:
 11115            description: "name conflicts with an existing object"
 11116            schema:
 11117              $ref: "#/definitions/ErrorResponse"
 11118          500:
 11119            description: "server error"
 11120            schema:
 11121              $ref: "#/definitions/ErrorResponse"
 11122          503:
 11123            description: "node is not part of a swarm"
 11124            schema:
 11125              $ref: "#/definitions/ErrorResponse"
 11126        parameters:
 11127          - name: "body"
 11128            in: "body"
 11129            schema:
 11130              allOf:
 11131                - $ref: "#/definitions/SecretSpec"
 11132                - type: "object"
 11133                  example:
 11134                    Name: "app-key.crt"
 11135                    Labels:
 11136                      foo: "bar"
 11137                    Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg=="
 11138                    Driver:
 11139                      Name: "secret-bucket"
 11140                      Options:
 11141                        OptionA: "value for driver option A"
 11142                        OptionB: "value for driver option B"
 11143        tags: ["Secret"]
 11144    /secrets/{id}:
 11145      get:
 11146        summary: "Inspect a secret"
 11147        operationId: "SecretInspect"
 11148        produces:
 11149          - "application/json"
 11150        responses:
 11151          200:
 11152            description: "no error"
 11153            schema:
 11154              $ref: "#/definitions/Secret"
 11155            examples:
 11156              application/json:
 11157                ID: "ktnbjxoalbkvbvedmg1urrz8h"
 11158                Version:
 11159                  Index: 11
 11160                CreatedAt: "2016-11-05T01:20:17.327670065Z"
 11161                UpdatedAt: "2016-11-05T01:20:17.327670065Z"
 11162                Spec:
 11163                  Name: "app-dev.crt"
 11164                  Labels:
 11165                    foo: "bar"
 11166                  Driver:
 11167                    Name: "secret-bucket"
 11168                    Options:
 11169                      OptionA: "value for driver option A"
 11170                      OptionB: "value for driver option B"
 11171  
 11172          404:
 11173            description: "secret not found"
 11174            schema:
 11175              $ref: "#/definitions/ErrorResponse"
 11176          500:
 11177            description: "server error"
 11178            schema:
 11179              $ref: "#/definitions/ErrorResponse"
 11180          503:
 11181            description: "node is not part of a swarm"
 11182            schema:
 11183              $ref: "#/definitions/ErrorResponse"
 11184        parameters:
 11185          - name: "id"
 11186            in: "path"
 11187            required: true
 11188            type: "string"
 11189            description: "ID of the secret"
 11190        tags: ["Secret"]
 11191      delete:
 11192        summary: "Delete a secret"
 11193        operationId: "SecretDelete"
 11194        produces:
 11195          - "application/json"
 11196        responses:
 11197          204:
 11198            description: "no error"
 11199          404:
 11200            description: "secret not found"
 11201            schema:
 11202              $ref: "#/definitions/ErrorResponse"
 11203          500:
 11204            description: "server error"
 11205            schema:
 11206              $ref: "#/definitions/ErrorResponse"
 11207          503:
 11208            description: "node is not part of a swarm"
 11209            schema:
 11210              $ref: "#/definitions/ErrorResponse"
 11211        parameters:
 11212          - name: "id"
 11213            in: "path"
 11214            required: true
 11215            type: "string"
 11216            description: "ID of the secret"
 11217        tags: ["Secret"]
 11218    /secrets/{id}/update:
 11219      post:
 11220        summary: "Update a Secret"
 11221        operationId: "SecretUpdate"
 11222        responses:
 11223          200:
 11224            description: "no error"
 11225          400:
 11226            description: "bad parameter"
 11227            schema:
 11228              $ref: "#/definitions/ErrorResponse"
 11229          404:
 11230            description: "no such secret"
 11231            schema:
 11232              $ref: "#/definitions/ErrorResponse"
 11233          500:
 11234            description: "server error"
 11235            schema:
 11236              $ref: "#/definitions/ErrorResponse"
 11237          503:
 11238            description: "node is not part of a swarm"
 11239            schema:
 11240              $ref: "#/definitions/ErrorResponse"
 11241        parameters:
 11242          - name: "id"
 11243            in: "path"
 11244            description: "The ID or name of the secret"
 11245            type: "string"
 11246            required: true
 11247          - name: "body"
 11248            in: "body"
 11249            schema:
 11250              $ref: "#/definitions/SecretSpec"
 11251            description: |
 11252              The spec of the secret to update. Currently, only the Labels field
 11253              can be updated. All other fields must remain unchanged from the
 11254              [SecretInspect endpoint](#operation/SecretInspect) response values.
 11255          - name: "version"
 11256            in: "query"
 11257            description: |
 11258              The version number of the secret object being updated. This is
 11259              required to avoid conflicting writes.
 11260            type: "integer"
 11261            format: "int64"
 11262            required: true
 11263        tags: ["Secret"]
 11264    /configs:
 11265      get:
 11266        summary: "List configs"
 11267        operationId: "ConfigList"
 11268        produces:
 11269          - "application/json"
 11270        responses:
 11271          200:
 11272            description: "no error"
 11273            schema:
 11274              type: "array"
 11275              items:
 11276                $ref: "#/definitions/Config"
 11277              example:
 11278                - ID: "ktnbjxoalbkvbvedmg1urrz8h"
 11279                  Version:
 11280                    Index: 11
 11281                  CreatedAt: "2016-11-05T01:20:17.327670065Z"
 11282                  UpdatedAt: "2016-11-05T01:20:17.327670065Z"
 11283                  Spec:
 11284                    Name: "server.conf"
 11285          500:
 11286            description: "server error"
 11287            schema:
 11288              $ref: "#/definitions/ErrorResponse"
 11289          503:
 11290            description: "node is not part of a swarm"
 11291            schema:
 11292              $ref: "#/definitions/ErrorResponse"
 11293        parameters:
 11294          - name: "filters"
 11295            in: "query"
 11296            type: "string"
 11297            description: |
 11298              A JSON encoded value of the filters (a `map[string][]string`) to
 11299              process on the configs list.
 11300  
 11301              Available filters:
 11302  
 11303              - `id=<config id>`
 11304              - `label=<key> or label=<key>=value`
 11305              - `name=<config name>`
 11306              - `names=<config name>`
 11307        tags: ["Config"]
 11308    /configs/create:
 11309      post:
 11310        summary: "Create a config"
 11311        operationId: "ConfigCreate"
 11312        consumes:
 11313          - "application/json"
 11314        produces:
 11315          - "application/json"
 11316        responses:
 11317          201:
 11318            description: "no error"
 11319            schema:
 11320              $ref: "#/definitions/IdResponse"
 11321          409:
 11322            description: "name conflicts with an existing object"
 11323            schema:
 11324              $ref: "#/definitions/ErrorResponse"
 11325          500:
 11326            description: "server error"
 11327            schema:
 11328              $ref: "#/definitions/ErrorResponse"
 11329          503:
 11330            description: "node is not part of a swarm"
 11331            schema:
 11332              $ref: "#/definitions/ErrorResponse"
 11333        parameters:
 11334          - name: "body"
 11335            in: "body"
 11336            schema:
 11337              allOf:
 11338                - $ref: "#/definitions/ConfigSpec"
 11339                - type: "object"
 11340                  example:
 11341                    Name: "server.conf"
 11342                    Labels:
 11343                      foo: "bar"
 11344                    Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg=="
 11345        tags: ["Config"]
 11346    /configs/{id}:
 11347      get:
 11348        summary: "Inspect a config"
 11349        operationId: "ConfigInspect"
 11350        produces:
 11351          - "application/json"
 11352        responses:
 11353          200:
 11354            description: "no error"
 11355            schema:
 11356              $ref: "#/definitions/Config"
 11357            examples:
 11358              application/json:
 11359                ID: "ktnbjxoalbkvbvedmg1urrz8h"
 11360                Version:
 11361                  Index: 11
 11362                CreatedAt: "2016-11-05T01:20:17.327670065Z"
 11363                UpdatedAt: "2016-11-05T01:20:17.327670065Z"
 11364                Spec:
 11365                  Name: "app-dev.crt"
 11366          404:
 11367            description: "config not found"
 11368            schema:
 11369              $ref: "#/definitions/ErrorResponse"
 11370          500:
 11371            description: "server error"
 11372            schema:
 11373              $ref: "#/definitions/ErrorResponse"
 11374          503:
 11375            description: "node is not part of a swarm"
 11376            schema:
 11377              $ref: "#/definitions/ErrorResponse"
 11378        parameters:
 11379          - name: "id"
 11380            in: "path"
 11381            required: true
 11382            type: "string"
 11383            description: "ID of the config"
 11384        tags: ["Config"]
 11385      delete:
 11386        summary: "Delete a config"
 11387        operationId: "ConfigDelete"
 11388        produces:
 11389          - "application/json"
 11390        responses:
 11391          204:
 11392            description: "no error"
 11393          404:
 11394            description: "config not found"
 11395            schema:
 11396              $ref: "#/definitions/ErrorResponse"
 11397          500:
 11398            description: "server error"
 11399            schema:
 11400              $ref: "#/definitions/ErrorResponse"
 11401          503:
 11402            description: "node is not part of a swarm"
 11403            schema:
 11404              $ref: "#/definitions/ErrorResponse"
 11405        parameters:
 11406          - name: "id"
 11407            in: "path"
 11408            required: true
 11409            type: "string"
 11410            description: "ID of the config"
 11411        tags: ["Config"]
 11412    /configs/{id}/update:
 11413      post:
 11414        summary: "Update a Config"
 11415        operationId: "ConfigUpdate"
 11416        responses:
 11417          200:
 11418            description: "no error"
 11419          400:
 11420            description: "bad parameter"
 11421            schema:
 11422              $ref: "#/definitions/ErrorResponse"
 11423          404:
 11424            description: "no such config"
 11425            schema:
 11426              $ref: "#/definitions/ErrorResponse"
 11427          500:
 11428            description: "server error"
 11429            schema:
 11430              $ref: "#/definitions/ErrorResponse"
 11431          503:
 11432            description: "node is not part of a swarm"
 11433            schema:
 11434              $ref: "#/definitions/ErrorResponse"
 11435        parameters:
 11436          - name: "id"
 11437            in: "path"
 11438            description: "The ID or name of the config"
 11439            type: "string"
 11440            required: true
 11441          - name: "body"
 11442            in: "body"
 11443            schema:
 11444              $ref: "#/definitions/ConfigSpec"
 11445            description: |
 11446              The spec of the config to update. Currently, only the Labels field
 11447              can be updated. All other fields must remain unchanged from the
 11448              [ConfigInspect endpoint](#operation/ConfigInspect) response values.
 11449          - name: "version"
 11450            in: "query"
 11451            description: |
 11452              The version number of the config object being updated. This is
 11453              required to avoid conflicting writes.
 11454            type: "integer"
 11455            format: "int64"
 11456            required: true
 11457        tags: ["Config"]
 11458    /distribution/{name}/json:
 11459      get:
 11460        summary: "Get image information from the registry"
 11461        description: |
 11462          Return image digest and platform information by contacting the registry.
 11463        operationId: "DistributionInspect"
 11464        produces:
 11465          - "application/json"
 11466        responses:
 11467          200:
 11468            description: "descriptor and platform information"
 11469            schema:
 11470              $ref: "#/definitions/DistributionInspect"
 11471          401:
 11472            description: "Failed authentication or no image found"
 11473            schema:
 11474              $ref: "#/definitions/ErrorResponse"
 11475            examples:
 11476              application/json:
 11477                message: "No such image: someimage (tag: latest)"
 11478          500:
 11479            description: "Server error"
 11480            schema:
 11481              $ref: "#/definitions/ErrorResponse"
 11482        parameters:
 11483          - name: "name"
 11484            in: "path"
 11485            description: "Image name or id"
 11486            type: "string"
 11487            required: true
 11488        tags: ["Distribution"]
 11489    /session:
 11490      post:
 11491        summary: "Initialize interactive session"
 11492        description: |
 11493          Start a new interactive session with a server. Session allows server to
 11494          call back to the client for advanced capabilities.
 11495  
 11496          ### Hijacking
 11497  
 11498          This endpoint hijacks the HTTP connection to HTTP2 transport that allows
 11499          the client to expose gPRC services on that connection.
 11500  
 11501          For example, the client sends this request to upgrade the connection:
 11502  
 11503          ```
 11504          POST /session HTTP/1.1
 11505          Upgrade: h2c
 11506          Connection: Upgrade
 11507          ```
 11508  
 11509          The Docker daemon responds with a `101 UPGRADED` response follow with
 11510          the raw stream:
 11511  
 11512          ```
 11513          HTTP/1.1 101 UPGRADED
 11514          Connection: Upgrade
 11515          Upgrade: h2c
 11516          ```
 11517        operationId: "Session"
 11518        produces:
 11519          - "application/vnd.docker.raw-stream"
 11520        responses:
 11521          101:
 11522            description: "no error, hijacking successful"
 11523          400:
 11524            description: "bad parameter"
 11525            schema:
 11526              $ref: "#/definitions/ErrorResponse"
 11527          500:
 11528            description: "server error"
 11529            schema:
 11530              $ref: "#/definitions/ErrorResponse"
 11531        tags: ["Session"]