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