github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/api/swagger.yaml (about)

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