github.com/wozhu6104/docker@v20.10.10+incompatible/docs/api/v1.40.yaml (about)

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