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