Problems API
Endpoints Overview
| Method | Path | Description |
|---|---|---|
| GET | /prod/api/problems | List problems |
| GET | /prod/api/problems/:id | Get single problem |
| POST | /prod/api/problems | Create problem |
| PATCH | /prod/api/problems/:id | Update problem |
| DELETE | /prod/api/problems/:id | Delete problem (admin) |
| POST | /prod/api/problems/:id/incidents | Link incidents |
| GET | /prod/api/problems/:id/incidents | List linked incidents |
| GET | /prod/api/problems/kedb | List KEDB entries |
| POST | /prod/api/problems/:id/kedb | Promote to KEDB |
List Problems
GET /prod/api/problems?state=known_error&limit=25
curl -H "Authorization: Bearer $TOKEN" "https://your-instance.stackflow-tech.com/prod/api/problems?state=known_error&priority=P1"
Get Problem
curl -H "Authorization: Bearer $TOKEN" https://your-instance.stackflow-tech.com/prod/api/problems/PRB0000123
{
"id": "PRB0000123",
"short_description": "Aurora connection pool exhaustion under load",
"root_cause": "Missing connection pool size limit in Lambda environment variable",
"workaround": "Restart StackFlowAPI Lambda to reset connections",
"state": "known_error",
"priority": "P2",
"assignment_group": "Platform Engineering",
"linked_incidents": ["INC0001230", "INC0001231", "INC0001234"],
"kedb_id": "KEDB0000045",
"created_at": "2026-05-10T09:00:00Z",
"updated_at": "2026-05-19T14:00:00Z"
}
Create Problem
curl -X POST https://your-instance.stackflow-tech.com/prod/api/problems -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{
"short_description": "Neptune graph query timeouts on deep traversals",
"description": "Gremlin queries with more than 5 hops consistently timeout at 30s",
"priority": "P2",
"category": "database",
"assignment_group": "Platform Engineering",
"linked_incident_ids": ["INC0001220", "INC0001225"]
}'
Update Problem
curl -X PATCH https://your-instance.stackflow-tech.com/prod/api/problems/PRB0000123 -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{
"state": "root_cause_identified",
"root_cause": "MAX_POOL_SIZE env var not set; defaulting to 1 connection per Lambda",
"workaround": "Set MAX_POOL_SIZE=10 in Lambda environment variables via Systems Manager"
}'
Problem state machine:
new → under_investigation → root_cause_identified → known_error → resolved → closed
new → cancelled
Link Incidents to Problem
curl -X POST https://your-instance.stackflow-tech.com/prod/api/problems/PRB0000123/incidents -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"incident_ids": ["INC0001240", "INC0001241"]}'
KEDB Entries
Known Error Database entries document problems with confirmed root causes and workarounds. Promoting a problem to KEDB makes its workaround searchable by the AI Copilot and surfaced in similar incident workflows.
# List all KEDB entries
curl -H "Authorization: Bearer $TOKEN" "https://your-instance.stackflow-tech.com/prod/api/problems/kedb?limit=50"
# Promote problem to KEDB
curl -X POST https://your-instance.stackflow-tech.com/prod/api/problems/PRB0000123/kedb -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{
"workaround_steps": [
"1. Open AWS Lambda console",
"2. Find StackFlowAPI function",
"3. Set MAX_POOL_SIZE=10 in environment variables",
"4. Deploy the function update"
],
"keywords": ["aurora", "connection pool", "timeout", "lambda"],
"resolution_eta_days": 14
}'
Field Reference
| Field | Type | Description |
|---|---|---|
id | string | PRBxxxxxxx identifier |
short_description | string | Required, max 255 chars |
root_cause | string | Root cause analysis text |
workaround | string | Temporary workaround steps |
state | enum | new, under_investigation, root_cause_identified, known_error, resolved, closed |
priority | enum | P1–P4 |
kedb_id | string | KEDB entry ID if promoted |
linked_incidents | array | Array of linked incident IDs |