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