In https://github.com/elastic/fleet-server/pull/3818, we introduced a new Fleet Server API, POST /api/fleet/agents/:id/audit/unenroll. When called by Agent, this API records a new audit_unenrolled_reason field in .fleet-agents documents.
It would be convenient if the GET /api/fleet/agents/:id API returned this audit_unenrolled_reason field in its response body.
Describe the feature:
In https://github.com/elastic/fleet-server/pull/3818, we introduced a new Fleet Server API,
POST /api/fleet/agents/:id/audit/unenroll
. When called by Agent, this API records a newaudit_unenrolled_reason
field in.fleet-agents
documents.It would be convenient if the
GET /api/fleet/agents/:id
API returned thisaudit_unenrolled_reason
field in its response body.Describe a specific use case for the feature:
For writing E2E tests (see https://github.com/elastic/elastic-agent/pull/5302/files#r1738582241) and potentially for displaying in the Fleet UI.