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