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