Commit graph

14 commits

Author SHA1 Message Date
Drew Davis
34c9afebe2
feat: Add list Webhooks API (#1802)
Closes HDX-3450

# Summary

This PR adds a list webhooks endpoint to the external API, to better support alert creation via the API (which requires a webhook ID).

<img width="2275" height="1048" alt="Screenshot 2026-02-25 at 11 54 54 AM" src="https://github.com/user-attachments/assets/a9a4f1cb-d3e9-4d18-bb9c-6647b784adf9" />

<img width="1463" height="1057" alt="Screenshot 2026-02-25 at 11 55 45 AM" src="https://github.com/user-attachments/assets/b7864e67-b8d0-4f71-aedf-04d2d13e27f1" />
2026-02-26 12:20:45 +00:00
Drew Davis
b5bb69e37c
feat: Improve pie chart implementation (#1773)
Closes HDX-3479

# Summary

This PR makes a number of improvements to new pie chart implementation (#1704)

1. Pie charts are now limited to 1 series. Previously, the pie chart summed the values of each series by group, and used the sum as the slice value. This is non-obvious and probably not what users expect. With a one-series limit, this problem is eliminated. Further, the logic for formatting the pie chart data from the clickhouse response is dramatically simpler.
2. Slices are now ordered by value decreasing, to avoid randomly changing slice order on refresh
3. Instead of being randomly generated, slice colors are now consistent with the theme colors and auto-detect log and trace severity levels, matching line/bar chart behavior
4. The external dashboards API now supports reading and writing pie charts. The transformation code has been updated so that there will be a type error if any new chart types are added in the future without updating the external API code.
5. The pie chart's tooltip now matches the style of the line chart tooltip, and is updated appropriately based on the app theme and light/dark mode.
6. The chart's number format is now applied to values in the pie chart tooltip
7. Slice labels are now correctly populated when a map is accessed in the Group By (eg. when grouping by `ResourceAttributes['app']`, the slice labels include the `app` value instead of being empty).
8. Also, added some unit tests for the pie chart data transformation, and moved it to ChartUtils with the other similar chart data transformation code.
2026-02-23 16:04:26 +00:00
Drew Davis
b676f268d9
feat: Add config property to external dashboard APIs. Deprecate series. (#1763) 2026-02-20 08:48:25 -05:00
Himanshu Kapoor
18e9690461
fix: update required fields in our spec (#1758)
1. `source` isn't actually required on an alert. It is non-nullable, but has a default value of `saved_search` if omitted.
2. `whereLanguage` is actually a required input.
2026-02-19 18:10:51 +00:00
Himanshu Kapoor
9ab68432af
Minor fixes in the external API (#1744) 2026-02-16 22:41:33 +01:00
Himanshu Kapoor
d759d046fd
feat: support filters in dashboards external api (#1724)
Fixes HDX-3387

In the external api, I renamed `filters[...].source` to `sourceId` to match tiles which also need a `sourceId`.
2026-02-12 18:57:43 +00:00
Drew Davis
27f478a699
feat: Add external GET /sources API (#1725)
HDX-3318

# Summary

This PR adds a `GET /sources` endpoint to the external API. This is intended to be a way for users to retrieve the list of available sources, so that they can use a correct source ID when creating or updating dashboards through the external API. Previously, the user had no easy way to view source IDs.

Create/Update/Delete source endpoints may be added in subsequent iterations.

There will be a related PR in control-plane to add this to the OpenAPI.

<img width="2126" height="1345" alt="Screenshot 2026-02-11 at 10 37 54 AM" src="https://github.com/user-attachments/assets/bd5ba25f-75df-495a-a25f-95b3a6a5cae2" />

```
curl --request GET \
  --url http://localhost:8000/api/v2/sources \
  --header 'authorization: Bearer <API Key>'
```
2026-02-11 16:18:01 +00:00
Himanshu Kapoor
a7e4912341
chore: minor cleanup of some schema definitions (#1723) 2026-02-11 13:57:17 +01:00
Himanshu Kapoor
5da3f3a21e
chore: improve external OpenAPI specs (#1687)
Fixes HDX-3325

* Use enums where possible
* Add descriptions where missing
* Simplify Alert request and types
* Fix a disceprency with alert request and response fields: `team` vs `teamId`, `dashboard` vs `dashboardId`, `savedSearch` vs `savedSearchId`
2026-02-02 16:10:47 +00:00
Drew Davis
4c287b163c
fix: Fix External Dashboard APIs (#1681)
Closes HDX-3303

# Summary

This PR reworks the external dashboard APIs in the following ways

1. Previously, there was no way to create a renderable dashboard using the create or update routes, because the APIs saved dashboard data in a format incompatible with v2 of HyperDX. This PR introduces a transformation layer to transform external API request and response formats into the v2 dashboard format prior to saving.
2. This PR also corrects and improves the openapi documentation associated with the dashboard endpoints.

This PR introduces a number of **breaking changes** in the dashboard API, which is acceptable because the APIs are already (a) effectively non-functional for writing dashboard data and (b) not aligned at all with the previously published spec when reading dashboard data.

1. The `dataSource` field has been removed from each series and replaced with a `sourceId` field, which specifies the sourceId of the source which should be queried. The `dataSource` argument was inflexible and could only specify `events`, `rrweb`, or `metrics` - these are leftover from V1, and are not very compatible with the design of HyperDX V2.
2. Dashboard responses previously would have contained `config` fields, in the format of a V2 dashboard config. Results are now transformed and align with the spec, which contains config data in a `series` array.
3. Additional validation has been added to prevent creation of some invalid dashboards
2026-01-30 18:15:55 +00:00
Drew Davis
941bc23ef4
fix: Fix inaccurate openapi docs for external alerts API (#1676)
# Summary

This PR updates the external Alerts API specs so that the specs match the actual behavior of the API.

I've also added a validator to an API which was missing any validation.
2026-01-29 16:20:50 +00:00
Drew Davis
ac1a2f7768
chore: Format OpenAPI Docs (#1555)
This PR commits automated formatting updates to the OpenAPI Docs.
2026-01-05 17:41:15 +00:00
Tom Alexander
e9033b463c
chore: update swagger server urls (#1405) 2025-11-24 18:10:46 +00:00
Tom Alexander
e3643ccfc0
chore: Add automatic api doc generation (#1397)
Fixes: HDX-2888
2025-11-21 21:14:02 +00:00