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