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