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