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