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