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