github.com/moby/docker@v26.1.3+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          - name: "version"
  7705            in: "query"
  7706            type: "string"
  7707            default: "1"
  7708            enum: ["1", "2"]
  7709            description: |
  7710              Version of the builder backend to use.
  7711  
  7712              - `1` is the first generation classic (deprecated) builder in the Docker daemon (default)
  7713              - `2` is [BuildKit](https://github.com/moby/buildkit)
  7714        responses:
  7715          200:
  7716            description: "no error"
  7717          400:
  7718            description: "Bad parameter"
  7719            schema:
  7720              $ref: "#/definitions/ErrorResponse"
  7721          500:
  7722            description: "server error"
  7723            schema:
  7724              $ref: "#/definitions/ErrorResponse"
  7725        tags: ["Image"]
  7726    /build/prune:
  7727      post:
  7728        summary: "Delete builder cache"
  7729        produces:
  7730          - "application/json"
  7731        operationId: "BuildPrune"
  7732        parameters:
  7733          - name: "keep-storage"
  7734            in: "query"
  7735            description: "Amount of disk space in bytes to keep for cache"
  7736            type: "integer"
  7737            format: "int64"
  7738          - name: "all"
  7739            in: "query"
  7740            type: "boolean"
  7741            description: "Remove all types of build cache"
  7742          - name: "filters"
  7743            in: "query"
  7744            type: "string"
  7745            description: |
  7746              A JSON encoded value of the filters (a `map[string][]string`) to
  7747              process on the list of build cache objects.
  7748  
  7749              Available filters:
  7750  
  7751              - `until=<duration>`: duration relative to daemon's time, during which build cache was not used, in Go's duration format (e.g., '24h')
  7752              - `id=<id>`
  7753              - `parent=<id>`
  7754              - `type=<string>`
  7755              - `description=<string>`
  7756              - `inuse`
  7757              - `shared`
  7758              - `private`
  7759        responses:
  7760          200:
  7761            description: "No error"
  7762            schema:
  7763              type: "object"
  7764              title: "BuildPruneResponse"
  7765              properties:
  7766                CachesDeleted:
  7767                  type: "array"
  7768                  items:
  7769                    description: "ID of build cache object"
  7770                    type: "string"
  7771                SpaceReclaimed:
  7772                  description: "Disk space reclaimed in bytes"
  7773                  type: "integer"
  7774                  format: "int64"
  7775          500:
  7776            description: "Server error"
  7777            schema:
  7778              $ref: "#/definitions/ErrorResponse"
  7779        tags: ["Image"]
  7780    /images/create:
  7781      post:
  7782        summary: "Create an image"
  7783        description: "Create an image by either pulling it from a registry or importing it."
  7784        operationId: "ImageCreate"
  7785        consumes:
  7786          - "text/plain"
  7787          - "application/octet-stream"
  7788        produces:
  7789          - "application/json"
  7790        responses:
  7791          200:
  7792            description: "no error"
  7793          404:
  7794            description: "repository does not exist or no read access"
  7795            schema:
  7796              $ref: "#/definitions/ErrorResponse"
  7797          500:
  7798            description: "server error"
  7799            schema:
  7800              $ref: "#/definitions/ErrorResponse"
  7801        parameters:
  7802          - name: "fromImage"
  7803            in: "query"
  7804            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."
  7805            type: "string"
  7806          - name: "fromSrc"
  7807            in: "query"
  7808            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."
  7809            type: "string"
  7810          - name: "repo"
  7811            in: "query"
  7812            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."
  7813            type: "string"
  7814          - name: "tag"
  7815            in: "query"
  7816            description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled."
  7817            type: "string"
  7818          - name: "message"
  7819            in: "query"
  7820            description: "Set commit message for imported image."
  7821            type: "string"
  7822          - name: "inputImage"
  7823            in: "body"
  7824            description: "Image content if the value `-` has been specified in fromSrc query parameter"
  7825            schema:
  7826              type: "string"
  7827            required: false
  7828          - name: "X-Registry-Auth"
  7829            in: "header"
  7830            description: |
  7831              A base64url-encoded auth configuration.
  7832  
  7833              Refer to the [authentication section](#section/Authentication) for
  7834              details.
  7835            type: "string"
  7836          - name: "changes"
  7837            in: "query"
  7838            description: |
  7839              Apply `Dockerfile` instructions to the image that is created,
  7840              for example: `changes=ENV DEBUG=true`.
  7841              Note that `ENV DEBUG=true` should be URI component encoded.
  7842  
  7843              Supported `Dockerfile` instructions:
  7844              `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
  7845            type: "array"
  7846            items:
  7847              type: "string"
  7848          - name: "platform"
  7849            in: "query"
  7850            description: "Platform in the format os[/arch[/variant]]"
  7851            type: "string"
  7852            default: ""
  7853        tags: ["Image"]
  7854    /images/{name}/json:
  7855      get:
  7856        summary: "Inspect an image"
  7857        description: "Return low-level information about an image."
  7858        operationId: "ImageInspect"
  7859        produces:
  7860          - "application/json"
  7861        responses:
  7862          200:
  7863            description: "No error"
  7864            schema:
  7865              $ref: "#/definitions/ImageInspect"
  7866          404:
  7867            description: "No such image"
  7868            schema:
  7869              $ref: "#/definitions/ErrorResponse"
  7870            examples:
  7871              application/json:
  7872                message: "No such image: someimage (tag: latest)"
  7873          500:
  7874            description: "Server error"
  7875            schema:
  7876              $ref: "#/definitions/ErrorResponse"
  7877        parameters:
  7878          - name: "name"
  7879            in: "path"
  7880            description: "Image name or id"
  7881            type: "string"
  7882            required: true
  7883        tags: ["Image"]
  7884    /images/{name}/history:
  7885      get:
  7886        summary: "Get the history of an image"
  7887        description: "Return parent layers of an image."
  7888        operationId: "ImageHistory"
  7889        produces: ["application/json"]
  7890        responses:
  7891          200:
  7892            description: "List of image layers"
  7893            schema:
  7894              type: "array"
  7895              items:
  7896                type: "object"
  7897                x-go-name: HistoryResponseItem
  7898                title: "HistoryResponseItem"
  7899                description: "individual image layer information in response to ImageHistory operation"
  7900                required: [Id, Created, CreatedBy, Tags, Size, Comment]
  7901                properties:
  7902                  Id:
  7903                    type: "string"
  7904                    x-nullable: false
  7905                  Created:
  7906                    type: "integer"
  7907                    format: "int64"
  7908                    x-nullable: false
  7909                  CreatedBy:
  7910                    type: "string"
  7911                    x-nullable: false
  7912                  Tags:
  7913                    type: "array"
  7914                    items:
  7915                      type: "string"
  7916                  Size:
  7917                    type: "integer"
  7918                    format: "int64"
  7919                    x-nullable: false
  7920                  Comment:
  7921                    type: "string"
  7922                    x-nullable: false
  7923            examples:
  7924              application/json:
  7925                - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710"
  7926                  Created: 1398108230
  7927                  CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /"
  7928                  Tags:
  7929                    - "ubuntu:lucid"
  7930                    - "ubuntu:10.04"
  7931                  Size: 182964289
  7932                  Comment: ""
  7933                - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8"
  7934                  Created: 1398108222
  7935                  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/"
  7936                  Tags: []
  7937                  Size: 0
  7938                  Comment: ""
  7939                - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158"
  7940                  Created: 1371157430
  7941                  CreatedBy: ""
  7942                  Tags:
  7943                    - "scratch12:latest"
  7944                    - "scratch:latest"
  7945                  Size: 0
  7946                  Comment: "Imported from -"
  7947          404:
  7948            description: "No such image"
  7949            schema:
  7950              $ref: "#/definitions/ErrorResponse"
  7951          500:
  7952            description: "Server error"
  7953            schema:
  7954              $ref: "#/definitions/ErrorResponse"
  7955        parameters:
  7956          - name: "name"
  7957            in: "path"
  7958            description: "Image name or ID"
  7959            type: "string"
  7960            required: true
  7961        tags: ["Image"]
  7962    /images/{name}/push:
  7963      post:
  7964        summary: "Push an image"
  7965        description: |
  7966          Push an image to a registry.
  7967  
  7968          If you wish to push an image on to a private registry, that image must
  7969          already have a tag which references the registry. For example,
  7970          `registry.example.com/myimage:latest`.
  7971  
  7972          The push is cancelled if the HTTP connection is closed.
  7973        operationId: "ImagePush"
  7974        consumes:
  7975          - "application/octet-stream"
  7976        responses:
  7977          200:
  7978            description: "No error"
  7979          404:
  7980            description: "No such image"
  7981            schema:
  7982              $ref: "#/definitions/ErrorResponse"
  7983          500:
  7984            description: "Server error"
  7985            schema:
  7986              $ref: "#/definitions/ErrorResponse"
  7987        parameters:
  7988          - name: "name"
  7989            in: "path"
  7990            description: "Image name or ID."
  7991            type: "string"
  7992            required: true
  7993          - name: "tag"
  7994            in: "query"
  7995            description: "The tag to associate with the image on the registry."
  7996            type: "string"
  7997          - name: "X-Registry-Auth"
  7998            in: "header"
  7999            description: |
  8000              A base64url-encoded auth configuration.
  8001  
  8002              Refer to the [authentication section](#section/Authentication) for
  8003              details.
  8004            type: "string"
  8005            required: true
  8006        tags: ["Image"]
  8007    /images/{name}/tag:
  8008      post:
  8009        summary: "Tag an image"
  8010        description: "Tag an image so that it becomes part of a repository."
  8011        operationId: "ImageTag"
  8012        responses:
  8013          201:
  8014            description: "No error"
  8015          400:
  8016            description: "Bad parameter"
  8017            schema:
  8018              $ref: "#/definitions/ErrorResponse"
  8019          404:
  8020            description: "No such image"
  8021            schema:
  8022              $ref: "#/definitions/ErrorResponse"
  8023          409:
  8024            description: "Conflict"
  8025            schema:
  8026              $ref: "#/definitions/ErrorResponse"
  8027          500:
  8028            description: "Server error"
  8029            schema:
  8030              $ref: "#/definitions/ErrorResponse"
  8031        parameters:
  8032          - name: "name"
  8033            in: "path"
  8034            description: "Image name or ID to tag."
  8035            type: "string"
  8036            required: true
  8037          - name: "repo"
  8038            in: "query"
  8039            description: "The repository to tag in. For example, `someuser/someimage`."
  8040            type: "string"
  8041          - name: "tag"
  8042            in: "query"
  8043            description: "The name of the new tag."
  8044            type: "string"
  8045        tags: ["Image"]
  8046    /images/{name}:
  8047      delete:
  8048        summary: "Remove an image"
  8049        description: |
  8050          Remove an image, along with any untagged parent images that were
  8051          referenced by that image.
  8052  
  8053          Images can't be removed if they have descendant images, are being
  8054          used by a running container or are being used by a build.
  8055        operationId: "ImageDelete"
  8056        produces: ["application/json"]
  8057        responses:
  8058          200:
  8059            description: "The image was deleted successfully"
  8060            schema:
  8061              type: "array"
  8062              items:
  8063                $ref: "#/definitions/ImageDeleteResponseItem"
  8064            examples:
  8065              application/json:
  8066                - Untagged: "3e2f21a89f"
  8067                - Deleted: "3e2f21a89f"
  8068                - Deleted: "53b4f83ac9"
  8069          404:
  8070            description: "No such image"
  8071            schema:
  8072              $ref: "#/definitions/ErrorResponse"
  8073          409:
  8074            description: "Conflict"
  8075            schema:
  8076              $ref: "#/definitions/ErrorResponse"
  8077          500:
  8078            description: "Server error"
  8079            schema:
  8080              $ref: "#/definitions/ErrorResponse"
  8081        parameters:
  8082          - name: "name"
  8083            in: "path"
  8084            description: "Image name or ID"
  8085            type: "string"
  8086            required: true
  8087          - name: "force"
  8088            in: "query"
  8089            description: "Remove the image even if it is being used by stopped containers or has other tags"
  8090            type: "boolean"
  8091            default: false
  8092          - name: "noprune"
  8093            in: "query"
  8094            description: "Do not delete untagged parent images"
  8095            type: "boolean"
  8096            default: false
  8097        tags: ["Image"]
  8098    /images/search:
  8099      get:
  8100        summary: "Search images"
  8101        description: "Search for an image on Docker Hub."
  8102        operationId: "ImageSearch"
  8103        produces:
  8104          - "application/json"
  8105        responses:
  8106          200:
  8107            description: "No error"
  8108            schema:
  8109              type: "array"
  8110              items:
  8111                type: "object"
  8112                title: "ImageSearchResponseItem"
  8113                properties:
  8114                  description:
  8115                    type: "string"
  8116                  is_official:
  8117                    type: "boolean"
  8118                  is_automated:
  8119                    type: "boolean"
  8120                  name:
  8121                    type: "string"
  8122                  star_count:
  8123                    type: "integer"
  8124            examples:
  8125              application/json:
  8126                - description: ""
  8127                  is_official: false
  8128                  is_automated: false
  8129                  name: "wma55/u1210sshd"
  8130                  star_count: 0
  8131                - description: ""
  8132                  is_official: false
  8133                  is_automated: false
  8134                  name: "jdswinbank/sshd"
  8135                  star_count: 0
  8136                - description: ""
  8137                  is_official: false
  8138                  is_automated: false
  8139                  name: "vgauthier/sshd"
  8140                  star_count: 0
  8141          500:
  8142            description: "Server error"
  8143            schema:
  8144              $ref: "#/definitions/ErrorResponse"
  8145        parameters:
  8146          - name: "term"
  8147            in: "query"
  8148            description: "Term to search"
  8149            type: "string"
  8150            required: true
  8151          - name: "limit"
  8152            in: "query"
  8153            description: "Maximum number of results to return"
  8154            type: "integer"
  8155          - name: "filters"
  8156            in: "query"
  8157            description: |
  8158              A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:
  8159  
  8160              - `is-automated=(true|false)`
  8161              - `is-official=(true|false)`
  8162              - `stars=<number>` Matches images that has at least 'number' stars.
  8163            type: "string"
  8164        tags: ["Image"]
  8165    /images/prune:
  8166      post:
  8167        summary: "Delete unused images"
  8168        produces:
  8169          - "application/json"
  8170        operationId: "ImagePrune"
  8171        parameters:
  8172          - name: "filters"
  8173            in: "query"
  8174            description: |
  8175              Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters:
  8176  
  8177              - `dangling=<boolean>` When set to `true` (or `1`), prune only
  8178                 unused *and* untagged images. When set to `false`
  8179                 (or `0`), all unused images are pruned.
  8180              - `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.
  8181              - `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.
  8182            type: "string"
  8183        responses:
  8184          200:
  8185            description: "No error"
  8186            schema:
  8187              type: "object"
  8188              title: "ImagePruneResponse"
  8189              properties:
  8190                ImagesDeleted:
  8191                  description: "Images that were deleted"
  8192                  type: "array"
  8193                  items:
  8194                    $ref: "#/definitions/ImageDeleteResponseItem"
  8195                SpaceReclaimed:
  8196                  description: "Disk space reclaimed in bytes"
  8197                  type: "integer"
  8198                  format: "int64"
  8199          500:
  8200            description: "Server error"
  8201            schema:
  8202              $ref: "#/definitions/ErrorResponse"
  8203        tags: ["Image"]
  8204    /auth:
  8205      post:
  8206        summary: "Check auth configuration"
  8207        description: |
  8208          Validate credentials for a registry and, if available, get an identity
  8209          token for accessing the registry without password.
  8210        operationId: "SystemAuth"
  8211        consumes: ["application/json"]
  8212        produces: ["application/json"]
  8213        responses:
  8214          200:
  8215            description: "An identity token was generated successfully."
  8216            schema:
  8217              type: "object"
  8218              title: "SystemAuthResponse"
  8219              required: [Status]
  8220              properties:
  8221                Status:
  8222                  description: "The status of the authentication"
  8223                  type: "string"
  8224                  x-nullable: false
  8225                IdentityToken:
  8226                  description: "An opaque token used to authenticate a user after a successful login"
  8227                  type: "string"
  8228                  x-nullable: false
  8229            examples:
  8230              application/json:
  8231                Status: "Login Succeeded"
  8232                IdentityToken: "9cbaf023786cd7..."
  8233          204:
  8234            description: "No error"
  8235          401:
  8236            description: "Auth error"
  8237            schema:
  8238              $ref: "#/definitions/ErrorResponse"
  8239          500:
  8240            description: "Server error"
  8241            schema:
  8242              $ref: "#/definitions/ErrorResponse"
  8243        parameters:
  8244          - name: "authConfig"
  8245            in: "body"
  8246            description: "Authentication to check"
  8247            schema:
  8248              $ref: "#/definitions/AuthConfig"
  8249        tags: ["System"]
  8250    /info:
  8251      get:
  8252        summary: "Get system information"
  8253        operationId: "SystemInfo"
  8254        produces:
  8255          - "application/json"
  8256        responses:
  8257          200:
  8258            description: "No error"
  8259            schema:
  8260              $ref: "#/definitions/SystemInfo"
  8261          500:
  8262            description: "Server error"
  8263            schema:
  8264              $ref: "#/definitions/ErrorResponse"
  8265        tags: ["System"]
  8266    /version:
  8267      get:
  8268        summary: "Get version"
  8269        description: "Returns the version of Docker that is running and various information about the system that Docker is running on."
  8270        operationId: "SystemVersion"
  8271        produces: ["application/json"]
  8272        responses:
  8273          200:
  8274            description: "no error"
  8275            schema:
  8276              $ref: "#/definitions/SystemVersion"
  8277          500:
  8278            description: "server error"
  8279            schema:
  8280              $ref: "#/definitions/ErrorResponse"
  8281        tags: ["System"]
  8282    /_ping:
  8283      get:
  8284        summary: "Ping"
  8285        description: "This is a dummy endpoint you can use to test if the server is accessible."
  8286        operationId: "SystemPing"
  8287        produces: ["text/plain"]
  8288        responses:
  8289          200:
  8290            description: "no error"
  8291            schema:
  8292              type: "string"
  8293              example: "OK"
  8294            headers:
  8295              API-Version:
  8296                type: "string"
  8297                description: "Max API Version the server supports"
  8298              Builder-Version:
  8299                type: "string"
  8300                description: "Default version of docker image builder"
  8301              Docker-Experimental:
  8302                type: "boolean"
  8303                description: "If the server is running with experimental mode enabled"
  8304              Cache-Control:
  8305                type: "string"
  8306                default: "no-cache, no-store, must-revalidate"
  8307              Pragma:
  8308                type: "string"
  8309                default: "no-cache"
  8310          500:
  8311            description: "server error"
  8312            schema:
  8313              $ref: "#/definitions/ErrorResponse"
  8314            headers:
  8315              Cache-Control:
  8316                type: "string"
  8317                default: "no-cache, no-store, must-revalidate"
  8318              Pragma:
  8319                type: "string"
  8320                default: "no-cache"
  8321        tags: ["System"]
  8322      head:
  8323        summary: "Ping"
  8324        description: "This is a dummy endpoint you can use to test if the server is accessible."
  8325        operationId: "SystemPingHead"
  8326        produces: ["text/plain"]
  8327        responses:
  8328          200:
  8329            description: "no error"
  8330            schema:
  8331              type: "string"
  8332              example: "(empty)"
  8333            headers:
  8334              API-Version:
  8335                type: "string"
  8336                description: "Max API Version the server supports"
  8337              Builder-Version:
  8338                type: "string"
  8339                description: "Default version of docker image builder"
  8340              Docker-Experimental:
  8341                type: "boolean"
  8342                description: "If the server is running with experimental mode enabled"
  8343              Cache-Control:
  8344                type: "string"
  8345                default: "no-cache, no-store, must-revalidate"
  8346              Pragma:
  8347                type: "string"
  8348                default: "no-cache"
  8349          500:
  8350            description: "server error"
  8351            schema:
  8352              $ref: "#/definitions/ErrorResponse"
  8353        tags: ["System"]
  8354    /commit:
  8355      post:
  8356        summary: "Create a new image from a container"
  8357        operationId: "ImageCommit"
  8358        consumes:
  8359          - "application/json"
  8360        produces:
  8361          - "application/json"
  8362        responses:
  8363          201:
  8364            description: "no error"
  8365            schema:
  8366              $ref: "#/definitions/IdResponse"
  8367          404:
  8368            description: "no such container"
  8369            schema:
  8370              $ref: "#/definitions/ErrorResponse"
  8371            examples:
  8372              application/json:
  8373                message: "No such container: c2ada9df5af8"
  8374          500:
  8375            description: "server error"
  8376            schema:
  8377              $ref: "#/definitions/ErrorResponse"
  8378        parameters:
  8379          - name: "containerConfig"
  8380            in: "body"
  8381            description: "The container configuration"
  8382            schema:
  8383              $ref: "#/definitions/ContainerConfig"
  8384          - name: "container"
  8385            in: "query"
  8386            description: "The ID or name of the container to commit"
  8387            type: "string"
  8388          - name: "repo"
  8389            in: "query"
  8390            description: "Repository name for the created image"
  8391            type: "string"
  8392          - name: "tag"
  8393            in: "query"
  8394            description: "Tag name for the create image"
  8395            type: "string"
  8396          - name: "comment"
  8397            in: "query"
  8398            description: "Commit message"
  8399            type: "string"
  8400          - name: "author"
  8401            in: "query"
  8402            description: "Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`)"
  8403            type: "string"
  8404          - name: "pause"
  8405            in: "query"
  8406            description: "Whether to pause the container before committing"
  8407            type: "boolean"
  8408            default: true
  8409          - name: "changes"
  8410            in: "query"
  8411            description: "`Dockerfile` instructions to apply while committing"
  8412            type: "string"
  8413        tags: ["Image"]
  8414    /events:
  8415      get:
  8416        summary: "Monitor events"
  8417        description: |
  8418          Stream real-time events from the server.
  8419  
  8420          Various objects within Docker report events when something happens to them.
  8421  
  8422          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`
  8423  
  8424          Images report these events: `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, and `untag`
  8425  
  8426          Volumes report these events: `create`, `mount`, `unmount`, and `destroy`
  8427  
  8428          Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, and `remove`
  8429  
  8430          The Docker daemon reports these events: `reload`
  8431  
  8432          Services report these events: `create`, `update`, and `remove`
  8433  
  8434          Nodes report these events: `create`, `update`, and `remove`
  8435  
  8436          Secrets report these events: `create`, `update`, and `remove`
  8437  
  8438          Configs report these events: `create`, `update`, and `remove`
  8439  
  8440        operationId: "SystemEvents"
  8441        produces:
  8442          - "application/json"
  8443        responses:
  8444          200:
  8445            description: "no error"
  8446            schema:
  8447              $ref: "#/definitions/EventMessage"
  8448          400:
  8449            description: "bad parameter"
  8450            schema:
  8451              $ref: "#/definitions/ErrorResponse"
  8452          500:
  8453            description: "server error"
  8454            schema:
  8455              $ref: "#/definitions/ErrorResponse"
  8456        parameters:
  8457          - name: "since"
  8458            in: "query"
  8459            description: "Show events created since this timestamp then stream new events."
  8460            type: "string"
  8461          - name: "until"
  8462            in: "query"
  8463            description: "Show events created until this timestamp then stop streaming."
  8464            type: "string"
  8465          - name: "filters"
  8466            in: "query"
  8467            description: |
  8468              A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters:
  8469  
  8470              - `config=<string>` config name or ID
  8471              - `container=<string>` container name or ID
  8472              - `daemon=<string>` daemon name or ID
  8473              - `event=<string>` event type
  8474              - `image=<string>` image name or ID
  8475              - `label=<string>` image or container label
  8476              - `network=<string>` network name or ID
  8477              - `node=<string>` node ID
  8478              - `plugin`=<string> plugin name or ID
  8479              - `scope`=<string> local or swarm
  8480              - `secret=<string>` secret name or ID
  8481              - `service=<string>` service name or ID
  8482              - `type=<string>` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config`
  8483              - `volume=<string>` volume name
  8484            type: "string"
  8485        tags: ["System"]
  8486    /system/df:
  8487      get:
  8488        summary: "Get data usage information"
  8489        operationId: "SystemDataUsage"
  8490        responses:
  8491          200:
  8492            description: "no error"
  8493            schema:
  8494              type: "object"
  8495              title: "SystemDataUsageResponse"
  8496              properties:
  8497                LayersSize:
  8498                  type: "integer"
  8499                  format: "int64"
  8500                Images:
  8501                  type: "array"
  8502                  items:
  8503                    $ref: "#/definitions/ImageSummary"
  8504                Containers:
  8505                  type: "array"
  8506                  items:
  8507                    $ref: "#/definitions/ContainerSummary"
  8508                Volumes:
  8509                  type: "array"
  8510                  items:
  8511                    $ref: "#/definitions/Volume"
  8512                BuildCache:
  8513                  type: "array"
  8514                  items:
  8515                    $ref: "#/definitions/BuildCache"
  8516              example:
  8517                LayersSize: 1092588
  8518                Images:
  8519                  -
  8520                    Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
  8521                    ParentId: ""
  8522                    RepoTags:
  8523                      - "busybox:latest"
  8524                    RepoDigests:
  8525                      - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6"
  8526                    Created: 1466724217
  8527                    Size: 1092588
  8528                    SharedSize: 0
  8529                    VirtualSize: 1092588
  8530                    Labels: {}
  8531                    Containers: 1
  8532                Containers:
  8533                  -
  8534                    Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148"
  8535                    Names:
  8536                      - "/top"
  8537                    Image: "busybox"
  8538                    ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
  8539                    Command: "top"
  8540                    Created: 1472592424
  8541                    Ports: []
  8542                    SizeRootFs: 1092588
  8543                    Labels: {}
  8544                    State: "exited"
  8545                    Status: "Exited (0) 56 minutes ago"
  8546                    HostConfig:
  8547                      NetworkMode: "default"
  8548                    NetworkSettings:
  8549                      Networks:
  8550                        bridge:
  8551                          IPAMConfig: null
  8552                          Links: null
  8553                          Aliases: null
  8554                          NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92"
  8555                          EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a"
  8556                          Gateway: "172.18.0.1"
  8557                          IPAddress: "172.18.0.2"
  8558                          IPPrefixLen: 16
  8559                          IPv6Gateway: ""
  8560                          GlobalIPv6Address: ""
  8561                          GlobalIPv6PrefixLen: 0
  8562                          MacAddress: "02:42:ac:12:00:02"
  8563                    Mounts: []
  8564                Volumes:
  8565                  -
  8566                    Name: "my-volume"
  8567                    Driver: "local"
  8568                    Mountpoint: "/var/lib/docker/volumes/my-volume/_data"
  8569                    Labels: null
  8570                    Scope: "local"
  8571                    Options: null
  8572                    UsageData:
  8573                      Size: 10920104
  8574                      RefCount: 2
  8575                BuildCache:
  8576                  -
  8577                    ID: "hw53o5aio51xtltp5xjp8v7fx"
  8578                    Parent: ""
  8579                    Type: "regular"
  8580                    Description: "pulled from docker.io/library/debian@sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0"
  8581                    InUse: false
  8582                    Shared: true
  8583                    Size: 0
  8584                    CreatedAt: "2021-06-28T13:31:01.474619385Z"
  8585                    LastUsedAt: "2021-07-07T22:02:32.738075951Z"
  8586                    UsageCount: 26
  8587                  -
  8588                    ID: "ndlpt0hhvkqcdfkputsk4cq9c"
  8589                    Parent: "ndlpt0hhvkqcdfkputsk4cq9c"
  8590                    Type: "regular"
  8591                    Description: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache"
  8592                    InUse: false
  8593                    Shared: true
  8594                    Size: 51
  8595                    CreatedAt: "2021-06-28T13:31:03.002625487Z"
  8596                    LastUsedAt: "2021-07-07T22:02:32.773909517Z"
  8597                    UsageCount: 26
  8598          500:
  8599            description: "server error"
  8600            schema:
  8601              $ref: "#/definitions/ErrorResponse"
  8602        tags: ["System"]
  8603    /images/{name}/get:
  8604      get:
  8605        summary: "Export an image"
  8606        description: |
  8607          Get a tarball containing all images and metadata for a repository.
  8608  
  8609          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.
  8610  
  8611          ### Image tarball format
  8612  
  8613          An image tarball contains one directory per image layer (named using its long ID), each containing these files:
  8614  
  8615          - `VERSION`: currently `1.0` - the file format version
  8616          - `json`: detailed layer information, similar to `docker inspect layer_id`
  8617          - `layer.tar`: A tarfile containing the filesystem changes in this layer
  8618  
  8619          The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions.
  8620  
  8621          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.
  8622  
  8623          ```json
  8624          {
  8625            "hello-world": {
  8626              "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"
  8627            }
  8628          }
  8629          ```
  8630        operationId: "ImageGet"
  8631        produces:
  8632          - "application/x-tar"
  8633        responses:
  8634          200:
  8635            description: "no error"
  8636            schema:
  8637              type: "string"
  8638              format: "binary"
  8639          500:
  8640            description: "server error"
  8641            schema:
  8642              $ref: "#/definitions/ErrorResponse"
  8643        parameters:
  8644          - name: "name"
  8645            in: "path"
  8646            description: "Image name or ID"
  8647            type: "string"
  8648            required: true
  8649        tags: ["Image"]
  8650    /images/get:
  8651      get:
  8652        summary: "Export several images"
  8653        description: |
  8654          Get a tarball containing all images and metadata for several image
  8655          repositories.
  8656  
  8657          For each value of the `names` parameter: if it is a specific name and
  8658          tag (e.g. `ubuntu:latest`), then only that image (and its parents) are
  8659          returned; if it is an image ID, similarly only that image (and its parents)
  8660          are returned and there would be no names referenced in the 'repositories'
  8661          file for this image ID.
  8662  
  8663          For details on the format, see the [export image endpoint](#operation/ImageGet).
  8664        operationId: "ImageGetAll"
  8665        produces:
  8666          - "application/x-tar"
  8667        responses:
  8668          200:
  8669            description: "no error"
  8670            schema:
  8671              type: "string"
  8672              format: "binary"
  8673          500:
  8674            description: "server error"
  8675            schema:
  8676              $ref: "#/definitions/ErrorResponse"
  8677        parameters:
  8678          - name: "names"
  8679            in: "query"
  8680            description: "Image names to filter by"
  8681            type: "array"
  8682            items:
  8683              type: "string"
  8684        tags: ["Image"]
  8685    /images/load:
  8686      post:
  8687        summary: "Import images"
  8688        description: |
  8689          Load a set of images and tags into a repository.
  8690  
  8691          For details on the format, see the [export image endpoint](#operation/ImageGet).
  8692        operationId: "ImageLoad"
  8693        consumes:
  8694          - "application/x-tar"
  8695        produces:
  8696          - "application/json"
  8697        responses:
  8698          200:
  8699            description: "no error"
  8700          500:
  8701            description: "server error"
  8702            schema:
  8703              $ref: "#/definitions/ErrorResponse"
  8704        parameters:
  8705          - name: "imagesTarball"
  8706            in: "body"
  8707            description: "Tar archive containing images"
  8708            schema:
  8709              type: "string"
  8710              format: "binary"
  8711          - name: "quiet"
  8712            in: "query"
  8713            description: "Suppress progress details during load."
  8714            type: "boolean"
  8715            default: false
  8716        tags: ["Image"]
  8717    /containers/{id}/exec:
  8718      post:
  8719        summary: "Create an exec instance"
  8720        description: "Run a command inside a running container."
  8721        operationId: "ContainerExec"
  8722        consumes:
  8723          - "application/json"
  8724        produces:
  8725          - "application/json"
  8726        responses:
  8727          201:
  8728            description: "no error"
  8729            schema:
  8730              $ref: "#/definitions/IdResponse"
  8731          404:
  8732            description: "no such container"
  8733            schema:
  8734              $ref: "#/definitions/ErrorResponse"
  8735            examples:
  8736              application/json:
  8737                message: "No such container: c2ada9df5af8"
  8738          409:
  8739            description: "container is paused"
  8740            schema:
  8741              $ref: "#/definitions/ErrorResponse"
  8742          500:
  8743            description: "Server error"
  8744            schema:
  8745              $ref: "#/definitions/ErrorResponse"
  8746        parameters:
  8747          - name: "execConfig"
  8748            in: "body"
  8749            description: "Exec configuration"
  8750            schema:
  8751              type: "object"
  8752              title: "ExecConfig"
  8753              properties:
  8754                AttachStdin:
  8755                  type: "boolean"
  8756                  description: "Attach to `stdin` of the exec command."
  8757                AttachStdout:
  8758                  type: "boolean"
  8759                  description: "Attach to `stdout` of the exec command."
  8760                AttachStderr:
  8761                  type: "boolean"
  8762                  description: "Attach to `stderr` of the exec command."
  8763                DetachKeys:
  8764                  type: "string"
  8765                  description: |
  8766                    Override the key sequence for detaching a container. Format is
  8767                    a single character `[a-Z]` or `ctrl-<value>` where `<value>`
  8768                    is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
  8769                Tty:
  8770                  type: "boolean"
  8771                  description: "Allocate a pseudo-TTY."
  8772                Env:
  8773                  description: |
  8774                    A list of environment variables in the form `["VAR=value", ...]`.
  8775                  type: "array"
  8776                  items:
  8777                    type: "string"
  8778                Cmd:
  8779                  type: "array"
  8780                  description: "Command to run, as a string or array of strings."
  8781                  items:
  8782                    type: "string"
  8783                Privileged:
  8784                  type: "boolean"
  8785                  description: "Runs the exec process with extended privileges."
  8786                  default: false
  8787                User:
  8788                  type: "string"
  8789                  description: |
  8790                    The user, and optionally, group to run the exec process inside
  8791                    the container. Format is one of: `user`, `user:group`, `uid`,
  8792                    or `uid:gid`.
  8793                WorkingDir:
  8794                  type: "string"
  8795                  description: |
  8796                    The working directory for the exec process inside the container.
  8797              example:
  8798                AttachStdin: false
  8799                AttachStdout: true
  8800                AttachStderr: true
  8801                DetachKeys: "ctrl-p,ctrl-q"
  8802                Tty: false
  8803                Cmd:
  8804                  - "date"
  8805                Env:
  8806                  - "FOO=bar"
  8807                  - "BAZ=quux"
  8808            required: true
  8809          - name: "id"
  8810            in: "path"
  8811            description: "ID or name of container"
  8812            type: "string"
  8813            required: true
  8814        tags: ["Exec"]
  8815    /exec/{id}/start:
  8816      post:
  8817        summary: "Start an exec instance"
  8818        description: |
  8819          Starts a previously set up exec instance. If detach is true, this endpoint
  8820          returns immediately after starting the command. Otherwise, it sets up an
  8821          interactive session with the command.
  8822        operationId: "ExecStart"
  8823        consumes:
  8824          - "application/json"
  8825        produces:
  8826          - "application/vnd.docker.raw-stream"
  8827        responses:
  8828          200:
  8829            description: "No error"
  8830          404:
  8831            description: "No such exec instance"
  8832            schema:
  8833              $ref: "#/definitions/ErrorResponse"
  8834          409:
  8835            description: "Container is stopped or paused"
  8836            schema:
  8837              $ref: "#/definitions/ErrorResponse"
  8838        parameters:
  8839          - name: "execStartConfig"
  8840            in: "body"
  8841            schema:
  8842              type: "object"
  8843              title: "ExecStartConfig"
  8844              properties:
  8845                Detach:
  8846                  type: "boolean"
  8847                  description: "Detach from the command."
  8848                Tty:
  8849                  type: "boolean"
  8850                  description: "Allocate a pseudo-TTY."
  8851              example:
  8852                Detach: false
  8853                Tty: false
  8854          - name: "id"
  8855            in: "path"
  8856            description: "Exec instance ID"
  8857            required: true
  8858            type: "string"
  8859        tags: ["Exec"]
  8860    /exec/{id}/resize:
  8861      post:
  8862        summary: "Resize an exec instance"
  8863        description: |
  8864          Resize the TTY session used by an exec instance. This endpoint only works
  8865          if `tty` was specified as part of creating and starting the exec instance.
  8866        operationId: "ExecResize"
  8867        responses:
  8868          200:
  8869            description: "No error"
  8870          400:
  8871            description: "bad parameter"
  8872            schema:
  8873              $ref: "#/definitions/ErrorResponse"
  8874          404:
  8875            description: "No such exec instance"
  8876            schema:
  8877              $ref: "#/definitions/ErrorResponse"
  8878          500:
  8879            description: "Server error"
  8880            schema:
  8881              $ref: "#/definitions/ErrorResponse"
  8882        parameters:
  8883          - name: "id"
  8884            in: "path"
  8885            description: "Exec instance ID"
  8886            required: true
  8887            type: "string"
  8888          - name: "h"
  8889            in: "query"
  8890            description: "Height of the TTY session in characters"
  8891            type: "integer"
  8892          - name: "w"
  8893            in: "query"
  8894            description: "Width of the TTY session in characters"
  8895            type: "integer"
  8896        tags: ["Exec"]
  8897    /exec/{id}/json:
  8898      get:
  8899        summary: "Inspect an exec instance"
  8900        description: "Return low-level information about an exec instance."
  8901        operationId: "ExecInspect"
  8902        produces:
  8903          - "application/json"
  8904        responses:
  8905          200:
  8906            description: "No error"
  8907            schema:
  8908              type: "object"
  8909              title: "ExecInspectResponse"
  8910              properties:
  8911                CanRemove:
  8912                  type: "boolean"
  8913                DetachKeys:
  8914                  type: "string"
  8915                ID:
  8916                  type: "string"
  8917                Running:
  8918                  type: "boolean"
  8919                ExitCode:
  8920                  type: "integer"
  8921                ProcessConfig:
  8922                  $ref: "#/definitions/ProcessConfig"
  8923                OpenStdin:
  8924                  type: "boolean"
  8925                OpenStderr:
  8926                  type: "boolean"
  8927                OpenStdout:
  8928                  type: "boolean"
  8929                ContainerID:
  8930                  type: "string"
  8931                Pid:
  8932                  type: "integer"
  8933                  description: "The system process ID for the exec process."
  8934            examples:
  8935              application/json:
  8936                CanRemove: false
  8937                ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126"
  8938                DetachKeys: ""
  8939                ExitCode: 2
  8940                ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b"
  8941                OpenStderr: true
  8942                OpenStdin: true
  8943                OpenStdout: true
  8944                ProcessConfig:
  8945                  arguments:
  8946                    - "-c"
  8947                    - "exit 2"
  8948                  entrypoint: "sh"
  8949                  privileged: false
  8950                  tty: true
  8951                  user: "1000"
  8952                Running: false
  8953                Pid: 42000
  8954          404:
  8955            description: "No such exec instance"
  8956            schema:
  8957              $ref: "#/definitions/ErrorResponse"
  8958          500:
  8959            description: "Server error"
  8960            schema:
  8961              $ref: "#/definitions/ErrorResponse"
  8962        parameters:
  8963          - name: "id"
  8964            in: "path"
  8965            description: "Exec instance ID"
  8966            required: true
  8967            type: "string"
  8968        tags: ["Exec"]
  8969  
  8970    /volumes:
  8971      get:
  8972        summary: "List volumes"
  8973        operationId: "VolumeList"
  8974        produces: ["application/json"]
  8975        responses:
  8976          200:
  8977            description: "Summary volume data that matches the query"
  8978            schema:
  8979              $ref: "#/definitions/VolumeListResponse"
  8980          500:
  8981            description: "Server error"
  8982            schema:
  8983              $ref: "#/definitions/ErrorResponse"
  8984        parameters:
  8985          - name: "filters"
  8986            in: "query"
  8987            description: |
  8988              JSON encoded value of the filters (a `map[string][]string`) to
  8989              process on the volumes list. Available filters:
  8990  
  8991              - `dangling=<boolean>` When set to `true` (or `1`), returns all
  8992                 volumes that are not in use by a container. When set to `false`
  8993                 (or `0`), only volumes that are in use by one or more
  8994                 containers are returned.
  8995              - `driver=<volume-driver-name>` Matches volumes based on their driver.
  8996              - `label=<key>` or `label=<key>:<value>` Matches volumes based on
  8997                 the presence of a `label` alone or a `label` and a value.
  8998              - `name=<volume-name>` Matches all or part of a volume name.
  8999            type: "string"
  9000            format: "json"
  9001        tags: ["Volume"]
  9002  
  9003    /volumes/create:
  9004      post:
  9005        summary: "Create a volume"
  9006        operationId: "VolumeCreate"
  9007        consumes: ["application/json"]
  9008        produces: ["application/json"]
  9009        responses:
  9010          201:
  9011            description: "The volume was created successfully"
  9012            schema:
  9013              $ref: "#/definitions/Volume"
  9014          500:
  9015            description: "Server error"
  9016            schema:
  9017              $ref: "#/definitions/ErrorResponse"
  9018        parameters:
  9019          - name: "volumeConfig"
  9020            in: "body"
  9021            required: true
  9022            description: "Volume configuration"
  9023            schema:
  9024              $ref: "#/definitions/VolumeCreateOptions"
  9025        tags: ["Volume"]
  9026  
  9027    /volumes/{name}:
  9028      get:
  9029        summary: "Inspect a volume"
  9030        operationId: "VolumeInspect"
  9031        produces: ["application/json"]
  9032        responses:
  9033          200:
  9034            description: "No error"
  9035            schema:
  9036              $ref: "#/definitions/Volume"
  9037          404:
  9038            description: "No such volume"
  9039            schema:
  9040              $ref: "#/definitions/ErrorResponse"
  9041          500:
  9042            description: "Server error"
  9043            schema:
  9044              $ref: "#/definitions/ErrorResponse"
  9045        parameters:
  9046          - name: "name"
  9047            in: "path"
  9048            required: true
  9049            description: "Volume name or ID"
  9050            type: "string"
  9051        tags: ["Volume"]
  9052  
  9053      delete:
  9054        summary: "Remove a volume"
  9055        description: "Instruct the driver to remove the volume."
  9056        operationId: "VolumeDelete"
  9057        responses:
  9058          204:
  9059            description: "The volume was removed"
  9060          404:
  9061            description: "No such volume or volume driver"
  9062            schema:
  9063              $ref: "#/definitions/ErrorResponse"
  9064          409:
  9065            description: "Volume is in use and cannot be removed"
  9066            schema:
  9067              $ref: "#/definitions/ErrorResponse"
  9068          500:
  9069            description: "Server error"
  9070            schema:
  9071              $ref: "#/definitions/ErrorResponse"
  9072        parameters:
  9073          - name: "name"
  9074            in: "path"
  9075            required: true
  9076            description: "Volume name or ID"
  9077            type: "string"
  9078          - name: "force"
  9079            in: "query"
  9080            description: "Force the removal of the volume"
  9081            type: "boolean"
  9082            default: false
  9083        tags: ["Volume"]
  9084  
  9085    /volumes/prune:
  9086      post:
  9087        summary: "Delete unused volumes"
  9088        produces:
  9089          - "application/json"
  9090        operationId: "VolumePrune"
  9091        parameters:
  9092          - name: "filters"
  9093            in: "query"
  9094            description: |
  9095              Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  9096  
  9097              Available filters:
  9098              - `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.
  9099            type: "string"
  9100        responses:
  9101          200:
  9102            description: "No error"
  9103            schema:
  9104              type: "object"
  9105              title: "VolumePruneResponse"
  9106              properties:
  9107                VolumesDeleted:
  9108                  description: "Volumes that were deleted"
  9109                  type: "array"
  9110                  items:
  9111                    type: "string"
  9112                SpaceReclaimed:
  9113                  description: "Disk space reclaimed in bytes"
  9114                  type: "integer"
  9115                  format: "int64"
  9116          500:
  9117            description: "Server error"
  9118            schema:
  9119              $ref: "#/definitions/ErrorResponse"
  9120        tags: ["Volume"]
  9121    /networks:
  9122      get:
  9123        summary: "List networks"
  9124        description: |
  9125          Returns a list of networks. For details on the format, see the
  9126          [network inspect endpoint](#operation/NetworkInspect).
  9127  
  9128          Note that it uses a different, smaller representation of a network than
  9129          inspecting a single network. For example, the list of containers attached
  9130          to the network is not propagated in API versions 1.28 and up.
  9131        operationId: "NetworkList"
  9132        produces:
  9133          - "application/json"
  9134        responses:
  9135          200:
  9136            description: "No error"
  9137            schema:
  9138              type: "array"
  9139              items:
  9140                $ref: "#/definitions/Network"
  9141            examples:
  9142              application/json:
  9143                - Name: "bridge"
  9144                  Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566"
  9145                  Created: "2016-10-19T06:21:00.416543526Z"
  9146                  Scope: "local"
  9147                  Driver: "bridge"
  9148                  EnableIPv6: false
  9149                  Internal: false
  9150                  Attachable: false
  9151                  Ingress: false
  9152                  IPAM:
  9153                    Driver: "default"
  9154                    Config:
  9155                      -
  9156                        Subnet: "172.17.0.0/16"
  9157                  Options:
  9158                    com.docker.network.bridge.default_bridge: "true"
  9159                    com.docker.network.bridge.enable_icc: "true"
  9160                    com.docker.network.bridge.enable_ip_masquerade: "true"
  9161                    com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
  9162                    com.docker.network.bridge.name: "docker0"
  9163                    com.docker.network.driver.mtu: "1500"
  9164                - Name: "none"
  9165                  Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794"
  9166                  Created: "0001-01-01T00:00:00Z"
  9167                  Scope: "local"
  9168                  Driver: "null"
  9169                  EnableIPv6: false
  9170                  Internal: false
  9171                  Attachable: false
  9172                  Ingress: false
  9173                  IPAM:
  9174                    Driver: "default"
  9175                    Config: []
  9176                  Containers: {}
  9177                  Options: {}
  9178                - Name: "host"
  9179                  Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e"
  9180                  Created: "0001-01-01T00:00:00Z"
  9181                  Scope: "local"
  9182                  Driver: "host"
  9183                  EnableIPv6: false
  9184                  Internal: false
  9185                  Attachable: false
  9186                  Ingress: false
  9187                  IPAM:
  9188                    Driver: "default"
  9189                    Config: []
  9190                  Containers: {}
  9191                  Options: {}
  9192          500:
  9193            description: "Server error"
  9194            schema:
  9195              $ref: "#/definitions/ErrorResponse"
  9196        parameters:
  9197          - name: "filters"
  9198            in: "query"
  9199            description: |
  9200              JSON encoded value of the filters (a `map[string][]string`) to process
  9201              on the networks list.
  9202  
  9203              Available filters:
  9204  
  9205              - `dangling=<boolean>` When set to `true` (or `1`), returns all
  9206                 networks that are not in use by a container. When set to `false`
  9207                 (or `0`), only networks that are in use by one or more
  9208                 containers are returned.
  9209              - `driver=<driver-name>` Matches a network's driver.
  9210              - `id=<network-id>` Matches all or part of a network ID.
  9211              - `label=<key>` or `label=<key>=<value>` of a network label.
  9212              - `name=<network-name>` Matches all or part of a network name.
  9213              - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`).
  9214              - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks.
  9215            type: "string"
  9216        tags: ["Network"]
  9217  
  9218    /networks/{id}:
  9219      get:
  9220        summary: "Inspect a network"
  9221        operationId: "NetworkInspect"
  9222        produces:
  9223          - "application/json"
  9224        responses:
  9225          200:
  9226            description: "No error"
  9227            schema:
  9228              $ref: "#/definitions/Network"
  9229          404:
  9230            description: "Network not found"
  9231            schema:
  9232              $ref: "#/definitions/ErrorResponse"
  9233          500:
  9234            description: "Server error"
  9235            schema:
  9236              $ref: "#/definitions/ErrorResponse"
  9237        parameters:
  9238          - name: "id"
  9239            in: "path"
  9240            description: "Network ID or name"
  9241            required: true
  9242            type: "string"
  9243          - name: "verbose"
  9244            in: "query"
  9245            description: "Detailed inspect output for troubleshooting"
  9246            type: "boolean"
  9247            default: false
  9248          - name: "scope"
  9249            in: "query"
  9250            description: "Filter the network by scope (swarm, global, or local)"
  9251            type: "string"
  9252        tags: ["Network"]
  9253  
  9254      delete:
  9255        summary: "Remove a network"
  9256        operationId: "NetworkDelete"
  9257        responses:
  9258          204:
  9259            description: "No error"
  9260          403:
  9261            description: "operation not supported for pre-defined networks"
  9262            schema:
  9263              $ref: "#/definitions/ErrorResponse"
  9264          404:
  9265            description: "no such network"
  9266            schema:
  9267              $ref: "#/definitions/ErrorResponse"
  9268          500:
  9269            description: "Server error"
  9270            schema:
  9271              $ref: "#/definitions/ErrorResponse"
  9272        parameters:
  9273          - name: "id"
  9274            in: "path"
  9275            description: "Network ID or name"
  9276            required: true
  9277            type: "string"
  9278        tags: ["Network"]
  9279  
  9280    /networks/create:
  9281      post:
  9282        summary: "Create a network"
  9283        operationId: "NetworkCreate"
  9284        consumes:
  9285          - "application/json"
  9286        produces:
  9287          - "application/json"
  9288        responses:
  9289          201:
  9290            description: "No error"
  9291            schema:
  9292              type: "object"
  9293              title: "NetworkCreateResponse"
  9294              properties:
  9295                Id:
  9296                  description: "The ID of the created network."
  9297                  type: "string"
  9298                Warning:
  9299                  type: "string"
  9300              example:
  9301                Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30"
  9302                Warning: ""
  9303          400:
  9304            description: "bad parameter"
  9305            schema:
  9306              $ref: "#/definitions/ErrorResponse"
  9307          403:
  9308            description: "operation not supported for pre-defined networks"
  9309            schema:
  9310              $ref: "#/definitions/ErrorResponse"
  9311          404:
  9312            description: "plugin not found"
  9313            schema:
  9314              $ref: "#/definitions/ErrorResponse"
  9315          500:
  9316            description: "Server error"
  9317            schema:
  9318              $ref: "#/definitions/ErrorResponse"
  9319        parameters:
  9320          - name: "networkConfig"
  9321            in: "body"
  9322            description: "Network configuration"
  9323            required: true
  9324            schema:
  9325              type: "object"
  9326              title: "NetworkCreateRequest"
  9327              required: ["Name"]
  9328              properties:
  9329                Name:
  9330                  description: "The network's name."
  9331                  type: "string"
  9332                CheckDuplicate:
  9333                  description: |
  9334                    Check for networks with duplicate names. Since Network is
  9335                    primarily keyed based on a random ID and not on the name, and
  9336                    network name is strictly a user-friendly alias to the network
  9337                    which is uniquely identified using ID, there is no guaranteed
  9338                    way to check for duplicates. CheckDuplicate is there to provide
  9339                    a best effort checking of any networks which has the same name
  9340                    but it is not guaranteed to catch all name collisions.
  9341                  type: "boolean"
  9342                Driver:
  9343                  description: "Name of the network driver plugin to use."
  9344                  type: "string"
  9345                  default: "bridge"
  9346                Internal:
  9347                  description: "Restrict external access to the network."
  9348                  type: "boolean"
  9349                Attachable:
  9350                  description: |
  9351                    Globally scoped network is manually attachable by regular
  9352                    containers from workers in swarm mode.
  9353                  type: "boolean"
  9354                Ingress:
  9355                  description: |
  9356                    Ingress network is the network which provides the routing-mesh
  9357                    in swarm mode.
  9358                  type: "boolean"
  9359                IPAM:
  9360                  description: "Optional custom IP scheme for the network."
  9361                  $ref: "#/definitions/IPAM"
  9362                EnableIPv6:
  9363                  description: "Enable IPv6 on the network."
  9364                  type: "boolean"
  9365                Options:
  9366                  description: "Network specific options to be used by the drivers."
  9367                  type: "object"
  9368                  additionalProperties:
  9369                    type: "string"
  9370                Labels:
  9371                  description: "User-defined key/value metadata."
  9372                  type: "object"
  9373                  additionalProperties:
  9374                    type: "string"
  9375              example:
  9376                Name: "isolated_nw"
  9377                CheckDuplicate: false
  9378                Driver: "bridge"
  9379                EnableIPv6: true
  9380                IPAM:
  9381                  Driver: "default"
  9382                  Config:
  9383                    - Subnet: "172.20.0.0/16"
  9384                      IPRange: "172.20.10.0/24"
  9385                      Gateway: "172.20.10.11"
  9386                    - Subnet: "2001:db8:abcd::/64"
  9387                      Gateway: "2001:db8:abcd::1011"
  9388                  Options:
  9389                    foo: "bar"
  9390                Internal: true
  9391                Attachable: false
  9392                Ingress: false
  9393                Options:
  9394                  com.docker.network.bridge.default_bridge: "true"
  9395                  com.docker.network.bridge.enable_icc: "true"
  9396                  com.docker.network.bridge.enable_ip_masquerade: "true"
  9397                  com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
  9398                  com.docker.network.bridge.name: "docker0"
  9399                  com.docker.network.driver.mtu: "1500"
  9400                Labels:
  9401                  com.example.some-label: "some-value"
  9402                  com.example.some-other-label: "some-other-value"
  9403        tags: ["Network"]
  9404  
  9405    /networks/{id}/connect:
  9406      post:
  9407        summary: "Connect a container to a network"
  9408        operationId: "NetworkConnect"
  9409        consumes:
  9410          - "application/json"
  9411        responses:
  9412          200:
  9413            description: "No error"
  9414          403:
  9415            description: "Operation not supported for swarm scoped networks"
  9416            schema:
  9417              $ref: "#/definitions/ErrorResponse"
  9418          404:
  9419            description: "Network or container not found"
  9420            schema:
  9421              $ref: "#/definitions/ErrorResponse"
  9422          500:
  9423            description: "Server error"
  9424            schema:
  9425              $ref: "#/definitions/ErrorResponse"
  9426        parameters:
  9427          - name: "id"
  9428            in: "path"
  9429            description: "Network ID or name"
  9430            required: true
  9431            type: "string"
  9432          - name: "container"
  9433            in: "body"
  9434            required: true
  9435            schema:
  9436              type: "object"
  9437              title: "NetworkDisconnectRequest"
  9438              properties:
  9439                Container:
  9440                  type: "string"
  9441                  description: "The ID or name of the container to connect to the network."
  9442                EndpointConfig:
  9443                  $ref: "#/definitions/EndpointSettings"
  9444              example:
  9445                Container: "3613f73ba0e4"
  9446                EndpointConfig:
  9447                  IPAMConfig:
  9448                    IPv4Address: "172.24.56.89"
  9449                    IPv6Address: "2001:db8::5689"
  9450        tags: ["Network"]
  9451  
  9452    /networks/{id}/disconnect:
  9453      post:
  9454        summary: "Disconnect a container from a network"
  9455        operationId: "NetworkDisconnect"
  9456        consumes:
  9457          - "application/json"
  9458        responses:
  9459          200:
  9460            description: "No error"
  9461          403:
  9462            description: "Operation not supported for swarm scoped networks"
  9463            schema:
  9464              $ref: "#/definitions/ErrorResponse"
  9465          404:
  9466            description: "Network or container not found"
  9467            schema:
  9468              $ref: "#/definitions/ErrorResponse"
  9469          500:
  9470            description: "Server error"
  9471            schema:
  9472              $ref: "#/definitions/ErrorResponse"
  9473        parameters:
  9474          - name: "id"
  9475            in: "path"
  9476            description: "Network ID or name"
  9477            required: true
  9478            type: "string"
  9479          - name: "container"
  9480            in: "body"
  9481            required: true
  9482            schema:
  9483              type: "object"
  9484              title: "NetworkConnectRequest"
  9485              properties:
  9486                Container:
  9487                  type: "string"
  9488                  description: |
  9489                    The ID or name of the container to disconnect from the network.
  9490                Force:
  9491                  type: "boolean"
  9492                  description: |
  9493                    Force the container to disconnect from the network.
  9494        tags: ["Network"]
  9495    /networks/prune:
  9496      post:
  9497        summary: "Delete unused networks"
  9498        produces:
  9499          - "application/json"
  9500        operationId: "NetworkPrune"
  9501        parameters:
  9502          - name: "filters"
  9503            in: "query"
  9504            description: |
  9505              Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  9506  
  9507              Available filters:
  9508              - `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.
  9509              - `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.
  9510            type: "string"
  9511        responses:
  9512          200:
  9513            description: "No error"
  9514            schema:
  9515              type: "object"
  9516              title: "NetworkPruneResponse"
  9517              properties:
  9518                NetworksDeleted:
  9519                  description: "Networks that were deleted"
  9520                  type: "array"
  9521                  items:
  9522                    type: "string"
  9523          500:
  9524            description: "Server error"
  9525            schema:
  9526              $ref: "#/definitions/ErrorResponse"
  9527        tags: ["Network"]
  9528    /plugins:
  9529      get:
  9530        summary: "List plugins"
  9531        operationId: "PluginList"
  9532        description: "Returns information about installed plugins."
  9533        produces: ["application/json"]
  9534        responses:
  9535          200:
  9536            description: "No error"
  9537            schema:
  9538              type: "array"
  9539              items:
  9540                $ref: "#/definitions/Plugin"
  9541          500:
  9542            description: "Server error"
  9543            schema:
  9544              $ref: "#/definitions/ErrorResponse"
  9545        parameters:
  9546          - name: "filters"
  9547            in: "query"
  9548            type: "string"
  9549            description: |
  9550              A JSON encoded value of the filters (a `map[string][]string`) to
  9551              process on the plugin list.
  9552  
  9553              Available filters:
  9554  
  9555              - `capability=<capability name>`
  9556              - `enable=<true>|<false>`
  9557        tags: ["Plugin"]
  9558  
  9559    /plugins/privileges:
  9560      get:
  9561        summary: "Get plugin privileges"
  9562        operationId: "GetPluginPrivileges"
  9563        responses:
  9564          200:
  9565            description: "no error"
  9566            schema:
  9567              type: "array"
  9568              items:
  9569                $ref: "#/definitions/PluginPrivilege"
  9570              example:
  9571                - Name: "network"
  9572                  Description: ""
  9573                  Value:
  9574                    - "host"
  9575                - Name: "mount"
  9576                  Description: ""
  9577                  Value:
  9578                    - "/data"
  9579                - Name: "device"
  9580                  Description: ""
  9581                  Value:
  9582                    - "/dev/cpu_dma_latency"
  9583          500:
  9584            description: "server error"
  9585            schema:
  9586              $ref: "#/definitions/ErrorResponse"
  9587        parameters:
  9588          - name: "remote"
  9589            in: "query"
  9590            description: |
  9591              The name of the plugin. The `:latest` tag is optional, and is the
  9592              default if omitted.
  9593            required: true
  9594            type: "string"
  9595        tags:
  9596          - "Plugin"
  9597  
  9598    /plugins/pull:
  9599      post:
  9600        summary: "Install a plugin"
  9601        operationId: "PluginPull"
  9602        description: |
  9603          Pulls and installs a plugin. After the plugin is installed, it can be
  9604          enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable).
  9605        produces:
  9606          - "application/json"
  9607        responses:
  9608          204:
  9609            description: "no error"
  9610          500:
  9611            description: "server error"
  9612            schema:
  9613              $ref: "#/definitions/ErrorResponse"
  9614        parameters:
  9615          - name: "remote"
  9616            in: "query"
  9617            description: |
  9618              Remote reference for plugin to install.
  9619  
  9620              The `:latest` tag is optional, and is used as the default if omitted.
  9621            required: true
  9622            type: "string"
  9623          - name: "name"
  9624            in: "query"
  9625            description: |
  9626              Local name for the pulled plugin.
  9627  
  9628              The `:latest` tag is optional, and is used as the default if omitted.
  9629            required: false
  9630            type: "string"
  9631          - name: "X-Registry-Auth"
  9632            in: "header"
  9633            description: |
  9634              A base64url-encoded auth configuration to use when pulling a plugin
  9635              from a registry.
  9636  
  9637              Refer to the [authentication section](#section/Authentication) for
  9638              details.
  9639            type: "string"
  9640          - name: "body"
  9641            in: "body"
  9642            schema:
  9643              type: "array"
  9644              items:
  9645                $ref: "#/definitions/PluginPrivilege"
  9646              example:
  9647                - Name: "network"
  9648                  Description: ""
  9649                  Value:
  9650                    - "host"
  9651                - Name: "mount"
  9652                  Description: ""
  9653                  Value:
  9654                    - "/data"
  9655                - Name: "device"
  9656                  Description: ""
  9657                  Value:
  9658                    - "/dev/cpu_dma_latency"
  9659        tags: ["Plugin"]
  9660    /plugins/{name}/json:
  9661      get:
  9662        summary: "Inspect a plugin"
  9663        operationId: "PluginInspect"
  9664        responses:
  9665          200:
  9666            description: "no error"
  9667            schema:
  9668              $ref: "#/definitions/Plugin"
  9669          404:
  9670            description: "plugin is not installed"
  9671            schema:
  9672              $ref: "#/definitions/ErrorResponse"
  9673          500:
  9674            description: "server error"
  9675            schema:
  9676              $ref: "#/definitions/ErrorResponse"
  9677        parameters:
  9678          - name: "name"
  9679            in: "path"
  9680            description: |
  9681              The name of the plugin. The `:latest` tag is optional, and is the
  9682              default if omitted.
  9683            required: true
  9684            type: "string"
  9685        tags: ["Plugin"]
  9686    /plugins/{name}:
  9687      delete:
  9688        summary: "Remove a plugin"
  9689        operationId: "PluginDelete"
  9690        responses:
  9691          200:
  9692            description: "no error"
  9693            schema:
  9694              $ref: "#/definitions/Plugin"
  9695          404:
  9696            description: "plugin is not installed"
  9697            schema:
  9698              $ref: "#/definitions/ErrorResponse"
  9699          500:
  9700            description: "server error"
  9701            schema:
  9702              $ref: "#/definitions/ErrorResponse"
  9703        parameters:
  9704          - name: "name"
  9705            in: "path"
  9706            description: |
  9707              The name of the plugin. The `:latest` tag is optional, and is the
  9708              default if omitted.
  9709            required: true
  9710            type: "string"
  9711          - name: "force"
  9712            in: "query"
  9713            description: |
  9714              Disable the plugin before removing. This may result in issues if the
  9715              plugin is in use by a container.
  9716            type: "boolean"
  9717            default: false
  9718        tags: ["Plugin"]
  9719    /plugins/{name}/enable:
  9720      post:
  9721        summary: "Enable a plugin"
  9722        operationId: "PluginEnable"
  9723        responses:
  9724          200:
  9725            description: "no error"
  9726          404:
  9727            description: "plugin is not installed"
  9728            schema:
  9729              $ref: "#/definitions/ErrorResponse"
  9730          500:
  9731            description: "server error"
  9732            schema:
  9733              $ref: "#/definitions/ErrorResponse"
  9734        parameters:
  9735          - name: "name"
  9736            in: "path"
  9737            description: |
  9738              The name of the plugin. The `:latest` tag is optional, and is the
  9739              default if omitted.
  9740            required: true
  9741            type: "string"
  9742          - name: "timeout"
  9743            in: "query"
  9744            description: "Set the HTTP client timeout (in seconds)"
  9745            type: "integer"
  9746            default: 0
  9747        tags: ["Plugin"]
  9748    /plugins/{name}/disable:
  9749      post:
  9750        summary: "Disable a plugin"
  9751        operationId: "PluginDisable"
  9752        responses:
  9753          200:
  9754            description: "no error"
  9755          404:
  9756            description: "plugin is not installed"
  9757            schema:
  9758              $ref: "#/definitions/ErrorResponse"
  9759          500:
  9760            description: "server error"
  9761            schema:
  9762              $ref: "#/definitions/ErrorResponse"
  9763        parameters:
  9764          - name: "name"
  9765            in: "path"
  9766            description: |
  9767              The name of the plugin. The `:latest` tag is optional, and is the
  9768              default if omitted.
  9769            required: true
  9770            type: "string"
  9771          - name: "force"
  9772            in: "query"
  9773            description: |
  9774              Force disable a plugin even if still in use.
  9775            required: false
  9776            type: "boolean"
  9777        tags: ["Plugin"]
  9778    /plugins/{name}/upgrade:
  9779      post:
  9780        summary: "Upgrade a plugin"
  9781        operationId: "PluginUpgrade"
  9782        responses:
  9783          204:
  9784            description: "no error"
  9785          404:
  9786            description: "plugin not installed"
  9787            schema:
  9788              $ref: "#/definitions/ErrorResponse"
  9789          500:
  9790            description: "server error"
  9791            schema:
  9792              $ref: "#/definitions/ErrorResponse"
  9793        parameters:
  9794          - name: "name"
  9795            in: "path"
  9796            description: |
  9797              The name of the plugin. The `:latest` tag is optional, and is the
  9798              default if omitted.
  9799            required: true
  9800            type: "string"
  9801          - name: "remote"
  9802            in: "query"
  9803            description: |
  9804              Remote reference to upgrade to.
  9805  
  9806              The `:latest` tag is optional, and is used as the default if omitted.
  9807            required: true
  9808            type: "string"
  9809          - name: "X-Registry-Auth"
  9810            in: "header"
  9811            description: |
  9812              A base64url-encoded auth configuration to use when pulling a plugin
  9813              from a registry.
  9814  
  9815              Refer to the [authentication section](#section/Authentication) for
  9816              details.
  9817            type: "string"
  9818          - name: "body"
  9819            in: "body"
  9820            schema:
  9821              type: "array"
  9822              items:
  9823                $ref: "#/definitions/PluginPrivilege"
  9824              example:
  9825                - Name: "network"
  9826                  Description: ""
  9827                  Value:
  9828                    - "host"
  9829                - Name: "mount"
  9830                  Description: ""
  9831                  Value:
  9832                    - "/data"
  9833                - Name: "device"
  9834                  Description: ""
  9835                  Value:
  9836                    - "/dev/cpu_dma_latency"
  9837        tags: ["Plugin"]
  9838    /plugins/create:
  9839      post:
  9840        summary: "Create a plugin"
  9841        operationId: "PluginCreate"
  9842        consumes:
  9843          - "application/x-tar"
  9844        responses:
  9845          204:
  9846            description: "no error"
  9847          500:
  9848            description: "server error"
  9849            schema:
  9850              $ref: "#/definitions/ErrorResponse"
  9851        parameters:
  9852          - name: "name"
  9853            in: "query"
  9854            description: |
  9855              The name of the plugin. The `:latest` tag is optional, and is the
  9856              default if omitted.
  9857            required: true
  9858            type: "string"
  9859          - name: "tarContext"
  9860            in: "body"
  9861            description: "Path to tar containing plugin rootfs and manifest"
  9862            schema:
  9863              type: "string"
  9864              format: "binary"
  9865        tags: ["Plugin"]
  9866    /plugins/{name}/push:
  9867      post:
  9868        summary: "Push a plugin"
  9869        operationId: "PluginPush"
  9870        description: |
  9871          Push a plugin to the registry.
  9872        parameters:
  9873          - name: "name"
  9874            in: "path"
  9875            description: |
  9876              The name of the plugin. The `:latest` tag is optional, and is the
  9877              default if omitted.
  9878            required: true
  9879            type: "string"
  9880        responses:
  9881          200:
  9882            description: "no error"
  9883          404:
  9884            description: "plugin not installed"
  9885            schema:
  9886              $ref: "#/definitions/ErrorResponse"
  9887          500:
  9888            description: "server error"
  9889            schema:
  9890              $ref: "#/definitions/ErrorResponse"
  9891        tags: ["Plugin"]
  9892    /plugins/{name}/set:
  9893      post:
  9894        summary: "Configure a plugin"
  9895        operationId: "PluginSet"
  9896        consumes:
  9897          - "application/json"
  9898        parameters:
  9899          - name: "name"
  9900            in: "path"
  9901            description: |
  9902              The name of the plugin. The `:latest` tag is optional, and is the
  9903              default if omitted.
  9904            required: true
  9905            type: "string"
  9906          - name: "body"
  9907            in: "body"
  9908            schema:
  9909              type: "array"
  9910              items:
  9911                type: "string"
  9912              example: ["DEBUG=1"]
  9913        responses:
  9914          204:
  9915            description: "No error"
  9916          404:
  9917            description: "Plugin not installed"
  9918            schema:
  9919              $ref: "#/definitions/ErrorResponse"
  9920          500:
  9921            description: "Server error"
  9922            schema:
  9923              $ref: "#/definitions/ErrorResponse"
  9924        tags: ["Plugin"]
  9925    /nodes:
  9926      get:
  9927        summary: "List nodes"
  9928        operationId: "NodeList"
  9929        responses:
  9930          200:
  9931            description: "no error"
  9932            schema:
  9933              type: "array"
  9934              items:
  9935                $ref: "#/definitions/Node"
  9936          500:
  9937            description: "server error"
  9938            schema:
  9939              $ref: "#/definitions/ErrorResponse"
  9940          503:
  9941            description: "node is not part of a swarm"
  9942            schema:
  9943              $ref: "#/definitions/ErrorResponse"
  9944        parameters:
  9945          - name: "filters"
  9946            in: "query"
  9947            description: |
  9948              Filters to process on the nodes list, encoded as JSON (a `map[string][]string`).
  9949  
  9950              Available filters:
  9951              - `id=<node id>`
  9952              - `label=<engine label>`
  9953              - `membership=`(`accepted`|`pending`)`
  9954              - `name=<node name>`
  9955              - `node.label=<node label>`
  9956              - `role=`(`manager`|`worker`)`
  9957            type: "string"
  9958        tags: ["Node"]
  9959    /nodes/{id}:
  9960      get:
  9961        summary: "Inspect a node"
  9962        operationId: "NodeInspect"
  9963        responses:
  9964          200:
  9965            description: "no error"
  9966            schema:
  9967              $ref: "#/definitions/Node"
  9968          404:
  9969            description: "no such node"
  9970            schema:
  9971              $ref: "#/definitions/ErrorResponse"
  9972          500:
  9973            description: "server error"
  9974            schema:
  9975              $ref: "#/definitions/ErrorResponse"
  9976          503:
  9977            description: "node is not part of a swarm"
  9978            schema:
  9979              $ref: "#/definitions/ErrorResponse"
  9980        parameters:
  9981          - name: "id"
  9982            in: "path"
  9983            description: "The ID or name of the node"
  9984            type: "string"
  9985            required: true
  9986        tags: ["Node"]
  9987      delete:
  9988        summary: "Delete a node"
  9989        operationId: "NodeDelete"
  9990        responses:
  9991          200:
  9992            description: "no error"
  9993          404:
  9994            description: "no such node"
  9995            schema:
  9996              $ref: "#/definitions/ErrorResponse"
  9997          500:
  9998            description: "server error"
  9999            schema:
 10000              $ref: "#/definitions/ErrorResponse"
 10001          503:
 10002            description: "node is not part of a swarm"
 10003            schema:
 10004              $ref: "#/definitions/ErrorResponse"
 10005        parameters:
 10006          - name: "id"
 10007            in: "path"
 10008            description: "The ID or name of the node"
 10009            type: "string"
 10010            required: true
 10011          - name: "force"
 10012            in: "query"
 10013            description: "Force remove a node from the swarm"
 10014            default: false
 10015            type: "boolean"
 10016        tags: ["Node"]
 10017    /nodes/{id}/update:
 10018      post:
 10019        summary: "Update a node"
 10020        operationId: "NodeUpdate"
 10021        responses:
 10022          200:
 10023            description: "no error"
 10024          400:
 10025            description: "bad parameter"
 10026            schema:
 10027              $ref: "#/definitions/ErrorResponse"
 10028          404:
 10029            description: "no such node"
 10030            schema:
 10031              $ref: "#/definitions/ErrorResponse"
 10032          500:
 10033            description: "server error"
 10034            schema:
 10035              $ref: "#/definitions/ErrorResponse"
 10036          503:
 10037            description: "node is not part of a swarm"
 10038            schema:
 10039              $ref: "#/definitions/ErrorResponse"
 10040        parameters:
 10041          - name: "id"
 10042            in: "path"
 10043            description: "The ID of the node"
 10044            type: "string"
 10045            required: true
 10046          - name: "body"
 10047            in: "body"
 10048            schema:
 10049              $ref: "#/definitions/NodeSpec"
 10050          - name: "version"
 10051            in: "query"
 10052            description: |
 10053              The version number of the node object being updated. This is required
 10054              to avoid conflicting writes.
 10055            type: "integer"
 10056            format: "int64"
 10057            required: true
 10058        tags: ["Node"]
 10059    /swarm:
 10060      get:
 10061        summary: "Inspect swarm"
 10062        operationId: "SwarmInspect"
 10063        responses:
 10064          200:
 10065            description: "no error"
 10066            schema:
 10067              $ref: "#/definitions/Swarm"
 10068          404:
 10069            description: "no such swarm"
 10070            schema:
 10071              $ref: "#/definitions/ErrorResponse"
 10072          500:
 10073            description: "server error"
 10074            schema:
 10075              $ref: "#/definitions/ErrorResponse"
 10076          503:
 10077            description: "node is not part of a swarm"
 10078            schema:
 10079              $ref: "#/definitions/ErrorResponse"
 10080        tags: ["Swarm"]
 10081    /swarm/init:
 10082      post:
 10083        summary: "Initialize a new swarm"
 10084        operationId: "SwarmInit"
 10085        produces:
 10086          - "application/json"
 10087          - "text/plain"
 10088        responses:
 10089          200:
 10090            description: "no error"
 10091            schema:
 10092              description: "The node ID"
 10093              type: "string"
 10094              example: "7v2t30z9blmxuhnyo6s4cpenp"
 10095          400:
 10096            description: "bad parameter"
 10097            schema:
 10098              $ref: "#/definitions/ErrorResponse"
 10099          500:
 10100            description: "server error"
 10101            schema:
 10102              $ref: "#/definitions/ErrorResponse"
 10103          503:
 10104            description: "node is already part of a swarm"
 10105            schema:
 10106              $ref: "#/definitions/ErrorResponse"
 10107        parameters:
 10108          - name: "body"
 10109            in: "body"
 10110            required: true
 10111            schema:
 10112              type: "object"
 10113              title: "SwarmInitRequest"
 10114              properties:
 10115                ListenAddr:
 10116                  description: |
 10117                    Listen address used for inter-manager communication, as well
 10118                    as determining the networking interface used for the VXLAN
 10119                    Tunnel Endpoint (VTEP). This can either be an address/port
 10120                    combination in the form `192.168.1.1:4567`, or an interface
 10121                    followed by a port number, like `eth0:4567`. If the port number
 10122                    is omitted, the default swarm listening port is used.
 10123                  type: "string"
 10124                AdvertiseAddr:
 10125                  description: |
 10126                    Externally reachable address advertised to other nodes. This
 10127                    can either be an address/port combination in the form
 10128                    `192.168.1.1:4567`, or an interface followed by a port number,
 10129                    like `eth0:4567`. If the port number is omitted, the port
 10130                    number from the listen address is used. If `AdvertiseAddr` is
 10131                    not specified, it will be automatically detected when possible.
 10132                  type: "string"
 10133                DataPathAddr:
 10134                  description: |
 10135                    Address or interface to use for data path traffic (format:
 10136                    `<ip|interface>`), for example,  `192.168.1.1`, or an interface,
 10137                    like `eth0`. If `DataPathAddr` is unspecified, the same address
 10138                    as `AdvertiseAddr` is used.
 10139  
 10140                    The `DataPathAddr` specifies the address that global scope
 10141                    network drivers will publish towards other  nodes in order to
 10142                    reach the containers running on this node. Using this parameter
 10143                    it is possible to separate the container data traffic from the
 10144                    management traffic of the cluster.
 10145                  type: "string"
 10146                DataPathPort:
 10147                  description: |
 10148                    DataPathPort specifies the data path port number for data traffic.
 10149                    Acceptable port range is 1024 to 49151.
 10150                    if no port is set or is set to 0, default port 4789 will be used.
 10151                  type: "integer"
 10152                  format: "uint32"
 10153                DefaultAddrPool:
 10154                  description: |
 10155                    Default Address Pool specifies default subnet pools for global
 10156                    scope networks.
 10157                  type: "array"
 10158                  items:
 10159                    type: "string"
 10160                    example: ["10.10.0.0/16", "20.20.0.0/16"]
 10161                ForceNewCluster:
 10162                  description: "Force creation of a new swarm."
 10163                  type: "boolean"
 10164                SubnetSize:
 10165                  description: |
 10166                    SubnetSize specifies the subnet size of the networks created
 10167                    from the default subnet pool.
 10168                  type: "integer"
 10169                  format: "uint32"
 10170                Spec:
 10171                  $ref: "#/definitions/SwarmSpec"
 10172              example:
 10173                ListenAddr: "0.0.0.0:2377"
 10174                AdvertiseAddr: "192.168.1.1:2377"
 10175                DataPathPort: 4789
 10176                DefaultAddrPool: ["10.10.0.0/8", "20.20.0.0/8"]
 10177                SubnetSize: 24
 10178                ForceNewCluster: false
 10179                Spec:
 10180                  Orchestration: {}
 10181                  Raft: {}
 10182                  Dispatcher: {}
 10183                  CAConfig: {}
 10184                  EncryptionConfig:
 10185                    AutoLockManagers: false
 10186        tags: ["Swarm"]
 10187    /swarm/join:
 10188      post:
 10189        summary: "Join an existing swarm"
 10190        operationId: "SwarmJoin"
 10191        responses:
 10192          200:
 10193            description: "no error"
 10194          400:
 10195            description: "bad parameter"
 10196            schema:
 10197              $ref: "#/definitions/ErrorResponse"
 10198          500:
 10199            description: "server error"
 10200            schema:
 10201              $ref: "#/definitions/ErrorResponse"
 10202          503:
 10203            description: "node is already part of a swarm"
 10204            schema:
 10205              $ref: "#/definitions/ErrorResponse"
 10206        parameters:
 10207          - name: "body"
 10208            in: "body"
 10209            required: true
 10210            schema:
 10211              type: "object"
 10212              title: "SwarmJoinRequest"
 10213              properties:
 10214                ListenAddr:
 10215                  description: |
 10216                    Listen address used for inter-manager communication if the node
 10217                    gets promoted to manager, as well as determining the networking
 10218                    interface used for the VXLAN Tunnel Endpoint (VTEP).
 10219                  type: "string"
 10220                AdvertiseAddr:
 10221                  description: |
 10222                    Externally reachable address advertised to other nodes. This
 10223                    can either be an address/port combination in the form
 10224                    `192.168.1.1:4567`, or an interface followed by a port number,
 10225                    like `eth0:4567`. If the port number is omitted, the port
 10226                    number from the listen address is used. If `AdvertiseAddr` is
 10227                    not specified, it will be automatically detected when possible.
 10228                  type: "string"
 10229                DataPathAddr:
 10230                  description: |
 10231                    Address or interface to use for data path traffic (format:
 10232                    `<ip|interface>`), for example,  `192.168.1.1`, or an interface,
 10233                    like `eth0`. If `DataPathAddr` is unspecified, the same address
 10234                    as `AdvertiseAddr` is used.
 10235  
 10236                    The `DataPathAddr` specifies the address that global scope
 10237                    network drivers will publish towards other nodes in order to
 10238                    reach the containers running on this node. Using this parameter
 10239                    it is possible to separate the container data traffic from the
 10240                    management traffic of the cluster.
 10241  
 10242                  type: "string"
 10243                RemoteAddrs:
 10244                  description: |
 10245                    Addresses of manager nodes already participating in the swarm.
 10246                  type: "array"
 10247                  items:
 10248                    type: "string"
 10249                JoinToken:
 10250                  description: "Secret token for joining this swarm."
 10251                  type: "string"
 10252              example:
 10253                ListenAddr: "0.0.0.0:2377"
 10254                AdvertiseAddr: "192.168.1.1:2377"
 10255                RemoteAddrs:
 10256                  - "node1:2377"
 10257                JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2"
 10258        tags: ["Swarm"]
 10259    /swarm/leave:
 10260      post:
 10261        summary: "Leave a swarm"
 10262        operationId: "SwarmLeave"
 10263        responses:
 10264          200:
 10265            description: "no error"
 10266          500:
 10267            description: "server error"
 10268            schema:
 10269              $ref: "#/definitions/ErrorResponse"
 10270          503:
 10271            description: "node is not part of a swarm"
 10272            schema:
 10273              $ref: "#/definitions/ErrorResponse"
 10274        parameters:
 10275          - name: "force"
 10276            description: |
 10277              Force leave swarm, even if this is the last manager or that it will
 10278              break the cluster.
 10279            in: "query"
 10280            type: "boolean"
 10281            default: false
 10282        tags: ["Swarm"]
 10283    /swarm/update:
 10284      post:
 10285        summary: "Update a swarm"
 10286        operationId: "SwarmUpdate"
 10287        responses:
 10288          200:
 10289            description: "no error"
 10290          400:
 10291            description: "bad parameter"
 10292            schema:
 10293              $ref: "#/definitions/ErrorResponse"
 10294          500:
 10295            description: "server error"
 10296            schema:
 10297              $ref: "#/definitions/ErrorResponse"
 10298          503:
 10299            description: "node is not part of a swarm"
 10300            schema:
 10301              $ref: "#/definitions/ErrorResponse"
 10302        parameters:
 10303          - name: "body"
 10304            in: "body"
 10305            required: true
 10306            schema:
 10307              $ref: "#/definitions/SwarmSpec"
 10308          - name: "version"
 10309            in: "query"
 10310            description: |
 10311              The version number of the swarm object being updated. This is
 10312              required to avoid conflicting writes.
 10313            type: "integer"
 10314            format: "int64"
 10315            required: true
 10316          - name: "rotateWorkerToken"
 10317            in: "query"
 10318            description: "Rotate the worker join token."
 10319            type: "boolean"
 10320            default: false
 10321          - name: "rotateManagerToken"
 10322            in: "query"
 10323            description: "Rotate the manager join token."
 10324            type: "boolean"
 10325            default: false
 10326          - name: "rotateManagerUnlockKey"
 10327            in: "query"
 10328            description: "Rotate the manager unlock key."
 10329            type: "boolean"
 10330            default: false
 10331        tags: ["Swarm"]
 10332    /swarm/unlockkey:
 10333      get:
 10334        summary: "Get the unlock key"
 10335        operationId: "SwarmUnlockkey"
 10336        consumes:
 10337          - "application/json"
 10338        responses:
 10339          200:
 10340            description: "no error"
 10341            schema:
 10342              type: "object"
 10343              title: "UnlockKeyResponse"
 10344              properties:
 10345                UnlockKey:
 10346                  description: "The swarm's unlock key."
 10347                  type: "string"
 10348              example:
 10349                UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
 10350          500:
 10351            description: "server error"
 10352            schema:
 10353              $ref: "#/definitions/ErrorResponse"
 10354          503:
 10355            description: "node is not part of a swarm"
 10356            schema:
 10357              $ref: "#/definitions/ErrorResponse"
 10358        tags: ["Swarm"]
 10359    /swarm/unlock:
 10360      post:
 10361        summary: "Unlock a locked manager"
 10362        operationId: "SwarmUnlock"
 10363        consumes:
 10364          - "application/json"
 10365        produces:
 10366          - "application/json"
 10367        parameters:
 10368          - name: "body"
 10369            in: "body"
 10370            required: true
 10371            schema:
 10372              type: "object"
 10373              title: "SwarmUnlockRequest"
 10374              properties:
 10375                UnlockKey:
 10376                  description: "The swarm's unlock key."
 10377                  type: "string"
 10378              example:
 10379                UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
 10380        responses:
 10381          200:
 10382            description: "no error"
 10383          500:
 10384            description: "server error"
 10385            schema:
 10386              $ref: "#/definitions/ErrorResponse"
 10387          503:
 10388            description: "node is not part of a swarm"
 10389            schema:
 10390              $ref: "#/definitions/ErrorResponse"
 10391        tags: ["Swarm"]
 10392    /services:
 10393      get:
 10394        summary: "List services"
 10395        operationId: "ServiceList"
 10396        responses:
 10397          200:
 10398            description: "no error"
 10399            schema:
 10400              type: "array"
 10401              items:
 10402                $ref: "#/definitions/Service"
 10403          500:
 10404            description: "server error"
 10405            schema:
 10406              $ref: "#/definitions/ErrorResponse"
 10407          503:
 10408            description: "node is not part of a swarm"
 10409            schema:
 10410              $ref: "#/definitions/ErrorResponse"
 10411        parameters:
 10412          - name: "filters"
 10413            in: "query"
 10414            type: "string"
 10415            description: |
 10416              A JSON encoded value of the filters (a `map[string][]string`) to
 10417              process on the services list.
 10418  
 10419              Available filters:
 10420  
 10421              - `id=<service id>`
 10422              - `label=<service label>`
 10423              - `mode=["replicated"|"global"]`
 10424              - `name=<service name>`
 10425        tags: ["Service"]
 10426    /services/create:
 10427      post:
 10428        summary: "Create a service"
 10429        operationId: "ServiceCreate"
 10430        consumes:
 10431          - "application/json"
 10432        produces:
 10433          - "application/json"
 10434        responses:
 10435          201:
 10436            description: "no error"
 10437            schema:
 10438              type: "object"
 10439              title: "ServiceCreateResponse"
 10440              properties:
 10441                ID:
 10442                  description: "The ID of the created service."
 10443                  type: "string"
 10444                Warning:
 10445                  description: "Optional warning message"
 10446                  type: "string"
 10447              example:
 10448                ID: "ak7w3gjqoa3kuz8xcpnyy0pvl"
 10449                Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found"
 10450          400:
 10451            description: "bad parameter"
 10452            schema:
 10453              $ref: "#/definitions/ErrorResponse"
 10454          403:
 10455            description: "network is not eligible for services"
 10456            schema:
 10457              $ref: "#/definitions/ErrorResponse"
 10458          409:
 10459            description: "name conflicts with an existing service"
 10460            schema:
 10461              $ref: "#/definitions/ErrorResponse"
 10462          500:
 10463            description: "server error"
 10464            schema:
 10465              $ref: "#/definitions/ErrorResponse"
 10466          503:
 10467            description: "node is not part of a swarm"
 10468            schema:
 10469              $ref: "#/definitions/ErrorResponse"
 10470        parameters:
 10471          - name: "body"
 10472            in: "body"
 10473            required: true
 10474            schema:
 10475              allOf:
 10476                - $ref: "#/definitions/ServiceSpec"
 10477                - type: "object"
 10478                  example:
 10479                    Name: "web"
 10480                    TaskTemplate:
 10481                      ContainerSpec:
 10482                        Image: "nginx:alpine"
 10483                        Mounts:
 10484                          -
 10485                            ReadOnly: true
 10486                            Source: "web-data"
 10487                            Target: "/usr/share/nginx/html"
 10488                            Type: "volume"
 10489                            VolumeOptions:
 10490                              DriverConfig: {}
 10491                              Labels:
 10492                                com.example.something: "something-value"
 10493                        Hosts: ["10.10.10.10 host1", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2"]
 10494                        User: "33"
 10495                        DNSConfig:
 10496                          Nameservers: ["8.8.8.8"]
 10497                          Search: ["example.org"]
 10498                          Options: ["timeout:3"]
 10499                        Secrets:
 10500                          -
 10501                            File:
 10502                              Name: "www.example.org.key"
 10503                              UID: "33"
 10504                              GID: "33"
 10505                              Mode: 384
 10506                            SecretID: "fpjqlhnwb19zds35k8wn80lq9"
 10507                            SecretName: "example_org_domain_key"
 10508                      LogDriver:
 10509                        Name: "json-file"
 10510                        Options:
 10511                          max-file: "3"
 10512                          max-size: "10M"
 10513                      Placement: {}
 10514                      Resources:
 10515                        Limits:
 10516                          MemoryBytes: 104857600
 10517                        Reservations: {}
 10518                      RestartPolicy:
 10519                        Condition: "on-failure"
 10520                        Delay: 10000000000
 10521                        MaxAttempts: 10
 10522                    Mode:
 10523                      Replicated:
 10524                        Replicas: 4
 10525                    UpdateConfig:
 10526                      Parallelism: 2
 10527                      Delay: 1000000000
 10528                      FailureAction: "pause"
 10529                      Monitor: 15000000000
 10530                      MaxFailureRatio: 0.15
 10531                    RollbackConfig:
 10532                      Parallelism: 1
 10533                      Delay: 1000000000
 10534                      FailureAction: "pause"
 10535                      Monitor: 15000000000
 10536                      MaxFailureRatio: 0.15
 10537                    EndpointSpec:
 10538                      Ports:
 10539                        -
 10540                          Protocol: "tcp"
 10541                          PublishedPort: 8080
 10542                          TargetPort: 80
 10543                    Labels:
 10544                      foo: "bar"
 10545          - name: "X-Registry-Auth"
 10546            in: "header"
 10547            description: |
 10548              A base64url-encoded auth configuration for pulling from private
 10549              registries.
 10550  
 10551              Refer to the [authentication section](#section/Authentication) for
 10552              details.
 10553            type: "string"
 10554        tags: ["Service"]
 10555    /services/{id}:
 10556      get:
 10557        summary: "Inspect a service"
 10558        operationId: "ServiceInspect"
 10559        responses:
 10560          200:
 10561            description: "no error"
 10562            schema:
 10563              $ref: "#/definitions/Service"
 10564          404:
 10565            description: "no such service"
 10566            schema:
 10567              $ref: "#/definitions/ErrorResponse"
 10568          500:
 10569            description: "server error"
 10570            schema:
 10571              $ref: "#/definitions/ErrorResponse"
 10572          503:
 10573            description: "node is not part of a swarm"
 10574            schema:
 10575              $ref: "#/definitions/ErrorResponse"
 10576        parameters:
 10577          - name: "id"
 10578            in: "path"
 10579            description: "ID or name of service."
 10580            required: true
 10581            type: "string"
 10582          - name: "insertDefaults"
 10583            in: "query"
 10584            description: "Fill empty fields with default values."
 10585            type: "boolean"
 10586            default: false
 10587        tags: ["Service"]
 10588      delete:
 10589        summary: "Delete a service"
 10590        operationId: "ServiceDelete"
 10591        responses:
 10592          200:
 10593            description: "no error"
 10594          404:
 10595            description: "no such service"
 10596            schema:
 10597              $ref: "#/definitions/ErrorResponse"
 10598          500:
 10599            description: "server error"
 10600            schema:
 10601              $ref: "#/definitions/ErrorResponse"
 10602          503:
 10603            description: "node is not part of a swarm"
 10604            schema:
 10605              $ref: "#/definitions/ErrorResponse"
 10606        parameters:
 10607          - name: "id"
 10608            in: "path"
 10609            description: "ID or name of service."
 10610            required: true
 10611            type: "string"
 10612        tags: ["Service"]
 10613    /services/{id}/update:
 10614      post:
 10615        summary: "Update a service"
 10616        operationId: "ServiceUpdate"
 10617        consumes: ["application/json"]
 10618        produces: ["application/json"]
 10619        responses:
 10620          200:
 10621            description: "no error"
 10622            schema:
 10623              $ref: "#/definitions/ServiceUpdateResponse"
 10624          400:
 10625            description: "bad parameter"
 10626            schema:
 10627              $ref: "#/definitions/ErrorResponse"
 10628          404:
 10629            description: "no such service"
 10630            schema:
 10631              $ref: "#/definitions/ErrorResponse"
 10632          500:
 10633            description: "server error"
 10634            schema:
 10635              $ref: "#/definitions/ErrorResponse"
 10636          503:
 10637            description: "node is not part of a swarm"
 10638            schema:
 10639              $ref: "#/definitions/ErrorResponse"
 10640        parameters:
 10641          - name: "id"
 10642            in: "path"
 10643            description: "ID or name of service."
 10644            required: true
 10645            type: "string"
 10646          - name: "body"
 10647            in: "body"
 10648            required: true
 10649            schema:
 10650              allOf:
 10651                - $ref: "#/definitions/ServiceSpec"
 10652                - type: "object"
 10653                  example:
 10654                    Name: "top"
 10655                    TaskTemplate:
 10656                      ContainerSpec:
 10657                        Image: "busybox"
 10658                        Args:
 10659                          - "top"
 10660                      Resources:
 10661                        Limits: {}
 10662                        Reservations: {}
 10663                      RestartPolicy:
 10664                        Condition: "any"
 10665                        MaxAttempts: 0
 10666                      Placement: {}
 10667                      ForceUpdate: 0
 10668                    Mode:
 10669                      Replicated:
 10670                        Replicas: 1
 10671                    UpdateConfig:
 10672                      Parallelism: 2
 10673                      Delay: 1000000000
 10674                      FailureAction: "pause"
 10675                      Monitor: 15000000000
 10676                      MaxFailureRatio: 0.15
 10677                    RollbackConfig:
 10678                      Parallelism: 1
 10679                      Delay: 1000000000
 10680                      FailureAction: "pause"
 10681                      Monitor: 15000000000
 10682                      MaxFailureRatio: 0.15
 10683                    EndpointSpec:
 10684                      Mode: "vip"
 10685  
 10686          - name: "version"
 10687            in: "query"
 10688            description: |
 10689              The version number of the service object being updated. This is
 10690              required to avoid conflicting writes.
 10691              This version number should be the value as currently set on the
 10692              service *before* the update. You can find the current version by
 10693              calling `GET /services/{id}`
 10694            required: true
 10695            type: "integer"
 10696          - name: "registryAuthFrom"
 10697            in: "query"
 10698            description: |
 10699              If the `X-Registry-Auth` header is not specified, this parameter
 10700              indicates where to find registry authorization credentials.
 10701            type: "string"
 10702            enum: ["spec", "previous-spec"]
 10703            default: "spec"
 10704          - name: "rollback"
 10705            in: "query"
 10706            description: |
 10707              Set to this parameter to `previous` to cause a server-side rollback
 10708              to the previous service spec. The supplied spec will be ignored in
 10709              this case.
 10710            type: "string"
 10711          - name: "X-Registry-Auth"
 10712            in: "header"
 10713            description: |
 10714              A base64url-encoded auth configuration for pulling from private
 10715              registries.
 10716  
 10717              Refer to the [authentication section](#section/Authentication) for
 10718              details.
 10719            type: "string"
 10720  
 10721        tags: ["Service"]
 10722    /services/{id}/logs:
 10723      get:
 10724        summary: "Get service logs"
 10725        description: |
 10726          Get `stdout` and `stderr` logs from a service. See also
 10727          [`/containers/{id}/logs`](#operation/ContainerLogs).
 10728  
 10729          **Note**: This endpoint works only for services with the `local`,
 10730          `json-file` or `journald` logging drivers.
 10731        operationId: "ServiceLogs"
 10732        responses:
 10733          200:
 10734            description: "logs returned as a stream in response body"
 10735            schema:
 10736              type: "string"
 10737              format: "binary"
 10738          404:
 10739            description: "no such service"
 10740            schema:
 10741              $ref: "#/definitions/ErrorResponse"
 10742            examples:
 10743              application/json:
 10744                message: "No such service: c2ada9df5af8"
 10745          500:
 10746            description: "server error"
 10747            schema:
 10748              $ref: "#/definitions/ErrorResponse"
 10749          503:
 10750            description: "node is not part of a swarm"
 10751            schema:
 10752              $ref: "#/definitions/ErrorResponse"
 10753        parameters:
 10754          - name: "id"
 10755            in: "path"
 10756            required: true
 10757            description: "ID or name of the service"
 10758            type: "string"
 10759          - name: "details"
 10760            in: "query"
 10761            description: "Show service context and extra details provided to logs."
 10762            type: "boolean"
 10763            default: false
 10764          - name: "follow"
 10765            in: "query"
 10766            description: "Keep connection after returning logs."
 10767            type: "boolean"
 10768            default: false
 10769          - name: "stdout"
 10770            in: "query"
 10771            description: "Return logs from `stdout`"
 10772            type: "boolean"
 10773            default: false
 10774          - name: "stderr"
 10775            in: "query"
 10776            description: "Return logs from `stderr`"
 10777            type: "boolean"
 10778            default: false
 10779          - name: "since"
 10780            in: "query"
 10781            description: "Only return logs since this time, as a UNIX timestamp"
 10782            type: "integer"
 10783            default: 0
 10784          - name: "timestamps"
 10785            in: "query"
 10786            description: "Add timestamps to every log line"
 10787            type: "boolean"
 10788            default: false
 10789          - name: "tail"
 10790            in: "query"
 10791            description: |
 10792              Only return this number of log lines from the end of the logs.
 10793              Specify as an integer or `all` to output all log lines.
 10794            type: "string"
 10795            default: "all"
 10796        tags: ["Service"]
 10797    /tasks:
 10798      get:
 10799        summary: "List tasks"
 10800        operationId: "TaskList"
 10801        produces:
 10802          - "application/json"
 10803        responses:
 10804          200:
 10805            description: "no error"
 10806            schema:
 10807              type: "array"
 10808              items:
 10809                $ref: "#/definitions/Task"
 10810              example:
 10811                - ID: "0kzzo1i0y4jz6027t0k7aezc7"
 10812                  Version:
 10813                    Index: 71
 10814                  CreatedAt: "2016-06-07T21:07:31.171892745Z"
 10815                  UpdatedAt: "2016-06-07T21:07:31.376370513Z"
 10816                  Spec:
 10817                    ContainerSpec:
 10818                      Image: "redis"
 10819                    Resources:
 10820                      Limits: {}
 10821                      Reservations: {}
 10822                    RestartPolicy:
 10823                      Condition: "any"
 10824                      MaxAttempts: 0
 10825                    Placement: {}
 10826                  ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
 10827                  Slot: 1
 10828                  NodeID: "60gvrl6tm78dmak4yl7srz94v"
 10829                  Status:
 10830                    Timestamp: "2016-06-07T21:07:31.290032978Z"
 10831                    State: "running"
 10832                    Message: "started"
 10833                    ContainerStatus:
 10834                      ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035"
 10835                      PID: 677
 10836                  DesiredState: "running"
 10837                  NetworksAttachments:
 10838                    - Network:
 10839                        ID: "4qvuz4ko70xaltuqbt8956gd1"
 10840                        Version:
 10841                          Index: 18
 10842                        CreatedAt: "2016-06-07T20:31:11.912919752Z"
 10843                        UpdatedAt: "2016-06-07T21:07:29.955277358Z"
 10844                        Spec:
 10845                          Name: "ingress"
 10846                          Labels:
 10847                            com.docker.swarm.internal: "true"
 10848                          DriverConfiguration: {}
 10849                          IPAMOptions:
 10850                            Driver: {}
 10851                            Configs:
 10852                              - Subnet: "10.255.0.0/16"
 10853                                Gateway: "10.255.0.1"
 10854                        DriverState:
 10855                          Name: "overlay"
 10856                          Options:
 10857                            com.docker.network.driver.overlay.vxlanid_list: "256"
 10858                        IPAMOptions:
 10859                          Driver:
 10860                            Name: "default"
 10861                          Configs:
 10862                            - Subnet: "10.255.0.0/16"
 10863                              Gateway: "10.255.0.1"
 10864                      Addresses:
 10865                        - "10.255.0.10/16"
 10866                - ID: "1yljwbmlr8er2waf8orvqpwms"
 10867                  Version:
 10868                    Index: 30
 10869                  CreatedAt: "2016-06-07T21:07:30.019104782Z"
 10870                  UpdatedAt: "2016-06-07T21:07:30.231958098Z"
 10871                  Name: "hopeful_cori"
 10872                  Spec:
 10873                    ContainerSpec:
 10874                      Image: "redis"
 10875                    Resources:
 10876                      Limits: {}
 10877                      Reservations: {}
 10878                    RestartPolicy:
 10879                      Condition: "any"
 10880                      MaxAttempts: 0
 10881                    Placement: {}
 10882                  ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
 10883                  Slot: 1
 10884                  NodeID: "60gvrl6tm78dmak4yl7srz94v"
 10885                  Status:
 10886                    Timestamp: "2016-06-07T21:07:30.202183143Z"
 10887                    State: "shutdown"
 10888                    Message: "shutdown"
 10889                    ContainerStatus:
 10890                      ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213"
 10891                  DesiredState: "shutdown"
 10892                  NetworksAttachments:
 10893                    - Network:
 10894                        ID: "4qvuz4ko70xaltuqbt8956gd1"
 10895                        Version:
 10896                          Index: 18
 10897                        CreatedAt: "2016-06-07T20:31:11.912919752Z"
 10898                        UpdatedAt: "2016-06-07T21:07:29.955277358Z"
 10899                        Spec:
 10900                          Name: "ingress"
 10901                          Labels:
 10902                            com.docker.swarm.internal: "true"
 10903                          DriverConfiguration: {}
 10904                          IPAMOptions:
 10905                            Driver: {}
 10906                            Configs:
 10907                              - Subnet: "10.255.0.0/16"
 10908                                Gateway: "10.255.0.1"
 10909                        DriverState:
 10910                          Name: "overlay"
 10911                          Options:
 10912                            com.docker.network.driver.overlay.vxlanid_list: "256"
 10913                        IPAMOptions:
 10914                          Driver:
 10915                            Name: "default"
 10916                          Configs:
 10917                            - Subnet: "10.255.0.0/16"
 10918                              Gateway: "10.255.0.1"
 10919                      Addresses:
 10920                        - "10.255.0.5/16"
 10921          500:
 10922            description: "server error"
 10923            schema:
 10924              $ref: "#/definitions/ErrorResponse"
 10925          503:
 10926            description: "node is not part of a swarm"
 10927            schema:
 10928              $ref: "#/definitions/ErrorResponse"
 10929        parameters:
 10930          - name: "filters"
 10931            in: "query"
 10932            type: "string"
 10933            description: |
 10934              A JSON encoded value of the filters (a `map[string][]string`) to
 10935              process on the tasks list.
 10936  
 10937              Available filters:
 10938  
 10939              - `desired-state=(running | shutdown | accepted)`
 10940              - `id=<task id>`
 10941              - `label=key` or `label="key=value"`
 10942              - `name=<task name>`
 10943              - `node=<node id or name>`
 10944              - `service=<service name>`
 10945        tags: ["Task"]
 10946    /tasks/{id}:
 10947      get:
 10948        summary: "Inspect a task"
 10949        operationId: "TaskInspect"
 10950        produces:
 10951          - "application/json"
 10952        responses:
 10953          200:
 10954            description: "no error"
 10955            schema:
 10956              $ref: "#/definitions/Task"
 10957          404:
 10958            description: "no such task"
 10959            schema:
 10960              $ref: "#/definitions/ErrorResponse"
 10961          500:
 10962            description: "server error"
 10963            schema:
 10964              $ref: "#/definitions/ErrorResponse"
 10965          503:
 10966            description: "node is not part of a swarm"
 10967            schema:
 10968              $ref: "#/definitions/ErrorResponse"
 10969        parameters:
 10970          - name: "id"
 10971            in: "path"
 10972            description: "ID of the task"
 10973            required: true
 10974            type: "string"
 10975        tags: ["Task"]
 10976    /tasks/{id}/logs:
 10977      get:
 10978        summary: "Get task logs"
 10979        description: |
 10980          Get `stdout` and `stderr` logs from a task.
 10981          See also [`/containers/{id}/logs`](#operation/ContainerLogs).
 10982  
 10983          **Note**: This endpoint works only for services with the `local`,
 10984          `json-file` or `journald` logging drivers.
 10985        operationId: "TaskLogs"
 10986        responses:
 10987          200:
 10988            description: "logs returned as a stream in response body"
 10989            schema:
 10990              type: "string"
 10991              format: "binary"
 10992          404:
 10993            description: "no such task"
 10994            schema:
 10995              $ref: "#/definitions/ErrorResponse"
 10996            examples:
 10997              application/json:
 10998                message: "No such task: c2ada9df5af8"
 10999          500:
 11000            description: "server error"
 11001            schema:
 11002              $ref: "#/definitions/ErrorResponse"
 11003          503:
 11004            description: "node is not part of a swarm"
 11005            schema:
 11006              $ref: "#/definitions/ErrorResponse"
 11007        parameters:
 11008          - name: "id"
 11009            in: "path"
 11010            required: true
 11011            description: "ID of the task"
 11012            type: "string"
 11013          - name: "details"
 11014            in: "query"
 11015            description: "Show task context and extra details provided to logs."
 11016            type: "boolean"
 11017            default: false
 11018          - name: "follow"
 11019            in: "query"
 11020            description: "Keep connection after returning logs."
 11021            type: "boolean"
 11022            default: false
 11023          - name: "stdout"
 11024            in: "query"
 11025            description: "Return logs from `stdout`"
 11026            type: "boolean"
 11027            default: false
 11028          - name: "stderr"
 11029            in: "query"
 11030            description: "Return logs from `stderr`"
 11031            type: "boolean"
 11032            default: false
 11033          - name: "since"
 11034            in: "query"
 11035            description: "Only return logs since this time, as a UNIX timestamp"
 11036            type: "integer"
 11037            default: 0
 11038          - name: "timestamps"
 11039            in: "query"
 11040            description: "Add timestamps to every log line"
 11041            type: "boolean"
 11042            default: false
 11043          - name: "tail"
 11044            in: "query"
 11045            description: |
 11046              Only return this number of log lines from the end of the logs.
 11047              Specify as an integer or `all` to output all log lines.
 11048            type: "string"
 11049            default: "all"
 11050        tags: ["Task"]
 11051    /secrets:
 11052      get:
 11053        summary: "List secrets"
 11054        operationId: "SecretList"
 11055        produces:
 11056          - "application/json"
 11057        responses:
 11058          200:
 11059            description: "no error"
 11060            schema:
 11061              type: "array"
 11062              items:
 11063                $ref: "#/definitions/Secret"
 11064              example:
 11065                - ID: "blt1owaxmitz71s9v5zh81zun"
 11066                  Version:
 11067                    Index: 85
 11068                  CreatedAt: "2017-07-20T13:55:28.678958722Z"
 11069                  UpdatedAt: "2017-07-20T13:55:28.678958722Z"
 11070                  Spec:
 11071                    Name: "mysql-passwd"
 11072                    Labels:
 11073                      some.label: "some.value"
 11074                    Driver:
 11075                      Name: "secret-bucket"
 11076                      Options:
 11077                        OptionA: "value for driver option A"
 11078                        OptionB: "value for driver option B"
 11079                - ID: "ktnbjxoalbkvbvedmg1urrz8h"
 11080                  Version:
 11081                    Index: 11
 11082                  CreatedAt: "2016-11-05T01:20:17.327670065Z"
 11083                  UpdatedAt: "2016-11-05T01:20:17.327670065Z"
 11084                  Spec:
 11085                    Name: "app-dev.crt"
 11086                    Labels:
 11087                      foo: "bar"
 11088          500:
 11089            description: "server error"
 11090            schema:
 11091              $ref: "#/definitions/ErrorResponse"
 11092          503:
 11093            description: "node is not part of a swarm"
 11094            schema:
 11095              $ref: "#/definitions/ErrorResponse"
 11096        parameters:
 11097          - name: "filters"
 11098            in: "query"
 11099            type: "string"
 11100            description: |
 11101              A JSON encoded value of the filters (a `map[string][]string`) to
 11102              process on the secrets list.
 11103  
 11104              Available filters:
 11105  
 11106              - `id=<secret id>`
 11107              - `label=<key> or label=<key>=value`
 11108              - `name=<secret name>`
 11109              - `names=<secret name>`
 11110        tags: ["Secret"]
 11111    /secrets/create:
 11112      post:
 11113        summary: "Create a secret"
 11114        operationId: "SecretCreate"
 11115        consumes:
 11116          - "application/json"
 11117        produces:
 11118          - "application/json"
 11119        responses:
 11120          201:
 11121            description: "no error"
 11122            schema:
 11123              $ref: "#/definitions/IdResponse"
 11124          409:
 11125            description: "name conflicts with an existing object"
 11126            schema:
 11127              $ref: "#/definitions/ErrorResponse"
 11128          500:
 11129            description: "server error"
 11130            schema:
 11131              $ref: "#/definitions/ErrorResponse"
 11132          503:
 11133            description: "node is not part of a swarm"
 11134            schema:
 11135              $ref: "#/definitions/ErrorResponse"
 11136        parameters:
 11137          - name: "body"
 11138            in: "body"
 11139            schema:
 11140              allOf:
 11141                - $ref: "#/definitions/SecretSpec"
 11142                - type: "object"
 11143                  example:
 11144                    Name: "app-key.crt"
 11145                    Labels:
 11146                      foo: "bar"
 11147                    Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg=="
 11148                    Driver:
 11149                      Name: "secret-bucket"
 11150                      Options:
 11151                        OptionA: "value for driver option A"
 11152                        OptionB: "value for driver option B"
 11153        tags: ["Secret"]
 11154    /secrets/{id}:
 11155      get:
 11156        summary: "Inspect a secret"
 11157        operationId: "SecretInspect"
 11158        produces:
 11159          - "application/json"
 11160        responses:
 11161          200:
 11162            description: "no error"
 11163            schema:
 11164              $ref: "#/definitions/Secret"
 11165            examples:
 11166              application/json:
 11167                ID: "ktnbjxoalbkvbvedmg1urrz8h"
 11168                Version:
 11169                  Index: 11
 11170                CreatedAt: "2016-11-05T01:20:17.327670065Z"
 11171                UpdatedAt: "2016-11-05T01:20:17.327670065Z"
 11172                Spec:
 11173                  Name: "app-dev.crt"
 11174                  Labels:
 11175                    foo: "bar"
 11176                  Driver:
 11177                    Name: "secret-bucket"
 11178                    Options:
 11179                      OptionA: "value for driver option A"
 11180                      OptionB: "value for driver option B"
 11181  
 11182          404:
 11183            description: "secret not found"
 11184            schema:
 11185              $ref: "#/definitions/ErrorResponse"
 11186          500:
 11187            description: "server error"
 11188            schema:
 11189              $ref: "#/definitions/ErrorResponse"
 11190          503:
 11191            description: "node is not part of a swarm"
 11192            schema:
 11193              $ref: "#/definitions/ErrorResponse"
 11194        parameters:
 11195          - name: "id"
 11196            in: "path"
 11197            required: true
 11198            type: "string"
 11199            description: "ID of the secret"
 11200        tags: ["Secret"]
 11201      delete:
 11202        summary: "Delete a secret"
 11203        operationId: "SecretDelete"
 11204        produces:
 11205          - "application/json"
 11206        responses:
 11207          204:
 11208            description: "no error"
 11209          404:
 11210            description: "secret not found"
 11211            schema:
 11212              $ref: "#/definitions/ErrorResponse"
 11213          500:
 11214            description: "server error"
 11215            schema:
 11216              $ref: "#/definitions/ErrorResponse"
 11217          503:
 11218            description: "node is not part of a swarm"
 11219            schema:
 11220              $ref: "#/definitions/ErrorResponse"
 11221        parameters:
 11222          - name: "id"
 11223            in: "path"
 11224            required: true
 11225            type: "string"
 11226            description: "ID of the secret"
 11227        tags: ["Secret"]
 11228    /secrets/{id}/update:
 11229      post:
 11230        summary: "Update a Secret"
 11231        operationId: "SecretUpdate"
 11232        responses:
 11233          200:
 11234            description: "no error"
 11235          400:
 11236            description: "bad parameter"
 11237            schema:
 11238              $ref: "#/definitions/ErrorResponse"
 11239          404:
 11240            description: "no such secret"
 11241            schema:
 11242              $ref: "#/definitions/ErrorResponse"
 11243          500:
 11244            description: "server error"
 11245            schema:
 11246              $ref: "#/definitions/ErrorResponse"
 11247          503:
 11248            description: "node is not part of a swarm"
 11249            schema:
 11250              $ref: "#/definitions/ErrorResponse"
 11251        parameters:
 11252          - name: "id"
 11253            in: "path"
 11254            description: "The ID or name of the secret"
 11255            type: "string"
 11256            required: true
 11257          - name: "body"
 11258            in: "body"
 11259            schema:
 11260              $ref: "#/definitions/SecretSpec"
 11261            description: |
 11262              The spec of the secret to update. Currently, only the Labels field
 11263              can be updated. All other fields must remain unchanged from the
 11264              [SecretInspect endpoint](#operation/SecretInspect) response values.
 11265          - name: "version"
 11266            in: "query"
 11267            description: |
 11268              The version number of the secret object being updated. This is
 11269              required to avoid conflicting writes.
 11270            type: "integer"
 11271            format: "int64"
 11272            required: true
 11273        tags: ["Secret"]
 11274    /configs:
 11275      get:
 11276        summary: "List configs"
 11277        operationId: "ConfigList"
 11278        produces:
 11279          - "application/json"
 11280        responses:
 11281          200:
 11282            description: "no error"
 11283            schema:
 11284              type: "array"
 11285              items:
 11286                $ref: "#/definitions/Config"
 11287              example:
 11288                - ID: "ktnbjxoalbkvbvedmg1urrz8h"
 11289                  Version:
 11290                    Index: 11
 11291                  CreatedAt: "2016-11-05T01:20:17.327670065Z"
 11292                  UpdatedAt: "2016-11-05T01:20:17.327670065Z"
 11293                  Spec:
 11294                    Name: "server.conf"
 11295          500:
 11296            description: "server error"
 11297            schema:
 11298              $ref: "#/definitions/ErrorResponse"
 11299          503:
 11300            description: "node is not part of a swarm"
 11301            schema:
 11302              $ref: "#/definitions/ErrorResponse"
 11303        parameters:
 11304          - name: "filters"
 11305            in: "query"
 11306            type: "string"
 11307            description: |
 11308              A JSON encoded value of the filters (a `map[string][]string`) to
 11309              process on the configs list.
 11310  
 11311              Available filters:
 11312  
 11313              - `id=<config id>`
 11314              - `label=<key> or label=<key>=value`
 11315              - `name=<config name>`
 11316              - `names=<config name>`
 11317        tags: ["Config"]
 11318    /configs/create:
 11319      post:
 11320        summary: "Create a config"
 11321        operationId: "ConfigCreate"
 11322        consumes:
 11323          - "application/json"
 11324        produces:
 11325          - "application/json"
 11326        responses:
 11327          201:
 11328            description: "no error"
 11329            schema:
 11330              $ref: "#/definitions/IdResponse"
 11331          409:
 11332            description: "name conflicts with an existing object"
 11333            schema:
 11334              $ref: "#/definitions/ErrorResponse"
 11335          500:
 11336            description: "server error"
 11337            schema:
 11338              $ref: "#/definitions/ErrorResponse"
 11339          503:
 11340            description: "node is not part of a swarm"
 11341            schema:
 11342              $ref: "#/definitions/ErrorResponse"
 11343        parameters:
 11344          - name: "body"
 11345            in: "body"
 11346            schema:
 11347              allOf:
 11348                - $ref: "#/definitions/ConfigSpec"
 11349                - type: "object"
 11350                  example:
 11351                    Name: "server.conf"
 11352                    Labels:
 11353                      foo: "bar"
 11354                    Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg=="
 11355        tags: ["Config"]
 11356    /configs/{id}:
 11357      get:
 11358        summary: "Inspect a config"
 11359        operationId: "ConfigInspect"
 11360        produces:
 11361          - "application/json"
 11362        responses:
 11363          200:
 11364            description: "no error"
 11365            schema:
 11366              $ref: "#/definitions/Config"
 11367            examples:
 11368              application/json:
 11369                ID: "ktnbjxoalbkvbvedmg1urrz8h"
 11370                Version:
 11371                  Index: 11
 11372                CreatedAt: "2016-11-05T01:20:17.327670065Z"
 11373                UpdatedAt: "2016-11-05T01:20:17.327670065Z"
 11374                Spec:
 11375                  Name: "app-dev.crt"
 11376          404:
 11377            description: "config not found"
 11378            schema:
 11379              $ref: "#/definitions/ErrorResponse"
 11380          500:
 11381            description: "server error"
 11382            schema:
 11383              $ref: "#/definitions/ErrorResponse"
 11384          503:
 11385            description: "node is not part of a swarm"
 11386            schema:
 11387              $ref: "#/definitions/ErrorResponse"
 11388        parameters:
 11389          - name: "id"
 11390            in: "path"
 11391            required: true
 11392            type: "string"
 11393            description: "ID of the config"
 11394        tags: ["Config"]
 11395      delete:
 11396        summary: "Delete a config"
 11397        operationId: "ConfigDelete"
 11398        produces:
 11399          - "application/json"
 11400        responses:
 11401          204:
 11402            description: "no error"
 11403          404:
 11404            description: "config not found"
 11405            schema:
 11406              $ref: "#/definitions/ErrorResponse"
 11407          500:
 11408            description: "server error"
 11409            schema:
 11410              $ref: "#/definitions/ErrorResponse"
 11411          503:
 11412            description: "node is not part of a swarm"
 11413            schema:
 11414              $ref: "#/definitions/ErrorResponse"
 11415        parameters:
 11416          - name: "id"
 11417            in: "path"
 11418            required: true
 11419            type: "string"
 11420            description: "ID of the config"
 11421        tags: ["Config"]
 11422    /configs/{id}/update:
 11423      post:
 11424        summary: "Update a Config"
 11425        operationId: "ConfigUpdate"
 11426        responses:
 11427          200:
 11428            description: "no error"
 11429          400:
 11430            description: "bad parameter"
 11431            schema:
 11432              $ref: "#/definitions/ErrorResponse"
 11433          404:
 11434            description: "no such config"
 11435            schema:
 11436              $ref: "#/definitions/ErrorResponse"
 11437          500:
 11438            description: "server error"
 11439            schema:
 11440              $ref: "#/definitions/ErrorResponse"
 11441          503:
 11442            description: "node is not part of a swarm"
 11443            schema:
 11444              $ref: "#/definitions/ErrorResponse"
 11445        parameters:
 11446          - name: "id"
 11447            in: "path"
 11448            description: "The ID or name of the config"
 11449            type: "string"
 11450            required: true
 11451          - name: "body"
 11452            in: "body"
 11453            schema:
 11454              $ref: "#/definitions/ConfigSpec"
 11455            description: |
 11456              The spec of the config to update. Currently, only the Labels field
 11457              can be updated. All other fields must remain unchanged from the
 11458              [ConfigInspect endpoint](#operation/ConfigInspect) response values.
 11459          - name: "version"
 11460            in: "query"
 11461            description: |
 11462              The version number of the config object being updated. This is
 11463              required to avoid conflicting writes.
 11464            type: "integer"
 11465            format: "int64"
 11466            required: true
 11467        tags: ["Config"]
 11468    /distribution/{name}/json:
 11469      get:
 11470        summary: "Get image information from the registry"
 11471        description: |
 11472          Return image digest and platform information by contacting the registry.
 11473        operationId: "DistributionInspect"
 11474        produces:
 11475          - "application/json"
 11476        responses:
 11477          200:
 11478            description: "descriptor and platform information"
 11479            schema:
 11480              $ref: "#/definitions/DistributionInspect"
 11481          401:
 11482            description: "Failed authentication or no image found"
 11483            schema:
 11484              $ref: "#/definitions/ErrorResponse"
 11485            examples:
 11486              application/json:
 11487                message: "No such image: someimage (tag: latest)"
 11488          500:
 11489            description: "Server error"
 11490            schema:
 11491              $ref: "#/definitions/ErrorResponse"
 11492        parameters:
 11493          - name: "name"
 11494            in: "path"
 11495            description: "Image name or id"
 11496            type: "string"
 11497            required: true
 11498        tags: ["Distribution"]
 11499    /session:
 11500      post:
 11501        summary: "Initialize interactive session"
 11502        description: |
 11503          Start a new interactive session with a server. Session allows server to
 11504          call back to the client for advanced capabilities.
 11505  
 11506          ### Hijacking
 11507  
 11508          This endpoint hijacks the HTTP connection to HTTP2 transport that allows
 11509          the client to expose gPRC services on that connection.
 11510  
 11511          For example, the client sends this request to upgrade the connection:
 11512  
 11513          ```
 11514          POST /session HTTP/1.1
 11515          Upgrade: h2c
 11516          Connection: Upgrade
 11517          ```
 11518  
 11519          The Docker daemon responds with a `101 UPGRADED` response follow with
 11520          the raw stream:
 11521  
 11522          ```
 11523          HTTP/1.1 101 UPGRADED
 11524          Connection: Upgrade
 11525          Upgrade: h2c
 11526          ```
 11527        operationId: "Session"
 11528        produces:
 11529          - "application/vnd.docker.raw-stream"
 11530        responses:
 11531          101:
 11532            description: "no error, hijacking successful"
 11533          400:
 11534            description: "bad parameter"
 11535            schema:
 11536              $ref: "#/definitions/ErrorResponse"
 11537          500:
 11538            description: "server error"
 11539            schema:
 11540              $ref: "#/definitions/ErrorResponse"
 11541        tags: ["Session"]