github.com/kaisawind/go-swagger@v0.19.0/fixtures/bugs/1479/fixture-1479.yaml (about)

     1  ---
     2  swagger: "2.0"
     3  schemes:
     4    - "http"
     5    - "https"
     6  produces:
     7    - "application/json"
     8    - "text/plain"
     9  consumes:
    10    - "application/json"
    11    - "text/plain"
    12  basePath: "/v1.24"
    13  info:
    14    title: "Pouch Engine API"
    15    version: "1.24"
    16    description: |
    17      API is an HTTP API served by Pouch Engine.
    18  
    19  produces:
    20          - "application/json"
    21  paths:
    22    /_ping:
    23      get:
    24        summary: ""
    25        description: ""
    26        responses:
    27          200:
    28            description: "no error"
    29            schema:
    30              type: "string"
    31              example: "OK"
    32          500:
    33            $ref: "#/responses/500ErrorResponse"
    34  
    35    /version:
    36      get:
    37        summary: "Get Pouchd version"
    38        description: ""
    39        responses:
    40          200:
    41            schema:
    42              $ref: '#/definitions/SystemVersion'
    43            description: "no error"
    44          500:
    45            $ref: "#/responses/500ErrorResponse"
    46  
    47    /info:
    48      get:
    49        summary: "Get System information"
    50        description: ""
    51        responses:
    52          200:
    53            schema:
    54              $ref: '#/definitions/SystemInfo'
    55            description: "no error"
    56          500:
    57            $ref: "#/responses/500ErrorResponse"
    58  
    59    /auth:
    60      post:
    61        summary: "Check auth configuration"
    62        description: "Validate credentials for a registry and, if available, get an identity token for accessing the registry without password."
    63        consumes:
    64          - "application/json"
    65        produces:
    66          - "application/json"
    67        responses:
    68          200:
    69            description: "An identity token was generated successfully."
    70            schema:
    71              $ref: "#/definitions/AuthResponse"
    72          401:
    73            description: "Login unauthorized"
    74            schema:
    75              $ref: "#/responses/401ErrorResponse"
    76          500:
    77            description: "Server error"
    78            schema:
    79              $ref: "#/responses/500ErrorResponse"
    80        parameters:
    81          - name: "authConfig"
    82            in: "body"
    83            description: "Authentication to check"
    84            schema:
    85              $ref: "#/definitions/AuthConfig"
    86    
    87    /daemon/update:
    88      post:
    89        summary: "Update daemon's labels and image proxy"
    90        consumes:
    91          - "application/json"
    92        produces:
    93          - "application/json"
    94        responses:
    95          200:
    96            description: "no error"
    97          400:
    98            description: "bad parameter"
    99            schema:
   100              $ref: '#/definitions/Error'
   101          500:
   102            $ref: "#/responses/500ErrorResponse"
   103        parameters:
   104          - name: "DaemonUpdateConfig"
   105            in: body
   106            description: "Config used to update daemon, only labels and image proxy are allowed."
   107            schema:
   108              $ref: "#/definitions/DaemonUpdateConfig"
   109  
   110    /images/create:
   111      post:
   112        summary: "Create an image by pulling from a registry or importing from an existing source file"
   113        consumes:
   114          - "text/plain"
   115          - "application/octet-stream"
   116        produces:
   117          - "application/json"
   118        responses:
   119          200:
   120            description: "no error"
   121          404:
   122            schema:
   123              $ref: '#/definitions/Error'
   124            description: "image not found"
   125          500:
   126            $ref: "#/responses/500ErrorResponse"
   127        parameters:
   128          - name: "fromImage"
   129            in: "query"
   130            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."
   131            type: "string"
   132          - name: "fromSrc"
   133            in: "query"
   134            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."
   135            type: "string"
   136          - name: "repo"
   137            in: "query"
   138            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."
   139            type: "string"
   140          - name: "tag"
   141            in: "query"
   142            description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled."
   143            type: "string"
   144          - name: "inputImage"
   145            in: "body"
   146            description: "Image content if the value `-` has been specified in fromSrc query parameter"
   147            schema:
   148              type: "string"
   149            required: false
   150          - name: "X-Registry-Auth"
   151            in: "header"
   152            description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)"
   153            type: "string"
   154  
   155    /images/{imageid}/json:
   156      get:
   157        summary: "Inspect a image"
   158        description: "Return the information about image"
   159        operationId: "ImageInspect"
   160        produces:
   161          - "application/json"
   162        responses:
   163          200:
   164            description: "no error"
   165            schema:
   166              $ref: "#/definitions/ImageInfo"
   167            examples:
   168              application/json:
   169                CreatedAt: "2017-12-19 15:32:09"
   170                Digest: "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8"
   171                ID: "e216a057b1cb"
   172                Name: "ubuntu:12.04"
   173                Size: 103579269
   174                Tag: "12.04"
   175          404:
   176            description: "no such image"
   177            schema:
   178              $ref: "#/definitions/Error"
   179            examples:
   180              application/json:
   181                message: "No such image: e216a057b1cb"
   182          500:
   183            $ref: "#/responses/500ErrorResponse"
   184        parameters:
   185          - $ref: "#/parameters/imageid"
   186  
   187    /images/json:
   188      get:
   189        summary: "List Images"
   190        description: "Return a list of stored images."
   191        operationId: "ImageList"
   192        produces:
   193          - "application/json"
   194        responses:
   195          200:
   196            description: "Summary image data for the images matching the query"
   197            schema:
   198              type: "array"
   199              items:
   200                $ref: "#/definitions/ImageInfo"
   201            examples:
   202              application/json:
   203                - Id: "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8"
   204                  ParentId: ""
   205                  RepoTags:
   206                    - "ubuntu:12.04"
   207                    - "ubuntu:precise"
   208                  RepoDigests:
   209                    - "ubuntu@sha256:992069aee4016783df6345315302fa59681aae51a8eeb2f889dea59290f21787"
   210                  Created: 1474925151
   211                  Size: 103579269
   212                  VirtualSize: 103579269
   213                  SharedSize: 0
   214                  Labels: {}
   215                  Containers: 2
   216                - Id: "sha256:3e314f95dcace0f5e4fd37b10862fe8398e3c60ed36600bc0ca5fda78b087175"
   217                  ParentId: ""
   218                  RepoTags:
   219                    - "ubuntu:12.10"
   220                    - "ubuntu:quantal"
   221                  RepoDigests:
   222                    - "ubuntu@sha256:002fba3e3255af10be97ea26e476692a7ebed0bb074a9ab960b2e7a1526b15d7"
   223                    - "ubuntu@sha256:68ea0200f0b90df725d99d823905b04cf844f6039ef60c60bf3e019915017bd3"
   224                  Created: 1403128455
   225                  Size: 172064416
   226                  VirtualSize: 172064416
   227                  SharedSize: 0
   228                  Labels: {}
   229                  Containers: 5
   230          500:
   231            $ref: "#/responses/500ErrorResponse"
   232        parameters:
   233          - name: "all"
   234            in: "query"
   235            description: "Show all images. Only images from a final layer (no children) are shown by default."
   236            type: "boolean"
   237          - name: "filters"
   238            in: "query"
   239            description: |
   240              A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:
   241  
   242              - `before`=(`<image-name>[:<tag>]`,  `<image id>` or `<image@digest>`)
   243              - `dangling=true`
   244              - `label=key` or `label="key=value"` of an image label
   245              - `reference`=(`<image-name>[:<tag>]`)
   246              - `since`=(`<image-name>[:<tag>]`,  `<image id>` or `<image@digest>`)
   247            type: "string"
   248          - name: "digests"
   249            in: "query"
   250            description: "Show digest information as a `RepoDigests` field on each image."
   251            type: "boolean"
   252  
   253    /images/search:
   254      get:
   255        summary: "Search images"
   256        produces:
   257          - "application/json"
   258        responses:
   259          200:
   260            description: "No error"
   261            schema:
   262              type: "array"
   263              items:
   264                $ref: "#/definitions/SearchResultItem"
   265          500:
   266            $ref: "#/responses/500ErrorResponse"
   267  
   268    /images/{imageid}:
   269      delete:
   270        summary: "Remove an image"
   271        description: "Remove an image by reference."
   272        parameters:
   273          - $ref: "#/parameters/imageid"
   274          - name: "force"
   275            in: "query"
   276            description: "Remove the image even if it is being used"
   277            type: "boolean"
   278            default: false
   279        responses:
   280          204:
   281            description: "No error"
   282          404:
   283            description: "no such image"
   284            schema:
   285              $ref: "#/definitions/Error"
   286            examples:
   287              application/json:
   288                message: "No such image: c2ada9df5af8"
   289          500:
   290            $ref: "#/responses/500ErrorResponse"
   291  
   292    /containers/create:
   293      post:
   294        summary: "Create a container"
   295        consumes:
   296          - "application/json"
   297        produces:
   298          - "application/json"
   299        parameters:
   300          - name: "name"
   301            in: "query"
   302            description: "Assign the specified name to the container. Must match `/?[a-zA-Z0-9_-]+`."
   303            type: "string"
   304            pattern: "/?[a-zA-Z0-9_-]+"
   305          - name: "body"
   306            in: "body"
   307            description: "Container to create"
   308            schema:
   309              $ref: "#/definitions/ContainerCreateConfig"
   310            required: true
   311        responses:
   312          201:
   313            description: "Container created successfully"
   314            schema:
   315              $ref: "#/definitions/ContainerCreateResp"
   316            examples:
   317              application/json:
   318                Id: "e90e34656806"
   319                Warnings: []
   320          400:
   321            description: "bad parameter"
   322            schema:
   323              $ref: "#/definitions/Error"
   324          404:
   325            description: "no such image"
   326            schema:
   327              $ref: "#/definitions/Error"
   328            examples:
   329              application/json:
   330                message: "image: xxx:latest: not found"
   331          409:
   332            description: "conflict"
   333            schema:
   334              $ref: "#/definitions/Error"
   335          500:
   336            $ref: "#/responses/500ErrorResponse"
   337        tags: ["Container"]
   338  
   339    /containers/{id}/json:
   340      get:
   341        summary: "Inspect a container"
   342        description: "Return low-level information about a container."
   343        operationId: "ContainerInspect"
   344        produces:
   345          - "application/json"
   346        responses:
   347          200:
   348            description: "no error"
   349            schema:
   350              $ref: "#/definitions/ContainerJSON"
   351          404:
   352            $ref: "#/responses/404ErrorResponse"
   353          500:
   354            $ref: "#/responses/500ErrorResponse"
   355        parameters:
   356          - $ref: "#/parameters/id"
   357          - name: "size"
   358            in: "query"
   359            type: "boolean"
   360            description: "Return the size of container as fields `SizeRw` and `SizeRootFs`"
   361        tags: ["Container"]
   362  
   363    /containers/json:
   364      get:
   365        summary: "List containers"
   366        operationId: "ContainerList"
   367        produces: ["application/json"]
   368        responses:
   369          200:
   370            description: "Summary containers that matches the query"
   371            schema:
   372              type: "array"
   373              items:
   374                $ref: "#/definitions/Container"
   375          500:
   376            $ref: "#/responses/500ErrorResponse"
   377        parameters:
   378          - name: "all"
   379            in: "query"
   380            description: "Return all containers. By default, only running containers are shown"
   381            type: "boolean"
   382            default: false
   383  
   384    /containers/{id}/rename:
   385      post:
   386        summary: "Rename a container"
   387        operationId: "ContainerRename"
   388        parameters:
   389          - $ref: "#/parameters/id"
   390          - name: "name"
   391            in: "query"
   392            required: true
   393            description: "New name for the container"
   394            type: "string"
   395        responses:
   396          204:
   397            description: "no error"
   398          404:
   399            $ref: "#/responses/404ErrorResponse"
   400          409:
   401            description: "name already in use"
   402            schema:
   403              $ref: "#/definitions/Error"
   404          500:
   405            $ref: "#/responses/500ErrorResponse"
   406        tags: ["Container"]
   407  
   408    /containers/{id}/restart:
   409      post:
   410        summary: "Restart a container"
   411        operationId: "ContainerRestart"
   412        parameters:
   413          - $ref: "#/parameters/id"
   414          - name: "name"
   415            in: "query"
   416            required: true
   417            description: "New name for the container"
   418            type: "string"
   419          - name: "t"
   420            in: "query"
   421            description: "Number of seconds to wait before killing the container"
   422            type: "integer"
   423        responses:
   424          204:
   425            description: "no error"
   426          404:
   427            $ref: "#/responses/404ErrorResponse"
   428          500:
   429            $ref: "#/responses/500ErrorResponse"
   430        tags: ["Container"]
   431  
   432    /containers/{id}/start:
   433      post:
   434        summary: "Start a container"
   435        operationId: "ContainerStart"
   436        parameters:
   437          - $ref: "#/parameters/id"
   438          - name: "detachKeys"
   439            in: "query"
   440            description: "Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`."
   441            type: "string"
   442        responses:
   443          204:
   444            description: "no error"
   445          404:
   446            $ref: "#/responses/404ErrorResponse"
   447          500:
   448            $ref: "#/responses/500ErrorResponse"
   449        tags: ["Container"]
   450  
   451    /containers/{id}/stop:
   452      post:
   453        summary: "Stop a container"
   454        operationId: "ContainerStop"
   455        parameters:
   456          - $ref: "#/parameters/id"
   457          - name: "t"
   458            in: "query"
   459            description: "Number of seconds to wait before killing the container"
   460            type: "integer"
   461        responses:
   462          204:
   463            description: "no error"
   464          404:
   465            $ref: "#/responses/404ErrorResponse"
   466          500:
   467            $ref: "#/responses/500ErrorResponse"
   468        tags: ["Container"]
   469  
   470    /containers/{id}/pause:
   471      post:
   472        summary: "Pause a container"
   473        operationId: "ContainerPause"
   474        parameters:
   475          - $ref: "#/parameters/id"
   476        responses:
   477          204:
   478            description: "no error"
   479          404:
   480            $ref: "#/responses/404ErrorResponse"
   481          500:
   482            $ref: "#/responses/500ErrorResponse"
   483        tags: ["Container"]
   484  
   485    /containers/{id}/unpause:
   486      post:
   487        summary: "Unpause a container"
   488        operationId: "ContainerUnpause"
   489        parameters:
   490          - $ref: "#/parameters/id"
   491        responses:
   492          204:
   493            description: "no error"
   494          404:
   495            $ref: "#/responses/404ErrorResponse"
   496          500:
   497            $ref: "#/responses/500ErrorResponse"
   498        tags: ["Container"]
   499  
   500    /containers/{id}/top:
   501      post:
   502        summary: "Display the running processes of a container"
   503        operationId: "ContainerTop"
   504        parameters:
   505          - $ref: "#/parameters/id"
   506          - name: "ps_args"
   507            in: "query"
   508            description: "top arguments"
   509            type: "string"
   510        responses:
   511          200:
   512            description: "no error"
   513            schema:
   514              $ref: "#/definitions/ContainerProcessList"
   515          404:
   516            $ref: "#/responses/404ErrorResponse"
   517          500:
   518            $ref: "#/responses/500ErrorResponse"
   519        tags: ["Container"]
   520  
   521    /containers/{id}:
   522      delete:
   523        summary: "Remove one container"
   524        operationId: "ContainerRemove"
   525        parameters:
   526          - $ref: "#/parameters/id"
   527          - name: "force"
   528            in: "query"
   529            description: "If the container is running, force query is used to kill it and remove it forcefully."
   530            type: "boolean"
   531        responses:
   532          204:
   533            description: "no error"
   534          404:
   535            $ref: "#/responses/404ErrorResponse"
   536          500:
   537            $ref: "#/responses/500ErrorResponse"
   538        tags: ["Container"]
   539  
   540    /containers/{id}/exec:
   541      post:
   542        summary: "Create an exec instance"
   543        description: "Run a command inside a running container."
   544        operationId: "ContainerExec"
   545        consumes:
   546          - "application/json"
   547        produces:
   548          - "application/json"
   549        responses:
   550          201:
   551            description: "no error"
   552            schema:
   553              $ref: "#/definitions/ExecCreateResp"
   554          404:
   555            $ref: "#/responses/404ErrorResponse"
   556          409:
   557            description: "container is paused"
   558            schema:
   559              $ref: "#/definitions/Error"
   560          500:
   561            $ref: "#/responses/500ErrorResponse"
   562        parameters:
   563          - $ref: "#/parameters/id"
   564          - name: "body"
   565            in: "body"
   566            schema:
   567              $ref: "#/definitions/ExecCreateConfig"
   568            required: true
   569        tags: ["Exec"]
   570  
   571    /containers/{id}/logs:
   572      get:
   573        summary: "Get container logs"
   574        description: |
   575          Get `stdout` and `stderr` logs from a container.
   576  
   577          Note: This endpoint works only for containers with the `json-file` or `journald` logging driver.
   578        operationId: "ContainerLogs"
   579        responses:
   580          101:
   581            description: "logs returned as a stream"
   582            schema:
   583              type: "string"
   584              format: "binary"
   585          200:
   586            description: "logs returned as a string in response body"
   587            schema:
   588              type: "string"
   589          404:
   590            $ref: "#/responses/404ErrorResponse"
   591          500:
   592            $ref: "#/responses/500ErrorResponse"
   593        parameters:
   594          - name: "id"
   595            in: "path"
   596            required: true
   597            description: "ID or name of the container"
   598            type: "string"
   599          - name: "follow"
   600            in: "query"
   601            description: |
   602              Return the logs as a stream.
   603            type: "boolean"
   604            default: false
   605          - name: "stdout"
   606            in: "query"
   607            description: "Return logs from `stdout`"
   608            type: "boolean"
   609            default: false
   610          - name: "stderr"
   611            in: "query"
   612            description: "Return logs from `stderr`"
   613            type: "boolean"
   614            default: false
   615          - name: "since"
   616            in: "query"
   617            description: "Only return logs since this time, as a UNIX timestamp"
   618            type: "integer"
   619            default: 0
   620          - name: "until"
   621            in: "query"
   622            description: "Only return logs before this time, as a UNIX timestamp"
   623            type: "integer"
   624            default: 0
   625          - name: "timestamps"
   626            in: "query"
   627            description: "Add timestamps to every log line"
   628            type: "boolean"
   629            default: false
   630          - name: "tail"
   631            in: "query"
   632            description: "Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines."
   633            type: "string"
   634            default: "all"
   635        tags: ["Container"]
   636  
   637    /containers/{id}/resize:
   638      post:
   639        summary: "changes the size of the tty for a container"
   640        operationId: "ContainerResize"
   641        parameters:
   642          - $ref: "#/parameters/id"
   643          - name: "height"
   644            in: "query"
   645            description: "height of the tty"
   646            type: "string"
   647          - name: "width"
   648            in: "query"
   649            description: "width of the tty"
   650            type: "string"
   651        responses:
   652          200:
   653            description: "no error"
   654          400:
   655            description: "bad parameter"
   656            schema:
   657              $ref: "#/definitions/Error"
   658        tags: ["Container"]
   659  
   660    /exec/{id}/start:
   661      post:
   662        summary: "Start an exec instance"
   663        description: "Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command."
   664        operationId: "ExecStart"
   665        consumes:
   666          - "application/json"
   667        produces:
   668          - "application/vnd.raw-stream"
   669        responses:
   670          200:
   671            description: "No error"
   672          404:
   673            description: "No such exec instance"
   674            schema:
   675              $ref: "#/definitions/Error"
   676          409:
   677            description: "Container is stopped or paused"
   678            schema:
   679              $ref: "#/definitions/Error"
   680        parameters:
   681          - name: "execStartConfig"
   682            in: "body"
   683            schema:
   684              $ref: "#/definitions/ExecStartConfig"
   685          - name: "id"
   686            in: "path"
   687            description: "Exec instance ID"
   688            required: true
   689            type: "string"
   690        tags: ["Exec"]
   691  
   692    /exec/{id}/json:
   693      get:
   694        summary: "Inspect an exec instance"
   695        description: "Return low-level information about an exec instance."
   696        operationId: "ExecInspect"
   697        produces:
   698          - "application/json"
   699        responses:
   700          200:
   701            description: "No error"
   702            schema:
   703              $ref: "#/definitions/ContainerExecInspect"
   704          404:
   705            description: "No such exec instance"
   706            schema:
   707              $ref: "#/responses/404ErrorResponse"
   708          500:
   709            description: "Server error"
   710            schema:
   711              $ref: "#/responses/500ErrorResponse"
   712        parameters:
   713          - name: "id"
   714            in: "path"
   715            description: "Exec instance ID"
   716            required: true
   717            type: "string"
   718        tags: ["Exec"]
   719  
   720    /containers/{id}/attach:
   721      post:
   722        summary: "Attach to a container"
   723        description: |
   724          Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached.
   725  
   726          Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything.
   727  
   728          ### Hijacking
   729  
   730          This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket.
   731  
   732          This is the response from the daemon for an attach request:
   733  
   734          ```
   735          HTTP/1.1 200 OK
   736          Content-Type: application/vnd.raw-stream
   737  
   738          [STREAM]
   739          ```
   740  
   741          After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server.
   742  
   743          To hint potential proxies about connection hijacking, the Pouch client can also optionally send connection upgrade headers.
   744  
   745          For example, the client sends this request to upgrade the connection:
   746  
   747          ```
   748          POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1
   749          Upgrade: tcp
   750          Connection: Upgrade
   751          ```
   752  
   753          The Pouch daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream:
   754  
   755          ```
   756          HTTP/1.1 101 UPGRADED
   757          Content-Type: application/vnd.raw-stream
   758          Connection: Upgrade
   759          Upgrade: tcp
   760  
   761          [STREAM]
   762          ```
   763  
   764          ### Stream format
   765  
   766          When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), the stream over the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The stream consists of a series of frames, each containing a header and a payload.
   767  
   768          The header contains the information which the stream writes (`stdout` or `stderr`). It also contains the size of the associated frame encoded in the last four bytes (`uint32`).
   769  
   770          It is encoded on the first eight bytes like this:
   771  
   772          ```go
   773          header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}
   774          ```
   775  
   776          `STREAM_TYPE` can be:
   777  
   778          - 0: `stdin` (is written on `stdout`)
   779          - 1: `stdout`
   780          - 2: `stderr`
   781  
   782          `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian.
   783  
   784          Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`.
   785  
   786          The simplest way to implement this protocol is the following:
   787  
   788          1. Read 8 bytes.
   789          2. Choose `stdout` or `stderr` depending on the first byte.
   790          3. Extract the frame size from the last four bytes.
   791          4. Read the extracted size and output it on the correct output.
   792          5. Goto 1.
   793  
   794          ### Stream format when using a TTY
   795  
   796          When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's `stdin`.
   797  
   798        operationId: "ContainerAttach"
   799        produces:
   800          - "application/vnd.raw-stream"
   801        responses:
   802          101:
   803            description: "no error, hints proxy about hijacking"
   804          200:
   805            description: "no error, no upgrade header found"
   806          400:
   807            description: "bad parameter"
   808            schema:
   809              $ref: "#/definitions/Error"
   810          404:
   811            description: "no such container"
   812            schema:
   813              $ref: "#/definitions/Error"
   814            examples:
   815              application/json:
   816                message: "No such container: c2ada9df5af8"
   817          500:
   818            description: "server error"
   819            schema:
   820              $ref: "#/definitions/Error"
   821        parameters:
   822          - name: "id"
   823            in: "path"
   824            required: true
   825            description: "ID or name of the container"
   826            type: "string"
   827          - name: "detachKeys"
   828            in: "query"
   829            description: "Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`."
   830            type: "string"
   831          - name: "logs"
   832            in: "query"
   833            description: |
   834              Replay previous logs from the container.
   835  
   836              This is useful for attaching to a container that has started and you want to output everything since the container started.
   837  
   838              If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output.
   839            type: "boolean"
   840            default: false
   841          - name: "stream"
   842            in: "query"
   843            description: "Stream attached streams from the time the request was made onwards"
   844            type: "boolean"
   845            default: false
   846          - name: "stdin"
   847            in: "query"
   848            description: "Attach to `stdin`"
   849            type: "boolean"
   850            default: false
   851          - name: "stdout"
   852            in: "query"
   853            description: "Attach to `stdout`"
   854            type: "boolean"
   855            default: false
   856          - name: "stderr"
   857            in: "query"
   858            description: "Attach to `stderr`"
   859            type: "boolean"
   860            default: false
   861        tags: ["Container"]
   862    /containers/{id}/update:
   863      post:
   864        summary: "Update the configurations of a container"
   865        operationId: "ContainerUpdate"
   866        parameters:
   867          - $ref: "#/parameters/id"
   868          - name: "updateConfig"
   869            in: "body"
   870            schema:
   871              $ref: "#/definitions/UpdateConfig"
   872        responses:
   873          200:
   874            description: "no error"
   875          400:
   876            description: "bad parameter"
   877            schema:
   878              $ref: "#/definitions/Error"
   879          404:
   880            $ref: "#/responses/404ErrorResponse"
   881          500:
   882            $ref: "#/responses/500ErrorResponse"
   883        tags: ["Container"]
   884    /containers/{id}/upgrade:
   885        post:
   886          summary: "Upgrade a container with new image and args"
   887          operationId: "ContainerUpgrade"
   888          parameters:
   889            - $ref: "#/parameters/id"
   890            - name: "upgradeConfig"
   891              in: "body"
   892              schema:
   893                $ref: "#/definitions/ContainerUpgradeConfig"
   894          responses:
   895            200:
   896              description: "no error"
   897            400:
   898              description: "bad parameter"
   899              schema:
   900                $ref: "#/definitions/Error"
   901            404:
   902              $ref: "#/responses/404ErrorResponse"
   903            500:
   904              $ref: "#/responses/500ErrorResponse"
   905          tags: ["Container"]
   906  
   907    /volumes:
   908      get:
   909        summary: "List volumes"
   910        operationId: "VolumeList"
   911        produces: ["application/json"]
   912        responses:
   913          200:
   914            description: "Summary volume data that matches the query"
   915            schema:
   916              $ref: "#/definitions/VolumeListResp"
   917            examples:
   918              application/json:
   919                Volumes:
   920                  - CreatedAt: "2017-07-19T12:00:26Z"
   921                    Name: "tardis"
   922                    Driver: "local"
   923                    Mountpoint: "/var/lib/pouch/volumes/tardis"
   924                    Labels:
   925                      com.example.some-label: "some-value"
   926                      com.example.some-other-label: "some-other-value"
   927                    Scope: "local"
   928                    Options:
   929                      device: "tmpfs"
   930                      o: "size=100m,uid=1000"
   931                      type: "tmpfs"
   932                Warnings: []
   933          500:
   934            $ref: "#/responses/500ErrorResponse"
   935        parameters:
   936          - name: "filters"
   937            in: "query"
   938            description: |
   939              JSON encoded value of the filters (a `map[string][]string`) to
   940              process on the volumes list. Available filters:
   941  
   942              - `dangling=<boolean>` When set to `true` (or `1`), returns all
   943                 volumes that are not in use by a container. When set to `false`
   944                 (or `0`), only volumes that are in use by one or more
   945                 containers are returned.
   946              - `driver=<volume-driver-name>` Matches volumes based on their driver.
   947              - `label=<key>` or `label=<key>:<value>` Matches volumes based on
   948                 the presence of a `label` alone or a `label` and a value.
   949              - `name=<volume-name>` Matches all or part of a volume name.
   950            type: "string"
   951            format: "json"
   952        tags: ["Volume"]
   953  
   954    /volumes/create:
   955      post:
   956        summary: "Create a volume"
   957        operationId: "VolumeCreate"
   958        consumes: ["application/json"]
   959        produces: ["application/json"]
   960        responses:
   961          201:
   962            description: "The volume was created successfully"
   963            schema:
   964              $ref: "#/definitions/VolumeInfo"
   965          500:
   966            $ref: "#/responses/500ErrorResponse"
   967        parameters:
   968          - name: "body"
   969            in: "body"
   970            required: true
   971            description: "Volume configuration"
   972            schema:
   973              $ref: "#/definitions/VolumeCreateConfig"
   974        tags: ["Volume"]
   975  
   976    /volumes/{id}:
   977      get:
   978        summary: "Inspect a volume"
   979        operationId: "VolumeInspect"
   980        produces: ["application/json"]
   981        responses:
   982          200:
   983            description: "No error"
   984            schema:
   985              $ref: "#/definitions/VolumeInfo"
   986          404:
   987            $ref: "#/responses/404ErrorResponse"
   988          500:
   989            $ref: "#/responses/500ErrorResponse"
   990        parameters:
   991          - $ref: "#/parameters/id"
   992        tags: ["Volume"]
   993  
   994      delete: 
   995        summary: "Delete a volume"
   996        operationId: "VolumeDelete"
   997        responses:
   998          204:
   999            description: "No error"
  1000          404:
  1001            $ref: "#/responses/404ErrorResponse"
  1002          500:
  1003            $ref: "#/responses/500ErrorResponse"
  1004        parameters:
  1005          - $ref: "#/parameters/id"
  1006        tags: ["Volume"]
  1007  
  1008    /networks/create:
  1009      post:
  1010        summary: "Create a network"
  1011        operationId: "NetworkCreate"
  1012        consumes: ["application/json"]
  1013        produces: ["application/json"]
  1014        responses:
  1015          201:
  1016            description: "The network was created successfully"
  1017            schema:
  1018              $ref: "#/definitions/NetworkCreateResp"
  1019          400:
  1020            description: "bad parameter"
  1021            schema:
  1022              $ref: "#/definitions/Error"
  1023          409:
  1024            description: "name already in use"
  1025            schema:
  1026              $ref: "#/definitions/Error"
  1027          500:
  1028            $ref: "#/responses/500ErrorResponse"
  1029        parameters:
  1030          - name: "NetworkCreateConfig"
  1031            in: "body"
  1032            required: true
  1033            description: "Network configuration"
  1034            schema:
  1035              $ref: "#/definitions/NetworkCreateConfig"
  1036        tags: ["Network"]
  1037  
  1038    /networks/{id}:
  1039      get:
  1040        summary: "Inspect a network"
  1041        operationId: "NetworkInspect"
  1042        produces:
  1043          - "application/json"
  1044        responses:
  1045          200:
  1046            description: "No error"
  1047            schema:
  1048              $ref: "#/definitions/NetworkInspectResp"
  1049          404:
  1050            $ref: "#/responses/404ErrorResponse"
  1051          500:
  1052            $ref: "#/responses/500ErrorResponse"
  1053        parameters:
  1054          - $ref: "#/parameters/id"
  1055        tags: ["Network"]
  1056  
  1057      delete:
  1058        summary: "Remove a network"
  1059        operationId: "NetworkDelete"
  1060        responses:
  1061          204:
  1062            description: "No error"
  1063          403:
  1064            description: "operation not supported for pre-defined networks"
  1065            schema:
  1066              $ref: "#/definitions/Error"
  1067          404:
  1068            $ref: "#/responses/404ErrorResponse"
  1069          500:
  1070            $ref: "#/responses/500ErrorResponse"
  1071        parameters:
  1072          - $ref: "#/parameters/id"
  1073        tags: ["Network"]
  1074  
  1075    /networks:
  1076        get:
  1077          summary: "List networks"
  1078          operationId: "NetworkList"
  1079          produces: ["application/json"]
  1080          responses:
  1081            200:
  1082              description: "Summary networks that matches the query"
  1083              schema:
  1084                  $ref: "#/definitions/NetworkResource"
  1085            500:
  1086              $ref: "#/responses/500ErrorResponse"
  1087          tags: ["Network"]
  1088  
  1089  definitions:
  1090    Error:
  1091      type: "object"
  1092      properties:
  1093        message:
  1094          type: string
  1095  
  1096    SystemVersion:
  1097      type: "object"
  1098      properties:
  1099        Version:
  1100          type: "string"
  1101          description: "version of Pouch Daemon"
  1102          example: "0.1.2"
  1103        ApiVersion:
  1104          type: "string"
  1105          description: "Api Version held by daemon"
  1106          example: ""
  1107        GitCommit:
  1108          type: "string"
  1109          description: "Commit ID held by the latest commit operation"
  1110          example: ""
  1111        GoVersion:
  1112          type: "string"
  1113          description: "version of Go runtime"
  1114          example: "1.8.3"
  1115        Os:
  1116          type: "string"
  1117          description: "Operating system type of underlying system"
  1118          example: "linux"
  1119        Arch:
  1120          type: "string"
  1121          description: "Arch type of underlying hardware"
  1122          example: "amd64"
  1123        KernelVersion:
  1124          type: "string"
  1125          description: "Operating system kernel version"
  1126          example: "3.13.0-106-generic"
  1127        BuildTime:
  1128          type: "string"
  1129          description: "The time when this binary of daemon is built"
  1130          example: "2017-08-29T17:41:57.729792388+00:00"
  1131  
  1132    SystemInfo:
  1133      type: "object"
  1134      properties:
  1135        ID:
  1136          description: |
  1137            Unique identifier of the daemon.
  1138  
  1139            <p><br /></p>
  1140  
  1141            > **Note**: The format of the ID itself is not part of the API, and
  1142            > should not be considered stable.
  1143          type: "string"
  1144          example: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS"
  1145        Containers:
  1146          description: "Total number of containers on the host."
  1147          type: "integer"
  1148          example: 14
  1149        ContainersRunning:
  1150          description: |
  1151            Number of containers with status `"running"`.
  1152          type: "integer"
  1153          example: 3
  1154        ContainersPaused:
  1155          description: |
  1156            Number of containers with status `"paused"`.
  1157          type: "integer"
  1158          example: 1
  1159        ContainersStopped:
  1160          description: |
  1161            Number of containers with status `"stopped"`.
  1162          type: "integer"
  1163          example: 10
  1164        Images:
  1165          description: |
  1166            Total number of images on the host.
  1167  
  1168            Both _tagged_ and _untagged_ (dangling) images are counted.
  1169          type: "integer"
  1170          example: 508
  1171        Driver:
  1172          description: "Name of the storage driver in use."
  1173          type: "string"
  1174          example: "overlay2"
  1175        DriverStatus:
  1176          description: |
  1177            Information specific to the storage driver, provided as
  1178            "label" / "value" pairs.
  1179  
  1180            This information is provided by the storage driver, and formatted
  1181            in a way consistent with the output of `pouch info` on the command
  1182            line.
  1183  
  1184            <p><br /></p>
  1185  
  1186            > **Note**: The information returned in this field, including the
  1187            > formatting of values and labels, should not be considered stable,
  1188            > and may change without notice.
  1189          type: "array"
  1190          items:
  1191            type: "array"
  1192            items:
  1193              type: "string"
  1194          example:
  1195            - ["Backing Filesystem", "extfs"]
  1196            - ["Supports d_type", "true"]
  1197            - ["Native Overlay Diff", "true"]
  1198        PouchRootDir:
  1199          description: |
  1200            Root directory of persistent Pouch state.
  1201  
  1202            Defaults to `/var/lib/pouch` on Linux.
  1203          type: "string"
  1204          example: "/var/lib/pouch"
  1205        Debug:
  1206          description: "Indicates if the daemon is running in debug-mode / with debug-level logging enabled."
  1207          type: "boolean"
  1208          example: true
  1209        LoggingDriver:
  1210          description: |
  1211            The logging driver to use as a default for new containers.
  1212          type: "string"
  1213        CgroupDriver:
  1214          description: |
  1215            The driver to use for managing cgroups.
  1216          type: "string"
  1217          x-nullable: false
  1218          enum: ["cgroupfs", "systemd"]
  1219          default: "cgroupfs"
  1220          example: "cgroupfs"
  1221        KernelVersion:
  1222          description: |
  1223            Kernel version of the host.
  1224            On Linux, this information obtained from `uname`.
  1225          type: "string"
  1226        OperatingSystem:
  1227          description: |
  1228            Name of the host's operating system, for example: "Ubuntu 16.04.2 LTS".
  1229          type: "string"
  1230          example: "Alpine Linux v3.5"
  1231        OSType:
  1232          description: |
  1233            Generic type of the operating system of the host, as returned by the
  1234            Go runtime (`GOOS`).
  1235  
  1236            Currently returned value is "linux". A full list of
  1237            possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).
  1238          type: "string"
  1239          example: "linux"
  1240        Architecture:
  1241          description: |
  1242            Hardware architecture of the host, as returned by the Go runtime
  1243            (`GOARCH`).
  1244  
  1245            A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).
  1246          type: "string"
  1247          example: "x86_64"
  1248        NCPU:
  1249          description: |
  1250            The number of logical CPUs usable by the daemon.
  1251  
  1252            The number of available CPUs is checked by querying the operating
  1253            system when the daemon starts. Changes to operating system CPU
  1254            allocation after the daemon is started are not reflected.
  1255          type: "integer"
  1256          example: 4
  1257        MemTotal:
  1258          description: |
  1259            Total amount of physical memory available on the host, in kilobytes (kB).
  1260          type: "integer"
  1261          format: "int64"
  1262          example: 2095882240
  1263  
  1264        IndexServerAddress:
  1265          description: |
  1266            Address / URL of the index server that is used for image search,
  1267            and as a default for user authentication.
  1268          type: "string"
  1269        DefaultRegistry:
  1270          description: |
  1271            default registry can be defined by user.
  1272          type: "string"
  1273        RegistryConfig:
  1274          $ref: "#/definitions/RegistryServiceConfig"
  1275        HttpProxy:
  1276          description: |
  1277            HTTP-proxy configured for the daemon. This value is obtained from the
  1278            [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable.
  1279  
  1280            Containers do not automatically inherit this configuration.
  1281          type: "string"
  1282          example: "http://user:pass@proxy.corp.example.com:8080"
  1283        HttpsProxy:
  1284          description: |
  1285            HTTPS-proxy configured for the daemon. This value is obtained from the
  1286            [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable.
  1287  
  1288            Containers do not automatically inherit this configuration.
  1289          type: "string"
  1290          example: "https://user:pass@proxy.corp.example.com:4443"
  1291        Name:
  1292          description: "Hostname of the host."
  1293          type: "string"
  1294          example: "node5.corp.example.com"
  1295        Labels:
  1296          description: |
  1297            User-defined labels (key/value metadata) as set on the daemon.
  1298          type: "array"
  1299          items:
  1300            type: "string"
  1301          example: ["storage=ssd", "production"]
  1302        ExperimentalBuild:
  1303          description: |
  1304            Indicates if experimental features are enabled on the daemon.
  1305          type: "boolean"
  1306          example: true
  1307        ServerVersion:
  1308          description: |
  1309            Version string of the daemon.
  1310          type: "string"
  1311          example: "17.06.0-ce"
  1312        Runtimes:
  1313          description: |
  1314            List of [OCI compliant](https://github.com/opencontainers/runtime-spec)
  1315            runtimes configured on the daemon. Keys hold the "name" used to
  1316            reference the runtime.
  1317  
  1318            The Pouch daemon relies on an OCI compliant runtime (invoked via the
  1319            `containerd` daemon) as its interface to the Linux kernel namespaces,
  1320            cgroups, and SELinux.
  1321  
  1322            The default runtime is `runc`, and automatically configured. Additional
  1323            runtimes can be configured by the user and will be listed here.
  1324          type: "object"
  1325          additionalProperties:
  1326            $ref: "#/definitions/Runtime"
  1327          default:
  1328            runc:
  1329              path: "pouch-runc"
  1330          example:
  1331            runc:
  1332              path: "pouch-runc"
  1333            runc-master:
  1334              path: "/go/bin/runc"
  1335            custom:
  1336              path: "/usr/local/bin/my-oci-runtime"
  1337              runtimeArgs: ["--debug", "--systemd-cgroup=false"]
  1338        DefaultRuntime:
  1339          description: |
  1340            Name of the default OCI runtime that is used when starting containers.
  1341            The default can be overridden per-container at create time.
  1342          type: "string"
  1343          x-nullable: false
  1344          default: "runc"
  1345          example: "runc"
  1346        LiveRestoreEnabled:
  1347          description: |
  1348            Indicates if live restore is enabled.
  1349            If enabled, containers are kept running when the daemon is shutdown
  1350            or upon daemon start if running containers are detected.
  1351          type: "boolean"
  1352          x-nullable: false
  1353          default: false
  1354          example: false
  1355        LxcfsEnabled:
  1356          description: |
  1357            Indicates if lxcfs is enabled.
  1358          type: "boolean"
  1359          x-nullable: false
  1360          default: false
  1361          example: false
  1362        ContainerdCommit:
  1363          $ref: "#/definitions/Commit"
  1364        RuncCommit:
  1365          $ref: "#/definitions/Commit"
  1366        SecurityOptions:
  1367          description: |
  1368            List of security features that are enabled on the daemon, such as
  1369            apparmor, seccomp, SELinux, and user-namespaces (userns).
  1370  
  1371            Additional configuration options for each security feature may
  1372            be present, and are included as a comma-separated list of key/value
  1373            pairs.
  1374          type: "array"
  1375          items:
  1376            type: "string"
  1377          example:
  1378            - "name=apparmor"
  1379            - "name=seccomp,profile=default"
  1380            - "name=selinux"
  1381            - "name=userns"
  1382        ListenAddresses:
  1383          description: "List of addresses the pouchd listens on"
  1384          type: "array"
  1385          items:
  1386            type: "string"
  1387          example:
  1388            - ["unix:///var/run/pouchd.sock", "tcp://0.0.0.0:4243"]
  1389  
  1390    DaemonUpdateConfig:
  1391      type: "object"
  1392      properties:
  1393        Labels:
  1394          description: "Labels indentified the attributes of daemon"
  1395          type: "array"
  1396          items:
  1397            type: "string"
  1398          example: ["storage=ssd", "zone=hangzhou"]
  1399        ImageProxy:
  1400          description: "Image proxy used to pull image."
  1401          type: "string"
  1402  
  1403    RegistryServiceConfig:
  1404      description: |
  1405        RegistryServiceConfig stores daemon registry services configuration.
  1406      type: "object"
  1407      x-nullable: true
  1408      properties:
  1409        AllowNondistributableArtifactsCIDRs:
  1410          description: |
  1411            List of IP ranges to which nondistributable artifacts can be pushed,
  1412            using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632).
  1413  
  1414            Some images contain artifacts whose distribution is restricted by license.
  1415            When these images are pushed to a registry, restricted artifacts are not
  1416            included.
  1417  
  1418            This configuration override this behavior, and enables the daemon to
  1419            push nondistributable artifacts to all registries whose resolved IP
  1420            address is within the subnet described by the CIDR syntax.
  1421  
  1422            This option is useful when pushing images containing
  1423            nondistributable artifacts to a registry on an air-gapped network so
  1424            hosts on that network can pull the images without connecting to
  1425            another server.
  1426  
  1427            > **Warning**: Nondistributable artifacts typically have restrictions
  1428            > on how and where they can be distributed and shared. Only use this
  1429            > feature to push artifacts to private registries and ensure that you
  1430            > are in compliance with any terms that cover redistributing
  1431            > nondistributable artifacts.
  1432  
  1433          type: "array"
  1434          items:
  1435            type: "string"
  1436          example: ["::1/128", "127.0.0.0/8"]
  1437        AllowNondistributableArtifactsHostnames:
  1438          description: |
  1439            List of registry hostnames to which nondistributable artifacts can be
  1440            pushed, using the format `<hostname>[:<port>]` or `<IP address>[:<port>]`.
  1441  
  1442            Some images (for example, Windows base images) contain artifacts
  1443            whose distribution is restricted by license. When these images are
  1444            pushed to a registry, restricted artifacts are not included.
  1445  
  1446            This configuration override this behavior for the specified
  1447            registries.
  1448  
  1449            This option is useful when pushing images containing
  1450            nondistributable artifacts to a registry on an air-gapped network so
  1451            hosts on that network can pull the images without connecting to
  1452            another server.
  1453  
  1454            > **Warning**: Nondistributable artifacts typically have restrictions
  1455            > on how and where they can be distributed and shared. Only use this
  1456            > feature to push artifacts to private registries and ensure that you
  1457            > are in compliance with any terms that cover redistributing
  1458            > nondistributable artifacts.
  1459          type: "array"
  1460          items:
  1461            type: "string"
  1462          example: ["registry.internal.corp.example.com:3000", "[2001:db8:a0b:12f0::1]:443"]
  1463        InsecureRegistryCIDRs:
  1464          description: |
  1465            List of IP ranges of insecure registries, using the CIDR syntax
  1466            ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries
  1467            accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates
  1468            from unknown CAs) communication.
  1469  
  1470            By default, local registries (`127.0.0.0/8`) are configured as
  1471            insecure. All other registries are secure. Communicating with an
  1472            insecure registry is not possible if the daemon assumes that registry
  1473            is secure.
  1474  
  1475            This configuration override this behavior, insecure communication with
  1476            registries whose resolved IP address is within the subnet described by
  1477            the CIDR syntax.
  1478  
  1479            Registries can also be marked insecure by hostname. Those registries
  1480            are listed under `IndexConfigs` and have their `Secure` field set to
  1481            `false`.
  1482  
  1483            > **Warning**: Using this option can be useful when running a local
  1484            > registry, but introduces security vulnerabilities. This option
  1485            > should therefore ONLY be used for testing purposes. For increased
  1486            > security, users should add their CA to their system's list of trusted
  1487            > CAs instead of enabling this option.
  1488          type: "array"
  1489          items:
  1490            type: "string"
  1491          example: ["::1/128", "127.0.0.0/8"]
  1492        IndexConfigs:
  1493          type: "object"
  1494          additionalProperties:
  1495            $ref: "#/definitions/IndexInfo"
  1496          example:
  1497            "127.0.0.1:5000":
  1498              "Name": "127.0.0.1:5000"
  1499              "Mirrors": []
  1500              "Secure": false
  1501              "Official": false
  1502            "[2001:db8:a0b:12f0::1]:80":
  1503              "Name": "[2001:db8:a0b:12f0::1]:80"
  1504              "Mirrors": []
  1505              "Secure": false
  1506              "Official": false
  1507            "registry.internal.corp.example.com:3000":
  1508              Name: "registry.internal.corp.example.com:3000"
  1509              Mirrors: []
  1510              Secure: false
  1511              Official: false
  1512        Mirrors:
  1513          description: "List of registry URLs that act as a mirror for the official registry."
  1514          type: "array"
  1515          items:
  1516            type: "string"
  1517          example:
  1518            - "https://hub-mirror.corp.example.com:5000/"
  1519            - "https://[2001:db8:a0b:12f0::1]/"
  1520  
  1521    IndexInfo:
  1522      description:
  1523        IndexInfo contains information about a registry.
  1524      type: "object"
  1525      x-nullable: true
  1526      properties:
  1527        Name:
  1528          description: |
  1529            Name of the registry.
  1530          type: "string"
  1531        Mirrors:
  1532          description: |
  1533            List of mirrors, expressed as URIs.
  1534          type: "array"
  1535          items:
  1536            type: "string"
  1537          example:
  1538            - "https://hub-mirror.corp.example.com:5000/"
  1539        Secure:
  1540          description: |
  1541            Indicates if the the registry is part of the list of insecure
  1542            registries.
  1543  
  1544            If `false`, the registry is insecure. Insecure registries accept
  1545            un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from
  1546            unknown CAs) communication.
  1547  
  1548            > **Warning**: Insecure registries can be useful when running a local
  1549            > registry. However, because its use creates security vulnerabilities
  1550            > it should ONLY be enabled for testing purposes. For increased
  1551            > security, users should add their CA to their system's list of
  1552            > trusted CAs instead of enabling this option.
  1553          type: "boolean"
  1554          example: true
  1555        Official:
  1556          description: |
  1557            Indicates whether this is an official registry.
  1558          type: "boolean"
  1559          example: true
  1560  
  1561    Runtime:
  1562      description: |
  1563        Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec)
  1564        runtime.
  1565  
  1566        The runtime is invoked by the daemon via the `containerd` daemon. OCI
  1567        runtimes act as an interface to the Linux kernel namespaces, cgroups,
  1568        and SELinux.
  1569      type: "object"
  1570      properties:
  1571        path:
  1572          description: |
  1573            Name and, optional, path, of the OCI executable binary.
  1574  
  1575            If the path is omitted, the daemon searches the host's `$PATH` for the
  1576            binary and uses the first result.
  1577          type: "string"
  1578          example: "/usr/local/bin/my-oci-runtime"
  1579        runtimeArgs:
  1580          description: |
  1581            List of command-line arguments to pass to the runtime when invoked.
  1582          type: "array"
  1583          x-nullable: true
  1584          items:
  1585            type: "string"
  1586          example: ["--debug", "--systemd-cgroup=false"]
  1587  
  1588    Commit:
  1589      description: |
  1590        Commit holds the Git-commit (SHA1) that a binary was built from, as
  1591        reported in the version-string of external tools, such as `containerd`,
  1592        or `runC`.
  1593      type: "object"
  1594      properties:
  1595        ID:
  1596          description: "Actual commit ID of external tool."
  1597          type: "string"
  1598          example: "cfb82a876ecc11b5ca0977d1733adbe58599088a"
  1599        Expected:
  1600          description: |
  1601            Commit ID of external tool expected by pouchd as set at build time.
  1602          type: "string"
  1603          example: "2d41c047c83e09a6d61d464906feb2a2f3c52aa4"
  1604  
  1605    AuthConfig:
  1606      type: "object"
  1607      properties:
  1608        Username:
  1609          type: "string"
  1610        Password:
  1611          type: "string"
  1612        Auth:
  1613          type: "string"
  1614        ServerAddress:
  1615          type: "string"
  1616        IdentityToken:
  1617          type: "string"
  1618          description: "IdentityToken is used to authenticate the user and get an access token for the registry"
  1619        RegistryToken:
  1620          type: "string"
  1621          description: "RegistryToken is a bearer token to be sent to a registry"
  1622  
  1623    AuthResponse:
  1624      description: "The response returned by login to a registry"
  1625      type: "object"
  1626      required: [Status]
  1627      properties:
  1628        Status:
  1629          description: "The status of the authentication"
  1630          type: "string"
  1631          x-nullable: false
  1632        IdentityToken:
  1633          description: "An opaque token used to authenticate a user after a successful login"
  1634          type: "string"
  1635          x-nullable: false
  1636  
  1637    ContainerCreateConfig:
  1638      description: | 
  1639        ContainerCreateConfig is used for API "POST /containers/create".
  1640        It wraps all kinds of config used in container creation.
  1641        It can be used to encode client params in client and unmarshal request body in daemon side.
  1642      allOf:
  1643        - $ref: "#/definitions/ContainerConfig"
  1644        - type: "object"
  1645          properties:
  1646            HostConfig:
  1647              $ref: "#/definitions/HostConfig"
  1648            NetworkingConfig:
  1649              $ref: "#/definitions/NetworkingConfig"
  1650  
  1651    ContainerConfig:
  1652      type: "object"
  1653      description: "Configuration for a container that is portable between hosts"
  1654      required: 
  1655        - Image
  1656      properties:
  1657        Hostname:
  1658          description: "The hostname to use for the container, as a valid RFC 1123 hostname."
  1659          type: "string"
  1660          format: hostname
  1661          minLength: 1
  1662        Domainname:
  1663          description: "The domain name to use for the container."
  1664          type: "string"
  1665        User:
  1666          description: "The user that commands are run as inside the container."
  1667          type: "string"
  1668        AttachStdin:
  1669          description: "Whether to attach to `stdin`."
  1670          type: "boolean"
  1671          x-nullable: false
  1672        AttachStdout:
  1673          description: "Whether to attach to `stdout`."
  1674          type: "boolean"
  1675          x-nullable: false
  1676          default: true
  1677        AttachStderr:
  1678          description: "Whether to attach to `stderr`."
  1679          type: "boolean"
  1680          x-nullable: false
  1681          default: true
  1682        ExposedPorts:
  1683          description: "An object mapping ports to an empty object in the form:`{<port>/<tcp|udp>: {}}`"
  1684          type: "object"
  1685          additionalProperties:
  1686            type: "object"
  1687            enum:
  1688              - {}
  1689            default: {}
  1690        Tty:
  1691          description: "Attach standard streams to a TTY, including `stdin` if it is not closed."
  1692          type: "boolean"
  1693          x-nullable: false
  1694        OpenStdin:
  1695          description: "Open `stdin`"
  1696          type: "boolean"
  1697          x-nullable: false
  1698        StdinOnce:
  1699          description: "Close `stdin` after one attached client disconnects"
  1700          type: "boolean"
  1701          x-nullable: false
  1702        Env:
  1703          description: |
  1704            A list of environment variables to set inside the container in the form `["VAR=value", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value.
  1705          type: "array"
  1706          items:
  1707            type: "string"
  1708        Cmd:
  1709          description: "Command to run specified an array of strings."
  1710          type: "array"
  1711          items:
  1712            type: "string"
  1713        ArgsEscaped:
  1714          description: "Command is already escaped (Windows only)"
  1715          type: "boolean"
  1716          x-nullable: false
  1717        Image:
  1718          description: "The name of the image to use when creating the container"
  1719          type: "string"
  1720          x-nullable: false
  1721        Volumes:
  1722          description: "An object mapping mount point paths inside the container to empty objects."
  1723          type: "object"
  1724          additionalProperties:
  1725            type: "object"
  1726            enum:
  1727              - {}
  1728            default: {}
  1729        WorkingDir:
  1730          description: "The working directory for commands to run in."
  1731          type: "string"
  1732        Entrypoint:
  1733          description: |
  1734            The entry point for the container as a string or an array of strings.
  1735            If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default.
  1736          type: "array"
  1737          items:
  1738            type: "string"
  1739        NetworkDisabled:
  1740          description: "Disable networking for the container."
  1741          type: "boolean"
  1742        MacAddress:
  1743          description: "MAC address of the container."
  1744          type: "string"
  1745        OnBuild:
  1746          description: "`ONBUILD` metadata that were defined."
  1747          type: "array"
  1748          items:
  1749            type: "string"
  1750        Labels:
  1751          description: "User-defined key/value metadata."
  1752          type: "object"
  1753          additionalProperties:
  1754            type: "string"
  1755        StopSignal:
  1756          description: "Signal to stop a container as a string or unsigned integer."
  1757          type: "string"
  1758          default: "SIGTERM"
  1759          x-nullable: false
  1760        StopTimeout:
  1761          description: "Timeout to stop a container in seconds."
  1762          type: "integer"
  1763          default: 10
  1764        Shell:
  1765          description: "Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell."
  1766          type: "array"
  1767          items:
  1768            type: "string"
  1769        Rich:
  1770          type: "boolean"
  1771          description: "Whether to start container in rich container mode. (default false)"
  1772          x-nullable: false
  1773        RichMode:
  1774          type: "string"
  1775          description: "Choose one rich container mode.(default dumb-init)"
  1776          enum:
  1777            - "dumb-init"
  1778            - "sbin-init"
  1779            - "systemd"
  1780        InitScript:
  1781          type: "string"
  1782          description: "Initial script executed in container. The script will be executed before entrypoint or command"
  1783        DiskQuota:
  1784          type: "object"
  1785          description: "Set disk quota for container"
  1786          x-nullable: true
  1787          additionalProperties:
  1788            type: "string"
  1789        SpecAnnotation:
  1790          description: "annotations send to runtime spec."
  1791          type: "object"
  1792          additionalProperties:
  1793            type: "string"
  1794        QuotaID:
  1795          type: "string"
  1796          description: "set disk quota by specified quota id, if id < 0, it means pouchd alloc a unique quota id"
  1797   
  1798    ContainerCreateResp:
  1799      description: "response returned by daemon when container create successfully"
  1800      type: "object"
  1801      required: [Id, Warnings]
  1802      properties:
  1803        Id:
  1804          description: "The ID of the created container"
  1805          type: "string"
  1806          x-nullable: false
  1807        Name:
  1808          description: "The name of the created container"
  1809          type: "string"
  1810        Warnings:
  1811          description: "Warnings encountered when creating the container"
  1812          type: "array"
  1813          x-nullable: false
  1814          items:
  1815            type: "string"
  1816  
  1817    HostConfig:
  1818      description: "Container configuration that depends on the host we are running on"
  1819      type: "object"
  1820      allOf:
  1821        - properties:
  1822            # Applicable to all platforms
  1823            Binds:
  1824              type: "array"
  1825              description: |
  1826                A list of volume bindings for this container. Each volume binding is a string in one of these forms:
  1827  
  1828                - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path.
  1829                - `host-src:container-dest:ro` to make the bind mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path.
  1830                - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path.
  1831                - `volume-name:container-dest:ro` to mount the volume read-only inside the container.  `container-dest` must be an _absolute_ path.
  1832              items:
  1833                type: "string"
  1834            ContainerIDFile:
  1835              type: "string"
  1836              description: "Path to a file where the container ID is written"
  1837            LogConfig:
  1838              type: "object"
  1839              description: "The logging configuration for this container"
  1840              properties:
  1841                Type:
  1842                  type: "string"
  1843                  enum:
  1844                    - "json-file"
  1845                    - "syslog"
  1846                    - "journald"
  1847                    - "gelf"
  1848                    - "fluentd"
  1849                    - "awslogs"
  1850                    - "splunk"
  1851                    - "etwlogs"
  1852                    - "none"
  1853                Config:
  1854                  type: "object"
  1855                  additionalProperties:
  1856                    type: "string"
  1857            RestartPolicy:
  1858              type: "object"
  1859              description: "Restart policy to be used to manage the container"
  1860              $ref: "#/definitions/RestartPolicy"
  1861            NetworkMode:
  1862              type: "string"
  1863              description: "Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:<name|id>`. Any other value is taken as a custom network's name to which this container should connect to."
  1864            PortBindings:
  1865              type: "object"
  1866              description: "A map of exposed container ports and the host port they should map to."
  1867              $ref: "#/definitions/PortMap"
  1868            AutoRemove:
  1869              type: "boolean"
  1870              description: "Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set."
  1871            VolumeDriver:
  1872              type: "string"
  1873              description: "Driver that this container uses to mount volumes."
  1874            VolumesFrom:
  1875              type: "array"
  1876              description: "A list of volumes to inherit from another container, specified in the form `<container name>[:<ro|rw>]`."
  1877              items:
  1878                type: "string"
  1879            CapAdd:
  1880              type: "array"
  1881              description: "A list of kernel capabilities to add to the container."
  1882              items:
  1883                type: "string"
  1884            CapDrop:
  1885              type: "array"
  1886              description: "A list of kernel capabilities to drop from the container."
  1887              items:
  1888                type: "string"
  1889            Dns:
  1890              type: "array"
  1891              description: "A list of DNS servers for the container to use."
  1892              items:
  1893                type: "string"
  1894            DnsOptions:
  1895              type: "array"
  1896              description: "A list of DNS options."
  1897              items:
  1898                type: "string"
  1899            DnsSearch:
  1900              type: "array"
  1901              description: "A list of DNS search domains."
  1902              items:
  1903                type: "string"
  1904            ExtraHosts:
  1905              type: "array"
  1906              description: |
  1907                A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`.
  1908              items:
  1909                type: "string"
  1910            GroupAdd:
  1911              type: "array"
  1912              description: "A list of additional groups that the container process will run as."
  1913              items:
  1914                type: "string"
  1915            IpcMode:
  1916              type: "string"
  1917              description: |
  1918                      IPC sharing mode for the container. Possible values are:
  1919                      - `"none"`: own private IPC namespace, with /dev/shm not mounted
  1920                      - `"private"`: own private IPC namespace
  1921                      - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers
  1922                      - `"container:<name|id>"`: join another (shareable) container's IPC namespace
  1923                      - `"host"`: use the host system's IPC namespace
  1924                      If not specified, daemon default is used, which can either be `"private"`
  1925                      or `"shareable"`, depending on daemon version and configuration.
  1926            Cgroup:
  1927              type: "string"
  1928              description: "Cgroup to use for the container."
  1929            Links:
  1930              type: "array"
  1931              description: "A list of links for the container in the form `container_name:alias`."
  1932              items:
  1933                type: "string"
  1934            OomScoreAdj:
  1935              type: "integer"
  1936              description: |
  1937                  An integer value containing the score given to the container in order to tune OOM killer preferences.
  1938                  The range is in [-1000, 1000].
  1939              type: "integer"
  1940              format: "int"
  1941              x-nullable: false
  1942              minimum: -1000
  1943              maximum: 1000
  1944            PidMode:
  1945              type: "string"
  1946              description: |
  1947                Set the PID (Process) Namespace mode for the container. It can be either:
  1948                - `"container:<name|id>"`: joins another container's PID namespace
  1949                - `"host"`: use the host's PID namespace inside the container
  1950            Privileged:
  1951              type: "boolean"
  1952              description: "Gives the container full access to the host."
  1953            PublishAllPorts:
  1954              type: "boolean"
  1955              description: "Allocates a random host port for all of a container's exposed ports."
  1956            ReadonlyRootfs:
  1957              type: "boolean"
  1958              description: "Mount the container's root filesystem as read only."
  1959            SecurityOpt:
  1960              type: "array"
  1961              description: "A list of string values to customize labels for MLS systems, such as SELinux."
  1962              items:
  1963                type: "string"
  1964            StorageOpt:
  1965              type: "object"
  1966              description: |
  1967                Storage driver options for this container, in the form `{"size": "120G"}`.
  1968              additionalProperties:
  1969                type: "string"
  1970            Tmpfs:
  1971              type: "object"
  1972              description: |
  1973                A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: `{ "/run": "rw,noexec,nosuid,size=65536k" }`.
  1974              additionalProperties:
  1975                type: "string"
  1976            UTSMode:
  1977              type: "string"
  1978              description: "UTS namespace to use for the container."
  1979            UsernsMode:
  1980              type: "string"
  1981              description: "Sets the usernamespace mode for the container when usernamespace remapping option is enabled."
  1982            ShmSize:
  1983              type: "integer"
  1984              description: "Size of `/dev/shm` in bytes. If omitted, the system uses 64MB."
  1985              minimum: 0
  1986            Sysctls:
  1987              type: "object"
  1988              description: |
  1989                A list of kernel parameters (sysctls) to set in the container. For example: `{"net.ipv4.ip_forward": "1"}`
  1990              additionalProperties:
  1991                type: "string"
  1992            Runtime:
  1993              type: "string"
  1994              description: "Runtime to use with this container."
  1995            # Applicable to Windows
  1996            ConsoleSize:
  1997              type: "array"
  1998              description: "Initial console size, as an `[height, width]` array. (Windows only)"
  1999              minItems: 2
  2000              maxItems: 2
  2001              items:
  2002                type: "integer"
  2003                minimum: 0
  2004            Isolation:
  2005              type: "string"
  2006              description: "Isolation technology of the container. (Windows only)"
  2007              enum:
  2008                - "default"
  2009                - "process"
  2010                - "hyperv"
  2011            EnableLxcfs:
  2012              description: "Whether to enable lxcfs."
  2013              type: "boolean"
  2014              x-nullable: false
  2015            Rich:
  2016              type: "boolean"
  2017              description: "Whether to start container in rich container mode. (default false)"
  2018              x-nullable: false
  2019            RichMode:
  2020              type: "string"
  2021              description: "Choose one rich container mode.(default dumb-init)"
  2022              enum:
  2023               - "dumb-init"
  2024               - "sbin-init"
  2025               - "systemd"
  2026            InitScript:
  2027              type: "string"
  2028              description: "Initial script executed in container. The script will be executed before entrypoint or command"
  2029        - $ref: "#/definitions/Resources"
  2030  
  2031    UpdateConfig:
  2032      description: "UpdateConfig holds the mutable attributes of a Container. Those attributes can be updated at runtime."
  2033      allOf:
  2034        - $ref: "#/definitions/Resources"
  2035        - properties:
  2036            RestartPolicy:
  2037              $ref: "#/definitions/RestartPolicy"
  2038            Image:
  2039              type: "string"
  2040              description: "Image ID or Name"
  2041            Env:
  2042              description: |
  2043                A list of environment variables to set inside the container in the form `["VAR=value", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value.
  2044              type: "array"
  2045              items:
  2046                type: "string"
  2047            Labels:
  2048              description: "List of labels set to container."
  2049              type: "object"
  2050              additionalProperties:
  2051                type: "string"
  2052  
  2053    ContainerUpgradeConfig:
  2054      description: |
  2055        ContainerUpgradeConfig is used for API "POST /containers/upgrade".
  2056        It wraps all kinds of config used in container upgrade.
  2057        It can be used to encode client params in client and unmarshal request body in daemon side.
  2058      allOf:
  2059        - $ref: "#/definitions/ContainerConfig"
  2060        - type: "object"
  2061          properties:
  2062            HostConfig:
  2063              $ref: "#/definitions/HostConfig"
  2064  
  2065    Resources:
  2066      description: "A container's resources (cgroups config, ulimits, etc)"
  2067      type: "object"
  2068      properties:
  2069        # Applicable to all platforms
  2070        CpuShares:
  2071          description: "An integer value representing this container's relative CPU weight versus other containers."
  2072          type: "integer"
  2073        Memory:
  2074          description: "Memory limit in bytes."
  2075          type: "integer"
  2076          default: 0
  2077        # Applicable to UNIX platforms
  2078        CgroupParent:
  2079          description: "Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist."
  2080          type: "string"
  2081        BlkioWeight:
  2082          description: "Block IO weight (relative weight)."
  2083          type: "integer"
  2084          format: "uint16"
  2085          x-nullable: false
  2086          minimum: 0
  2087          maximum: 1000
  2088        BlkioWeightDevice:
  2089          description: |
  2090            Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`.
  2091          type: "array"
  2092          items:
  2093            $ref: "#/definitions/WeightDevice"
  2094        BlkioDeviceReadBps:
  2095          description: |
  2096            Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
  2097          type: "array"
  2098          items:
  2099            $ref: "#/definitions/ThrottleDevice"
  2100        BlkioDeviceWriteBps:
  2101          description: |
  2102            Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
  2103          type: "array"
  2104          items:
  2105            $ref: "#/definitions/ThrottleDevice"
  2106        BlkioDeviceReadIOps:
  2107          description: |
  2108            Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
  2109          type: "array"
  2110          items:
  2111            $ref: "#/definitions/ThrottleDevice"
  2112        BlkioDeviceWriteIOps:
  2113          description: |
  2114            Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
  2115          type: "array"
  2116          items:
  2117            $ref: "#/definitions/ThrottleDevice"
  2118        CpuPeriod:
  2119          description: |
  2120            CPU CFS (Completely Fair Scheduler) period.
  2121            The length of a CPU period in microseconds.
  2122          type: "integer"
  2123          format: "int64"
  2124          minimum: 1000
  2125          maximum: 1000000
  2126        CpuQuota:
  2127          description: |
  2128            CPU CFS (Completely Fair Scheduler) quota.
  2129            Microseconds of CPU time that the container can get in a CPU period."
  2130          type: "integer"
  2131          format: "int64"
  2132          minimum: 1000
  2133        CpuRealtimePeriod:
  2134          description: "The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks."
  2135          type: "integer"
  2136          format: "int64"
  2137        CpuRealtimeRuntime:
  2138          description: "The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks."
  2139          type: "integer"
  2140          format: "int64"
  2141        CpusetCpus:
  2142          description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)"
  2143          type: "string"
  2144          example: "0-3"
  2145        CpusetMems:
  2146          description: "Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems."
  2147          type: "string"
  2148        Devices:
  2149          description: "A list of devices to add to the container."
  2150          type: "array"
  2151          items:
  2152            $ref: "#/definitions/DeviceMapping"
  2153        DeviceCgroupRules:
  2154          description: "a list of cgroup rules to apply to the container"
  2155          type: "array"
  2156          items:
  2157            type: "string"
  2158            example: "c 13:* rwm"
  2159        DiskQuota:
  2160          description: "Disk limit (in bytes)."
  2161          type: "integer"
  2162          format: "int64"
  2163        KernelMemory:
  2164          description: "Kernel memory limit in bytes."
  2165          type: "integer"
  2166          format: "int64"
  2167        MemoryReservation:
  2168          description: "Memory soft limit in bytes."
  2169          type: "integer"
  2170          format: "int64"
  2171        MemorySwap:
  2172          description: "Total memory limit (memory + swap). Set as `-1` to enable unlimited swap."
  2173          type: "integer"
  2174          format: "int64"
  2175        MemorySwappiness:
  2176          description: "Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100."
  2177          type: "integer"
  2178          format: "int64"
  2179          minimum: -1
  2180          maximum: 100
  2181        NanoCPUs:
  2182          description: "CPU quota in units of 10<sup>-9</sup> CPUs."
  2183          type: "integer"
  2184          format: "int64"
  2185        OomKillDisable:
  2186          description: "Disable OOM Killer for the container."
  2187          type: "boolean"
  2188          x-nullable: true
  2189        PidsLimit:
  2190          description: |
  2191            Tune a container's pids limit. Set -1 for unlimited. Only on Linux 4.4 does this paramter support.
  2192          type: "integer"
  2193          format: "int64"
  2194        Ulimits:
  2195          description: |
  2196            A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`"
  2197          type: "array"
  2198          items:
  2199            type: "object"
  2200            properties:
  2201              Name:
  2202                description: "Name of ulimit"
  2203                type: "string"
  2204              Soft:
  2205                description: "Soft limit"
  2206                type: "integer"
  2207              Hard:
  2208                description: "Hard limit"
  2209                type: "integer"
  2210        # Applicable to Windows
  2211        CpuCount:
  2212          description: |
  2213            The number of usable CPUs (Windows only).
  2214            On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last.
  2215          type: "integer"
  2216          format: "int64"
  2217        CpuPercent:
  2218          description: |
  2219            The usable percentage of the available CPUs (Windows only).
  2220            On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last.
  2221          type: "integer"
  2222          format: "int64"
  2223        IOMaximumIOps:
  2224          description: "Maximum IOps for the container system drive (Windows only)"
  2225          type: "integer"
  2226          format: "uint64"
  2227        IOMaximumBandwidth:
  2228          description: "Maximum IO in bytes per second for the container system drive (Windows only)"
  2229          type: "integer"
  2230          format: "uint64"
  2231        IntelRdtL3Cbm:
  2232          description: "IntelRdtL3Cbm specifies settings for Intel RDT/CAT group that the container is placed into to limit the resources (e.g., L3 cache) the container has available."
  2233          type: "string"
  2234  
  2235        # applicable to AliKenerl 4.9
  2236        ScheLatSwitch:
  2237          description: "ScheLatSwitch enables scheduler latency count in cpuacct"
  2238          type: "integer"
  2239          format: "int64"
  2240          x-nullable: false
  2241          minimum: 0
  2242          maximum: 1
  2243        MemoryWmarkRatio:
  2244          description: | 
  2245            MemoryWmarkRatio is an integer value representing this container's memory low water mark percentage. 
  2246            The value of memory low water mark is memory.limit_in_bytes * MemoryWmarkRatio. The range is in [0, 100].
  2247          type: "integer"
  2248          format: "int64"
  2249          x-nullable: true
  2250          minimum: 0
  2251          maximum: 100
  2252        MemoryExtra:
  2253          description: |
  2254            MemoryExtra is an integer value representing this container's memory high water mark percentage.
  2255            The range is in [0, 100].
  2256          type: "integer"
  2257          format: "int64"
  2258          x-nullable: true
  2259          minimum: 0
  2260          maximum: 100
  2261        MemoryForceEmptyCtl:
  2262          description: "MemoryForceEmptyCtl represents whether to reclaim the page cache when deleting cgroup."
  2263          type: "integer"
  2264          format: "int64"
  2265          x-nullable: false
  2266          minimum: 0
  2267          maximum: 1
  2268  
  2269    ThrottleDevice:
  2270      type: "object"
  2271      properties:
  2272        Path:
  2273          description: "Device path"
  2274          type: "string"
  2275        Rate:
  2276          description: "Rate"
  2277          type: "integer"
  2278          format: "uint64"
  2279          x-nullable: false
  2280          minimum: 0
  2281  
  2282    WeightDevice:
  2283      type: "object"
  2284      description: "Weight for BlockIO Device"
  2285      properties:
  2286        Path:
  2287          description: "Weight Device"
  2288          type: "string"
  2289        Weight:
  2290          type: "integer"
  2291          format: "uint16"
  2292          x-nullable: false
  2293          minimum: 0
  2294  
  2295    DeviceMapping:
  2296      type: "object"
  2297      description: "A device mapping between the host and container"
  2298      properties:
  2299        PathOnHost:
  2300          description: "path on host of the device mapping"
  2301          type: "string"
  2302        PathInContainer:
  2303          description: "path in container of the device mapping"
  2304          type: "string"
  2305        CgroupPermissions:
  2306          description: "cgroup permissions of the device"
  2307          type: "string"
  2308      example:
  2309        PathOnHost: "/dev/deviceName"
  2310        PathInContainer: "/dev/deviceName"
  2311        CgroupPermissions: "mrw"
  2312  
  2313    Container:
  2314      description: |
  2315        an array of Container contains response of Engine API:
  2316        GET "/containers/json"
  2317      type: "object"
  2318      properties:
  2319        Id:
  2320          description: "Container ID"
  2321          type: "string"
  2322        Names:
  2323          type: "array"
  2324          items:
  2325            type: "string"
  2326          example:
  2327            - "container_1"
  2328            - "container_2"
  2329        Image:
  2330          type: "string"
  2331        ImageID:
  2332          type: "string"
  2333        Command:
  2334          type: "string"
  2335        Created:
  2336          description: "Created time of container in daemon."
  2337          type: "integer"
  2338          format: "int64"
  2339        SizeRw:
  2340          type: "integer"
  2341          format: "int64"
  2342        SizeRootFs:
  2343          type: "integer"
  2344          format: "int64"
  2345        Labels:
  2346          type: "object"
  2347          additionalProperties:
  2348            type: "string"
  2349        State:
  2350          type: "string"
  2351        Status:
  2352          type: "string"
  2353        HostConfig:
  2354          description: |
  2355            In Moby's API, HostConfig field in Container struct has following type 
  2356            struct { NetworkMode string `json:",omitempty"` }
  2357            In Pouch, we need to pick runtime field in HostConfig from daemon side to judge runtime type,
  2358            So Pouch changes this type to be the complete HostConfig.
  2359            Incompatibility exists, ATTENTION.
  2360          $ref: "#/definitions/HostConfig"
  2361          x-nullable: false
  2362        Mounts:
  2363          type: "array"
  2364          description: "Set of mount point in a container."
  2365          items:
  2366            $ref: "#/definitions/MountPoint"
  2367        NetworkSettings:
  2368          type: "object"
  2369          properties:
  2370            Networks:
  2371              additionalProperties:
  2372                $ref: "#/definitions/EndpointSettings"
  2373                x-nullable: true
  2374  
  2375    NetworkingConfig:
  2376      description: "Configuration for a network used to create a container."
  2377      type: "object"
  2378      properties:
  2379        EndpointsConfig:
  2380          additionalProperties:
  2381            $ref: "#/definitions/EndpointSettings"
  2382            x-nullable: true
  2383  
  2384    EndpointSettings:
  2385      description: "Configuration for a network endpoint."
  2386      type: "object"
  2387      properties:
  2388        # Configurations
  2389        IPAMConfig:
  2390          $ref: "#/definitions/EndpointIPAMConfig"
  2391          x-nullable: true
  2392        Links:
  2393          type: "array"
  2394          items:
  2395            type: "string"
  2396          example:
  2397            - "container_1"
  2398            - "container_2"
  2399        Aliases:
  2400          type: "array"
  2401          items:
  2402            type: "string"
  2403          example:
  2404            - "server_x"
  2405            - "server_y"
  2406  
  2407        # Operational data
  2408        NetworkID:
  2409          description: |
  2410            Unique ID of the network.
  2411          type: "string"
  2412          example: "08754567f1f40222263eab4102e1c733ae697e8e354aa9cd6e18d7402835292a"
  2413        EndpointID:
  2414          description: |
  2415            Unique ID for the service endpoint in a Sandbox.
  2416          type: "string"
  2417          example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b"
  2418        Gateway:
  2419          description: |
  2420            Gateway address for this network.
  2421          type: "string"
  2422          example: "172.17.0.1"
  2423        IPAddress:
  2424          description: |
  2425            IPv4 address.
  2426          type: "string"
  2427          example: "172.17.0.4"
  2428        IPPrefixLen:
  2429          description: |
  2430            Mask length of the IPv4 address.
  2431          type: "integer"
  2432          example: 16
  2433        IPv6Gateway:
  2434          description: |
  2435            IPv6 gateway address.
  2436          type: "string"
  2437          example: "2001:db8:2::100"
  2438        GlobalIPv6Address:
  2439          description: |
  2440            Global IPv6 address.
  2441          type: "string"
  2442          example: "2001:db8::5689"
  2443        GlobalIPv6PrefixLen:
  2444          description: |
  2445            Mask length of the global IPv6 address.
  2446          type: "integer"
  2447          format: "int64"
  2448          example: 64
  2449        MacAddress:
  2450          description: |
  2451            MAC address for the endpoint on this network.
  2452          type: "string"
  2453          example: "02:42:ac:11:00:04"
  2454        DriverOpts:
  2455          description: |
  2456            DriverOpts is a mapping of driver options and values. These options
  2457            are passed directly to the driver and are driver specific.
  2458          type: "object"
  2459          x-nullable: true
  2460          additionalProperties:
  2461            type: "string"
  2462          example:
  2463            com.example.some-label: "some-value"
  2464            com.example.some-other-label: "some-other-value"
  2465  
  2466    EndpointIPAMConfig:
  2467      description: "IPAM configurations for the endpoint"
  2468      type: "object"
  2469      properties:
  2470        IPv4Address:
  2471          description: "ipv4 address"
  2472          type: "string"
  2473        IPv6Address:
  2474          description: "ipv6 address"
  2475          type: "string"
  2476        LinkLocalIPs:
  2477          description: "link to the list of local ip"
  2478          type: "array"
  2479          x-nullable: false
  2480          items:
  2481            type: "string"
  2482  
  2483    ImageInfo:
  2484      description: "An object containing all details of an image at API side"
  2485      type: "object"
  2486      properties:
  2487        Id:
  2488          description: "ID of an image."
  2489          type: "string"
  2490          x-nullable: false
  2491        RepoTags:
  2492          description: "repository with tag."
  2493          type: "array"
  2494          items:
  2495            type: "string"
  2496        RepoDigests:
  2497          description: "repository with digest."
  2498          type: "array"
  2499          items:
  2500            type: "string"
  2501        CreatedAt:
  2502          description: "time of image creation."
  2503          type: "string"
  2504          x-nullable: false
  2505        Size:
  2506          description: "size of image's taking disk space."
  2507          type: "integer"
  2508          x-nullable: false
  2509        Config:
  2510          $ref: "#/definitions/ContainerConfig"
  2511        Architecture:
  2512          description: "the CPU architecture."
  2513          type: "string"
  2514          x-nullable: false
  2515        Os:
  2516          description: "the name of the operating system."
  2517          type: "string"
  2518          x-nullable: false
  2519        RootFS:
  2520          description: "the rootfs key references the layer content addresses used by the image."
  2521          type: "object"
  2522          required: [Type]
  2523          properties:
  2524            Type:
  2525              description: "type of the rootfs"
  2526              type: "string"
  2527              x-nullable: false
  2528            Layers:
  2529              description: "an array of layer content hashes"
  2530              type: "array"
  2531              items:
  2532                type: "string"
  2533            BaseLayer:
  2534              description: "the base layer content hash."
  2535              type: "string"
  2536  
  2537    SearchResultItem:
  2538      type: "object"
  2539      description: "search result item in search results."
  2540      properties:
  2541        description:
  2542          type: "string"
  2543          description: "description just shows the description of this image"
  2544        is_official:
  2545          type: "boolean"
  2546          description: "is_official shows if this image is marked official."
  2547        is_automated:
  2548          type: "boolean"
  2549          description: "is_automated means whether this image is automated."
  2550        name:
  2551          type: "string"
  2552          description: "name represents the name of this image"
  2553        star_count:
  2554          type: "integer"
  2555          description: "star_count refers to the star count of this image."
  2556  
  2557    VolumeInfo:
  2558      type: "object"
  2559      description: "Volume represents the configuration of a volume for the container."
  2560      properties:
  2561        Name:
  2562          description: "Name is the name of the volume."
  2563          type: "string"
  2564        Driver:
  2565          description: "Driver is the Driver name used to create the volume."
  2566          type: "string"
  2567        Mountpoint:
  2568          description: "Mountpoint is the location on disk of the volume."
  2569          type: "string"
  2570        CreatedAt:
  2571          type: "string"
  2572          format: "dateTime"
  2573          description: "Date/Time the volume was created."
  2574        Status:
  2575          description: "Status provides low-level status information about the volume."
  2576          type: "object"
  2577          additionalProperties:
  2578            type: "object"
  2579            enum:
  2580              - {}
  2581            default: {}
  2582        Labels:
  2583          description: "Labels is metadata specific to the volume."
  2584          type: "object"
  2585          additionalProperties:
  2586            type: "string"
  2587        Scope:
  2588          description: |
  2589            Scope describes the level at which the volume exists
  2590            (e.g. `global` for cluster-wide or `local` for machine level)
  2591          type: "string"
  2592  
  2593    VolumeCreateConfig:
  2594      description: "config used to create a volume"
  2595      type: "object"
  2596      properties:
  2597        Name:
  2598          description: "The new volume's name. If not specified, Pouch generates a name."
  2599          type: "string"
  2600          x-nullable: false
  2601        Driver:
  2602          description: "Name of the volume driver to use."
  2603          type: "string"
  2604          default: "local"
  2605          x-nullable: false
  2606        DriverOpts:
  2607          description: "A mapping of driver options and values. These options are passed directly to the driver and are driver specific."
  2608          type: "object"
  2609          additionalProperties:
  2610            type: "string"
  2611        Labels:
  2612          description: "User-defined key/value metadata."
  2613          type: "object"
  2614          additionalProperties:
  2615            type: "string"
  2616      example:
  2617        Name: "tardis"
  2618        Labels:
  2619          com.example.some-label: "some-value"
  2620          com.example.some-other-label: "some-other-value"
  2621        Driver: "custom"
  2622  
  2623    VolumeListResp:
  2624      type: "object"
  2625      required: [Volumes, Warnings]
  2626      properties:
  2627        Volumes:
  2628          type: "array"
  2629          x-nullable: false
  2630          description: "List of volumes"
  2631          items:
  2632            $ref: "#/definitions/VolumeInfo"
  2633        Warnings:
  2634          type: "array"
  2635          x-nullable: false
  2636          description: "Warnings that occurred when fetching the list of volumes"
  2637          items:
  2638            type: "string"
  2639  
  2640    ExecCreateConfig:
  2641      type: "object"
  2642      description: is a small subset of the Config struct that holds the configuration.
  2643      properties:
  2644        User:
  2645          type: "string"
  2646          description: "User that will run the command"
  2647          x-nullable: false
  2648        Privileged:
  2649          type: "boolean"
  2650          description: "Is the container in privileged mode"
  2651        Tty:
  2652          type: "boolean"
  2653          description: "Attach standard streams to a tty"
  2654        AttachStdin:
  2655          type: "boolean"
  2656          description: "Attach the standard input, makes possible user interaction"
  2657        AttachStderr:
  2658          type: "boolean"
  2659          description: "Attach the standard error"
  2660        AttachStdout:
  2661          type: "boolean"
  2662          description: "Attach the standard output"
  2663        Detach:
  2664          type: "boolean"
  2665          description: "Execute in detach mode"
  2666        DetachKeys:
  2667          type: "string"
  2668          description: "Escape keys for detach"
  2669        Cmd:
  2670          type: "array"
  2671          description: "Execution commands and args"
  2672          minItems: 1
  2673          items:
  2674            type: "string"
  2675    ContainerProcessList:
  2676      description: OK Response to ContainerTop operation
  2677      type: "object"
  2678      properties:
  2679        Titles:
  2680          description: "The ps column titles"
  2681          type: "array"
  2682          items:
  2683            type: "string"
  2684        Processes:
  2685          description: "Each process running in the container, where each is process is an array of values corresponding to the titles"
  2686          type: "array"
  2687          items:
  2688            type: "array"
  2689            items:
  2690              type: "string"
  2691  
  2692    ExecCreateResp:
  2693      type: "object"
  2694      description: contains response of Remote API POST "/containers/{name:.*}/exec".
  2695      properties:
  2696        Id:
  2697          type: "string"
  2698          description: ID is the exec ID
  2699  
  2700    ExecStartConfig:
  2701      type: "object"
  2702      description: ExecStartConfig is a temp struct used by execStart.
  2703      properties:
  2704        Detach:
  2705          description: ExecStart will first check if it's detached
  2706          type: "boolean"
  2707        Tty:
  2708          description: Check if there's a tty
  2709          type: "boolean"
  2710      example:
  2711        Detach: false
  2712        Tty: false
  2713    
  2714    ContainerExecInspect:
  2715      type: "object"
  2716      description: holds information about a running process started.
  2717      properties:
  2718        ID:
  2719          type: "string"
  2720          description: "The ID of this exec"
  2721        Running:
  2722          type: "boolean"
  2723        ExitCode:
  2724          type: "integer"
  2725          description: "The last exit code of this container"
  2726        ProcessConfig:
  2727          $ref: "#/definitions/ProcessConfig"
  2728        OpenStdin:
  2729          type: "boolean"
  2730        OpenStderr:
  2731          type: "boolean"
  2732        OpenStdout:
  2733          type: "boolean"
  2734        CanRemove:
  2735          type: "boolean"
  2736        ContainerID:
  2737          type: "string"
  2738          description: "The ID of this container"
  2739        DetachKeys:
  2740          type: "string"
  2741  
  2742    ProcessConfig:
  2743      type: "object"
  2744      description: ExecProcessConfig holds information about the exec process.
  2745      properties:
  2746        privileged:
  2747          type: "boolean"
  2748        user:
  2749          type: "string"
  2750        tty:
  2751          type: "boolean"
  2752        entrypoint:
  2753          type: "string"
  2754        arguments:
  2755          type: "array"
  2756          items:
  2757            type: "string"
  2758  
  2759    ContainerJSON:
  2760      description: | 
  2761        ContainerJSON contains response of Engine API:
  2762        GET "/containers/{id}/json"
  2763      type: "object"
  2764      properties:
  2765        Id:
  2766          description: "The ID of the container"
  2767          type: "string"
  2768        Created:
  2769          description: "The time the container was created"
  2770          type: "string"
  2771        Path:
  2772          description: "The path to the command being run"
  2773          type: "string"
  2774        Args:
  2775          description: "The arguments to the command being run"
  2776          type: "array"
  2777          items:
  2778            type: "string"
  2779        State:
  2780          description: "The state of the container."
  2781          $ref: "#/definitions/ContainerState"
  2782        Image:
  2783          description: "The container's image"
  2784          type: "string"
  2785        ResolvConfPath:
  2786          type: "string"
  2787        HostnamePath:
  2788          type: "string"
  2789        HostsPath:
  2790          type: "string"
  2791        LogPath:
  2792          type: "string"
  2793        Name:
  2794          type: "string"
  2795        RestartCount:
  2796          type: "integer"
  2797        Driver:
  2798          type: "string"
  2799        MountLabel:
  2800          type: "string"
  2801        ProcessLabel:
  2802          type: "string"
  2803        AppArmorProfile:
  2804          type: "string"
  2805        ExecIDs:
  2806          type: "string"
  2807        HostConfig:
  2808          $ref: "#/definitions/HostConfig"
  2809        SizeRw:
  2810          description: "The size of files that have been created or changed by this container."
  2811          type: "integer"
  2812          format: "int64"
  2813          x-nullable: true
  2814        SizeRootFs:
  2815          description: "The total size of all the files in this container."
  2816          type: "integer"
  2817          format: "int64"
  2818          x-nullable: true
  2819        Config:
  2820          $ref: "#/definitions/ContainerConfig"
  2821        Snapshotter:
  2822          $ref: "#/definitions/SnapshotterData"
  2823        GraphDriver:
  2824          $ref: "#/definitions/GraphDriverData"
  2825        Mounts:
  2826          type: "array"
  2827          description: "Set of mount point in a container."
  2828          items:
  2829            $ref: "#/definitions/MountPoint"
  2830        NetworkSettings:
  2831          description: "NetworkSettings exposes the network settings in the API."
  2832          $ref: "#/definitions/NetworkSettings"
  2833  
  2834    ContainerState:
  2835      type: "object"
  2836      properties:
  2837        Status:
  2838          $ref: "#/definitions/Status"
  2839        Running:
  2840          description: |
  2841            Whether this container is running.
  2842  
  2843            Note that a running container can be _paused_. The `Running` and `Paused`
  2844            booleans are not mutually exclusive:
  2845  
  2846            When pausing a container (on Linux), the cgroups freezer is used to suspend
  2847            all processes in the container. Freezing the process requires the process to
  2848            be running. As a result, paused containers are both `Running` _and_ `Paused`.
  2849  
  2850            Use the `Status` field instead to determine if a container's state is "running".
  2851          type: "boolean"
  2852        Paused:
  2853          description: "Whether this container is paused."
  2854          type: "boolean"
  2855        Restarting:
  2856          description: "Whether this container is restarting."
  2857          type: "boolean"
  2858        OOMKilled:
  2859          description: "Whether this container has been killed because it ran out of memory."
  2860          type: "boolean"
  2861        Dead:
  2862          description: "Whether this container is dead."
  2863          type: "boolean"
  2864        Pid:
  2865          description: "The process ID of this container"
  2866          type: "integer"
  2867        ExitCode:
  2868          description: "The last exit code of this container"
  2869          type: "integer"
  2870        Error:
  2871          description: "The error message of this container"
  2872          type: "string"
  2873        StartedAt:
  2874          description: "The time when this container was last started."
  2875          type: "string"
  2876        FinishedAt:
  2877          description: "The time when this container last exited."
  2878          type: "string"
  2879  
  2880    ContainerLogsOptions:
  2881      type: "object"
  2882      properties:
  2883        ShowStdout:
  2884          description: "Return logs from `stdout`"
  2885          type: "boolean"
  2886        ShowStderr:
  2887          description: "Return logs from `stderr`"
  2888          type: "boolean"
  2889        Since:
  2890          description: "Only return logs after this time, as a UNIX timestamp"
  2891          type: "string"
  2892        Until:
  2893          description: "Only reture logs before this time, as a UNIX timestamp"
  2894          type: "string"
  2895        Timestamps:
  2896          description: "Add timestamps to every log line"
  2897          type: "boolean"
  2898        Follow:
  2899          description: "Return logs as a stream"
  2900          type: "boolean"
  2901        Tail:
  2902          description: "Only reture this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines."
  2903          type: "string"
  2904        Details:
  2905          description: "Show extra details provided to logs"
  2906          type: "boolean"
  2907  
  2908  
  2909      description: The parameters to filter the log.
  2910  
  2911  
  2912    Status:
  2913      description: The status of the container. For example, "running" or "exited".
  2914      type: "string"
  2915      enum: ["created", "running", "stopped", "paused", "restarting", "removing", "exited", "dead"]
  2916  
  2917    SnapshotterData:
  2918      description: "Information about a container's snapshotter."
  2919      type: "object"
  2920      required: [Name, Data]
  2921      properties:
  2922        Name:
  2923          type: "string"
  2924          x-nullable: false
  2925        Data:
  2926          type: "object"
  2927          x-nullable: false
  2928          additionalProperties:
  2929            type: "string"
  2930  
  2931    GraphDriverData:
  2932      description: "Information about a container's graph driver."
  2933      type: "object"
  2934      required: [Name, Data]
  2935      properties:
  2936        Name:
  2937          type: "string"
  2938          x-nullable: false
  2939        Data:
  2940          type: "object"
  2941          x-nullable: false
  2942          additionalProperties:
  2943            type: "string"
  2944  
  2945    MountPoint:
  2946      type: "object"
  2947      description: "A mount point inside a container"
  2948      x-nullable: false
  2949      properties:
  2950        Type:
  2951          type: "string"
  2952        ID:
  2953          type: "string"
  2954        Name:
  2955          type: "string"
  2956        Source:
  2957          type: "string"
  2958        Destination:
  2959          type: "string"
  2960        Driver:
  2961          type: "string"
  2962        Mode:
  2963          type: "string"
  2964        RW:
  2965          type: "boolean"
  2966        CopyData:
  2967          type: "boolean"
  2968        Named:
  2969          type: "boolean"
  2970        Replace:
  2971          type: "string"
  2972        Propagation:
  2973          type: "string"
  2974  
  2975    NetworkSettings:
  2976      description: "NetworkSettings exposes the network settings in the API."
  2977      type: "object"
  2978      properties:
  2979        Bridge:
  2980          description: Name of the network'a bridge (for example, `pouch-br`).
  2981          type: "string"
  2982          example: "pouch-br"
  2983        SandboxID:
  2984          description: SandboxID uniquely represents a container's network stack.
  2985          type: "string"
  2986          example: "9d12daf2c33f5959c8bf90aa513e4f65b561738661003029ec84830cd503a0c3"
  2987        HairpinMode:
  2988          description: "Indicates if hairpin NAT should be enabled on the virtual interface"
  2989          type: "boolean"
  2990          example: false
  2991        LinkLocalIPv6Address:
  2992          description: "IPv6 unicast address using the link-local prefix"
  2993          type: "string"
  2994          example: "fe80::42:acff:fe11:1"
  2995        LinkLocalIPv6PrefixLen:
  2996          description: Prefix length of the IPv6 unicast address.
  2997          type: "integer"
  2998          example: "64"
  2999        Ports:
  3000          $ref: "#/definitions/PortMap"
  3001        SandboxKey:
  3002          description: SandboxKey identifies the sandbox
  3003          type: "string"
  3004          example: "/var/run/pouch/netns/8ab54b426c38"
  3005  
  3006        # TODO is SecondaryIPAddresses actually used?
  3007        SecondaryIPAddresses:
  3008          description: ""
  3009          type: "array"
  3010          items:
  3011            $ref: "#/definitions/IPAddress"
  3012          x-nullable: true
  3013  
  3014        # TODO is SecondaryIPv6Addresses actually used?
  3015        SecondaryIPv6Addresses:
  3016          description: ""
  3017          type: "array"
  3018          items:
  3019            $ref: "#/definitions/IPAddress"
  3020          x-nullable: true
  3021        Networks:
  3022          description: "Information about all networks that the container is connected to"
  3023          type: "object"
  3024          additionalProperties:
  3025            $ref: "#/definitions/EndpointSettings"
  3026            x-nullable: true
  3027  
  3028    IPAddress:
  3029      description: Address represents an IPv4 or IPv6 IP address.
  3030      type: "object"
  3031      properties:
  3032        Addr:
  3033          description: IP address.
  3034          type: "string"
  3035        PrefixLen:
  3036          description: Mask length of the IP address.
  3037          type: "integer"
  3038  
  3039    PortMap:
  3040      description: |
  3041        PortMap describes the mapping of container ports to host ports, using the
  3042        container's port-number and protocol as key in the format `<port>/<protocol>`,
  3043        for example, `80/udp`.
  3044  
  3045        If a container's port is mapped for both `tcp` and `udp`, two separate
  3046        entries are added to the mapping table.
  3047      type: "object"
  3048      additionalProperties:
  3049        type: "array"
  3050        items:
  3051          $ref: "#/definitions/PortBinding"
  3052      example:
  3053        "443/tcp":
  3054          - HostIp: "127.0.0.1"
  3055            HostPort: "4443"
  3056        "80/tcp":
  3057          - HostIp: "0.0.0.0"
  3058            HostPort: "80"
  3059          - HostIp: "0.0.0.0"
  3060            HostPort: "8080"
  3061        "80/udp":
  3062          - HostIp: "0.0.0.0"
  3063            HostPort: "80"
  3064        "2377/tcp": null
  3065  
  3066    PortBinding:
  3067      description: "PortBinding represents a binding between a host IP address and a host port"
  3068      type: "object"
  3069      x-nullable: true
  3070      properties:
  3071        HostIp:
  3072          description: "Host IP address that the container's port is mapped to."
  3073          type: "string"
  3074          example: "127.0.0.1"
  3075        HostPort:
  3076          description: "Host port number that the container's port is mapped to."
  3077          type: "string"
  3078          example: "4443"
  3079  
  3080    RestartPolicy:
  3081      description: "Define container's restart policy"
  3082      type: "object"
  3083      properties:
  3084        Name:
  3085          type: "string"
  3086        MaximumRetryCount:
  3087          type: "integer"
  3088  
  3089    NetworkCreateConfig:
  3090      type: "object"
  3091      description: "contains the request for the remote API: POST /networks/create"
  3092      allOf:
  3093        - properties:
  3094            Name:
  3095              description: "Name is the name of the network."
  3096              type: "string"
  3097        - $ref: "#/definitions/NetworkCreate"
  3098  
  3099    NetworkCreateResp:
  3100      type: "object"
  3101      description: "contains the response for the remote API: POST /networks/create"
  3102      properties:
  3103        Id:
  3104          description: "ID is the id of the network."
  3105          type: "string"
  3106        Warning:
  3107          description: "Warning means the message of create network result."
  3108          type: "string"
  3109  
  3110    NetworkCreate:
  3111      type: "object"
  3112      description: "is the expected body of the \"create network\" http request message"
  3113      properties:
  3114        CheckDuplicate:
  3115          type: "boolean"
  3116          description: "CheckDuplicate is used to check the network is duplicate or not."
  3117        Driver:
  3118          type: "string"
  3119          description: "Driver means the network's driver."
  3120        EnableIPv6:
  3121          type: "boolean"
  3122        IPAM:
  3123          type: "object"
  3124          $ref: "#/definitions/IPAM"
  3125        Internal:
  3126          type: "boolean"
  3127          description: "Internal checks the network is internal network or not."
  3128        Options:
  3129          type: "object"
  3130          additionalProperties:
  3131            type: "string"
  3132        Labels:
  3133          type: "object"
  3134          additionalProperties:
  3135            type: "string"
  3136  
  3137    NetworkInspectResp:
  3138      type: "object"
  3139      description: "is the expected body of the 'GET networks/{id}'' http request message"
  3140      properties:
  3141        Name:
  3142          type: "string"
  3143          description: "Name is the requested name of the network"
  3144        Id:
  3145          type: "string"
  3146          description: "ID uniquely identifies a network on a single machine"
  3147        Scope:
  3148          type: "string"
  3149          description: "Scope describes the level at which the network exists."
  3150        Driver:
  3151          type: "string"
  3152          description: "Driver means the network's driver."
  3153        EnableIPv6:
  3154          type: "boolean"
  3155          description: "EnableIPv6 represents whether to enable IPv6."
  3156        IPAM:
  3157          type: "object"
  3158          description: "IPAM is the network's IP Address Management."
  3159          $ref: "#/definitions/IPAM"
  3160        Internal:
  3161          type: "boolean"
  3162          description: "Internal checks the network is internal network or not."
  3163        Options:
  3164          type: "object"
  3165          description: "Options holds the network specific options to use for when creating the network."
  3166          additionalProperties:
  3167            type: "string"
  3168        Labels:
  3169          type: "object"
  3170          description: "Labels holds metadata specific to the network being created."
  3171          additionalProperties:
  3172            type: "string"
  3173  
  3174    NetworkResource:
  3175      type: "object"
  3176      description: "NetworkResource is the body of the \"get network\" http response message"
  3177      properties:
  3178        Name:
  3179          description: "Name is the requested name of the network"
  3180          type: "string"
  3181        Id:
  3182          description: "ID uniquely identifies a network on a single machine"
  3183          type: "string"
  3184        Scope:
  3185          description: "Scope describes the level at which the network exists (e.g. `global` for cluster-wide or `local` for machine level)"
  3186          type: "string"
  3187        Driver:
  3188          description: "Driver is the Driver name used to create the network (e.g. `bridge`, `overlay`)"
  3189          type: "string"
  3190        EnableIPv6:
  3191          description: "EnableIPv6 represents whether to enable IPv6"
  3192          type: "boolean"
  3193        IPAM:
  3194          description: ""
  3195          type: "object"
  3196          $ref: "#/definitions/IPAM"
  3197        Internal:
  3198          description: "Internal represents if the network is used internal only"
  3199          type: "boolean"
  3200        Containers:
  3201          description: "Containers contains endpoints belonging to the network"
  3202          type: "object"
  3203        IndexConfigs:
  3204          type: "object"
  3205          additionalProperties:
  3206            $ref: "#/definitions/EndpointResource"
  3207        Options:
  3208          description: "Options holds the network specific options to use for when creating the network"
  3209          type: "object"
  3210          x-nullable: true
  3211          additionalProperties:
  3212            type: "string"
  3213          example:
  3214            com.example.some-options: "some-option"
  3215            com.example.some-other-options: "some-other-option"
  3216        Labels:
  3217          description: "Labels holds metadata specific to the network being created"
  3218          type: "object"
  3219          x-nullable: true
  3220          additionalProperties:
  3221            type: "string"
  3222          example:
  3223            com.example.some-label: "some-label"
  3224            com.example.some-other-label: "some-other-label"
  3225  
  3226    EndpointResource:
  3227      type: "object"
  3228      description: "NetworkResource is the body of the \"get network\" http response message"
  3229      properties:
  3230        Name:
  3231          description: "Name is the requested name of the network"
  3232          type: "string"
  3233        EndpointID:
  3234          description: "EndpointID represents the endpoint's id"
  3235          type: "string"
  3236        MacAddress:
  3237          description: "MacAddress represents the enpoint's mac address"
  3238          type: "string"
  3239        IPv4Address:
  3240          description: "IPv4Address represents the enpoint's ipv4 address"
  3241          type: "string"
  3242        IPv6Address:
  3243          description: "IPv4Address represents the enpoint's ipv6 address"
  3244          type: "string"
  3245  
  3246    IPAM:
  3247      type: "object"
  3248      description: "represents IP Address Management"
  3249      properties:
  3250        Driver:
  3251          type: "string"
  3252        Options:
  3253          type: "object"
  3254          additionalProperties:
  3255            type: "string"
  3256        Config:
  3257          type: "array"
  3258          items:
  3259            $ref: '#/definitions/IPAMConfig'
  3260  
  3261    IPAMConfig:
  3262      description: "represents IPAM configurations"
  3263      type: "object"
  3264      x-nullable: false
  3265      properties:
  3266        Subnet:
  3267          type: "string"
  3268        IPRange:
  3269          type: "string"
  3270        Gateway:
  3271          type: "string"
  3272        AuxAddress:
  3273          type: "object"
  3274          additionalProperties:
  3275            type: "string"
  3276  
  3277    ResizeOptions:
  3278      description: "options of resizing container tty size"
  3279      type: "object"
  3280      properties:
  3281        Height:
  3282          type: "integer"
  3283        Width:
  3284          type: "integer"
  3285  
  3286  parameters:
  3287    id:
  3288      name: id
  3289      in: path
  3290      required: true
  3291      description: ID or name of the container
  3292      type: string
  3293    imageid:
  3294      name: imageid
  3295      in: path
  3296      required: true
  3297      description: Image name or id
  3298      type: string
  3299  
  3300  responses:
  3301    401ErrorResponse:
  3302      description: An unexpected 401 error occured.
  3303      schema:
  3304        $ref: "#/definitions/Error"
  3305    404ErrorResponse:
  3306      description: An unexpected 404 error occured.
  3307      schema:
  3308        $ref: "#/definitions/Error"
  3309    500ErrorResponse:
  3310      description: An unexpected server error occured.
  3311      schema:
  3312        $ref: "#/definitions/Error"
  3313