Skip to content

Latest commit

 

History

History
3268 lines (2232 loc) · 124 KB

HTTP_API.md

File metadata and controls

3268 lines (2232 loc) · 124 KB

Pouch Engine API

Overview

API is an HTTP API served by Pouch Engine.

Version information

Version : 1.24

URI scheme

BasePath : /v1.24
Schemes : HTTP, HTTPS

Consumes

  • application/json
  • text/plain

Produces

  • application/json
  • text/plain

Paths

GET /_ping

Responses

HTTP Code Description Schema
200 no error string
500 An unexpected server error occurred. Error

Example HTTP response

Response 200
json :
"OK"

Check auth configuration

POST /auth

Description

Validate credentials for a registry and, if available, get an identity token for accessing the registry without password.

Parameters

Type Name Description Schema
Body authConfig
optional
Authentication to check AuthConfig

Responses

HTTP Code Description Schema
200 An identity token was generated successfully. AuthResponse
401 An unexpected 401 error occurred. Error
500 An unexpected server error occurred. Error

Consumes

  • application/json

Produces

  • application/json

Create an image from a container

POST /commit

Parameters

Type Name Description Schema
Body ContainerCommitOptions
required
options of commit an image from a container ContainerCommitOptions

Responses

HTTP Code Description Schema
201 The image was created successfully ContainerCommitResp
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Consumes

  • application/json

Produces

  • application/json

Create a container

POST /containers/create

Parameters

Type Name Description Schema
Query name
optional
Assign the specified name to the container. Must match /?[a-zA-Z0-9_-]+. string
Body body
required
Container to create ContainerCreateConfig

Responses

HTTP Code Description Schema
201 Container created successfully ContainerCreateResp
400 bad parameter Error
404 no such image Error
409 conflict Error
500 An unexpected server error occurred. Error

Consumes

  • application/json

Produces

  • application/json

Tags

  • Container

Example HTTP response

Response 201
json :
{
  "Id" : "e90e34656806",
  "Warnings" : [ ]
}
Response 404
json :
{
  "message" : "image: xxx:latest: not found"
}

List containers

GET /containers/json

Parameters

Type Name Description Schema Default
Query all
optional
Return all containers. By default, only running containers are shown boolean "false"
Query filters
optional
Filters encoded as JSON string(type map[string][]string in Golang). This API will list containers match all of the filters. For example, {"status": ["paused"]} will only return paused containers.
Available filters:
- id=<ID> container ID filter, support regular expression.
- name=<name> container name filter, support regular expression.
- status=<status> container status filter, support regular expression.
- label=<key>=<value> container label filter, support equal and unequal operator. such as label=[k=a,k!=b].
string

Responses

HTTP Code Description Schema
200 Summary containers that matches the query < Container > array
500 An unexpected server error occurred. Error

Produces

  • application/json

Remove one container

DELETE /containers/{id}

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string
Query force
optional
If the container is running, force query is used to kill it and remove it forcefully. boolean

Responses

HTTP Code Description Schema
204 no error No Content
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Tags

  • Container

Attach to a container

POST /containers/{id}/attach

Description

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.

Either the stream or logs parameter must be true for this endpoint to do anything.

Hijacking

This endpoint hijacks the HTTP connection to transport stdin, stdout, and stderr on the same socket.

This is the response from the daemon for an attach request:

HTTP/1.1 200 OK
Content-Type: application/vnd.raw-stream

[STREAM]

After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server.

To hint potential proxies about connection hijacking, the Pouch client can also optionally send connection upgrade headers.

For example, the client sends this request to upgrade the connection:

POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1
Upgrade: tcp
Connection: Upgrade

The Pouch daemon will respond with a 101 UPGRADED response, and will similarly follow with the raw stream:

HTTP/1.1 101 UPGRADED
Content-Type: application/vnd.raw-stream
Connection: Upgrade
Upgrade: tcp

[STREAM]

Stream format

When the TTY setting is disabled in POST /containers/create, 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.

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).

It is encoded on the first eight bytes like this:

header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}

STREAM_TYPE can be:

  • 0: stdin (is written on stdout)
  • 1: stdout
  • 2: stderr

SIZE1, SIZE2, SIZE3, SIZE4 are the four bytes of the uint32 size encoded as big endian.

Following the header is the payload, which is the specified number of bytes of STREAM_TYPE.

The simplest way to implement this protocol is the following:

  1. Read 8 bytes.
  2. Choose stdout or stderr depending on the first byte.
  3. Extract the frame size from the last four bytes.
  4. Read the extracted size and output it on the correct output.
  5. Goto 1.

Stream format when using a TTY

When the TTY setting is enabled in POST /containers/create, 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.

Parameters

Type Name Description Schema Default
Path id
required
ID or name of the container string
Query detachKeys
optional
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 _. string
Query logs
optional
Replay previous logs from the container.

This is useful for attaching to a container that has started and you want to output everything since the container started.

If stream is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output.
boolean "false"
Query stderr
optional
Attach to stderr boolean "false"
Query stdin
optional
Attach to stdin boolean "false"
Query stdout
optional
Attach to stdout boolean "false"
Query stream
optional
Stream attached streams from the time the request was made onwards boolean "false"

Responses

HTTP Code Description Schema
101 no error, hints proxy about hijacking No Content
200 no error, no upgrade header found No Content
400 bad parameter Error
404 no such container Error
500 server error Error

Produces

  • application/vnd.raw-stream

Tags

  • Container

Example HTTP response

Response 404
json :
{
  "message" : "No such container: c2ada9df5af8"
}

list checkpoints of a container

GET /containers/{id}/checkpoints

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string
Query checkpointdir
optional
checkpoint directory string

Responses

HTTP Code Description Schema
200 no error No Content
400 bad parameter Error
404 An unexpected 404 error occurred. Error

Tags

  • Container

delete a checkpoint of a container

DELETE /containers/{id}/checkpoints/{id}

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string
Query checkpointdir
optional
checkpoint directory string
Query checkpointid
optional
checkpoint id string

Responses

HTTP Code Description Schema
204 no error No Content
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Tags

  • Container

Create an exec instance

POST /containers/{id}/exec

Description

Run a command inside a running container.

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string
Body body
required
ExecCreateConfig

Responses

HTTP Code Description Schema
201 no error ExecCreateResp
404 An unexpected 404 error occurred. Error
409 container is paused Error
500 An unexpected server error occurred. Error

Consumes

  • application/json

Produces

  • application/json

Tags

  • Exec

Inspect a container

GET /containers/{id}/json

Description

Return low-level information about a container.

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string
Query size
optional
Return the size of container as fields SizeRw and SizeRootFs boolean

Responses

HTTP Code Description Schema
200 no error ContainerJSON
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Produces

  • application/json

Tags

  • Container

Get container logs

GET /containers/{id}/logs

Description

Get stdout and stderr logs from a container.

Note: This endpoint works only for containers with the json-file or journald logging driver.

Parameters

Type Name Description Schema Default
Path id
required
ID or name of the container string
Query follow
optional
Return the logs as a stream. boolean "false"
Query since
optional
Only return logs since this time, as a UNIX timestamp integer 0
Query stderr
optional
Return logs from stderr boolean "false"
Query stdout
optional
Return logs from stdout boolean "false"
Query tail
optional
Only return this number of log lines from the end of the logs. Specify as an integer or all to output all log lines. string "all"
Query timestamps
optional
Add timestamps to every log line boolean "false"
Query until
optional
Only return logs before this time, as a UNIX timestamp integer 0

Responses

HTTP Code Description Schema
101 logs returned as a stream string (binary)
200 logs returned as a string in response body string
400 bad parameter Error
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Tags

  • Container

Pause a container

POST /containers/{id}/pause

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string

Responses

HTTP Code Description Schema
204 no error No Content
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Tags

  • Container

Rename a container

POST /containers/{id}/rename

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string
Query name
required
New name for the container string

Responses

HTTP Code Description Schema
204 no error No Content
404 An unexpected 404 error occurred. Error
409 name already in use Error
500 An unexpected server error occurred. Error

Tags

  • Container

changes the size of the tty for a container

POST /containers/{id}/resize

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string
Query h
optional
height of the tty string
Query w
optional
width of the tty string

Responses

HTTP Code Description Schema
200 no error No Content
400 bad parameter Error
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Tags

  • Container

Restart a container

POST /containers/{id}/restart

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string
Query name
required
New name for the container string
Query t
optional
Number of seconds to wait before killing the container integer

Responses

HTTP Code Description Schema
204 no error No Content
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Tags

  • Container

Start a container

POST /containers/{id}/start

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string
Query checkpoint
optional
checkpoint id string
Query checkpoint-dir
optional
checkpoint directory string
Query detachKeys
optional
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 _. string

Responses

HTTP Code Description Schema
204 no error No Content
304 container already started No Content
404 An unexpected 404 error occurred. Error
409 container is paused Error
500 An unexpected server error occurred. Error

Tags

  • Container

Get container stats based on resource usage

GET /containers/{id}/stats

Description

This endpoint returns a live stream of a container’s resource usage statistics.

The precpu_stats is the CPU statistic of the previous read, and is used to calculate the CPU usage percentage. It is not an exact copy of the cpu_stats field.

If either precpu_stats.online_cpus or cpu_stats.online_cpus is nil then for compatibility with older daemons the length of the corresponding cpu_usage.percpu_usage array should be used.

Parameters

Type Name Description Schema Default
Path id
required
ID or name of the container string
Query stream
optional
Stream the output. If false, the stats will be output once and then it will disconnect. boolean "true"

Responses

HTTP Code Description Schema
200 container stats ContainerStats
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Produces

  • application/json

Tags

  • Container

Stop a container

POST /containers/{id}/stop

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string
Query t
optional
Number of seconds to wait before killing the container integer

Responses

HTTP Code Description Schema
204 no error No Content
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Tags

  • Container

Display the running processes of a container

GET /containers/{id}/top

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string
Query ps_args
optional
top arguments string

Responses

HTTP Code Description Schema
200 no error ContainerProcessList
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Tags

  • Container

Unpause a container

POST /containers/{id}/unpause

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string

Responses

HTTP Code Description Schema
204 no error No Content
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Tags

  • Container

Update the configurations of a container

POST /containers/{id}/update

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string
Body updateConfig
optional
UpdateConfig

Responses

HTTP Code Description Schema
200 no error No Content
400 bad parameter Error
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Tags

  • Container

Upgrade a container with new image and args

POST /containers/{id}/upgrade

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string
Body upgradeConfig
optional
ContainerUpgradeConfig

Responses

HTTP Code Description Schema
200 no error No Content
400 bad parameter Error
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Tags

  • Container

Block until a container stops, then returns the exit code.

POST /containers/{id}/wait

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string

Responses

HTTP Code Description Schema
200 The container has exited. Response 200
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Response 200

Name Description Schema
Error
optional
The error message of waiting container string
StatusCode
required
Exit code of the container integer

Tags

  • Container

Update daemon's labels and image proxy

POST /daemon/update

Parameters

Type Name Description Schema
Body DaemonUpdateConfig
optional
Config used to update daemon, only labels and image proxy are allowed. DaemonUpdateConfig

Responses

HTTP Code Description Schema
200 no error No Content
400 bad parameter Error
500 An unexpected server error occurred. Error

Consumes

  • application/json

Produces

  • application/json

Subscribe pouchd events to users

GET /events

Description

Stream real-time events from the server. Report various object events of pouchd when something happens to them. Containers report these events: create, destroy, die, oom, pause, rename, resize, restart, start, stop, top, unpause, and updateImages report these events:pull, untagVolumes report these events:create, destroyNetworks report these events:create, connect, disconnect, destroy`

Parameters

Type Name Description Schema
Query filters
optional
A JSON encoded value of filters (a map[string][]string) to process on the event list. Available filters:
- container=<string> container name or ID
- event=<string> event type
- image=<string> image name or ID
- label=<string> image or container label
- network=<string> network name or ID
- type=<string> object to filter by, one of container, image, volume, network
- volume=<string> volume name
string
Query since
optional
Show events created since this timestamp then stream new events. string
Query until
optional
Show events created until this timestamp then stop streaming string

Responses

HTTP Code Description Schema
200 no error #definitions/EventsMessage
400 bad parameter Error
500 An unexpected server error occurred. Error

Produces

  • application/json

Inspect an exec instance

GET /exec/{id}/json

Description

Return low-level information about an exec instance.

Parameters

Type Name Description Schema
Path id
required
Exec instance ID string

Responses

HTTP Code Description Schema
200 No error ContainerExecInspect
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Produces

  • application/json

Tags

  • Exec

changes the size of the tty for an exec process

POST /exec/{id}/resize

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string
Query h
optional
height of the tty string
Query w
optional
width of the tty string

Responses

HTTP Code Description Schema
200 no error No Content
400 bad parameter Error
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Tags

  • Exec

Start an exec instance

POST /exec/{id}/start

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.

Parameters

Type Name Description Schema
Path id
required
Exec instance ID string
Body execStartConfig
optional
ExecStartConfig

Responses

HTTP Code Description Schema
200 No error No Content
404 No such exec instance Error
409 Container is stopped or paused Error

Consumes

  • application/json

Produces

  • application/vnd.raw-stream

Tags

  • Exec

Example HTTP request

Request body
json :
{
  "Detach" : false,
  "Tty" : false
}

Create an image by pulling from a registry or importing from an existing source file

POST /images/create

Parameters

Type Name Description Schema
Header X-Registry-Auth
optional
A base64-encoded auth configuration. See the authentication section for details. string
Query fromImage
optional
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. string
Query fromSrc
optional
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. string
Query repo
optional
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. string
Query tag
optional
Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled. string
Body inputImage
optional
Image content if the value - has been specified in fromSrc query parameter string

Responses

HTTP Code Description Schema
200 no error No Content
404 image not found Error
500 An unexpected server error occurred. Error

Consumes

  • text/plain
  • application/octet-stream

Produces

  • application/json

List Images

GET /images/json

Description

Return a list of stored images.

Parameters

Type Name Description Schema
Query all
optional
Show all images. Only images from a final layer (no children) are shown by default. boolean
Query digests
optional
Show digest information as a RepoDigests field on each image. boolean
Query filters
optional
A JSON encoded value of the filters (a map[string][]string) to process on the images list. Available filters:

- before=(<image-name>[:<tag>], <image id> or <image@digest>)
- dangling=true
- label=key or label="key=value" of an image label
- reference=(<image-name>[:<tag>])
- since=(<image-name>[:<tag>], <image id> or <image@digest>)
string

Responses

HTTP Code Description Schema
200 Summary image data for the images matching the query < ImageInfo > array
500 An unexpected server error occurred. Error

Produces

  • application/json

Example HTTP response

Response 200
json :
[ {
  "Id" : "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8",
  "ParentId" : "",
  "RepoTags" : [ "ubuntu:12.04", "ubuntu:precise" ],
  "RepoDigests" : [ "ubuntu@sha256:992069aee4016783df6345315302fa59681aae51a8eeb2f889dea59290f21787" ],
  "Created" : 1474925151,
  "Size" : 103579269,
  "VirtualSize" : 103579269,
  "SharedSize" : 0,
  "Labels" : { },
  "Containers" : 2
}, {
  "Id" : "sha256:3e314f95dcace0f5e4fd37b10862fe8398e3c60ed36600bc0ca5fda78b087175",
  "ParentId" : "",
  "RepoTags" : [ "ubuntu:12.10", "ubuntu:quantal" ],
  "RepoDigests" : [ "ubuntu@sha256:002fba3e3255af10be97ea26e476692a7ebed0bb074a9ab960b2e7a1526b15d7", "ubuntu@sha256:68ea0200f0b90df725d99d823905b04cf844f6039ef60c60bf3e019915017bd3" ],
  "Created" : 1403128455,
  "Size" : 172064416,
  "VirtualSize" : 172064416,
  "SharedSize" : 0,
  "Labels" : { },
  "Containers" : 5
} ]

Import images

POST /images/load

Description

Load a set of images by oci.v1 format tar stream

Parameters

Type Name Description Schema
Query name
optional
set the image name for the tar stream, default unknown/unknown string
Body imageTarStream
optional
tar stream containing images string (binary)

Responses

HTTP Code Description Schema
200 no error No Content
500 An unexpected server error occurred. Error

Consumes

  • application/x-tar

Save image

GET /images/save

Description

Save an image by oci.v1 format tar stream.

Parameters

Type Name Description Schema
Query name
optional
Image name which is to be saved string

Responses

HTTP Code Description Schema
200 no error string (binary)
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Produces

  • application/x-tar

Search images

GET /images/search

Responses

HTTP Code Description Schema
200 No error < SearchResultItem > array
500 An unexpected server error occurred. Error

Produces

  • application/json

Remove an image

DELETE /images/{imageid}

Description

Remove an image by reference.

Parameters

Type Name Description Schema Default
Path imageid
required
Image name or id string
Query force
optional
Remove the image even if it is being used boolean "false"

Responses

HTTP Code Description Schema
204 No error No Content
404 no such image Error
500 An unexpected server error occurred. Error

Example HTTP response

Response 404
json :
{
  "message" : "No such image: c2ada9df5af8"
}

Get an image's history

GET /images/{imageid}/history

Description

Return the history of each layer of image

Parameters

Type Name Description Schema
Path imageid
required
Image name or id string

Responses

HTTP Code Description Schema
200 no error < HistoryResultItem > array
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Produces

  • application/json

Inspect an image

GET /images/{imageid}/json

Description

Return the information about image

Parameters

Type Name Description Schema
Path imageid
required
Image name or id string

Responses

HTTP Code Description Schema
200 no error ImageInfo
404 no such image Error
500 An unexpected server error occurred. Error

Produces

  • application/json

Example HTTP response

Response 200
json :
{
  "CreatedAt" : "2017-12-19 15:32:09",
  "Digest" : "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8",
  "ID" : "e216a057b1cb",
  "Name" : "ubuntu:12.04",
  "Size" : 103579269,
  "Tag" : "12.04"
}
Response 404
json :
{
  "message" : "No such image: e216a057b1cb"
}

Tag an image

POST /images/{imageid}/tag

Description

Add tag reference to the existing image

Parameters

Type Name Description Schema
Path imageid
required
Image name or id string
Query repo
optional
The repository to tag in. For example, someuser/someimage. string
Query tag
optional
The name of the new tag. string

Responses

HTTP Code Description Schema
201 No error No Content
400 Bad parameter Error
404 no such image Error
500 An unexpected server error occurred. Error

Get System information

GET /info

Responses

HTTP Code Description Schema
200 no error SystemInfo
500 An unexpected server error occurred. Error

List networks

GET /networks

Responses

HTTP Code Description Schema
200 Summary networks that matches the query NetworkResource
500 An unexpected server error occurred. Error

Produces

  • application/json

Tags

  • Network

Create a network

POST /networks/create

Parameters

Type Name Description Schema
Body NetworkCreateConfig
required
Network configuration NetworkCreateConfig

Responses

HTTP Code Description Schema
201 The network was created successfully NetworkCreateResp
400 bad parameter Error
409 name already in use Error
500 An unexpected server error occurred. Error

Consumes

  • application/json

Produces

  • application/json

Tags

  • Network

Inspect a network

GET /networks/{id}

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string

Responses

HTTP Code Description Schema
200 No error NetworkInspectResp
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Produces

  • application/json

Tags

  • Network

Remove a network

DELETE /networks/{id}

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string

Responses

HTTP Code Description Schema
204 No error No Content
403 operation not supported for pre-defined networks Error
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Tags

  • Network

Connect a container to a network

POST /networks/{id}/connect

Parameters

Type Name Description Schema
Path id
required
Network ID or name string
Body container
required
NetworkConnect

Responses

HTTP Code Description Schema
200 No error No Content
400 bad parameter Error
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Consumes

  • application/json

Tags

  • Network

Disconnect a container from a network

POST /networks/{id}/disconnect

Parameters

Type Name Description Schema
Path id
required
Network ID or name string
Body NetworkDisconnect
required
Network disconnect parameters NetworkDisconnect

Responses

HTTP Code Description Schema
200 No error No Content
400 bad parameter Error
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Consumes

  • application/json

Tags

  • Network

Get Pouchd version

GET /version

Responses

HTTP Code Description Schema
200 no error SystemVersion
500 An unexpected server error occurred. Error

List volumes

GET /volumes

Parameters

Type Name Description Schema
Query filters
optional
JSON encoded value of the filters (a map[string][]string) to
process on the volumes list. Available filters:

- dangling=<boolean> When set to true (or 1), returns all
volumes that are not in use by a container. When set to false
(or 0), only volumes that are in use by one or more
containers are returned.
- driver=<volume-driver-name> Matches volumes based on their driver.
- label=<key> or label=<key>:<value> Matches volumes based on
the presence of a label alone or a label and a value.
- name=<volume-name> Matches all or part of a volume name.
string (json)

Responses

HTTP Code Description Schema
200 Summary volume data that matches the query VolumeListResp
500 An unexpected server error occurred. Error

Produces

  • application/json

Tags

  • Volume

Example HTTP response

Response 200
json :
{
  "Volumes" : [ {
    "CreatedAt" : "2017-07-19T12:00:26Z",
    "Name" : "tardis",
    "Driver" : "local",
    "Mountpoint" : "/var/lib/pouch/volumes/tardis",
    "Labels" : {
      "com.example.some-label" : "some-value",
      "com.example.some-other-label" : "some-other-value"
    },
    "Scope" : "local",
    "Options" : {
      "device" : "tmpfs",
      "o" : "opt.size=100m,uid=1000",
      "type" : "tmpfs"
    }
  } ],
  "Warnings" : [ ]
}

Create a volume

POST /volumes/create

Parameters

Type Name Description Schema
Body body
required
Volume configuration VolumeCreateConfig

Responses

HTTP Code Description Schema
201 The volume was created successfully VolumeInfo
500 An unexpected server error occurred. Error

Consumes

  • application/json

Produces

  • application/json

Tags

  • Volume

Example HTTP request

Request body
json :
{
  "Name" : "tardis",
  "Labels" : {
    "com.example.some-label" : "some-value",
    "com.example.some-other-label" : "some-other-value"
  },
  "Driver" : "custom"
}

Inspect a volume

GET /volumes/{id}

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string

Responses

HTTP Code Description Schema
200 No error VolumeInfo
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Produces

  • application/json

Tags

  • Volume

Delete a volume

DELETE /volumes/{id}

Parameters

Type Name Description Schema
Path id
required
ID or name of the container string

Responses

HTTP Code Description Schema
204 No error No Content
404 An unexpected 404 error occurred. Error
500 An unexpected server error occurred. Error

Tags

  • Volume

Definitions

AuthConfig

Name Description Schema
Auth
optional
string
IdentityToken
optional
IdentityToken is used to authenticate the user and get an access token for the registry string
Password
optional
string
RegistryToken
optional
RegistryToken is a bearer token to be sent to a registry string
ServerAddress
optional
string
Username
optional
string

AuthResponse

The response returned by login to a registry

Name Description Schema
IdentityToken
optional
An opaque token used to authenticate a user after a successful login string
Status
required
The status of the authentication string

BlkioStatEntry

BlkioStatEntry is one small entity to store a piece of Blkio stats

Name Schema
major
optional
integer (uint64)
minor
optional
integer (uint64)
op
optional
string
value
optional
integer (uint64)

BlkioStats

BlkioStats stores All IO service stats for data read and write.

Name Schema
io_merged_recursive
optional
< BlkioStatEntry > array
io_queue_recursive
optional
< BlkioStatEntry > array
io_service_bytes_recursive
optional
< BlkioStatEntry > array
io_service_time_recursive
optional
< BlkioStatEntry > array
io_serviced_recursive
optional
< BlkioStatEntry > array
io_time_recursive
optional
< BlkioStatEntry > array
io_wait_time_recursive
optional
< BlkioStatEntry > array
sectors_recursive
optional
< BlkioStatEntry > array

CPUStats

CPUStats aggregates and wraps all CPU related info of container

Name Description Schema
cpu_usage
optional
CPUUsage
online_cpus
optional
onine CPUs integer (uint32)
syetem_cpu_usage
optional
System CPU Usage integer (uint64)
throttling_data
optional
ThrottlingData

CPUUsage

CPUUsage stores All CPU stats aggregated since container inception.

Name Description Schema
percpu_usage
optional
Total CPU time consumed per core (Linux). < integer (uint64) > array
total_usage
optional
Total CPU time consumed. integer (uint64)
usage_in_kernelmode
optional
Time spent by tasks of the cgroup in kernel mode (Linux).
Units, nanoseconds (Linux)
integer (uint64)
usage_in_usermode
optional
Time spent by tasks of the cgroup in user mode (Linux).
Units, nanoseconds (Linux)
integer (uint64)

Checkpoint

describe a created checkpoint, include container name and checkpoint name

Name Schema
CheckpointName
optional
string
ContainerID
optional
string

CheckpointCreateOptions

options of creating a checkpoint from a running container, checkpoint is used to restore a container with current state later

Name Schema
CheckpointDir
optional
string
CheckpointID
optional
string
Exit
optional
boolean

CheckpointDeleteOptions

options of deleting a checkpoint from a container

Name Schema
CheckpointDir
optional
string
CheckpointID
optional
string

CheckpointListOptions

options of listing all checkpoints of a container

Name Schema
CheckpointDir
optional
string

Commit

Commit holds the Git-commit (SHA1) that a binary was built from, as reported in the version-string of external tools, such as containerd, or runC.

Name Description Schema
Expected
optional
Commit ID of external tool expected by pouchd as set at build time.
Example : "2d41c047c83e09a6d61d464906feb2a2f3c52aa4"
string
ID
optional
Actual commit ID of external tool.
Example : "cfb82a876ecc11b5ca0977d1733adbe58599088a"
string

Container

an array of Container contains response of Engine API: GET "/containers/json"

Name Description Schema
Command
optional
string
Created
optional
Created time of container in daemon. integer (int64)
HostConfig
optional
In Moby's API, HostConfig field in Container struct has following type
struct { NetworkMode string json:",omitempty" }
In Pouch, we need to pick runtime field in HostConfig from daemon side to judge runtime type,
So Pouch changes this type to be the complete HostConfig.
Incompatibility exists, ATTENTION.
HostConfig
Id
optional
Container ID string
Image
optional
string
ImageID
optional
string
Labels
optional
< string, string > map
Mounts
optional
Set of mount point in a container. < MountPoint > array
Names
optional
Example : [ "container_1", "container_2" ] < string > array
NetworkSettings
optional
object
SizeRootFs
optional
integer (int64)
SizeRw
optional
integer (int64)
State
optional
string
Status
optional
string

ContainerCommitOptions

options of committing a container into an image

Name Description Schema
Author
optional
author is the one build the image string
Comment
optional
comment is external information add for the image string
Repository
optional
repository is the image name string
Tag
optional
tag is the image tag string

ContainerCommitResp

response of commit container for the remote API: POST /commit

Name Description Schema
Id
optional
ID uniquely identifies an image committed by a container string

ContainerConfig

Configuration for a container that is portable between hosts

Name Description Schema
ArgsEscaped
optional
Command is already escaped (Windows only) boolean
AttachStderr
optional
Whether to attach to stderr.
Default : true
boolean
AttachStdin
optional
Whether to attach to stdin. boolean
AttachStdout
optional
Whether to attach to stdout.
Default : true
boolean
Cmd
optional
Command to run specified an array of strings. < string > array
DisableNetworkFiles
optional
Whether to generate the network files(/etc/hostname, /etc/hosts and /etc/resolv.conf) for container.
Default : false
boolean
DiskQuota
optional
Set disk quota for container.
Key is the dir in container.
Value is disk quota size for the dir.
/ means rootfs dir in container.
.* includes rootfs dir and all volume dir.
< string, string > map
Domainname
optional
The domain name to use for the container. string
Entrypoint
optional
The entry point for the container as a string or an array of strings.
If the array consists of exactly one empty string ([""]) then the entry point is reset to system default.
< string > array
Env
optional
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. < string > array
ExposedPorts
optional
An object mapping ports to an empty object in the form:{<port>/<tcp|udp>: {}} < string, object > map
Hostname
optional
The hostname to use for the container, as a valid RFC 1123 hostname.
Minimum length : 1
string (hostname)
Image
required
The name of the image to use when creating the container string
InitScript
optional
Initial script executed in container. The script will be executed before entrypoint or command string
Labels
optional
User-defined key/value metadata. < string, string > map
MacAddress
optional
MAC address of the container. string
NetPriority
optional
net priority. integer
NetworkDisabled
optional
Disable networking for the container. boolean
OnBuild
optional
ONBUILD metadata that were defined. < string > array
OpenStdin
optional
Open stdin boolean
QuotaID
optional
Set disk quota by specified quota id.
If QuotaID <= 0, it means pouchd should allocate a unique quota id by sequence automatically.
By default, a quota ID is mapped to only one container. And one quota ID can include several mountpoint.
string
Rich
optional
Whether to start container in rich container mode. (default false) boolean
RichMode
optional
Choose one rich container mode.(default dumb-init) enum (dumb-init, sbin-init, systemd)
Shell
optional
Shell for when RUN, CMD, and ENTRYPOINT uses a shell. < string > array
SpecAnnotation
optional
annotations send to runtime spec. < string, string > map
StdinOnce
optional
Close stdin after one attached client disconnects boolean
StopSignal
optional
Signal to stop a container as a string or unsigned integer.
Default : "SIGTERM"
string
StopTimeout
optional
Timeout to stop a container in seconds. integer
Tty
optional
Attach standard streams to a TTY, including stdin if it is not closed. boolean
User
optional
The user that commands are run as inside the container. string
Volumes
optional
An object mapping mount point paths inside the container to empty objects. < string, object > map
WorkingDir
optional
The working directory for commands to run in. string

ContainerCreateConfig

ContainerCreateConfig is used for API "POST /containers/create". It wraps all kinds of config used in container creation. It can be used to encode client params in client and unmarshal request body in daemon side.

Polymorphism : Composition

Name Description Schema
ArgsEscaped
optional
Command is already escaped (Windows only) boolean
AttachStderr
optional
Whether to attach to stderr.
Default : true
boolean
AttachStdin
optional
Whether to attach to stdin. boolean
AttachStdout
optional
Whether to attach to stdout.
Default : true
boolean
Cmd
optional
Command to run specified an array of strings. < string > array
DisableNetworkFiles
optional
Whether to generate the network files(/etc/hostname, /etc/hosts and /etc/resolv.conf) for container.
Default : false
boolean
DiskQuota
optional
Set disk quota for container.
Key is the dir in container.
Value is disk quota size for the dir.
/ means rootfs dir in container.
.* includes rootfs dir and all volume dir.
< string, string > map
Domainname
optional
The domain name to use for the container. string
Entrypoint
optional
The entry point for the container as a string or an array of strings.
If the array consists of exactly one empty string ([""]) then the entry point is reset to system default.
< string > array
Env
optional
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. < string > array
ExposedPorts
optional
An object mapping ports to an empty object in the form:{<port>/<tcp|udp>: {}} < string, object > map
HostConfig
optional
HostConfig
Hostname
optional
The hostname to use for the container, as a valid RFC 1123 hostname.
Minimum length : 1
string (hostname)
Image
required
The name of the image to use when creating the container string
InitScript
optional
Initial script executed in container. The script will be executed before entrypoint or command string
Labels
optional
User-defined key/value metadata. < string, string > map
MacAddress
optional
MAC address of the container. string
NetPriority
optional
net priority. integer
NetworkDisabled
optional
Disable networking for the container. boolean
NetworkingConfig
optional
NetworkingConfig
OnBuild
optional
ONBUILD metadata that were defined. < string > array
OpenStdin
optional
Open stdin boolean
QuotaID
optional
Set disk quota by specified quota id.
If QuotaID <= 0, it means pouchd should allocate a unique quota id by sequence automatically.
By default, a quota ID is mapped to only one container. And one quota ID can include several mountpoint.
string
Rich
optional
Whether to start container in rich container mode. (default false) boolean
RichMode
optional
Choose one rich container mode.(default dumb-init) enum (dumb-init, sbin-init, systemd)
Shell
optional
Shell for when RUN, CMD, and ENTRYPOINT uses a shell. < string > array
SpecAnnotation
optional
annotations send to runtime spec. < string, string > map
StdinOnce
optional
Close stdin after one attached client disconnects boolean
StopSignal
optional
Signal to stop a container as a string or unsigned integer.
Default : "SIGTERM"
string
StopTimeout
optional
Timeout to stop a container in seconds. integer
Tty
optional
Attach standard streams to a TTY, including stdin if it is not closed. boolean
User
optional
The user that commands are run as inside the container. string
Volumes
optional
An object mapping mount point paths inside the container to empty objects. < string, object > map
WorkingDir
optional
The working directory for commands to run in. string

ContainerCreateResp

response returned by daemon when container create successfully

Name Description Schema
Id
required
The ID of the created container string
Name
optional
The name of the created container string
Warnings
required
Warnings encountered when creating the container < string > array

ContainerExecInspect

holds information about a running process started.

Name Description Schema
CanRemove
required
boolean
ContainerID
required
The ID of this container string
DetachKeys
required
string
ExitCode
required
The last exit code of this container integer
ID
required
The ID of this exec string
OpenStderr
required
boolean
OpenStdin
required
boolean
OpenStdout
required
boolean
ProcessConfig
required
ProcessConfig
Running
required
boolean

ContainerJSON

ContainerJSON contains response of Engine API: GET "/containers/{id}/json"

Name Description Schema
AppArmorProfile
optional
string
Args
optional
The arguments to the command being run < string > array
Config
optional
ContainerConfig
Created
optional
The time the container was created string
Driver
optional
string
ExecIDs
optional
exec ids of container < string > array
GraphDriver
optional
GraphDriverData
HostConfig
optional
HostConfig
HostnamePath
optional
string
HostsPath
optional
string
Id
optional
The ID of the container string
Image
optional
The container's image string
LogPath
optional
string
MountLabel
optional
string
Mounts
optional
Set of mount point in a container. < MountPoint > array
Name
optional
string
NetworkSettings
optional
NetworkSettings exposes the network settings in the API. NetworkSettings
Path
optional
The path to the command being run string
ProcessLabel
optional
string
ResolvConfPath
optional
string
RestartCount
optional
integer
SizeRootFs
optional
The total size of all the files in this container. integer (int64)
SizeRw
optional
The size of files that have been created or changed by this container. integer (int64)
Snapshotter
optional
SnapshotterData
State
optional
The state of the container. ContainerState

ContainerListOptions

options of list container, filters (a map[string][]string) to process on the container list. Available filters:

  • id=container-id
  • name=container-name
  • status=running
  • label=key or label=key=value
  • network=container-network
  • volume=volume-id
Name Schema
All
optional
boolean
Before
optional
string
Filter
optional
< string, < string > array > map
Limit
optional
integer
Since
optional
string

ContainerLogsOptions

The parameters to filter the log.

Name Description Schema
Details
optional
Show extra details provided to logs boolean
Follow
optional
Return logs as a stream boolean
ShowStderr
optional
Return logs from stderr boolean
ShowStdout
optional
Return logs from stdout boolean
Since
optional
Only return logs after this time, as a UNIX timestamp string
Tail
optional
Only reture this number of log lines from the end of the logs. Specify as an integer or all to output all log lines. string
Timestamps
optional
Add timestamps to every log line boolean
Until
optional
Only reture logs before this time, as a UNIX timestamp string

ContainerProcessList

OK Response to ContainerTop operation

Name Description Schema
Processes
optional
Each process running in the container, where each is process is an array of values corresponding to the titles < < string > array > array
Titles
optional
The ps column titles < string > array

ContainerRemoveOptions

options of remove container

Name Schema
Force
optional
boolean
Link
optional
boolean
Volumes
optional
boolean

ContainerStartOptions

options of starting container

Name Schema
CheckpointDir
optional
string
CheckpointID
optional
string
DetachKeys
optional
string

ContainerState

Name Description Schema
Dead
required
Whether this container is dead. boolean
Error
required
The error message of this container string
ExitCode
required
The last exit code of this container integer
FinishedAt
required
The time when this container last exited. string
OOMKilled
required
Whether this container has been killed because it ran out of memory. boolean
Paused
required
Whether this container is paused. boolean
Pid
required
The process ID of this container integer
Restarting
required
Whether this container is restarting. boolean
Running
required
Whether this container is running.

Note that a running container can be paused. The Running and Paused
booleans are not mutually exclusive:

When pausing a container (on Linux), the cgroups freezer is used to suspend
all processes in the container. Freezing the process requires the process to
be running. As a result, paused containers are both Running and Paused.

Use the Status field instead to determine if a container's state is "running".
boolean
StartedAt
required
The time when this container was last started. string
Status
required
Status

ContainerStats

container stats almost from cgroup resource usage.

Name Description Schema
blkio_stats
optional
BlkioStats
cpu_stats
optional
CPUStats
id
optional
container id string
memory_stats
optional
MemoryStats
name
optional
container name string
networks
optional
< string, NetworkStats > map
pids_stats
optional
PidsStats
precpu_stats
optional
CPUStats
read
optional
read time of container stats. string (date-time)

ContainerUpgradeConfig

ContainerUpgradeConfig is used for API "POST /containers/{name:.*}/upgrade". when upgrade a container, we must specify new image used to create a new container, and also can specify Cmd and Entrypoint for new container. There is all parameters that upgrade a container, if want to change other parameters, i think you should use update API interface.

Name Description Schema
Cmd
optional
Execution commands and args < string > array
Entrypoint
optional
The entrypoint for the container as a string or an array of strings.
If the array consists of exactly one empty string ([""]) then the entry point is reset to system default.
< string > array
Image
required
string

DaemonUpdateConfig

Name Description Schema
ImageProxy
optional
Image proxy used to pull image. string
Labels
optional
Labels indentified the attributes of daemon
Example : [ "storage=ssd", "zone=hangzhou" ]
< string > array

DeviceMapping

A device mapping between the host and container

Name Description Schema
CgroupPermissions
optional
cgroup permissions of the device string
PathInContainer
optional
path in container of the device mapping string
PathOnHost
optional
path on host of the device mapping string

EndpointIPAMConfig

IPAM configurations for the endpoint

Name Description Schema
IPv4Address
optional
ipv4 address string
IPv6Address
optional
ipv6 address string
LinkLocalIPs
optional
link to the list of local ip < string > array

EndpointResource

NetworkResource is the body of the "get network" http response message

Name Description Schema
EndpointID
optional
EndpointID represents the endpoint's id string
IPv4Address
optional
IPv4Address represents the enpoint's ipv4 address string
IPv6Address
optional
IPv4Address represents the enpoint's ipv6 address string
MacAddress
optional
MacAddress represents the enpoint's mac address string
Name
optional
Name is the requested name of the network string

EndpointSettings

Configuration for a network endpoint.

Name Description Schema
Aliases
optional
Example : [ "server_x", "server_y" ] < string > array
DriverOpts
optional
DriverOpts is a mapping of driver options and values. These options
are passed directly to the driver and are driver specific.
Example : {<br> "com.example.some-label" : "some-value",<br> "com.example.some-other-label" : "some-other-value"<br>}
< string, string > map
EndpointID
optional
Unique ID for the service endpoint in a Sandbox.
Example : "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b"
string
Gateway
optional
Gateway address for this network.
Example : "172.17.0.1"
string
GlobalIPv6Address
optional
Global IPv6 address.
Example : "2001:db8::5689"
string
GlobalIPv6PrefixLen
optional
Mask length of the global IPv6 address.
Example : 64
integer (int64)
IPAMConfig
optional
EndpointIPAMConfig
IPAddress
optional
IPv4 address.
Example : "172.17.0.4"
string
IPPrefixLen
optional
Mask length of the IPv4 address.
Example : 16
integer
IPv6Gateway
optional
IPv6 gateway address.
Example : "2001:db8:2::100"
string
Links
optional
Example : [ "container_1", "container_2" ] < string > array
MacAddress
optional
MAC address for the endpoint on this network.
Example : "02:42:ac:11:00:04"
string
NetworkID
optional
Unique ID of the network.
Example : "08754567f1f40222263eab4102e1c733ae697e8e354aa9cd6e18d7402835292a"
string

Error

Name Schema
message
optional
string

EventType

The type of event. For example, "container" or "image", Now we only support container, image, network and volume events.

Type : enum (container, daemon, image, network, plugin, volume)

EventsActor

EventsActor describes something that generates events, like a container, or a network, or a volume. It has a defined name and a set or attributes. The container attributes are its labels, other actors can generate these attributes from other properties.

Name Schema
Attributes
optional
< string, string > map
ID
optional
string

EventsMessage

EventsMessage represents the information an event contains, the message at least contains type, action and id. type specifies which object generates the event, like container, or a network, or a volume. the action specifies the action name, like create, or destroy. the id identifies the object that generates the event. The message also can contain the EventsActor that describes the extra attributes that describe the event.

Name Schema
action
optional
string
actor
optional
EventsActor
from
optional
string
id
optional
string
status
optional
string
time
optional
integer
timeNano
optional
integer
type
optional
EventType

ExecCreateConfig

is a small subset of the Config struct that holds the configuration.

Name Description Schema
AttachStderr
optional
Attach the standard error boolean
AttachStdin
optional
Attach the standard input, makes possible user interaction boolean
AttachStdout
optional
Attach the standard output boolean
Cmd
optional
Execution commands and args < string > array
Detach
optional
Execute in detach mode boolean
DetachKeys
optional
Escape keys for detach string
Env
optional
envs for exec command in container < string > array
Privileged
optional
Is the container in privileged mode boolean
Tty
optional
Attach standard streams to a tty boolean
User
optional
User that will run the command string

ExecCreateResp

contains response of Remote API POST "/containers/{name:.*}/exec".

Name Description Schema
Id
optional
ID is the exec ID string

ExecStartConfig

ExecStartConfig is a temp struct used by execStart.

Name Description Schema
Detach
optional
ExecStart will first check if it's detached boolean
Tty
optional
Check if there's a tty boolean

GraphDriverData

Information about a container's graph driver.

Name Schema
Data
required
< string, string > map
Name
required
string

HistoryResultItem

An object containing image history at API side.

Name Description Schema
Author
required
the author of the build point. string
Comment
required
a custom message set when creating the layer. string
Created
required
the combined date and time at which the layer was created. integer (int64)
CreatedBy
required
the command which created the layer. string
EmptyLayer
required
mark whether the history item created a filesystem diff or not. boolean
ID
required
ID of each layer image. string
Size
required
size of each layer image. integer (int64)

HostConfig

Container configuration that depends on the host we are running on

Polymorphism : Composition

Name Description Schema
AutoRemove
optional
Automatically remove the container when the container's process exits. This has no effect if RestartPolicy is set. boolean
Binds
optional
A list of volume bindings for this container. Each volume binding is a string in one of these forms:

- host-src:container-dest to bind-mount a host path into the container. Both host-src, and container-dest must be an absolute path.
- 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.
- volume-name:container-dest to bind-mount a volume managed by a volume driver into the container. container-dest must be an absolute path.
- volume-name:container-dest:ro to mount the volume read-only inside the container. container-dest must be an absolute path.
< string > array
BlkioDeviceReadBps
optional
Limit read rate (bytes per second) from a device, in the form [{"Path": "device_path", "Rate": rate}]. < ThrottleDevice > array
BlkioDeviceReadIOps
optional
Limit read rate (IO per second) from a device, in the form [{"Path": "device_path", "Rate": rate}]. < ThrottleDevice > array
BlkioDeviceWriteBps
optional
Limit write rate (bytes per second) to a device, in the form [{"Path": "device_path", "Rate": rate}]. < ThrottleDevice > array
BlkioDeviceWriteIOps
optional
Limit write rate (IO per second) to a device, in the form [{"Path": "device_path", "Rate": rate}]. < ThrottleDevice > array
BlkioWeight
required
Block IO weight (relative weight), need CFQ IO Scheduler enable.
Minimum value : 0
Maximum value : 1000
integer (uint16)
BlkioWeightDevice
optional
Block IO weight (relative device weight) in the form [{"Path": "device_path", "Weight": weight}]. < WeightDevice > array
CapAdd
optional
A list of kernel capabilities to add to the container. < string > array
CapDrop
optional
A list of kernel capabilities to drop from the container. < string > array
Cgroup
optional
Cgroup to use for the container. string
CgroupParent
required
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. string
ConsoleSize
optional
Initial console size, as an [height, width] array. (Windows only) < integer > array
ContainerIDFile
optional
Path to a file where the container ID is written string
CpuCount
required
The number of usable CPUs (Windows only).
On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is CPUCount first, then CPUShares, and CPUPercent last.
integer (int64)
CpuPercent
required
The usable percentage of the available CPUs (Windows only).
On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is CPUCount first, then CPUShares, and CPUPercent last.
integer (int64)
CpuPeriod
required
CPU CFS (Completely Fair Scheduler) period.
The length of a CPU period in microseconds.
Minimum value : 1000
Maximum value : 1000000
integer (int64)
CpuQuota
required
CPU CFS (Completely Fair Scheduler) quota.
Microseconds of CPU time that the container can get in a CPU period."
Minimum value : 1000
integer (int64)
CpuRealtimePeriod
required
The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. integer (int64)
CpuRealtimeRuntime
required
The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. integer (int64)
CpuShares
required
An integer value representing this container's relative CPU weight versus other containers. integer
CpusetCpus
required
CPUs in which to allow execution (e.g., 0-3, 0,1)
Example : "0-3"
string
CpusetMems
required
Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. string
DeviceCgroupRules
required
a list of cgroup rules to apply to the container < string > array
Devices
optional
A list of devices to add to the container. < DeviceMapping > array
Dns
optional
A list of DNS servers for the container to use. < string > array
DnsOptions
optional
A list of DNS options. < string > array
DnsSearch
optional
A list of DNS search domains. < string > array
EnableLxcfs
optional
Whether to enable lxcfs. boolean
ExtraHosts
optional
A list of hostnames/IP mappings to add to the container's /etc/hosts file. Specified in the form ["hostname:IP"]. < string > array
GroupAdd
optional
A list of additional groups that the container process will run as. < string > array
IOMaximumBandwidth
required
Maximum IO in bytes per second for the container system drive (Windows only) integer (uint64)
IOMaximumIOps
required
Maximum IOps for the container system drive (Windows only) integer (uint64)
InitScript
optional
Initial script executed in container. The script will be executed before entrypoint or command string
IntelRdtL3Cbm
required
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. string
IpcMode
optional
IPC sharing mode for the container. Possible values are:
- "none": own private IPC namespace, with /dev/shm not mounted
- "private": own private IPC namespace
- "shareable": own private IPC namespace, with a possibility to share it with other containers
- "container:<name|id>": join another (shareable) container's IPC namespace
- "host": use the host system's IPC namespace
If not specified, daemon default is used, which can either be "private"
or "shareable", depending on daemon version and configuration.
string
Isolation
optional
Isolation technology of the container. (Windows only) enum (default, process, hyperv)
KernelMemory
required
Kernel memory limit in bytes. integer (int64)
Links
optional
A list of links for the container in the form container_name:alias. < string > array
LogConfig
optional
The logging configuration for this container LogConfig
Memory
required
Memory limit in bytes. integer
MemoryExtra
required
MemoryExtra is an integer value representing this container's memory high water mark percentage.
The range is in [0, 100].
Minimum value : 0
Maximum value : 100
integer (int64)
MemoryForceEmptyCtl
required
MemoryForceEmptyCtl represents whether to reclaim the page cache when deleting cgroup.
Minimum value : 0
Maximum value : 1
integer (int64)
MemoryReservation
required
Memory soft limit in bytes. integer (int64)
MemorySwap
required
Total memory limit (memory + swap). Set as -1 to enable unlimited swap. integer (int64)
MemorySwappiness
required
Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100.
Minimum value : 0
Maximum value : 100
integer (int64)
MemoryWmarkRatio
required
MemoryWmarkRatio is an integer value representing this container's memory low water mark percentage.
The value of memory low water mark is memory.limit_in_bytes * MemoryWmarkRatio. The range is in [0, 100].
Minimum value : 0
Maximum value : 100
integer (int64)
NanoCpus
required
CPU quota in units of 10-9 CPUs. integer (int64)
NetworkMode
optional
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. string
NvidiaConfig
optional
NvidiaConfig
OomKillDisable
required
Disable OOM Killer for the container. boolean
OomScoreAdj
optional
An integer value containing the score given to the container in order to tune OOM killer preferences.
The range is in [-1000, 1000].
Minimum value : -1000
Maximum value : 1000
integer (int)
PidMode
optional
Set the PID (Process) Namespace mode for the container. It can be either:
- "container:<name|id>": joins another container's PID namespace
- "host": use the host's PID namespace inside the container
string
PidsLimit
required
Tune a container's pids limit. Set -1 for unlimited. Only on Linux 4.4 does this parameter support. integer (int64)
PortBindings
optional
A map of exposed container ports and the host port they should map to. PortMap
Privileged
optional
Gives the container full access to the host. boolean
PublishAllPorts
optional
Allocates a random host port for all of a container's exposed ports. boolean
ReadonlyRootfs
optional
Mount the container's root filesystem as read only. boolean
RestartPolicy
optional
Restart policy to be used to manage the container RestartPolicy
Rich
optional
Whether to start container in rich container mode. (default false) boolean
RichMode
optional
Choose one rich container mode.(default dumb-init) enum (dumb-init, sbin-init, systemd)
Runtime
optional
Runtime to use with this container. string
ScheLatSwitch
required
ScheLatSwitch enables scheduler latency count in cpuacct
Minimum value : 0
Maximum value : 1
integer (int64)
SecurityOpt
optional
A list of string values to customize labels for MLS systems, such as SELinux. < string > array
ShmSize
optional
Size of /dev/shm in bytes. If omitted, the system uses 64MB.
Minimum value : 0
integer
StorageOpt
optional
Storage driver options for this container, in the form {"size": "120G"}. < string, string > map
Sysctls
optional
A list of kernel parameters (sysctls) to set in the container. For example: {"net.ipv4.ip_forward": "1"} < string, string > map
Tmpfs
optional
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" }. < string, string > map
UTSMode
optional
UTS namespace to use for the container. string
Ulimits
optional
A list of resource limits to set in the container. For example: {"Name": "nofile", "Soft": 1024, "Hard": 2048}" < Ulimit > array
UsernsMode
optional
Sets the usernamespace mode for the container when usernamespace remapping option is enabled. string
VolumeDriver
optional
Driver that this container uses to mount volumes. string
VolumesFrom
optional
A list of volumes to inherit from another container, specified in the form <container name>[:<ro|rw>]. < string > array

IPAM

represents IP Address Management

Name Schema
Config
optional
< IPAMConfig > array
Driver
optional
string
Options
optional
< string, string > map

IPAMConfig

represents IPAM configurations

Name Description Schema
AuxAddress
optional
aux address in sub-network < string, string > map
Gateway
optional
gateway for sub-network string
IPRange
optional
sub ip range in sub-network string
Subnet
optional
subnet address for network string

IPAddress

Address represents an IPv4 or IPv6 IP address.

Name Description Schema
Addr
optional
IP address. string
PrefixLen
optional
Mask length of the IP address. integer

ImageInfo

An object containing all details of an image at API side

Name Description Schema
Architecture
optional
the CPU architecture. string
Config
optional
ContainerConfig
CreatedAt
optional
time of image creation. string
Id
optional
ID of an image. string
Os
optional
the name of the operating system. string
RepoDigests
optional
repository with digest. < string > array
RepoTags
optional
repository with tag. < string > array
RootFS
optional
the rootfs key references the layer content addresses used by the image. RootFS
Size
optional
size of image's taking disk space. integer

RootFS

Name Description Schema
BaseLayer
optional
the base layer content hash. string
Layers
optional
an array of layer content hashes < string > array
Type
required
type of the rootfs string

IndexInfo

IndexInfo contains information about a registry.

Name Description Schema
Mirrors
optional
List of mirrors, expressed as URIs.
Example : [ "https://hub-mirror.corp.example.com:5000/" ]
< string > array
Name
optional
Name of the registry. string
Official
optional
Indicates whether this is an official registry.
Example : true
boolean
Secure
optional
Indicates if the the registry is part of the list of insecure
registries.

If false, the registry is insecure. Insecure registries accept
un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from
unknown CAs) communication.

> Warning: Insecure registries can be useful when running a local
> registry. However, because its use creates security vulnerabilities
> it should ONLY be enabled for testing purposes. For increased
> security, users should add their CA to their system's list of
> trusted CAs instead of enabling this option.
Example : true
boolean

LogConfig

The logging configuration for this container

Name Schema
Config
optional
< string, string > map
Type
optional
enum (json-file, syslog, journald, gelf, fluentd, awslogs, splunk, etwlogs, none)

MemoryStats

MemoryStats aggregates all memory stats since container inception on Linux.

Name Description Schema
failcnt
optional
number of times memory usage hits limits. integer (uint64)
limit
optional
xxx integer (uint64)
max_usage
optional
maximum usage ever recorded. integer (uint64)
stats
optional
all the stats exported via memory.stat. < string, integer (uint64) > map
usage
optional
current res_counter usage for memory integer (uint64)

MountPoint

A mount point inside a container

Name Schema
CopyData
optional
boolean
Destination
optional
string
Driver
optional
string
ID
optional
string
Mode
optional
string
Name
optional
string
Named
optional
boolean
Propagation
optional
string
RW
optional
boolean
Replace
optional
string
Source
optional
string
Type
optional
string

NetworkConnect

contains the request for the remote API: POST /networks/{id:.*}/connect

Name Description Schema
Container
optional
The ID or name of the container to connect to the network. string
EndpointConfig
optional
EndpointSettings

NetworkCreate

is the expected body of the "create network" http request message

Name Description Schema
CheckDuplicate
optional
CheckDuplicate is used to check the network is duplicate or not. boolean
Driver
optional
Driver means the network's driver. string
EnableIPv6
optional
boolean
IPAM
optional
IPAM
Internal
optional
Internal checks the network is internal network or not. boolean
Labels
optional
< string, string > map
Options
optional
< string, string > map

NetworkCreateConfig

contains the request for the remote API: POST /networks/create

Polymorphism : Composition

Name Description Schema
CheckDuplicate
optional
CheckDuplicate is used to check the network is duplicate or not. boolean
Driver
optional
Driver means the network's driver. string
EnableIPv6
optional
boolean
IPAM
optional
IPAM
Internal
optional
Internal checks the network is internal network or not. boolean
Labels
optional
< string, string > map
Name
optional
Name is the name of the network. string
Options
optional
< string, string > map

NetworkCreateResp

contains the response for the remote API: POST /networks/create

Name Description Schema
Id
optional
ID is the id of the network. string
Warning
optional
Warning means the message of create network result. string

NetworkDisconnect

Parameters of network disconnect

Name Description Schema
Container
optional
The ID or name of the container to disconnect from the network. string
Force
optional
Force the container to disconnect from the network. boolean

NetworkInspectResp

is the expected body of the 'GET networks/{id}'' http request message

Name Description Schema
Driver
optional
Driver means the network's driver. string
EnableIPv6
optional
EnableIPv6 represents whether to enable IPv6. boolean
IPAM
optional
IPAM is the network's IP Address Management. IPAM
Id
optional
ID uniquely identifies a network on a single machine string
Internal
optional
Internal checks the network is internal network or not. boolean
Labels
optional
Labels holds metadata specific to the network being created. < string, string > map
Name
optional
Name is the requested name of the network string
Options
optional
Options holds the network specific options to use for when creating the network. < string, string > map
Scope
optional
Scope describes the level at which the network exists. string

NetworkResource

NetworkResource is the body of the "get network" http response message

Name Description Schema
Containers
optional
Containers contains endpoints belonging to the network object
Driver
optional
Driver is the Driver name used to create the network (e.g. bridge, overlay) string
EnableIPv6
optional
EnableIPv6 represents whether to enable IPv6 boolean
IPAM
optional
IPAM
Id
optional
ID uniquely identifies a network on a single machine string
IndexConfigs
optional
< string, EndpointResource > map
Internal
optional
Internal represents if the network is used internal only boolean
Labels
optional
Labels holds metadata specific to the network being created
Example : {<br> "com.example.some-label" : "some-label",<br> "com.example.some-other-label" : "some-other-label"<br>}
< string, string > map
Name
optional
Name is the requested name of the network string
Options
optional
Options holds the network specific options to use for when creating the network
Example : {<br> "com.example.some-options" : "some-option",<br> "com.example.some-other-options" : "some-other-option"<br>}
< string, string > map
Scope
optional
Scope describes the level at which the network exists (e.g. global for cluster-wide or local for machine level) string

NetworkSettings

NetworkSettings exposes the network settings in the API.

Name Description Schema
Bridge
optional
Name of the network'a bridge (for example, pouch-br).
Example : "pouch-br"
string
HairpinMode
optional
Indicates if hairpin NAT should be enabled on the virtual interface
Example : false
boolean
LinkLocalIPv6Address
optional
IPv6 unicast address using the link-local prefix
Example : "fe80::42:acff:fe11:1"
string
LinkLocalIPv6PrefixLen
optional
Prefix length of the IPv6 unicast address.
Example : 64
integer
Networks
optional
Information about all networks that the container is connected to < string, EndpointSettings > map
Ports
optional
PortMap
SandboxID
optional
SandboxID uniquely represents a container's network stack.
Example : "9d12daf2c33f5959c8bf90aa513e4f65b561738661003029ec84830cd503a0c3"
string
SandboxKey
optional
SandboxKey identifies the sandbox
Example : "/var/run/pouch/netns/8ab54b426c38"
string
SecondaryIPAddresses
optional
< IPAddress > array
SecondaryIPv6Addresses
optional
< IPAddress > array

NetworkStats

container stats almost from cgroup resource usage.

Name Description Schema
endpoint_id
optional
Endpoint ID. string
instance_id
optional
Instance ID. string
rx_bytes
optional
Bytes received. integer (uint64)
rx_dropped
optional
Incoming packets dropped. integer (uint64)
rx_errors
optional
Received errors. integer (uint64)
rx_packets
optional
Packets received. integer (uint64)
tx_bytes
optional
Bytes sent. integer (uint64)
tx_dropped
optional
Outgoing packets dropped. integer (uint64)
tx_errors
optional
Sent errors. integer (uint64)
tx_packets
optional
Packets sent. integer (uint64)

NetworkingConfig

Configuration for a network used to create a container.

Type : object

NvidiaConfig

Name Description Schema
NvidiaDriverCapabilities
optional
NvidiaDriverCapabilities controls which driver libraries/binaries will be mounted inside the container
Example : "Possible values\ncompute,video, graphics,utility …: a comma-separated list of driver features the container needs.\nall: enable all available driver capabilities.\n"
string
NvidiaVisibleDevices
optional
NvidiaVisibleDevices controls which GPUs will be made accessible inside the container
Example : "Possible values.\n0,1,2, GPU-fef8089b …: a comma-separated list of GPU UUID(s) or index(es).\nall: all GPUs will be accessible, this is the default value in our container images.\nnone: no GPU will be accessible, but driver capabilities will be enabled.\n"
string

PidsStats

PidsStats contains the stats of a container's pids

Name Description Schema
current
optional
Current is the number of pids in the cgroup integer (uint64)
limit
optional
Limit is the hard limit on the number of pids in the cgroup.
A "Limit" of 0 means that there is no limit.
integer (uint64)

PortBinding

PortBinding represents a binding between a host IP address and a host port

Name Description Schema
HostIp
optional
Host IP address that the container's port is mapped to.
Example : "127.0.0.1"
string
HostPort
optional
Host port number that the container's port is mapped to.
Example : "4443"
string

PortMap

PortMap describes the mapping of container ports to host ports, using the container's port-number and protocol as key in the format <port>/<protocol>, for example, 80/udp.

If a container's port is mapped for both tcp and udp, two separate entries are added to the mapping table.

Type : < string, < PortBinding > array > map

ProcessConfig

ExecProcessConfig holds information about the exec process.

Name Schema
arguments
required
< string > array
entrypoint
required
string
privileged
required
boolean
tty
required
boolean
user
required
string

RegistryServiceConfig

RegistryServiceConfig stores daemon registry services configuration.

Name Description Schema
AllowNondistributableArtifactsCIDRs
optional
List of IP ranges to which nondistributable artifacts can be pushed,
using the CIDR syntax RFC 4632.

Some images contain artifacts whose distribution is restricted by license.
When these images are pushed to a registry, restricted artifacts are not
included.

This configuration override this behavior, and enables the daemon to
push nondistributable artifacts to all registries whose resolved IP
address is within the subnet described by the CIDR syntax.

This option is useful when pushing images containing
nondistributable artifacts to a registry on an air-gapped network so
hosts on that network can pull the images without connecting to
another server.

> Warning: Nondistributable artifacts typically have restrictions
> on how and where they can be distributed and shared. Only use this
> feature to push artifacts to private registries and ensure that you
> are in compliance with any terms that cover redistributing
> nondistributable artifacts.
Example : [ "::1/128", "127.0.0.0/8" ]
< string > array
AllowNondistributableArtifactsHostnames
optional
List of registry hostnames to which nondistributable artifacts can be
pushed, using the format <hostname>[:<port>] or <IP address>[:<port>].

Some images (for example, Windows base images) contain artifacts
whose distribution is restricted by license. When these images are
pushed to a registry, restricted artifacts are not included.

This configuration override this behavior for the specified
registries.

This option is useful when pushing images containing
nondistributable artifacts to a registry on an air-gapped network so
hosts on that network can pull the images without connecting to
another server.

> Warning: Nondistributable artifacts typically have restrictions
> on how and where they can be distributed and shared. Only use this
> feature to push artifacts to private registries and ensure that you
> are in compliance with any terms that cover redistributing
> nondistributable artifacts.
Example : [ "registry.internal.corp.example.com:3000", "[2001:db8:a0b:12f0::1]:443" ]
< string > array
IndexConfigs
optional
Example : {<br> "127.0.0.1:5000" : {<br> "Name" : "127.0.0.1:5000",<br> "Mirrors" : [ ],<br> "Secure" : false,<br> "Official" : false<br> },<br> "[2001:db8:a0b:12f0::1]:80" : {<br> "Name" : "[2001:db8:a0b:12f0::1]:80",<br> "Mirrors" : [ ],<br> "Secure" : false,<br> "Official" : false<br> },<br> "registry.internal.corp.example.com:3000" : {<br> "Name" : "registry.internal.corp.example.com:3000",<br> "Mirrors" : [ ],<br> "Secure" : false,<br> "Official" : false<br> }<br>} < string, IndexInfo > map
InsecureRegistryCIDRs
optional
List of IP ranges of insecure registries, using the CIDR syntax
(RFC 4632). Insecure registries
accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates
from unknown CAs) communication.

By default, local registries (127.0.0.0/8) are configured as
insecure. All other registries are secure. Communicating with an
insecure registry is not possible if the daemon assumes that registry
is secure.

This configuration override this behavior, insecure communication with
registries whose resolved IP address is within the subnet described by
the CIDR syntax.

Registries can also be marked insecure by hostname. Those registries
are listed under IndexConfigs and have their Secure field set to
false.

> Warning: Using this option can be useful when running a local
> registry, but introduces security vulnerabilities. This option
> should therefore ONLY be used for testing purposes. For increased
> security, users should add their CA to their system's list of trusted
> CAs instead of enabling this option.
Example : [ "::1/128", "127.0.0.0/8" ]
< string > array
Mirrors
optional
List of registry URLs that act as a mirror for the official registry.
Example : [ "https://hub-mirror.corp.example.com:5000/", "https://[2001:db8:a0b:12f0::1]/" ]
< string > array

ResizeOptions

options of resizing container tty size

Name Schema
Height
optional
integer
Width
optional
integer

Resources

A container's resources (cgroups config, ulimits, etc)

Name Description Schema
BlkioDeviceReadBps
optional
Limit read rate (bytes per second) from a device, in the form [{"Path": "device_path", "Rate": rate}]. < ThrottleDevice > array
BlkioDeviceReadIOps
optional
Limit read rate (IO per second) from a device, in the form [{"Path": "device_path", "Rate": rate}]. < ThrottleDevice > array
BlkioDeviceWriteBps
optional
Limit write rate (bytes per second) to a device, in the form [{"Path": "device_path", "Rate": rate}]. < ThrottleDevice > array
BlkioDeviceWriteIOps
optional
Limit write rate (IO per second) to a device, in the form [{"Path": "device_path", "Rate": rate}]. < ThrottleDevice > array
BlkioWeight
required
Block IO weight (relative weight), need CFQ IO Scheduler enable.
Minimum value : 0
Maximum value : 1000
integer (uint16)
BlkioWeightDevice
optional
Block IO weight (relative device weight) in the form [{"Path": "device_path", "Weight": weight}]. < WeightDevice > array
CgroupParent
required
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. string
CpuCount
required
The number of usable CPUs (Windows only).
On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is CPUCount first, then CPUShares, and CPUPercent last.
integer (int64)
CpuPercent
required
The usable percentage of the available CPUs (Windows only).
On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is CPUCount first, then CPUShares, and CPUPercent last.
integer (int64)
CpuPeriod
required
CPU CFS (Completely Fair Scheduler) period.
The length of a CPU period in microseconds.
Minimum value : 1000
Maximum value : 1000000
integer (int64)
CpuQuota
required
CPU CFS (Completely Fair Scheduler) quota.
Microseconds of CPU time that the container can get in a CPU period."
Minimum value : 1000
integer (int64)
CpuRealtimePeriod
required
The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. integer (int64)
CpuRealtimeRuntime
required
The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. integer (int64)
CpuShares
required
An integer value representing this container's relative CPU weight versus other containers. integer
CpusetCpus
required
CPUs in which to allow execution (e.g., 0-3, 0,1)
Example : "0-3"
string
CpusetMems
required
Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. string
DeviceCgroupRules
required
a list of cgroup rules to apply to the container < string > array
Devices
optional
A list of devices to add to the container. < DeviceMapping > array
IOMaximumBandwidth
required
Maximum IO in bytes per second for the container system drive (Windows only) integer (uint64)
IOMaximumIOps
required
Maximum IOps for the container system drive (Windows only) integer (uint64)
IntelRdtL3Cbm
required
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. string
KernelMemory
required
Kernel memory limit in bytes. integer (int64)
Memory
required
Memory limit in bytes. integer
MemoryExtra
required
MemoryExtra is an integer value representing this container's memory high water mark percentage.
The range is in [0, 100].
Minimum value : 0
Maximum value : 100
integer (int64)
MemoryForceEmptyCtl
required
MemoryForceEmptyCtl represents whether to reclaim the page cache when deleting cgroup.
Minimum value : 0
Maximum value : 1
integer (int64)
MemoryReservation
required
Memory soft limit in bytes. integer (int64)
MemorySwap
required
Total memory limit (memory + swap). Set as -1 to enable unlimited swap. integer (int64)
MemorySwappiness
required
Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100.
Minimum value : 0
Maximum value : 100
integer (int64)
MemoryWmarkRatio
required
MemoryWmarkRatio is an integer value representing this container's memory low water mark percentage.
The value of memory low water mark is memory.limit_in_bytes * MemoryWmarkRatio. The range is in [0, 100].
Minimum value : 0
Maximum value : 100
integer (int64)
NanoCpus
required
CPU quota in units of 10-9 CPUs. integer (int64)
NvidiaConfig
optional
NvidiaConfig
OomKillDisable
required
Disable OOM Killer for the container. boolean
PidsLimit
required
Tune a container's pids limit. Set -1 for unlimited. Only on Linux 4.4 does this parameter support. integer (int64)
ScheLatSwitch
required
ScheLatSwitch enables scheduler latency count in cpuacct
Minimum value : 0
Maximum value : 1
integer (int64)
Ulimits
optional
A list of resource limits to set in the container. For example: {"Name": "nofile", "Soft": 1024, "Hard": 2048}" < Ulimit > array

RestartPolicy

Define container's restart policy

Name Schema
MaximumRetryCount
optional
integer
Name
optional
string

Runtime

Runtime describes an OCI compliant runtime.

The runtime is invoked by the daemon via the containerd daemon. OCI runtimes act as an interface to the Linux kernel namespaces, cgroups, and SELinux.

Name Description Schema
path
optional
Name and, optional, path, of the OCI executable binary.

If the path is omitted, the daemon searches the host's $PATH for the
binary and uses the first result.
Example : "/usr/local/bin/my-oci-runtime"
string
runtimeArgs
optional
List of command-line arguments to pass to the runtime when invoked.
Example : [ "--debug", "--systemd-cgroup=false" ]
< string > array

SearchResultItem

search result item in search results.

Name Description Schema
description
optional
description just shows the description of this image string
is_automated
optional
is_automated means whether this image is automated. boolean
is_official
optional
is_official shows if this image is marked official. boolean
name
optional
name represents the name of this image string
star_count
optional
star_count refers to the star count of this image. integer

SnapshotterData

Information about a container's snapshotter.

Name Schema
Data
required
< string, string > map
Name
required
string

Status

The status of the container. For example, "running" or "exited".

Type : enum (created, running, stopped, paused, restarting, removing, exited, dead)

SystemInfo

Name Description Schema
Architecture
optional
Hardware architecture of the host, as returned by the Go runtime
(GOARCH).

A full list of possible values can be found in the Go documentation.
Example : "x86_64"
string
CgroupDriver
optional
The driver to use for managing cgroups.
Default : "cgroupfs"
Example : "cgroupfs"
enum (cgroupfs, systemd)
ContainerdCommit
optional
Commit
Containers
optional
Total number of containers on the host.
Example : 14
integer
ContainersPaused
optional
Number of containers with status "paused".
Example : 1
integer
ContainersRunning
optional
Number of containers with status "running".
Example : 3
integer
ContainersStopped
optional
Number of containers with status "stopped".
Example : 10
integer
CriEnabled
optional
Indicates if pouchd has accepted flag --enable-cri and enables cri part.
Default : false
Example : false
boolean
Debug
optional
Indicates if the daemon is running in debug-mode / with debug-level logging enabled.
Example : true
boolean
DefaultRegistry
optional
default registry can be defined by user. string
DefaultRuntime
optional
Name of the default OCI runtime that is used when starting containers.
The default can be overridden per-container at create time.
Default : "runc"
Example : "runc"
string
Driver
optional
Name of the storage driver in use.
Example : "overlay2"
string
DriverStatus
optional
Information specific to the storage driver, provided as
"label" / "value" pairs.

This information is provided by the storage driver, and formatted
in a way consistent with the output of pouch info on the command
line.




> Note: The information returned in this field, including the
> formatting of values and labels, should not be considered stable,
> and may change without notice.
Example : [ [ "Backing Filesystem", "extfs" ], [ "Supports d_type", "true" ], [ "Native Overlay Diff", "true" ] ]
< < string > array > array
ExperimentalBuild
optional
Indicates if experimental features are enabled on the daemon.
Example : true
boolean
HttpProxy
optional
HTTP-proxy configured for the daemon. This value is obtained from the
HTTP_PROXY environment variable.

Containers do not automatically inherit this configuration.
Example : "http://user:pass@proxy.corp.example.com:8080"
string
HttpsProxy
optional
HTTPS-proxy configured for the daemon. This value is obtained from the
HTTPS_PROXY environment variable.

Containers do not automatically inherit this configuration.
Example : "https://user:pass@proxy.corp.example.com:4443"
string
ID
optional
Unique identifier of the daemon.




> Note: The format of the ID itself is not part of the API, and
> should not be considered stable.
Example : "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS"
string
Images
optional
Total number of images on the host.

Both tagged and untagged (dangling) images are counted.
Example : 508
integer
IndexServerAddress
optional
Address / URL of the index server that is used for image search,
and as a default for user authentication.
string
KernelVersion
optional
Kernel version of the host.
On Linux, this information obtained from uname.
string
Labels
optional
User-defined labels (key/value metadata) as set on the daemon.
Example : [ "storage=ssd", "production" ]
< string > array
ListenAddresses
optional
List of addresses the pouchd listens on
Example : [ [ "unix:///var/run/pouchd.sock", "tcp://0.0.0.0:4243" ] ]
< string > array
LiveRestoreEnabled
optional
Indicates if live restore is enabled.
If enabled, containers are kept running when the daemon is shutdown
or upon daemon start if running containers are detected.
Default : false
Example : false
boolean
LoggingDriver
optional
The logging driver to use as a default for new containers. string
LxcfsEnabled
optional
Indicates if lxcfs is enabled.
Default : false
Example : false
boolean
MemTotal
optional
Total amount of physical memory available on the host, in kilobytes (kB).
Example : 2095882240
integer (int64)
NCPU
optional
The number of logical CPUs usable by the daemon.

The number of available CPUs is checked by querying the operating
system when the daemon starts. Changes to operating system CPU
allocation after the daemon is started are not reflected.
Example : 4
integer
Name
optional
Hostname of the host.
Example : "node5.corp.example.com"
string
OSType
optional
Generic type of the operating system of the host, as returned by the
Go runtime (GOOS).

Currently returned value is "linux". A full list of
possible values can be found in the Go documentation.
Example : "linux"
string
OperatingSystem
optional
Name of the host's operating system, for example: "Ubuntu 16.04.2 LTS".
Example : "Alpine Linux v3.5"
string
PouchRootDir
optional
Root directory of persistent Pouch state.

Defaults to /var/lib/pouch on Linux.
Example : "/var/lib/pouch"
string
RegistryConfig
optional
RegistryServiceConfig
RuncCommit
optional
Commit
Runtimes
optional
List of OCI compliant
runtimes configured on the daemon. Keys hold the "name" used to
reference the runtime.

The Pouch daemon relies on an OCI compliant runtime (invoked via the
containerd daemon) as its interface to the Linux kernel namespaces,
cgroups, and SELinux.

The default runtime is runc, and automatically configured. Additional
runtimes can be configured by the user and will be listed here.
Example : {<br> "runc" : {<br> "path" : "pouch-runc"<br> },<br> "runc-master" : {<br> "path" : "/go/bin/runc"<br> },<br> "custom" : {<br> "path" : "/usr/local/bin/my-oci-runtime",<br> "runtimeArgs" : [ "--debug", "--systemd-cgroup=false" ]<br> }<br>}
< string, Runtime > map
SecurityOptions
optional
List of security features that are enabled on the daemon, such as
apparmor, seccomp, SELinux, and user-namespaces (userns).

Additional configuration options for each security feature may
be present, and are included as a comma-separated list of key/value
pairs.
Example : [ "name=apparmor", "name=seccomp,profile=default", "name=selinux", "name=userns" ]
< string > array
ServerVersion
optional
Version string of the daemon.
Example : "17.06.0-ce"
string
VolumeDrivers
optional
The list of volume drivers which the pouchd supports
Example : [ "local", "tmpfs" ]
< string > array

SystemVersion

Name Description Schema
ApiVersion
optional
Api Version held by daemon
Example : ""
string
Arch
optional
Arch type of underlying hardware
Example : "amd64"
string
BuildTime
optional
The time when this binary of daemon is built
Example : "2017-08-29T17:41:57.729792388+00:00"
string
GitCommit
optional
Commit ID held by the latest commit operation
Example : ""
string
GoVersion
optional
version of Go runtime
Example : "1.8.3"
string
KernelVersion
optional
Operating system kernel version
Example : "3.13.0-106-generic"
string
Os
optional
Operating system type of underlying system
Example : "linux"
string
Version
optional
version of Pouch Daemon
Example : "0.1.2"
string

ThrottleDevice

Name Description Schema
Path
optional
Device path string
Rate
optional
Rate
Minimum value : 0
integer (uint64)

ThrottlingData

ThrottlingData stores CPU throttling stats of one running container.

Name Description Schema
periods
optional
Number of periods with throttling active. integer (uint64)
throttled_periods
optional
Number of periods when the container hits its throttling limit. integer (uint64)
throttled_time
optional
Aggregate time the container was throttled for in nanoseconds. integer (uint64)

Ulimit

A list of resource limits

Name Description Schema
Hard
optional
Hard limit integer
Name
optional
Name of ulimit string
Soft
optional
Soft limit integer

UpdateConfig

UpdateConfig holds the mutable attributes of a Container. Those attributes can be updated at runtime.

Polymorphism : Composition

Name Description Schema
BlkioDeviceReadBps
optional
Limit read rate (bytes per second) from a device, in the form [{"Path": "device_path", "Rate": rate}]. < ThrottleDevice > array
BlkioDeviceReadIOps
optional
Limit read rate (IO per second) from a device, in the form [{"Path": "device_path", "Rate": rate}]. < ThrottleDevice > array
BlkioDeviceWriteBps
optional
Limit write rate (bytes per second) to a device, in the form [{"Path": "device_path", "Rate": rate}]. < ThrottleDevice > array
BlkioDeviceWriteIOps
optional
Limit write rate (IO per second) to a device, in the form [{"Path": "device_path", "Rate": rate}]. < ThrottleDevice > array
BlkioWeight
required
Block IO weight (relative weight), need CFQ IO Scheduler enable.
Minimum value : 0
Maximum value : 1000
integer (uint16)
BlkioWeightDevice
optional
Block IO weight (relative device weight) in the form [{"Path": "device_path", "Weight": weight}]. < WeightDevice > array
CgroupParent
required
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. string
CpuCount
required
The number of usable CPUs (Windows only).
On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is CPUCount first, then CPUShares, and CPUPercent last.
integer (int64)
CpuPercent
required
The usable percentage of the available CPUs (Windows only).
On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is CPUCount first, then CPUShares, and CPUPercent last.
integer (int64)
CpuPeriod
required
CPU CFS (Completely Fair Scheduler) period.
The length of a CPU period in microseconds.
Minimum value : 1000
Maximum value : 1000000
integer (int64)
CpuQuota
required
CPU CFS (Completely Fair Scheduler) quota.
Microseconds of CPU time that the container can get in a CPU period."
Minimum value : 1000
integer (int64)
CpuRealtimePeriod
required
The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. integer (int64)
CpuRealtimeRuntime
required
The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. integer (int64)
CpuShares
required
An integer value representing this container's relative CPU weight versus other containers. integer
CpusetCpus
required
CPUs in which to allow execution (e.g., 0-3, 0,1)
Example : "0-3"
string
CpusetMems
required
Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. string
DeviceCgroupRules
required
a list of cgroup rules to apply to the container < string > array
Devices
optional
A list of devices to add to the container. < DeviceMapping > array
DiskQuota
optional
update disk quota for container < string, string > map
Env
optional
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. < string > array
IOMaximumBandwidth
required
Maximum IO in bytes per second for the container system drive (Windows only) integer (uint64)
IOMaximumIOps
required
Maximum IOps for the container system drive (Windows only) integer (uint64)
IntelRdtL3Cbm
required
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. string
KernelMemory
required
Kernel memory limit in bytes. integer (int64)
Label
optional
List of labels set to container. < string > array
Memory
required
Memory limit in bytes. integer
MemoryExtra
required
MemoryExtra is an integer value representing this container's memory high water mark percentage.
The range is in [0, 100].
Minimum value : 0
Maximum value : 100
integer (int64)
MemoryForceEmptyCtl
required
MemoryForceEmptyCtl represents whether to reclaim the page cache when deleting cgroup.
Minimum value : 0
Maximum value : 1
integer (int64)
MemoryReservation
required
Memory soft limit in bytes. integer (int64)
MemorySwap
required
Total memory limit (memory + swap). Set as -1 to enable unlimited swap. integer (int64)
MemorySwappiness
required
Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100.
Minimum value : 0
Maximum value : 100
integer (int64)
MemoryWmarkRatio
required
MemoryWmarkRatio is an integer value representing this container's memory low water mark percentage.
The value of memory low water mark is memory.limit_in_bytes * MemoryWmarkRatio. The range is in [0, 100].
Minimum value : 0
Maximum value : 100
integer (int64)
NanoCpus
required
CPU quota in units of 10-9 CPUs. integer (int64)
NvidiaConfig
optional
NvidiaConfig
OomKillDisable
required
Disable OOM Killer for the container. boolean
PidsLimit
required
Tune a container's pids limit. Set -1 for unlimited. Only on Linux 4.4 does this parameter support. integer (int64)
RestartPolicy
optional
RestartPolicy
ScheLatSwitch
required
ScheLatSwitch enables scheduler latency count in cpuacct
Minimum value : 0
Maximum value : 1
integer (int64)
Ulimits
optional
A list of resource limits to set in the container. For example: {"Name": "nofile", "Soft": 1024, "Hard": 2048}" < Ulimit > array

VolumeCreateConfig

config used to create a volume

Name Description Schema
Driver
optional
Name of the volume driver to use.
Default : "local"
string
DriverOpts
optional
A mapping of driver options and values. These options are passed directly to the driver and are driver specific. < string, string > map
Labels
optional
User-defined key/value metadata. < string, string > map
Name
optional
The new volume's name. If not specified, Pouch generates a name. string

VolumeInfo

Volume represents the configuration of a volume for the container.

Name Description Schema
CreatedAt
optional
Date/Time the volume was created. string (dateTime)
Driver
optional
Driver is the Driver name used to create the volume. string
Labels
optional
Labels is metadata specific to the volume. < string, string > map
Mountpoint
optional
Mountpoint is the location on disk of the volume. string
Name
optional
Name is the name of the volume. string
Scope
optional
Scope describes the level at which the volume exists
(e.g. global for cluster-wide or local for machine level)
string
Status
optional
Status provides low-level status information about the volume. < string, object > map

VolumeListResp

Name Description Schema
Volumes
required
List of volumes < VolumeInfo > array
Warnings
required
Warnings that occurred when fetching the list of volumes < string > array

WeightDevice

Weight for BlockIO Device

Name Description Schema
Path
optional
Weight Device string
Weight
optional
Minimum value : 0 integer (uint16)