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