You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/how-to/api.md
+31-26Lines changed: 31 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ This guide shows how to use the HTTP API end-to-end: check health, add an instan
6
6
- Services running (Docker Compose or local uvicorn + worker)
7
7
- If you enabled auth in your environment, include your API key header as needed
8
8
9
+
**Port Note**: Docker Compose exposes the API on port **8080**, while local uvicorn uses port **8000**. Examples below use port 8080 (Docker Compose). Replace with 8000 if running locally.
10
+
9
11
### 1) Start services (choose one)
10
12
- Docker Compose
11
13
```bash
@@ -26,20 +28,21 @@ uv run redis-sre-agent worker --concurrency 4
26
28
### 2) Health and readiness
27
29
```bash
28
30
# Root health (fast)
29
-
curl -fsS http://localhost:8000/
31
+
# Use port 8080 for Docker Compose, port 8000 for local uvicorn
@@ -69,14 +72,16 @@ curl -fsS -X POST http://localhost:8000/api/v1/instances/test-connection-url \
69
72
70
73
### 4) Triage with tasks and threads
71
74
Simplest: create a task with your question. The API will create a thread if you omit `thread_id`.
75
+
76
+
> **Note**: Triage performs comprehensive analysis (metrics, logs, knowledge base, multi-topic recommendations) and typically takes **2-10 minutes** to complete. Poll the task status or use WebSocket for real-time updates.
72
77
```bash
73
78
# Create a task (no instance)
74
-
curl -fsS -X POST http://localhost:8000/api/v1/tasks \
79
+
curl -fsS -X POST http://localhost:8080/api/v1/tasks \
75
80
-H 'Content-Type: application/json' \
76
81
-d '{"message": "Explain high memory usage signals in Redis"}'| jq
77
82
78
83
# Create a task (target a specific instance)
79
-
curl -fsS -X POST http://localhost:8000/api/v1/tasks \
84
+
curl -fsS -X POST http://localhost:8080/api/v1/tasks \
80
85
-H 'Content-Type: application/json' \
81
86
-d '{
82
87
"message": "Check memory pressure and slow ops",
@@ -86,15 +91,15 @@ curl -fsS -X POST http://localhost:8000/api/v1/tasks \
0 commit comments