List containers
GET/node/:hostname/container/docker
List containers on the target node, optionally filtered by state.
Request
Path Parameters
Possible values: non-empty
Target agent hostname, reserved routing value (_any, _all), or label selector (key:value).
Query Parameters
Possible values: [running, stopped, all]
Default value: all
Filter containers by state. Defaults to "all".
Possible values: >= 1 and <= 100
Default value: 20
Maximum number of containers to return.
Responses
- 200
- 400
- 401
- 403
- 500
List of containers.
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
]
]
The job ID used to process this request.
results
object[]
required
The hostname of the agent.
containers
object[]
List of containers on this agent.
Container identifier.
Container name.
Image used by the container.
Current container state.
Container creation timestamp.
Whether the operation modified system state.
Error message if the agent failed.
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"results": [
{
"hostname": "string",
"containers": [
{
"id": "a1b2c3d4e5f6",
"name": "my-nginx",
"image": "nginx:latest",
"state": "running",
"created": "2024-01-15T10:30:00Z"
}
],
"changed": true,
"error": "string"
}
]
}
Invalid request parameters.
- application/json
- Schema
- Example (from schema)
Schema
A description of the error that occurred.
Additional details about the error.
The error code.
{
"error": "Failed to retrieve status.",
"details": "Failed due to network timeout.",
"code": 500
}
Unauthorized - API key required
- application/json
- Schema
- Example (from schema)
Schema
A description of the error that occurred.
Additional details about the error.
The error code.
{
"error": "Failed to retrieve status.",
"details": "Failed due to network timeout.",
"code": 500
}
Forbidden - Insufficient permissions
- application/json
- Schema
- Example (from schema)
Schema
A description of the error that occurred.
Additional details about the error.
The error code.
{
"error": "Failed to retrieve status.",
"details": "Failed due to network timeout.",
"code": 500
}
Error listing containers.
- application/json
- Schema
- Example (from schema)
Schema
A description of the error that occurred.
Additional details about the error.
The error code.
{
"error": "Failed to retrieve status.",
"details": "Failed due to network timeout.",
"code": 500
}