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