Skip to content

Add specs for alerting namespace - #1186

Open
xluo-aws wants to merge 3 commits into
opensearch-project:mainfrom
xluo-aws:add-alerting-namespace-spec-221
Open

Add specs for alerting namespace#1186
xluo-aws wants to merge 3 commits into
opensearch-project:mainfrom
xluo-aws:add-alerting-namespace-spec-221

Conversation

@xluo-aws

@xluo-aws xluo-aws commented Aug 6, 2026

Copy link
Copy Markdown
Member

Description

Adds OpenAPI specs for the Alerting plugin's REST API (spec/namespaces/alerting.yaml and spec/schemas/alerting._common.yaml), covering the endpoints listed in #221:

  • Monitors: create, get (+ exists), update, delete, search, execute (by ID and ad hoc)
  • Alerts: get, acknowledge
  • Findings: search
  • Destinations: get one/all (marked deprecated in favor of the Notifications plugin's channels, per the docs)
  • Email accounts and email groups: get (+ exists), search
  • Scheduled-job stats

The pre-existing _opendistro -> _plugins superseded-operation entries for alerting in spec/_superseded_operations.yaml used path parameter names (monitorID, emailAccountID, emailGroupID, destinationID, nodeId, metric) that didn't match the new namespace file's parameter names. I updated the superseded_by values so the merger correctly generates the legacy _opendistro/_alerting/* aliases.

Note: POST /_plugins/_alerting/destinations, update, and delete were intentionally left out since destinations were deprecated in OpenSearch 2.0 in favor of the Notifications plugin, and the plugin's write REST handlers for destinations were removed. The read APIs remain (and are specced here) for backwards compatibility.

Issues Resolved

Closes #221

Testing

  • npm run lint:spec - no errors
  • npm run merge - merges cleanly, no new warnings
  • npm run lint - no errors
  • npm run test:unit - 198 passed, 2 todo
  • Validated the merged spec with the Python openapi-spec-validator and the Ruby json_schemer validators used by the Validate Spec (Python) and Validate Spec (Ruby) CI workflows

Check List

  • New functionality includes testing
  • New functionality has been documented if needed
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@xluo-aws xluo-aws changed the title Add specs for alerting namespace Add specs for alerting namespace -Draft Aug 6, 2026
@xluo-aws xluo-aws changed the title Add specs for alerting namespace -Draft Add specs for alerting namespace Aug 6, 2026
Add OpenAPI specs for the Alerting plugin's REST API, covering:
- Monitor create, get, update, delete, search, and execute
- Alert get and acknowledge
- Finding search
- Destination get (deprecated, kept for backwards compatibility)
- Email account and email group get, exists, and search
- Scheduled-job stats

Update the pre-existing opendistro-to-plugins superseded operation
entries for alerting to use the same path parameter names as the new
namespace file, since the merger substitutes parameter names from
`superseded_by` when generating the legacy `_opendistro` aliases.

Closes opensearch-project#221

Signed-off-by: Xuesong Luo <lxuesong@amazon.com>
@xluo-aws
xluo-aws force-pushed the add-alerting-namespace-spec-221 branch from dbb79c6 to 1208986 Compare August 6, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add specs for alerting namespace

1 participant