-
Notifications
You must be signed in to change notification settings - Fork 0
List Containers
Sharmarke Aden edited this page May 17, 2014
·
7 revisions
| URI | Method | Consumes | HTTP Status | Produces |
|---|---|---|---|---|
| /containers | GET | 200 / 400 | application/json |
| Name | Type | Default | Description |
|---|---|---|---|
| all | boolean | false | Show all containers |
| limit | boolean | false | Show last created |
| since | string (container id) | "" | Show only containers created since Id, including non-running |
| before | string (container id) | "" | Show only containers created before Id, including non-running |
| size | boolean | false | Show container sizes |
{
"type": "array",
"required": false,
"items": {
"type": "object",
"required": false,
"properties": {
"Command": {
"type": "string",
"required": false
},
"Created": {
"type": "number",
"required": true
},
"Id": {
"type": "string",
"required": true
},
"Image": {
"type": "string",
"required": true
},
"Ports": {
"type": "array",
"required": false,
"items": {
"type": "object",
"required": false,
"properties": {
"PrivatePort": {
"type": "number",
"required": true
},
"PublicPort": {
"type": "number",
"required": true
},
"Type": {
"type": "string",
"required": true
}
}
}
},
"SizeRootFs": {
"type": "number",
"required": true
},
"SizeRw": {
"type": "number",
"required": true
},
"Status": {
"type": "string",
"required": true
}
}
}
}GET /containers
Headers
Accept: application/json
Content-Type : application/json
Status: 200 (OK)
[
{
"Id": "8dfafdbc3a40",
"Image": "base:latest",
"Command": "echo 1",
"Created": 1367854155,
"Status": "Exit 0",
"Ports": [{
"PrivatePort": 2222,
"PublicPort": 3333,
"Type": "tcp"
}],
"SizeRw": 12288,
"SizeRootFs": 0
},
{
"Id": "9cd87474be90",
"Image": "base:latest",
"Command": "echo 222222",
"Created": 1367854155,
"Status": "Exit 0",
"Ports": [],
"SizeRw": 12288,
"SizeRootFs": 0
}
]GET /containers?all=tank
Headers
Accept: application/json
Content-Type : application/json
Status: 400 (Bad Request)
{
"Error": "Message ...."
}