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