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