Combined Insights alerts OpenAPI: alert rules, alert instances, and notification channels - #1246
Merged
kishlay-singh-DO merged 15 commits intoOct 1, 2026
Conversation
Document public CRUD for /v2/insights/alert-rules against the api-service contract and Edge scopes from COBS-1287. Co-authored-by: Cursor <cursoragent@cursor.com>
Match staging: protobuf omitempty drops total when zero. Co-authored-by: Cursor <cursoragent@cursor.com>
Use lowercase enums, duration strings, links/meta list envelope, and dotted OTel metric guidance from the Alerts Public Insights API RFC. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Adds the read-only Insights alert instances endpoints:
- GET /v2/insights/alert-instances (list; filters: status, rule_id,
resource_urn; standard page/per_page pagination with links/meta envelope)
- GET /v2/insights/alert-instances/{id}
Spec follows the agreed Alerts Public Insights API contract: snake_case
fields, lowercase enums (severity: warning|critical, status:
active|resolved), RFC 3339 timestamps, uuid identifiers, and the standard
DO list envelope via shared pages/meta components. Scope: insights:read,
matching the staging Edge routing for COBS-1287.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Add Insights to x-tagGroups so the section renders in Redoc. - Document that alert instances are ordered by triggered_at DESC and note the offset-pagination stability caveat on an append-only list. - Mark alert_instance.resource_urn as optional and describe when it may be empty (non-resource-bound signals, e.g. cluster/pod/namespace- scoped Kubernetes alerts; see optionalResourceURN in executioner/pkg/alertrule/store.go). Co-authored-by: Cursor <cursoragent@cursor.com>
Document the Prometheus-compatible query surface published at /v2/insights/query/{region}/prom/api/v1/*: instant query, range query, label names, label values, and series. GET and POST variants are documented where the public Edge routes accept both; every operation requires the insights:read scope.
Only the publicly routed endpoints are included -- metadata, format_query, and parse_query stay internal.
kishlay-singh-DO
approved these changes
Oct 1, 2026
kishlay-singh-DO
left a comment
Contributor
There was a problem hiding this comment.
For pydo we will need to make fix for the four methods that are there because AutoRest's Python generator does not implement application/x-www-form-urlencoded operations. It marks them abstract and emits raise_if_not_implemented for post_prom_query, post_prom_query_range, post_prom_labels, and post_prom_series.
atalluri-do
force-pushed
the
combined-insights-alerts
branch
from
October 1, 2026 17:10
9a29b6a to
c14840e
Compare
kishlay-singh-DO
merged commit Oct 1, 2026
6b51ace
into
digitalocean:insights_v2
5 of 6 checks passed
kishlay-singh-DO
added a commit
that referenced
this pull request
Oct 1, 2026
* Cobs 1289 insights notification channels (#1241) * Add OpenAPI for Insights notification channels (COBS-1289) Document public CRUD for /v2/insights/notification-channels against the api-service contract and Edge scopes from COBS-1287. Co-authored-by: Cursor <cursoragent@cursor.com> * Remove PagerDuty from Insights notification channels OpenAPI Omit unsupported pagerduty channel type/config from the public spec. Co-authored-by: Cursor <cursoragent@cursor.com> * Align Insights notification-channels OpenAPI with public RFC contract Use lowercase channel types, write-only/masked secrets, and page/per_page defaults from the Alerts Public Insights API RFC. Co-authored-by: Cursor <cursoragent@cursor.com> * Document notification channel proto enum values Co-authored-by: Cursor <cursoragent@cursor.com> * Add notification channel enum references Co-authored-by: Cursor <cursoragent@cursor.com> * Address notification channels API review feedback Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Devender Mamidala <dmamidala@digitalocean.com> Co-authored-by: Cursor <cursoragent@cursor.com> * Combined Insights alerts OpenAPI: alert rules, alert instances, and notification channels (#1246) * Add OpenAPI for Insights alert rules (COBS-1290) Document public CRUD for /v2/insights/alert-rules against the api-service contract and Edge scopes from COBS-1287. Co-authored-by: Cursor <cursoragent@cursor.com> * Fix Insights alert-rules pagination total optionality Match staging: protobuf omitempty drops total when zero. Co-authored-by: Cursor <cursoragent@cursor.com> * Align Insights alert-rules OpenAPI with public RFC contract Use lowercase enums, duration strings, links/meta list envelope, and dotted OTel metric guidance from the Alerts Public Insights API RFC. Co-authored-by: Cursor <cursoragent@cursor.com> * Document alert rule proto enum values Co-authored-by: Cursor <cursoragent@cursor.com> * Add alert rule enum references Co-authored-by: Cursor <cursoragent@cursor.com> * Address alert rules API review feedback Co-authored-by: Cursor <cursoragent@cursor.com> * Add OpenAPI spec for Insights alert instances (COBS-1288) Adds the read-only Insights alert instances endpoints: - GET /v2/insights/alert-instances (list; filters: status, rule_id, resource_urn; standard page/per_page pagination with links/meta envelope) - GET /v2/insights/alert-instances/{id} Spec follows the agreed Alerts Public Insights API contract: snake_case fields, lowercase enums (severity: warning|critical, status: active|resolved), RFC 3339 timestamps, uuid identifiers, and the standard DO list envelope via shared pages/meta components. Scope: insights:read, matching the staging Edge routing for COBS-1287. Co-authored-by: Cursor <cursoragent@cursor.com> * COBS-1288: Address review — tag group, sort docs, optional resource_urn - Add Insights to x-tagGroups so the section renders in Redoc. - Document that alert instances are ordered by triggered_at DESC and note the offset-pagination stability caveat on an append-only list. - Mark alert_instance.resource_urn as optional and describe when it may be empty (non-resource-bound signals, e.g. cluster/pod/namespace- scoped Kubernetes alerts; see optionalResourceURN in executioner/pkg/alertrule/store.go). Co-authored-by: Cursor <cursoragent@cursor.com> * COBS-1342: Add public OpenAPI for Insights PromQL query endpoints Document the Prometheus-compatible query surface published at /v2/insights/query/{region}/prom/api/v1/*: instant query, range query, label names, label values, and series. GET and POST variants are documented where the public Edge routes accept both; every operation requires the insights:read scope. Only the publicly routed endpoints are included -- metadata, format_query, and parse_query stay internal. * COBS-1347: Add public OpenAPI for Insights logs search endpoints * Remove POST variants of PromQL endpoints to fix client generation --------- Co-authored-by: Devender Mamidala <dmamidala@digitalocean.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: SSharma-10 <shivanisharma@digitalocean.com> Co-authored-by: adityasingh <adityasingh@digitalocean.com> --------- Co-authored-by: atalluri-do <atalluri@digitalocean.com> Co-authored-by: Devender Mamidala <dmamidala@digitalocean.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: SSharma-10 <shivanisharma@digitalocean.com> Co-authored-by: adityasingh <adityasingh@digitalocean.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR combines the Insights work from #1242, #1243, and #1244 into a single branch against the current
insights_v2target.Included changes:
insights_v2via Cobs 1289 insights notification channels #1241)The POST variants of the PromQL endpoints were removed because they caused client-generation failures.
Conflicts between the branches were resolved while preserving the original authors' commits via cherry-pick.
Closes / supersedes #1242, #1243, and #1244.