Serve dashboard at /, version the REST API under /api/v1
The SvelteKit build was always made for the root (no base path); it now mounts at / — registered last so /api/v1, /ws, /health, and /mcp match first — and the JSON root endpoint is gone (its info lives in /health and gateway_status). REST routers move from /api/* to /api/v1/*; /ws and /health stay put; /mcp/ unchanged. Dashboard API client, tests, README, and docs updated; dashboard rebuilt (build/ is gitignored). Verified live: / serves the UI, /api/v1 answers 200/401, the old /api paths 404, MCP still lists 15 tools. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,7 @@ Base URL: `http://localhost:8000/api`
|
||||
#### Place an Outbound Call
|
||||
|
||||
```
|
||||
POST /api/calls/outbound
|
||||
POST /api/v1/calls/outbound
|
||||
```
|
||||
|
||||
**Request:**
|
||||
@@ -53,7 +53,7 @@ POST /api/calls/outbound
|
||||
#### Launch Hold Slayer
|
||||
|
||||
```
|
||||
POST /api/calls/hold-slayer
|
||||
POST /api/v1/calls/hold-slayer
|
||||
```
|
||||
|
||||
Convenience endpoint — equivalent to `POST /outbound` with `mode=hold_slayer`.
|
||||
@@ -72,7 +72,7 @@ Convenience endpoint — equivalent to `POST /outbound` with `mode=hold_slayer`.
|
||||
#### Get Call Status
|
||||
|
||||
```
|
||||
GET /api/calls/{call_id}
|
||||
GET /api/v1/calls/{call_id}
|
||||
```
|
||||
|
||||
**Response:**
|
||||
@@ -99,7 +99,7 @@ GET /api/calls/{call_id}
|
||||
#### List Active Calls
|
||||
|
||||
```
|
||||
GET /api/calls
|
||||
GET /api/v1/calls
|
||||
```
|
||||
|
||||
**Response:**
|
||||
@@ -117,13 +117,13 @@ GET /api/calls
|
||||
#### End a Call
|
||||
|
||||
```
|
||||
POST /api/calls/{call_id}/hangup
|
||||
POST /api/v1/calls/{call_id}/hangup
|
||||
```
|
||||
|
||||
#### Transfer a Call
|
||||
|
||||
```
|
||||
POST /api/calls/{call_id}/transfer
|
||||
POST /api/v1/calls/{call_id}/transfer
|
||||
```
|
||||
|
||||
**Request:**
|
||||
@@ -139,9 +139,9 @@ POST /api/calls/{call_id}/transfer
|
||||
#### List Call Flows
|
||||
|
||||
```
|
||||
GET /api/call-flows
|
||||
GET /api/call-flows?company=Chase+Bank
|
||||
GET /api/call-flows?tag=banking
|
||||
GET /api/v1/call-flows
|
||||
GET /api/v1/call-flows?company=Chase+Bank
|
||||
GET /api/v1/call-flows?tag=banking
|
||||
```
|
||||
|
||||
**Response:**
|
||||
@@ -166,7 +166,7 @@ GET /api/call-flows?tag=banking
|
||||
#### Get Call Flow
|
||||
|
||||
```
|
||||
GET /api/call-flows/{flow_id}
|
||||
GET /api/v1/call-flows/{flow_id}
|
||||
```
|
||||
|
||||
Returns the full call flow with all steps.
|
||||
@@ -174,7 +174,7 @@ Returns the full call flow with all steps.
|
||||
#### Create Call Flow
|
||||
|
||||
```
|
||||
POST /api/call-flows
|
||||
POST /api/v1/call-flows
|
||||
```
|
||||
|
||||
**Request:**
|
||||
@@ -197,13 +197,13 @@ POST /api/call-flows
|
||||
#### Update Call Flow
|
||||
|
||||
```
|
||||
PUT /api/call-flows/{flow_id}
|
||||
PUT /api/v1/call-flows/{flow_id}
|
||||
```
|
||||
|
||||
#### Delete Call Flow
|
||||
|
||||
```
|
||||
DELETE /api/call-flows/{flow_id}
|
||||
DELETE /api/v1/call-flows/{flow_id}
|
||||
```
|
||||
|
||||
### Devices
|
||||
@@ -211,7 +211,7 @@ DELETE /api/call-flows/{flow_id}
|
||||
#### List Registered Devices
|
||||
|
||||
```
|
||||
GET /api/devices
|
||||
GET /api/v1/devices
|
||||
```
|
||||
|
||||
**Response:**
|
||||
@@ -234,7 +234,7 @@ GET /api/devices
|
||||
#### Register a Device
|
||||
|
||||
```
|
||||
POST /api/devices
|
||||
POST /api/v1/devices
|
||||
```
|
||||
|
||||
**Request:**
|
||||
@@ -252,13 +252,13 @@ POST /api/devices
|
||||
#### Update Device
|
||||
|
||||
```
|
||||
PUT /api/devices/{device_id}
|
||||
PUT /api/v1/devices/{device_id}
|
||||
```
|
||||
|
||||
#### Remove Device
|
||||
|
||||
```
|
||||
DELETE /api/devices/{device_id}
|
||||
DELETE /api/v1/devices/{device_id}
|
||||
```
|
||||
|
||||
### Error Responses
|
||||
|
||||
Reference in New Issue
Block a user