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