elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.65k stars 8.23k forks source link

[Fleet] Remove deprecated APIs, parameters, and response properties from Fleet API #189746

Closed kpollich closed 1 week ago

kpollich commented 3 months ago

These are breaking changes for 9.0

The following API operations, request parameters, and response properties are deprecated, and should be removed in 9.0

Endpoints to remove

Endpoint Deprecated version + PR Telemetry (last 4 weeks) Notes Removal PR
POST /service-tokens 8.0.0 - https://github.com/elastic/kibana/pull/121091 1 request from a cluster on 8.5.3 Deprecated in favor of POST /service_tokens (underscore) https://github.com/elastic/kibana/pull/198313
GET /agent-status 8.0.0 - https://github.com/elastic/kibana/pull/121091 18868 requests all on 7.x Deprecated in favor of GET /agent_status (underscore) https://github.com/elastic/kibana/pull/198313
PUT /agents/:agentid/reassign 8.8.0 - https://github.com/elastic/kibana/pull/152236 2 requests from 8.13.4 clusters PUT verb deprecated in favor of POST https://github.com/elastic/kibana/pull/198313
GET/POST/DELETE /epm/packages/:pkgkey 8.0.0 - https://github.com/elastic/kibana/pull/121091 N/A - wildcard query errors out in CCS Deprecated in favor of corresponding /epm/packages/:pkgname/:pkgversion endpoints (slash delimiter for name/version) https://github.com/elastic/kibana/pull/198434
GET/POST/DELETE /enrollment-api-keys/* 8.0.0 - https://github.com/elastic/kibana/pull/121091 950997 requests mainly from 8.13.x + 8.14.x clusters Deprecated in favor of /enrollment_api_keys (underscores) https://github.com/elastic/kibana/pull/198799

Query parameters to remove

Endpoint Query parameter Deprecated version + PR Notes Removal PR
GET /epm/categories ?experimental 8.6.0 - https://github.com/elastic/kibana/pull/143853 https://github.com/elastic/kibana/pull/198434
GET /epm/packages/ ?experimental 8.7.0 - https://github.com/elastic/kibana/pull/150743 https://github.com/elastic/kibana/pull/198434
GET /agent_status ?kuery 8.9.0 - https://github.com/elastic/kibana/pull/159095 Will not be removed deprecated by error
Usage across many endpoints. All should be removed. ?sort_field 8.9.0 - https://github.com/elastic/kibana/pull/159095 Supported by many endpoints today

Request/response properties to remove

Endpoint Request/Response Property Deprecated version + PR Notes Removal PR
DELETE /epm/packages/:pkgname/:pkgversion Entire request body 8.11.0 - https://github.com/elastic/kibana/pull/166623 https://github.com/elastic/kibana/pull/198434
POST /health_check host in request + response 8.15.0 - https://github.com/elastic/kibana/pull/185014 Recent deprecation https://github.com/elastic/kibana/pull/198799
GET /epm/packages/:pkgname/:pkgversion savedObject + release in response 8.9.0 - https://github.com/elastic/kibana/pull/159095 https://github.com/elastic/kibana/pull/198434
GET /agent_status total in response 8.8.0 - https://github.com/elastic/kibana/pull/151564 https://github.com/elastic/kibana/pull/198313
GET /enrollment_api_keys/ list in response 8.0.0 - https://github.com/elastic/kibana/pull/119494
POST /settings fleet_server_hosts in response 8.6.0 - https://github.com/elastic/kibana/pull/145005 https://github.com/elastic/kibana/pull/198799
POST /epm/bulk_assets Entire response body 8.9.0 - https://github.com/elastic/kibana/pull/158350
GET /epm/categories response in response 8.0.0 - https://github.com/elastic/kibana/pull/121091 https://github.com/elastic/kibana/pull/198434
GET /epm/packages response in response 8.0.0 - https://github.com/elastic/kibana/pull/121091 https://github.com/elastic/kibana/pull/198434
GET /epm/packages saved_object in response 8.9.0 - https://github.com/elastic/kibana/pull/159095 https://github.com/elastic/kibana/pull/198434
GET /agents list in response 8.0.0 - https://github.com/elastic/kibana/pull/121091 https://github.com/elastic/kibana/pull/198313
POST/PUT /packages_policies policy_id in response 8.15.0 - https://github.com/elastic/kibana/pull/184636 Recent deprecation
GET/POST/PUT /settings/outputs topics in response 8.13.0 - https://github.com/elastic/kibana/pull/177229 Recent deprecation https://github.com/elastic/kibana/pull/199226
elasticmachine commented 3 months ago

Pinging @elastic/fleet (Team:Fleet)

criamico commented 3 months ago

Not sure if it should be part of this ticket, but we also have some deprecations in fleet/server/config: https://github.com/elastic/kibana/blob/d9c1f9702b5dd426f19d2faf877fe183c0e93859/x-pack/plugins/fleet/server/config.ts#L52

criamico commented 3 months ago

We also have an older ticket where we tracked some of the API deprecations: https://github.com/elastic/kibana/issues/121485

I don't see some of them (like the output_id property inpackage_policies) listed here so we should to take a look at it as well.

kpollich commented 3 months ago

The list should be accurate now based on all deprecated notices in https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/common/openapi/bundled.yaml

kpollich commented 1 month ago

This is going to require a new API version for serverless.

kpollich commented 2 weeks ago

Reopening since the private breaking change committee issue will be closed at some point to indicate the changes are approved.

nchaulet commented 2 weeks ago

@criamico I have a question regarding removing sortField it seems it's not marked as deprecated in the schema generated open API, and it's used by our UI, do we have a better option for that property? or should we skip that removal?

nchaulet commented 1 week ago

I think we can close this one, all API removal PRs have been merged, except for: