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