Get service details
GET/node/:hostname/service/:name
Get detailed information about a specific service on the target node.
Request
Path Parameters
Possible values: non-empty
Target agent hostname, reserved routing value (_any, _all), or label selector (key:value).
Possible values: non-empty
Service unit name (e.g., nginx, sshd).
Responses
- 200
- 400
- 401
- 403
- 404
- 500
Service detail.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
The job ID used to process this request.
results
object[]
required
Hostname of the agent that reported this entry.
Possible values: [ok, failed, skipped]
The status of the operation for this host.
service
object
Information about a systemd service.
Service unit name.
Active status of the service.
Whether the service is enabled to start on boot.
Service description from the unit file.
Main process ID of the service.
Error message if the agent failed.
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"results": [
{
"hostname": "string",
"status": "ok",
"service": {
"name": "nginx",
"status": "active",
"enabled": true,
"description": "A high performance web server",
"pid": 1234
},
"error": "string"
}
]
}
Bad request - validation error.
- 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
}
Service not found.
- 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 getting service.
- 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
}