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