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