Skip to content

Add insights v2 endpoints to openapi - #1248

Merged
kishlay-singh-DO merged 3 commits into
mainfrom
insights_v2
Oct 1, 2026
Merged

kishlay-singh-DO merged 3 commits into
mainfrom
insights_v2

Conversation

@kishlay-singh-DO

Copy link
Copy Markdown
Contributor
  • 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.

  • Remove PagerDuty from Insights notification channels OpenAPI

Omit unsupported pagerduty channel type/config from the public spec.

  • 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.

  • Document notification channel proto enum values

  • Add notification channel enum references

  • Address notification channels API review feedback


atalluri-do and others added 3 commits October 1, 2026 14:15
* 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>
…otification 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>

@anup-deka anup-deka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

3 participants