Containers
The /list/:cluster/containers endpoint of Dashium API allows you to retrieve the list of Docker containers for a specific cluster.
Use this route to fetch details about all containers, including those currently running.
Endpointβ
- Path:
/list/:cluster/containers - Method:
GET - Parameters:
:cluster(Name of the Docker cluster)
Responseβ
The response of this route includes a complete list of all containers, as well as a sublist of those currently running.
{
"containers": [
{
"Id": "CONTAINER_ID",
"Names": [
"/CONTAINER_NAME"
],
"Image": "CONTAINER_IMAGE",
"ImageID": "CONTAINER_IMAGE_ID",
"Command": "CONTAINER_CMD",
"Created": "CONTAINER_CREATED_DATE",
"Ports": [
{
"PrivatePort": 80,
"Type": "tcp"
}
],
"Labels": {
// ... ALL LABELS
},
"State": "running",
"Status": "Up 5 hours",
"HostConfig": {
"NetworkMode": "default"
},
"NetworkSettings": {
"Networks": {
"ingress": {
"IPAMConfig": {
"IPv4Address": "CONTAINER_IPv4"
},
"Links": null,
"Aliases": null,
"NetworkID": "NETWORK_ID",
"EndpointID": "ENDPOINT_ID",
"Gateway": "",
"IPAddress": "IP_ADDRESS",
"IPPrefixLen": 24,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "CONTAINER_MACADDRESS",
"DriverOpts": null
}
}
},
"Mounts": []
},
{
// Details of the second container
},
// ...
],
"running": [
{
// Details of the running container
},
// ...
]
}
Usage Exampleβ
Make a GET request to this route replacing :cluster with the name of the Docker cluster you want to query.
curl -X GET https://your-dashium-api.com/list/your-cluster/containers
Upon success, you'll receive a detailed JSON response detailing the containers.