---
issue: 1833
last_synced_at: 2026-05-19T12:30:00Z
last_synced_comment_id: 0
snapshot:
  thumbs: 0
  age_days: 18
  labels: ["enhancement", "kilo-triaged", "kilo-duplicate"]
  state: open
  classified_at: 2026-05-01T10:53:06Z
---

# Feature: [Feature] API-first Management — REST Endpoints for Programmatic OmniRoute Configuration

> GitHub Issue: #1833 — opened by @diegosouzapw on 2026-04-30T19:55:40Z
> Status: 📋 Cataloged | Priority: TBD

## 📝 Original Request

## Summary

Implement a dedicated REST management API with scoped API keys for programmatic OmniRoute configuration. This enables CI/CD integration, infrastructure-as-code workflows, third-party monitoring, and CLI scripting without requiring MCP or the dashboard.

## Origin

This feature request originates from Discussion #1567 by @shannonlowder — a well-specified proposal for management-scoped API keys and settings endpoints.

## Motivation

While OmniRoute already provides programmatic access through the **MCP Server** (29 tools), a dedicated REST API would:
- Enable CI/CD integration without MCP dependency
- Support infrastructure-as-code workflows (Terraform, Pulumi)
- Allow third-party monitoring tool integration
- Provide CLI scripting for batch operations
- Lower the barrier for automation (standard HTTP vs MCP protocol)

## Proposed Scope

### Management API Keys
- Create management-scoped API keys (separate from request proxy keys)
- Scoped permissions: `providers:read`, `providers:write`, `combos:read`, `combos:write`, `settings:read`, `settings:write`, etc.

### REST Endpoints
- `GET/POST/PUT/DELETE /api/v1/management/providers` — CRUD for provider connections
- `GET/POST/PUT/DELETE /api/v1/management/combos` — CRUD for combos
- `GET/PUT /api/v1/management/settings` — Read/update settings
- `GET /api/v1/management/health` — Detailed health check
- `GET /api/v1/management/metrics` — Usage metrics and analytics

### Export/Import
- `GET /api/v1/management/export` — Full config export (JSON)
- `POST /api/v1/management/import` — Config import with merge/overwrite options

## Implementation Notes

- Auth: Reuse existing API key infrastructure with added management scope
- Validation: Zod schemas for all inputs (consistent with existing patterns)
- DB: All operations through `src/lib/db/` domain modules
- Audit: Log all management operations to `mcp_audit` or new `management_audit` table

## Labels
`enhancement`, `api`

---
*Ref: https://github.com/diegosouzapw/OmniRoute/discussions/1567*

## 💬 Community Discussion

**@kilo-code-bot** (2026-04-30T19:55:46Z):
This issue appears to be a duplicate of https://github.com/diegosouzapw/OmniRoute/issues/1568.

> **API-first management for OmniRoute - management-scoped API keys & settings endpoints** (#1568)

Similarity score: 95%

*This comment was generated by Kilo Auto-Triage.*
---


### Participants

- @diegosouzapw
- @kilo-code-bot

### Key Points

- Needs detailed analysis

## 🎯 Refined Feature Description

Feature needs manual refinement and interpretation to fill logical gaps and outline high-level technical scope.

### What it solves

- TBD

### How it should work (high level)

1. TBD
2. TBD

### Affected areas

- TBD

## 📎 Attachments & References

- Check issue body for references

## 🔗 Related Ideas

- None yet
