Hengfei Yang
bdefdde66c
fix: migration router ( #10058 )
2026-01-16 16:36:04 +08:00
Hengfei Yang
62f5def1be
feat: add MCP category annotations to API endpoints ( #9937 )
2026-01-15 17:05:43 +08:00
Hengfei Yang
1fc4270f54
fix: payload limit ( #10021 )
...
1. We only need `ZO_PAYLOAD_LIMIT` now, removed `ZO_JSON_LIMIT`
2. Config axum log level `RUST_LOG = "info,config::axum=warn"`
2026-01-14 16:54:35 +08:00
Hengfei Yang
33eecaefe3
refactor: migrate actix-web to axum ( #9912 )
2026-01-13 16:44:53 +08:00
Hengfei Yang
ec021ac29e
perf: optimize MCP tools - reduce size from 643KB to 123KB ( #9825 )
2026-01-03 14:47:15 +08:00
78c96c3721
fix: support bulk deletes for various resources ( #9153 )
...
### **User description**
fixes https://github.com/openobserve/openobserve/issues/9116
This adds support for bulk delete operation from API and UI side for
various resources.
___
### **PR Type**
Enhancement
___
### **Description**
- Add bulk delete endpoints for multiple resources
- Enforce per-item permission checks before delete
- Aggregate successful/failed items in responses
- Register bulk-delete routes in HTTP router
- Extend UI: add bulk-delete buttons, dialogs, service calls
___
### Diagram Walkthrough
```mermaid
flowchart LR
UI["\"UI: Bulk Delete Trigger\""]
API["\"HTTP DELETE /{resource}/bulk Handler\""]
AUTH["\"Permission Checks per Item\""]
DEL["\"Perform Delete Operations Loop\""]
RESP["\"Aggregate Response: successes/ failures\""]
UI_FE["\"FE: Show Notifications\""]
UI -- "calls" --> API
API -- "checks" --> AUTH
AUTH -- "allowed" --> DEL
DEL -- "deletes items" --> RESP
RESP -- "returns" --> UI_FE
```
<details> <summary><h3> File Walkthrough</h3></summary>
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>14
files</summary><table>
<tr>
<td><strong>fga.rs</strong><dd><code>Add bulk delete roles and groups
endpoints</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-e7c99f37f3abbb5e0507d2760bbf67df010d9218704b38dce84c5477acecd22e ">+218/-6</a>
</td>
</tr>
<tr>
<td><strong>mod.rs</strong><dd><code>Implement delete_alert_bulk
handler</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-83431801d27626ef27482e67b62661f900043544a45ddf958bd027cf2fa3bd8d ">+87/-6</a>
</td>
</tr>
<tr>
<td><strong>mod.rs</strong><dd><code>Add delete_function_bulk and error
types</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-a5e1b3644cef9feb689dfe66382e44e5434ecadbff3469127346a333d4733102 ">+97/-3</a>
</td>
</tr>
<tr>
<td><strong>mod.rs</strong><dd><code>Add delete_dashboard_bulk
endpoint</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-1b3c257e1d174c826718499faa4a1d4e93465dd56cb2b7b273b690ff7e3223fd ">+78/-1</a>
</td>
</tr>
<tr>
<td><strong>mod.rs</strong><dd><code>Implement re_patterns delete_bulk
logic</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-27d37a8738de89c81b540daa978e684caf2cf28803e1208d90cb4d42528ed28b ">+116/-0</a>
</td>
</tr>
<tr>
<td><strong>mod.rs</strong><dd><code>Add users bulk delete
handler</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-56897e42f9436a640bc70fddc25686485ba8ae1223635b32d252a0333309f748 ">+80/-1</a>
</td>
</tr>
<tr>
<td><strong>mod.rs</strong><dd><code>Add service_accounts delete_bulk
API</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-095d70f65b6e69bf7de0180fcbcddcd7c89c4cf00095d7b06f039a07e73916bb ">+86/-1</a>
</td>
</tr>
<tr>
<td><strong>action.rs</strong><dd><code>Implement delete_action_bulk
endpoint</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-616df3014c553f763ea57e925f1bff7bb47f9467c632940d93a45b7b1e4c3a07 ">+90/-1</a>
</td>
</tr>
<tr>
<td><strong>destinations.rs</strong><dd><code>Add
delete_destination_bulk for alerts</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-76b00293c621036de31cf499c1c276efb9704c2bf8cf1b728f49cfdd43f9fd1b ">+75/-4</a>
</td>
</tr>
<tr>
<td><strong>mod.rs</strong><dd><code>Add delete_bulk for
cipher_keys</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-043222e433d1e5825a4b7bfc2c7feedba417f2630f0082fa67aff64976736396 ">+76/-1</a>
</td>
</tr>
<tr>
<td><strong>templates.rs</strong><dd><code>Implement
delete_template_bulk handler</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-b08e274a64cc935b0cec402a04271a872b1586027a77dc0ccb84c597c3960f61 ">+73/-4</a>
</td>
</tr>
<tr>
<td><strong>pipeline.rs</strong><dd><code>Add delete_pipeline_bulk API
handler</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-c69f4f94eee97ce226caddc497b2adf89e26869f2d72b0d0206dc31ab2714daf ">+70/-2</a>
</td>
</tr>
<tr>
<td><strong>reports.rs</strong><dd><code>Add delete_report_bulk
endpoint</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-00435e0d9301342b51cb57ae313f1413e7ed973642e0badf3f3959125d0677d1 ">+75/-1</a>
</td>
</tr>
<tr>
<td><strong>ActionScripts.vue</strong><dd><code>Integrate bulk delete UI
in action scripts</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-770f71fcb92a13b3b8b1041567b885fac39903c814825c878595cafa624ebbd8 ">+284/-5</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>3 files</summary><table>
<tr>
<td><strong>mod.rs</strong><dd><code>Register bulk delete services in
router</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-02556e3f515441b5d2b6bbea7829df488beac03c4cc41309a6638ae3c0e0aec6 ">+14/-0</a>
</td>
</tr>
<tr>
<td><strong>iam.ts</strong><dd><code>Add bulkDeleteGroups and
bulkDeleteRoles calls</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-3712c1bb0eecb664b6691d724c3673b8c1befa41efbd8c5de626c5849f8ace98 ">+10/-0</a>
</td>
</tr>
<tr>
<td><strong>dashboards.ts</strong><dd><code>Add bulkDelete service for
dashboards</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-913b3f54367036b1b3960aa3eddd7e17b509b1d6011c5ab68ae0e935653179c5 ">+7/-0</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Error
handling</strong></td><td><details><summary>1 files</summary><table>
<tr>
<td><strong>auth.rs</strong><dd><code>Allow bulk-delete paths in auth
extractor</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-9bc2b1841504a435f66ad094f72ddbe7b7fa75e5e1557b8adbfe36f7f0592e1b ">+17/-1</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>2
files</summary><table>
<tr>
<td><strong>user.rs</strong><dd><code>Define bulk delete
request/response structs</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-e13b3a981fd70182b9738a6b0ecfdee915c5b36757703a87741e1eddf3f6e786 ">+36/-0</a>
</td>
</tr>
<tr>
<td><strong>mod.rs</strong><dd><code>Add PipelineBulkDelete meta
types</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-c4bd542e4e07ed7706b0643086f5a7d4edbb3647c7ceedbe4bea516c5274d8bd ">+12/-0</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Additional
files</strong></td><td><details><summary>40 files</summary><table>
<tr>
<td><strong>mod.rs</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-6f9c2e6dbc40f8d40e3d3ecbee23240813a3d4856d49bd5d979f5b98551fdc3d ">+12/-0</a>
</td>
</tr>
<tr>
<td><strong>service_account.rs</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-878ad520e1c84500cc21ff6fc4088c8da64ff2febd79e60c0d4cc8c695c49798 ">+11/-0</a>
</td>
</tr>
<tr>
<td><strong>action.rs</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-fc87c75a7df9539d7e7ee6184dfab02d4a8932323e81f95d57c05363aa44752d ">+15/-0</a>
</td>
</tr>
<tr>
<td><strong>reports.rs</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-d2117a3d67d4ec47b0017861845c92143baf917e10e6746df5dd97f925f81eeb ">+12/-0</a>
</td>
</tr>
<tr>
<td><strong>function.rs</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-27c9f3d93723397a0e234bc45c9f543b43eff5fd518d76e735f78d95a58f3f1c ">+12/-0</a>
</td>
</tr>
<tr>
<td><strong>requests.rs</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-412f11e06c0e901e2292aab80536cb36edebcc4796dec52923389c3aaa32b25a ">+6/-0</a>
</td>
</tr>
<tr>
<td><strong>responses.rs</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-224027f90893122eea28e35778467acf1a4b5572ce612fc9bc9ec44ca8ebd9fb ">+9/-0</a>
</td>
</tr>
<tr>
<td><strong>dashboards.rs</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-250eeebeec9d4ac0ac271466ed83cd33fea3f121080491b340dc95d9af287259 ">+12/-0</a>
</td>
</tr>
<tr>
<td><strong>destinations.rs</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-ecffe114c8200bab742dd2ee4f7f41128aa59438a879634f070edd575a1f917c ">+24/-0</a>
</td>
</tr>
<tr>
<td><strong>search_stream.rs</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-642de43ff6b19ae41087a9f1efc02d8b0b873809e0c92cbddfac1a30ef3f1184 ">+1/-0</a>
</td>
</tr>
<tr>
<td><strong>utils.rs</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-96bb9f4a8f547c821f26c957e8505d0437095b08d2b36687531f71565d287bd6 ">+2/-1</a>
</td>
</tr>
<tr>
<td><strong>functions.rs</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-ed5611a9aa6b5c033e70d7631ba72fafad3cc842672077a7fcf965d11a4fef23 ">+22/-31</a>
</td>
</tr>
<tr>
<td><strong>AppTable.vue</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-efcf66a9e913b5d3a7c2eea800b7f4e54d9e5268307131482fd40f32e2074d8e ">+72/-16</a>
</td>
</tr>
<tr>
<td><strong>AlertList.vue</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-be3e41b823e163b226ffc270d95cc4981e59c600851e4e0d10ee5e4ee994ac8e ">+123/-2</a>
</td>
</tr>
<tr>
<td><strong>AlertsDestinationList.vue</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-e9d05ba6c071c0e2f5d9ef7acdef757f79910abd6897b29e27b069a10d4ba8de ">+142/-5</a>
</td>
</tr>
<tr>
<td><strong>PipelinesDestinationList.vue</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-088c66f5a34e73a5350a794a772e5d905262277337c937dd36f4295072203ebf ">+163/-28</a></td>
</tr>
<tr>
<td><strong>TemplateList.vue</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-7df66364d7d69a26cfa25cbc555d0e090c2f73e51c8386d9b0435bae4412564c ">+116/-27</a></td>
</tr>
<tr>
<td><strong>EnrichmentTableList.vue</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-6a29e253f59405d3c0f756dba36afd7483f10ad86927cbbc3348ede6372c3077 ">+124/-13</a></td>
</tr>
<tr>
<td><strong>FunctionList.vue</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-6ff9af50a1597504b7f0dca91e61cf30c800b4a17b4be2ed2c3a4f7a7b2d7068 ">+143/-6</a>
</td>
</tr>
<tr>
<td><strong>AppGroups.vue</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-402fb2a5338e60fdc3da489f4d50b5cf52f06b4e884a6fe7b82441c9fa5ea22c ">+86/-1</a>
</td>
</tr>
<tr>
<td><strong>AppRoles.vue</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-191634ef09436199f91f442968110a01f54ae46b5ceee67476f52613ad796db4 ">+86/-1</a>
</td>
</tr>
<tr>
<td><strong>EditRole.vue</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-263b6bc7d29fdf8358c8437cd637f1350aa3733cc2706eae8ff00028686cc0f5 ">+20/-0</a>
</td>
</tr>
<tr>
<td><strong>ServiceAccountsList.vue</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-3afe835bcfbec3fda2e9550850c29581092ee0717e7dd8de8888e774a0048d24 ">+114/-1</a>
</td>
</tr>
<tr>
<td><strong>User.vue</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-e973c2a665f9b27b94673ba64cc5b23650300836a727a2e07673c8e26305aee5 ">+133/-3</a>
</td>
</tr>
<tr>
<td><strong>PipelinesList.vue</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-85e3ef322f3eea0fc6d74d89431ba338a1153cb82ee06bef0f7c5f439c04267d ">+108/-2</a>
</td>
</tr>
<tr>
<td><strong>ReportList.vue</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-f7d700f7e67fbaba3c58ab5d2c614925db743101828214445ce9dae35dc29067 ">+157/-5</a>
</td>
</tr>
<tr>
<td><strong>CipherKeys.vue</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-950b715cff2c964d8542512692030c370733b57d698abf40e1dcb3cce2cfaf7a ">+104/-13</a></td>
</tr>
<tr>
<td><strong>RegexPatternList.vue</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-524927acd9f5bb07b71bfac489e747470108574e21a6dde63ea7c1f219cea853 ">+109/-14</a></td>
</tr>
<tr>
<td><strong>action_scripts.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-6c1a011ac23290134801b22feb2b50c2b19cabf2a009f37a62b4dd9ca6e415e3 ">+3/-0</a>
</td>
</tr>
<tr>
<td><strong>alert_destination.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-377d28822e9ad4e9e80327ecc2d09bf1981c7997c5f1c1de120c6179eef19c6e ">+3/-0</a>
</td>
</tr>
<tr>
<td><strong>alert_templates.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-fd8c4260abc3df601e4331d36b0c211eca568ee70139ad90c87247bc552fe4e2 ">+3/-0</a>
</td>
</tr>
<tr>
<td><strong>alerts.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-7a62782cceacac92b787e058219b3c53ea7406d4be5780def899943a01f500c1 ">+7/-0</a>
</td>
</tr>
<tr>
<td><strong>cipher_keys.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-0a0ef3a63c29b2a74b7f904c54c3fb32bee421608474aa32334b7c55133ab1ef ">+3/-0</a>
</td>
</tr>
<tr>
<td><strong>jstransform.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-301add2528e0f32323ca4c503bd7d460ab15ca6b9a9537192a02c5e52fd82926 ">+3/-0</a>
</td>
</tr>
<tr>
<td><strong>pipelines.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-e8626670bb4e46e073f9858ade6b3dc77eaadf39d6721d9c0006eccc1b430612 ">+8/-0</a>
</td>
</tr>
<tr>
<td><strong>regex_pattern.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-2a0b0828141d39ab0385e0941314ead1cdd2ec3ec7b3baf5fd0c42f8f010728a ">+3/-0</a>
</td>
</tr>
<tr>
<td><strong>reports.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-32d3299b2b21dc57c39d01080baba03765d853bd05c82d6158834b54713ae825 ">+3/-0</a>
</td>
</tr>
<tr>
<td><strong>service_accounts.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-4038191b0dc0cad335f3d8f7f703505df905ad843fe950096aefb8abbd139a1e ">+4/-1</a>
</td>
</tr>
<tr>
<td><strong>users.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-a334d8d570d9bdcaa3d4c8c2a993eff009a1ec8eb499c8a3d1a292d9224159d0 ">+3/-0</a>
</td>
</tr>
<tr>
<td><strong>Dashboards.vue</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9153/files#diff-8da3187db8ce3d795d0f196ede6b2290221ffa3e27b15dcc2b645e44dd196213 ">+122/-6</a>
</td>
</tr>
</table></details></td></tr></tr></tbody></table>
</details>
___
---------
Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com >
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com >
Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai >
2025-12-29 16:37:29 +05:30
ByteBaker
1593db0e22
feat: skip aud validation for MCP-invoked requests
...
- Add `x-o2-mcp` header support for MCP request identification in token validator
- Wrap OpenAPI schema types with `inline()` for better documentation generation
- Update AI module imports to use new agent namespace
- fix compilation for `cloud` feature, also return early if user isn't in trial
- Enable service graph by default
2025-11-04 17:36:23 +05:30
ByteBaker
abc11250fd
refactor: replace manual JSON deser with web::Json extractors in handlers
2025-10-09 21:22:26 +05:30
ByteBaker
da96d301ab
refactor: extract reusable Headers extractor for actix-web handlers
...
This commit:
- Creates a new extractors.rs module with a generic Headers<T> extractor
- Implements FromRequest trait for type-safe header deserialization
- Centralizes header parsing logic to reduce code duplication across HTTP handlers
2025-10-08 14:08:36 +05:30
sktrpathi
d40b6afc2e
refactor: fix OpenAPI schemas and improvements ( #8505 )
...
### **User description**
- **OpenAPI schema fixes**: Replace generic `Object` content types with
proper typed schemas
- `ai/prompt.rs`: Use `UpdatePromptRequest` instead of `Object`
- `authz/fga.rs`: Use `RoleRequest` for role operations
- `keys/mod.rs`: Use `KeyAddRequest` for cipher key operations
- `dashboards/mod.rs`: Use versioned dashboard schemas for create/update
endpoints
- `actions/action.rs`: Remove incorrect request_body specifications
- **Deprecated endpoint disambiguation**: Add "Deprecated" suffix to
alert operation IDs to prevent OpenAPI conflicts
- **Dashboard macro refactoring**: Replace repetitive getter/setter
methods with declarative macros
- `make_getter!` macro generates type-safe field accessors across all
dashboard versions (v1-v5)
- `make_setter!` macro generates unified field mutators with
version-specific matching
- Add comprehensive unit tests covering edge cases (empty values,
unsupported versions, missing inner objects)
- **Pipeline schema**: Add `ToSchema` derive to Pipeline struct for API
documentation
- **Enterprise feature gating**: Properly gate cipher key endpoints with
conditional compilation
___
### **PR Type**
Enhancement, Tests
___
### **Description**
- Replace OpenAPI Object with typed schemas
- Introduce dashboard getter/setter macros
- Gate cipher key endpoints by feature
- Add ToSchema for Pipeline and multipart
2025-09-18 13:52:07 +05:30
sktrpathi
f8cc585408
feat: store ratelimit info in vendor extension ( #8259 )
...
### **PR Type**
Enhancement, Documentation
___
### **Description**
- Replace ratelimit comments with OpenAPI extensions
- Add `x-o2-ratelimit` metadata to endpoints
- Import `serde_json::json` where needed
- Clean up obsolete inline ratelimit markers
2025-09-02 21:30:20 +05:30
sktrpathi
d87d346bba
fix: OpenAPI descriptions for endpoints ( #8231 )
...
### **User description**
So far the OpenAPI descriptions for endpoint handlers was directly
derived from the doc comments, leaving little control. This also leaked
any dev-specific information into API spec.
Now the summary and description are explicitly populated for all the
endpoints, detaching them from doc comments.
Also update response body annotations wherever necessary
Also bump
- utoipa: 4.0.0 -> 5.0.0
- utoipa-swagger-ui: 4.0.0 -> 9.0.0
___
### **PR Type**
Documentation, Enhancement
___
### **Description**
- Add explicit OpenAPI summaries/descriptions
- Correct response body schemas to Object/()
- Update params/types for accuracy
- Improve endpoint examples and metadata
2025-09-01 23:34:30 +05:30
Loakesh Indiran and sai nikhil kethe
e46f6d5b82
feat: custom histogram interval & aligned partitions ( #7909 )
...
- `is_ui_histogram` query param for search api, the backend will convert
the sql to histogram query and respond accordingly
- `search_type` for search partition query, and if search type is `ui`
only then we generate partitions with mini partition that is aligned
with histogram interval
### **PR Type**
Enhancement, Bug fix, Tests, Documentation
___
### **Description**
- Add UI histogram query conversion and flag
- Align partitions to histogram with mini
- Stream empty metadata+hints consistently
- Expose histogram eligibility and interval
___
### Diagram Walkthrough
```mermaid
flowchart LR
FE["Web UI logs & services"] -- "is_ui_histogram, searchType" --> HTTP["HTTP search endpoints"]
HTTP -- "convert to histogram SQL\n(resolve streams, eligibility)" --> SQL["Histogram SQL converter"]
HTTP -- "pass search_type, flags" --> SVC["Search service"]
SVC -- "is_eligible, gen interval" --> PART["PartitionGenerator"]
PART -- "aligned partitions\n(+mini optional)" --> STREAM["Streaming execution"]
STREAM -- "SearchResponse + metadata\n(empty hits emitted)" --> FE
SVC -- "Response: histogram_interval, is_histogram_eligible, converted_query" --> FE
```
<details> <summary><h3> File Walkthrough</h3></summary>
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>16
files</summary><table>
<tr>
<td><strong>partition.rs</strong><dd><code>Histogram-aligned partitions
with optional mini support</code> </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-348fa23375d0cea3e5fb039cc6b381d79aa1d5121e6b9792acc048d3fd02e37c ">+798/-269</a></td>
</tr>
<tr>
<td><strong>execution.rs</strong><dd><code>Always emit responses;
accumulate and metadata tweaks</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-75d432351865224f0b00d7cc819554c2ad5fa1f777e9c645d91a3fd5c1113bc0 ">+148/-152</a></td>
</tr>
<tr>
<td><strong>search_stream.rs</strong><dd><code>HTTP2 stream: UI
histogram conversion and interval handling</code></dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-642de43ff6b19ae41087a9f1efc02d8b0b873809e0c92cbddfac1a30ef3f1184 ">+149/-69</a></td>
</tr>
<tr>
<td><strong>mod.rs</strong><dd><code>Partition API: histogram
eligibility, interval, UI paths</code> </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-c3b85ea662a885fbd39797968928b291cb59a58f53a03f7b7dfd7ba8b6a7985a ">+71/-5</a>
</td>
</tr>
<tr>
<td><strong>histogram.rs</strong><dd><code>Convert original SQL to
histogram-safe query</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-a5fc4cd11b3ec569b4cedf278ef0b14f540504abfbb23e29eb896d5b2a6cc2b2 ">+140/-0</a>
</td>
</tr>
<tr>
<td><strong>mod.rs</strong><dd><code>HTTP search: UI histogram
conversion and response enrichment</code></dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-96630a0dbb6dd7b2b0248fa325c7c7041ce31340c32826675a4a70772e9d29f6 ">+38/-3</a>
</td>
</tr>
<tr>
<td><strong>search.rs</strong><dd><code>Response/request fields for
histogram meta and streaming chunks</code></dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-373e83a31e5bbc82fba05d7ae274b0dbd624ed748272232cf7eb8b8c3b2f3afc ">+45/-0</a>
</td>
</tr>
<tr>
<td><strong>mod.rs</strong><dd><code>New error:
SearchHistogramNotAvailable</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-90c725d0e77a6e7d4bcc130cf5783848a5cf0efdb304b351cd63cacf8775fc36 ">+7/-0</a>
</td>
</tr>
<tr>
<td><strong>multi_streams.rs</strong><dd><code>Multi-stream partition
search accepts search_type</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-c3233cdf1e68cb2455f91457719b9c2f477e735ee16546fdfe111e76768bd054 ">+16/-4</a>
</td>
</tr>
<tr>
<td><strong>sql.rs</strong><dd><code>Detect histogram-eligible queries
and subqueries</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-a0a09c66a20d878ec7683ae222c919fbe092b8001871ade7f455b89573ce0911 ">+27/-0</a>
</td>
</tr>
<tr>
<td><strong>http.rs</strong><dd><code>Add query flag parser for
is_ui_histogram</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-3b50a69c1ec2f63f8eebb5f9880e17826463a586768aed3e3e15242833609d6b ">+8/-0</a>
</td>
</tr>
<tr>
<td><strong>Index.vue</strong><dd><code>UI: histogram streaming flow,
timeouts cleanup</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-0323c3da69b369843c5d72bf4df5b00ca6b5147192a213baf331659ecf92af62 ">+45/-12</a>
</td>
</tr>
<tr>
<td><strong>IndexList.vue</strong><dd><code>Pass searchType=ui to
partition API</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-08f058f883b659e713e606991a7ea37ae1ff016b7cccef970489ab5840dc3d09 ">+1/-0</a>
</td>
</tr>
<tr>
<td><strong>search.ts</strong><dd><code>API: support is_ui_histogram,
searchType plumbed</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-885ab872dbc6e7b20264df815e3ef4727f0abc86ce90d2fb47e4aff572814c75 ">+7/-2</a>
</td>
</tr>
<tr>
<td><strong>useStreamingSearch.ts</strong><dd><code>Include
is_ui_histogram in streaming URL</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-8fce3e25a161cd458e734bd9b1f98aadefe3482da7b6529a5b1f4fa20ec115e2 ">+1/-0</a>
</td>
</tr>
<tr>
<td><strong>usePanelDataLoader.ts</strong><dd><code>Dashboard partition
calls pass searchType</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-5a42e9493a7bcd722b88e61fd38883c4f61001bc9cafa399f65f8eafda3aace9 ">+2/-0</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>3
files</summary><table>
<tr>
<td><strong>cacher.rs</strong><dd><code>Adjust tests for new response
fields</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-8c387b22b2c0a282600ee41ca702b3db60f5a284d507c0feb7418608ff062c6c ">+6/-0</a>
</td>
</tr>
<tr>
<td><strong>SearchResult.spec.ts</strong><dd><code>Skip flaky
resetPlotChart unit test</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-8ff7d14fc3cdac80eeec5550ecd89a77f015b4ebe928da9d4a76a9585d64d788 ">+1/-1</a>
</td>
</tr>
<tr>
<td><strong>useLogs.spec.ts</strong><dd><code>Skip failing query
partitions test</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-842307ae8db03aa51891ddde98cfdbbabc712db1e1614c9eee99a59add395f70 ">+1/-1</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Error
handling</strong></td><td><details><summary>1 files</summary><table>
<tr>
<td><strong>error_utils.rs</strong><dd><code>Map histogram
unavailability to 400 with code</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-d4de63bc9275a19c868f6967de0f7835bd2d7bda74ff55ce97b8fb3f9af54da9 ">+3/-0</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Miscellaneous</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>mod.rs</strong><dd><code>Export histogram SQL
module</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-dc0ab53d0ff551cf3cd12027c73d0da5e66680c0bf2d1830778639a33bac3464 ">+1/-0</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Bug
fix</strong></td><td><details><summary>2 files</summary><table>
<tr>
<td><strong>SearchResult.vue</strong><dd><code>UI: robust
empty-histogram handling and reset watcher</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-5e65533aa4754bb6d0074fda18ffc1ecacded3b9ca6bc28a161c3f6b12f20195 ">+17/-15</a>
</td>
</tr>
<tr>
<td><strong>SearchBar.vue</strong><dd><code>Cancel running query before
applying saved view</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-81893de4edf186b0556f610acb280c87baa2ffe67d3b48a60a866094c7635baf ">+2/-1</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>query.ts</strong><dd><code>Types: histogram interval and
eligibility fields</code>
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-12dd5b3bb9741bbeaa348c0efbbd745d0a582899678738159c6927d34a35191d ">+2/-0</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Additional
files</strong></td><td><details><summary>2 files</summary><table>
<tr>
<td><strong>fga.rs</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-e7c99f37f3abbb5e0507d2760bbf67df010d9218704b38dce84c5477acecd22e ">+0/-2</a>
</td>
</tr>
<tr>
<td><strong>useLogs.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7909/files#diff-1040f61354f92711e0e77ed4e9bfa15586d45a94c7e2ab06cc37372068030e7b ">+154/-168</a></td>
</tr>
</table></details></td></tr></tr></tbody></table>
</details>
___
---------
Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai >
2025-08-11 13:36:03 +05:30
Huaijin
682033437e
chore: refactor sql.rs ( #7846 )
2025-08-05 12:18:20 +08:00
sktrpathi
10a2849c32
chore: add unit tests ( #7837 )
...
### **User description**
- also fix FGA tests (lack of import) for `enterprise` feature
- consolidate parquet readers for file and bytes into generic
2025-08-04 18:14:24 +05:30
Huaijin
5f249edf51
perf: improve high frequency term search speed ( #7804 )
2025-08-04 10:59:26 +08:00
Hengfei Yang
b7e1a9d702
perf: pushdown plan ( #7778 )
2025-07-31 14:31:33 +08:00
Huaijin
689cfcf4c9
chore: remove some deprecated code ( #7776 )
...
- [x] remove some deprecated code
2025-07-31 12:33:28 +08:00
sktrpathi
7e08f5ac7a
chore: add UTs, run fmt and clipyy ( #7753 )
2025-07-30 15:55:10 +08:00
Subhra264
89a2959869
fix: role and group names should be formatted using regex ( #7224 )
...
### **User description**
Currently role names and groups names are getting lowercased when
creating them (as part of the org revamp changes). This PR uses standard
format_role_name function to follow a standard role and group name
format.
___
### **PR Type**
Enhancement
___
### **Description**
- Introduce reusable name-formatting function
- Enforce regex formatting for roles and groups
- Update HTTP handlers to apply formatting
- Standardize success responses for role/group
___
### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>jwt.rs</strong><dd><code>Extract and centralize name
formatting</code>
</dd></summary>
<hr>
src/handler/http/auth/jwt.rs
<li>Extract regex-based formatting into helper<br> <li> Change
<code>format_role_name</code> to accept <code>&str</code><br> <li> Add
public <code>format_role_name_only</code> function<br> <li> Delegate
formatting to new helper function
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7224/files#diff-232cab74f4cbf135af424744272e17732fbda8ac005d33c0acb4597e65479d02 ">+9/-3</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>fga.rs</strong><dd><code>Apply standardized formatting
in handlers</code>
</dd></summary>
<hr>
src/handler/http/request/authz/fga.rs
<li>Import <code>format_role_name_only</code> helper<br> <li> Replace
lowercase trim with regex formatting<br> <li> Update handler logic to
use new helper<br> <li> Standardize response messages and payloads
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7224/files#diff-e7c99f37f3abbb5e0507d2760bbf67df010d9218704b38dce84c5477acecd22e ">+15/-17</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
___
> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/ ">documentation</a>
for more information.</li></details>
2025-06-18 16:02:52 +05:30
+2
0d9f47966b
feat: Organization revamp ( #5579 )
...
Fixes #5131
Addresses #5408
### Revamp
- Created a new table to store organizations in the `organizations`
table. Earlier, we never stored organizations in any table, rather we
used to store the organizations in the meta table as part of the `user`
json.
- The users and organization membership relations are now moved to its
own separate tables - `users` and `org_users`.
### New changes
**API changes** -
- `/organizations` - `POST` api to create an org and save it in the meta
table. In non-enterprise version, currently only the root user can
create the org. For enterprise version with rbac enabled, anyone with
`CREATE` access for organizations can create the organization and
becomes an admin. Root user can always create an organization.
- `/{org_id}/rename` - `PUT` api to rename the existing org. Only root
user and the admins of the org can access this API.
The payload for following APIs are changed -
- `POST api/{org_id}/roles` - `{"name":"new_role"}` is changed to
`{"role":"new_role"}
- `POST api/{org_id}/users/{user}` -
`{"role":"viewer","custom_role":["role_name"]}` is the new payload where
`custom_role` is optional and is array of custom roles (only works in
enterprise with rbac enabled) which will be assigned to the user. The
value of `role` can be standard role or as well as any custom role (when
it is custom role, the standard role assigned to the user is decided
based on the enterprise env variable - `O2_DEX_DEFAULT_ROLE`).
- `POST api/{org_id}/users`- the payload -
```
{"email":"user@user.com ","role":"viewer","custom_role":["create_org_permission"],"password":"12345678", "first_name": "", "last_name":""}
```
- `PUT api//{org_id}/users/{email_id}` the payload -
```
{"first_name":"Hello","last_name":"j","role":"viewer","isExternal":false,"change_password":false,"password":"","custom_role":["create_org_permission"]}
```
A new ENV variable is introduced - `ZO_CREATE_ORG_THROUGH_INGESTION`
(default `false`) which if true, an org will automatically created when
ingesting data to a new org. If false, user can not create org by
ingesting data to new org, they need to first call the `POST
/organizations` API.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Release Notes
**New Features**
- Added a `cloud` feature for enhanced organizational management
capabilities.
- Introduced new methods for managing organizational users and
asynchronous message processing.
- Enhanced user invitation and membership features, including improved
role handling.
- Implemented configurable ingestion URL support across various
components.
- Added new functionality for user management and organization handling
in the super cluster architecture.
**Improvements**
- Refined user authentication and authorization processes, including
error handling.
- Updated database schema to support multi-organization architecture.
- Enhanced pagination settings and UI components for better user
experience.
- Improved handling of organization names and user roles in
notifications and alerts.
- Streamlined service account token management with visibility
enhancements.
- Enhanced the `AddUpdateOrganization` component with improved user
input handling and validation.
- Updated the `AppOrganizations` component to dynamically load the
appropriate organization management interface.
- Improved the `ServiceAccountsList` component with updated pagination
options and token handling logic.
**Bug Fixes**
- Resolved issues with user role assignments and organization management
inconsistencies.
- Corrected routing and navigation logic for login and logout processes.
- Addressed various error handling scenarios in user and organization
processes.
- Fixed issues with the visibility of service account options in the
`EditGroup` and `EditRole` components based on the cloud configuration.
**Breaking Changes**
- Significant restructuring of user and organization data models.
- Changes to authentication workflows and configuration handling.
- Removal of certain components related to user and organization
management.
- Updated the logic for determining the ingestion URL across various
components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com >
Co-authored-by: Bhargav <BJP232004@GMAIL.COM >
Co-authored-by: Taiming Liu <liutaiming3@gmail.com >
Co-authored-by: hengfei yang <hengfei.yang@gmail.com >
Co-authored-by: harshiv-7 <harshiv@openobserve.ai >
Co-authored-by: Huaijin <haohuaijin@gmail.com >
Co-authored-by: Zhao.wei <weizhao029@gmail.com >
Co-authored-by: ShyamOOAI <shyam@openobserve.ai >
Co-authored-by: oasisk <ashish.j.kolhe@gmail.com >
Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai >
Co-authored-by: Yashodhan Joshi <yashodhan@openobserve.ai >
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com >
2025-05-25 21:53:55 -07:00
Subhra264
c89a2b30a8
fix: roles and groups post/delete endpoints should return json response on success ( #6481 )
...
As of now, we return no json body, when we save/delete roles/groups in
openobserve. It returns a json body like other apis.
2025-04-08 10:56:26 +05:30
Zhao.wei
871805a32c
feat: impl ratelimit feature ( #6072 )
2025-04-03 23:47:18 +08:00
Hengfei Yang
595490ea33
ci: update rust to nightly-2025-03-02 ( #6145 )
2025-03-02 17:27:10 +08:00
Patrick Sullivan
0111124a15
refactor: Split openfga and dex modules into their own crates ( #5876 )
...
Note: This PR has an [accompanying
PR](https://github.com/openobserve/o2-enterprise/pull/331 ) in the
enterprise repo
This splits the `openfga` and `dex` modules into their own crates,
`o2_openfga` and `o2_dex`.
**Why?**
We want to be able to reference the `o2_enterprise::openfga` module from
within the `infra::table` module so that we can perform OpenFGA data
migrations as part of data transformation migrations in the
`openobserve` app. However, the `o2_enterprise` module references the
`infra::table` module in various places (eg: inside
`o2_enterprise::enterprise::actions::action_manager`). Therefore we
cannot reference `o2_enterprise::enterprise::openfga` from
`infra::table` without introducing a circular dependency.
The solution presented by this PR is to move the `openfga` module into
its own crate, so that `infra::table` can reference the new create
without creating a circular dependency. As part of this PR we also move
the `dex` module into its own crate since the `openfga` module depends
on the `dex` module, and we do not want the new `o2_openfga` crate to
depend on the `o2_enterprise` crate.


2025-02-06 08:35:18 -06:00
Prabhat Sharma
f39a3de5a1
fix: rename zinc labs to OpenObserve ( #4822 )
...
Rename Zinc Labs to OpenObserve
2024-10-18 13:11:52 +08:00
Ankur Srivastava and Hengfei Yang
8f3df9e7a1
feat: support reloading config vars using an API ( #3623 )
...
The new endpoint `/config/reload` will refresh the
environment variables.
There are a bunch of env-vars which will not be reloaded
for e.g. HTTP_PORT etc. these will need a restart.
---------
Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com >
2024-05-30 08:23:27 +08:00
Subhra264 and oasisk
f9e200f82b
fix: same role and group name in rbac with diff org conflicts ( #3359 )
...
Co-authored-by: oasisk <ashish.j.kolhe@gmail.com >
2024-04-29 11:31:43 +05:30
Ashish Kolhe
5bc9d93e23
fix: list should return only allowed objects ( #2785 )
2024-02-26 22:08:54 +05:30
Ashish Kolhe
eed6625097
chore: refactor rbac code ( #2668 )
2024-02-07 17:18:11 +05:30
Ashish Kolhe and omkark06
ead43c9873
fix: add delete for roles & groups ( #2643 )
...
Co-authored-by: omkark06 <omkar@zinclabs.io >
2024-02-03 19:28:37 +05:30
Hengfei Yang
d745dace45
feat: search queue ( #2640 )
2024-02-02 18:31:51 +08:00
Ashish Kolhe and omkark06
56f8cb113a
feat: rbac changes ( #2634 )
...
Co-authored-by: omkark06 <omkar@zinclabs.io >
2024-02-02 05:29:00 +05:30
Ashish Kolhe and omkark06
93a97d2f46
feat: rbac ui ( #2623 )
...
Co-authored-by: omkark06 <omkar@zinclabs.io >
2024-01-31 23:22:47 +01:00
Ashish Kolhe
98c9af0356
fix: report user email as part of usage reporting ( #2610 )
2024-01-31 15:31:08 +05:30
Ashish Kolhe
edd3d10fb6
fix: functions issue ( #2587 )
2024-01-26 18:12:34 +05:30
Ashish Kolhe and Bhargav
99ec2221d8
feat: rebac with openfga ( #2454 )
...
Co-authored-by: Bhargav <BJP232004@GMAIL.COM >
2024-01-24 10:13:59 +05:30
Ashish Kolhe
7db25f01d6
feat: rebac with open fga ( #2445 )
2024-01-11 14:56:37 +05:30