-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create new alerting HTTP APIs that use the new terminology #93977
Conversation
* Move current HTTP APIs to legacy folder * Rename BASE_ALERT_API_PATH to LEGACY_BASE_ALERT_API_PATH * Fix failing tests and extra files
3a69fd8
to
09e8a3b
Compare
* Move current HTTP APIs to legacy folder * Rename BASE_ALERT_API_PATH to LEGACY_BASE_ALERT_API_PATH * Fix failing tests and extra files * Move current alert HTTP APIs to legacy folder (#93943) * Move current HTTP APIs to legacy folder * Rename BASE_ALERT_API_PATH to LEGACY_BASE_ALERT_API_PATH * Fix failing tests and extra files * Add necessary files * Create rule route * Get rule API * Update rule API * Delete rule route * Aggregate rules API * Disable rule API * Enable rule API * Find rules API * Fix Update API * Get rule alert summary API * Get rule state API * Health API * Rule types API * Mute all API * Mute alert API * Unmute all API * Unmute alert route * Update API key API * corrected tpye by making it much more complicated * removed unneeded cocde * Fixes * Add back health route * mutedInstanceIds -> mutedAlertIds * lastRun -> last_run * alert_type_state -> rule_type_state & alert_instances -> alerts Co-authored-by: Gidi Meir Morris <[email protected]>
@elasticmachine merge upstream |
* Create docs for new APIs, deprecate old docs * Remove connector_type_id * Update docs * Add link to legacy APIs from rules API docs * Remove connector_type_id references * [DOCS] Add legacy APIs to index.asciidoc * Fix camel case Co-authored-by: lcawl <[email protected]>
* Make API integration tests use new HTTP APIs * Fix end to end tests * Fix test failures * Fix more test failures * Rename some files
…bana into alerting/http-api-terminology
@gchaps the doc changes are ready for review (preview link in description). The summary of the changes are captured in the following PR descriptions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the Deprecated APIs section, I'd use this as the warning.
Deprecated in 7.13.0. Use Create rule instead.
Note: remove "the" before the API name.
* Initial commit * Update README.md * Use internal API
@elasticmachine merge upstream |
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, since the PR contains the changes from a reviewed PRs!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs look good to me. In the title "Deprecated 7.x APIs", will readers know what 7.x refers to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @mikecote |
💔 Backport failed❌ 7.x: Commit could not be cherrypicked due to conflicts To backport manually run: |
…3977) * Move current alert HTTP APIs to legacy folder (elastic#93943) * Move current HTTP APIs to legacy folder * Rename BASE_ALERT_API_PATH to LEGACY_BASE_ALERT_API_PATH * Fix failing tests and extra files * Create new rule HTTP APIs (elastic#93980) * Move current HTTP APIs to legacy folder * Rename BASE_ALERT_API_PATH to LEGACY_BASE_ALERT_API_PATH * Fix failing tests and extra files * Move current alert HTTP APIs to legacy folder (elastic#93943) * Move current HTTP APIs to legacy folder * Rename BASE_ALERT_API_PATH to LEGACY_BASE_ALERT_API_PATH * Fix failing tests and extra files * Add necessary files * Create rule route * Get rule API * Update rule API * Delete rule route * Aggregate rules API * Disable rule API * Enable rule API * Find rules API * Fix Update API * Get rule alert summary API * Get rule state API * Health API * Rule types API * Mute all API * Mute alert API * Unmute all API * Unmute alert route * Update API key API * corrected tpye by making it much more complicated * removed unneeded cocde * Fixes * Add back health route * mutedInstanceIds -> mutedAlertIds * lastRun -> last_run * alert_type_state -> rule_type_state & alert_instances -> alerts Co-authored-by: Gidi Meir Morris <[email protected]> * Create docs for new rule HTTP APIs, deprecate old docs (elastic#94745) * Create docs for new APIs, deprecate old docs * Remove connector_type_id * Update docs * Add link to legacy APIs from rules API docs * Remove connector_type_id references * [DOCS] Add legacy APIs to index.asciidoc * Fix camel case Co-authored-by: lcawl <[email protected]> * Make alerting tests use new rules APIs (elastic#95159) * Make API integration tests use new HTTP APIs * Fix end to end tests * Fix test failures * Fix more test failures * Rename some files * Add tests for legacy APIs (elastic#95333) * Initial commit (elastic#95457) * Move some new alerting APIs to /internal (elastic#95461) * Initial commit * Update README.md * Use internal API * Merge deprecated warning w/ alternative solution * Update API docs Co-authored-by: Gidi Meir Morris <[email protected]> Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: lcawl <[email protected]> # Conflicts: # api_docs/core.json
…95781) * Move current alert HTTP APIs to legacy folder (#93943) * Move current HTTP APIs to legacy folder * Rename BASE_ALERT_API_PATH to LEGACY_BASE_ALERT_API_PATH * Fix failing tests and extra files * Create new rule HTTP APIs (#93980) * Move current HTTP APIs to legacy folder * Rename BASE_ALERT_API_PATH to LEGACY_BASE_ALERT_API_PATH * Fix failing tests and extra files * Move current alert HTTP APIs to legacy folder (#93943) * Move current HTTP APIs to legacy folder * Rename BASE_ALERT_API_PATH to LEGACY_BASE_ALERT_API_PATH * Fix failing tests and extra files * Add necessary files * Create rule route * Get rule API * Update rule API * Delete rule route * Aggregate rules API * Disable rule API * Enable rule API * Find rules API * Fix Update API * Get rule alert summary API * Get rule state API * Health API * Rule types API * Mute all API * Mute alert API * Unmute all API * Unmute alert route * Update API key API * corrected tpye by making it much more complicated * removed unneeded cocde * Fixes * Add back health route * mutedInstanceIds -> mutedAlertIds * lastRun -> last_run * alert_type_state -> rule_type_state & alert_instances -> alerts Co-authored-by: Gidi Meir Morris <[email protected]> * Create docs for new rule HTTP APIs, deprecate old docs (#94745) * Create docs for new APIs, deprecate old docs * Remove connector_type_id * Update docs * Add link to legacy APIs from rules API docs * Remove connector_type_id references * [DOCS] Add legacy APIs to index.asciidoc * Fix camel case Co-authored-by: lcawl <[email protected]> * Make alerting tests use new rules APIs (#95159) * Make API integration tests use new HTTP APIs * Fix end to end tests * Fix test failures * Fix more test failures * Rename some files * Add tests for legacy APIs (#95333) * Initial commit (#95457) * Move some new alerting APIs to /internal (#95461) * Initial commit * Update README.md * Use internal API * Merge deprecated warning w/ alternative solution * Update API docs Co-authored-by: Gidi Meir Morris <[email protected]> Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: lcawl <[email protected]> # Conflicts: # api_docs/core.json
Resolves #90377
Resolves #85639
This PR creates new alerting HTTP APIs that use the terminology and deprecates the existing alert APIs.
The new HTTP APIs are as follows:
POST /api/alerting/rule/<id>
GET /api/alerting/rule/<id>
PUT /api/alerting/rule/<id>
DELETE: /api/alerting/rule/<id>
POST /api/alerting/rule/<id>/_disable
POST /api/alerting/rule/<id>/_enable
GET /api/alerting/rules/_find
GET /api/alerting/_health
GET /api/alerting/rule_types
POST /api/alerting/rule/<rule_id>/alert/<alert_id>/_mute
POST /api/alerting/rule/<rule_id>/alert/<alert_id>/_unmute
POST /api/alerting/rule/<id>/_mute_all
POST /api/alerting/rule/<id>/_unmute_all
Sub-PRs merged into this feature branch:
BASE_ALERT_API_PATH
toLEGACY_BASE_ALERT_API_PATH
legacy
subfolderdefineRoutes
function to define all alerting routesdefineLegacyRoutes
function to define all legacy alerting routes/legacy
[[...]]
to follow best practice by keeping it all lower case and follow the heading text. (they determine the URL path to the doc like:/create-rule-api.html
)create
->create_rule
)/internal
Move some new alerting APIs to /internal #95461/api/alerting/rules/_aggregate
to/internal/alerting/rules/_aggregate
/api/alerting/rule/{id}/_alert_summary
to/internal/alerting/rule/{id}/_alert_summary
/api/alerting/rule/{id}/state
to/internal/alerting/rule/{id}/state
/api/alerting/rule/{id}/_update_api_key
to/internal/alerting/rule/{id}/_update_api_key
Docs preview: https://kibana_93977.docs-preview.app.elstc.co/guide/en/kibana/master/index.html
Release Notes
The
/api/alerts/*
APIs are deprecated and will be removed in 8.0. Use one of the new/api/alerting/*
APIs.