Retrieve disk usage
GET/api/node/:hostname/disk
Get disk usage information for the target node.
Request
Path Parameters
Possible values: non-empty
Target agent hostname, reserved routing value (_any, _all), or label selector (key:value).
Responses
- 200
- 400
- 401
- 403
- 500
Disk usage information.
- 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.
Possible values: [ok, failed, skipped]
The status of the operation for this host.
disks
object[]
List of local disk usage information.
Disk identifier, e.g., "/dev/sda1".
Total disk space in bytes.
Used disk space in bytes.
Free disk space in bytes.
Whether the operation modified system state.
Error message if the agent failed.
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"results": [
{
"hostname": "string",
"status": "ok",
"disks": [
{
"name": "/dev/sda1",
"total": 500000000000,
"used": 250000000000,
"free": 250000000000
}
],
"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 retrieving disk usage.
- 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
}