[Fleet] Remove deprecated APIs for agents endpoints#198313
[Fleet] Remove deprecated APIs for agents endpoints#198313nchaulet merged 30 commits intoelastic:mainfrom
Conversation
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --update'
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --update'
…kibana into feature-remove-deprecated-apis
|
Pinging @elastic/fleet (Team:Fleet) |
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --update'
|
@criamico @juliaElastic it seems |
gergoabraham
left a comment
There was a problem hiding this comment.
@elastic/security-defend-workflows relevant changes: active is used instead of the now removed total from the response of GET /agent_status, and based on the code snippet below, they are the same, so the related changes look good! thanks for updating the code 🙌
kibana/x-pack/plugins/fleet/server/services/agents/status.ts
Lines 166 to 177 in 7dea07f
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --update'
As discussed in slack, this deprecation was firstly introduced as preliminary work for #161064, but it was then decided to keep the kuery parameter, as highlighted in the PR description. This deprecation was then mistakenly kept, but seeing that it's still used and useful I think it's ok to keep it. |
|
@elasticmachine merge upstream |
| withMetrics: displayAgentMetrics, | ||
| }), | ||
| sendGetAgentStatus({ | ||
| sendGetAgents({ |
There was a problem hiding this comment.
As we are not going to deprecate usage of kuery in agent_status, is this change still needed? Or you prefer to change it anyway?
There was a problem hiding this comment.
I will remove those changes 👍
| // if selection is a query, do an api call to get updating agents | ||
| try { | ||
| const res = await sendGetAgentStatus({ | ||
| const res = await sendGetAgentsQuery({ |
maxcold
left a comment
There was a problem hiding this comment.
cloud_defend and cloud_security_posture changes lgtm
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --update'
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
cc @nchaulet |
Summary
Related to #189746
Remove API endpoints
POST /service-tokensin favor ofPOST /service_tokensGET /agent-statusin favorGET /agent_statusPUT /agents/:agentid/reassignin favor ofPOST /agents/:agentid/reassignRemove deprecated parameters or response
totalfromGET /agent_statusresponselistfromGET /agentsresponseOur UI was still consuming the
totalfield in some places, I made the changes to not use anymore, this could cause some errors during the upgrade if two kibana version are running but it seems code handle that missing field well.To keep those removal PR readable and easy to review I will do separate similar PR for epm endpoints and enrollment api keys endpoints
Did some manual testing of Fleet, nothing seems to be broken and looking at telemetry those deletions seems relatively safe.