CE-2875: Fetch host status in a separate endpoint
A new endpoint has been added, [GET] /hosts/{host_id}/status (Hosts.findHostStatus), which queries the host status information and can be used to asynchronously query the host's status.
The response schema is:
{
"assigned": true,
"status": "AVAILABLE",
"alerts": [
{
"type": "ERROR",
"message": "string",
"link": "string"
}
]
}
For simplicity, I have wrapped these fields into DTO in the host detail response (Hosts.findHostWithStatusById) as well, so its response schema has changed to this:
{
"netBoxHost": {
"id": 0,
"fqdn": "string",
"name": "string",
"scope": "string",
"description": "string",
"network": "string",
"deviceType": "string",
"tags": [
"string"
],
"hostId": "string",
"vm": true
},
"status": {
"assigned": true,
"status": "AVAILABLE",
"alerts": [
{
"type": "ERROR",
"message": "string",
"link": "string"
}
]
}
}
Closes CE-2875