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