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