To not introduce any breaking changes or changes in the behavior of Rules and Connectors APIs when upgrading Kibana, we need to do changes in our endpoints. The needed steps to achieve this goal are described in the following section.
Steps
Disconnect API Interface with SO Attributes
The goal of this step is to isolate the SO attributes from the HTTP APIs. Any change in our SO attributes should not reflect a change in our API interfaces. To do that we need to
[ ] Create types for domain objects
[ ] Create TS interfaces/types for SOs and HTTP routes even if they are the same. Types for SOs should be in the server directory
[ ] Explicitly map the SO attributes to the response and vice-versa even if they are the same. No more spreading
APIs:
Rules:
[x] POST /api/alerts/alert/{id?} -> LEGACY -> We won't do anything
[x] POST /api/alerts/_find -> LEGACY -> We won't do anything
[x] GET /api/alerts/alert/{id} -> LEGACY-> We won't do anything
[x] PUT /api/alerts/alert/{id} -> LEGACY -> We won't do anything
[x] POST /internal/alerting/rules/maintenance_window/{id}/_archive (archive, maybe this should be archive/unarchive, 2 routes) -> @JiaweiWu https://github.com/elastic/kibana/pull/162446
To not introduce any breaking changes or changes in the behavior of Rules and Connectors APIs when upgrading Kibana, we need to do changes in our endpoints. The needed steps to achieve this goal are described in the following section.
Steps
Disconnect API Interface with SO Attributes
The goal of this step is to isolate the SO attributes from the HTTP APIs. Any change in our SO attributes should not reflect a change in our API interfaces. To do that we need to
APIs:
Rules:
Rule Settings:
Maintenance Windows: