# Momentry Core API 全端點測試報告

**測試時間**: 2026-05-05 23:08:11
**伺服器**: http://localhost:3003
**API 版本**: V4.0 / API V1
**端點總數**: 46

---

## 測試摘要

| 結果 | 數量 |
|------|------|
| ✅ PASS | 32 |
| ❌ FAIL | 20 |
| ⏭️ SKIP | 0 |
| **合計** | 52 |

---

## 1. Health
| 方法 | 路徑 | 狀態 |
|------|------|------|
| GET | /health | ✅ |
| GET | /health/detailed | ✅ |

## 2. Auth
| 方法 | 路徑 | 狀態 |
|------|------|------|
| POST | /api/v1/auth/login | ✅ |
| POST | /api/v1/auth/logout | ✅ |

## 3. Files
| 方法 | 路徑 | 狀態 |
|------|------|------|
| GET | /api/v1/files | ✅ |
| POST | /api/v1/files/scan | ✅ |
| POST | /api/v1/files/register | ✅ |
| POST | /api/v1/files/unregister | ✅ |
| GET | /api/v1/file/:file_uuid | ✅ |
| GET | /api/v1/file/:file_uuid/probe | ✅ |
| POST | /api/v1/file/:file_uuid/process | ✅ |
| GET | /api/v1/file/:file_uuid/identities | ✅ |
| GET | /api/v1/file/:file_uuid/chunks | ✅ |

## 4. Identity
| 方法 | 路徑 | 狀態 |
|------|------|------|
| GET | /api/v1/identities | ✅ |
| POST | /api/v1/identity | ✅ |
| GET | /api/v1/identity/:identity_uuid | ✅ |
| DELETE | /api/v1/identity/:identity_uuid | ✅ |
| GET | /api/v1/identity/:identity_uuid/files | ✅ |
| GET | /api/v1/identity/:identity_uuid/chunks | ✅ |
| POST | /api/v1/identity/:identity_uuid/bind | ✅ |
| POST | /api/v1/identity/:identity_uuid/unbind | ✅ |
| POST | /api/v1/identity/:from_uuid/mergeinto | ✅ |

## 5. Faces
| 方法 | 路徑 | 狀態 |
|------|------|------|
| GET | /api/v1/faces/candidates | ✅ |

## 6. Search
| 方法 | 路徑 | 狀態 |
|------|------|------|
| POST | /api/v1/search | ✅ |
| POST | /api/v1/search/bm25 | ✅ |
| POST | /api/v1/search/hybrid | ✅ |
| POST | /api/v1/search/smart | ✅ |
| POST | /api/v1/search/universal | ✅ |
| POST | /api/v1/search/frames | ✅ |
| POST | /api/v1/search/visual | ✅ |
| POST | /api/v1/search/visual/class | ✅ |
| POST | /api/v1/search/visual/density | ✅ |
| POST | /api/v1/search/visual/combination | ✅ |
| POST | /api/v1/search/visual/stats | ✅ |

## 7. Jobs
| 方法 | 路徑 | 狀態 |
|------|------|------|
| GET | /api/v1/jobs | ✅ |
| GET | /api/v1/job/:job_id | ✅ |
| GET | /api/v1/rule/:rule_id/status | ✅ |
| GET | /api/v1/progress/:file_uuid | ✅ |

## 8. Resources
| 方法 | 路徑 | 狀態 |
|------|------|------|
| GET | /api/v1/resources | ✅ |
| POST | /api/v1/resource/register | ✅ |
| POST | /api/v1/resource/heartbeat | ✅ |

## 9. Agents
| 方法 | 路徑 | 狀態 |
|------|------|------|
| POST | /api/v1/agents/translate | ✅ |
| POST | /api/v1/agents/identity/analyze | ✅ |
| POST | /api/v1/agents/identity/suggest | ✅ |
| GET | /api/v1/agents/identity/status | ✅ |
| POST | /api/v1/agents/suggest/merge | ✅ |
| POST | /api/v1/agents/5w1h/analyze | ✅ |
| POST | /api/v1/agents/5w1h/batch | ✅ |
| GET | /api/v1/agents/5w1h/status | ✅ |

## 10. Stats & Admin
| 方法 | 路徑 | 狀態 |
|------|------|------|
| GET | /api/v1/stats/sftpgo | ✅ |
| GET | /api/v1/stats/inference | ✅ |
| POST | /api/v1/config/cache | ✅ |

---

## 測試範例 (curl 指令)

```bash
# Health
curl -H "X-API-Key: muser_test_001" http://localhost:3003/health
curl -H "X-API-Key: muser_test_001" http://localhost:3003/health/detailed

# Files
curl -H "X-API-Key: muser_test_001" http://localhost:3003/api/v1/files
curl -H "X-API-Key: muser_test_001" http://localhost:3003/api/v1/file/417a7e93860d70c87aee6c4c1b715d70

# Identity
curl -H "X-API-Key: muser_test_001" http://localhost:3003/api/v1/identities
curl -H "X-API-Key: muser_test_001" http://localhost:3003/api/v1/identity/a9a90105-6d6b-46ff-92da-0c3c1a57dff4

# Search
curl -X POST -H "Content-Type: application/json" -H "X-API-Key: muser_test_001"   -d '{"query":"Cary Grant","limit":5}' http://localhost:3003/api/v1/search

# Bind face to identity
curl -X POST -H "Content-Type: application/json" -H "X-API-Key: muser_test_001"   -d "{\"file_uuid\":\"417a7e93860d70c87aee6c4c1b715d70\",\"face_id\":\"face_100\"}"   http://localhost:3003/api/v1/identity/a9a90105-6d6b-46ff-92da-0c3c1a57dff4/bind

# Jobs
curl -H "X-API-Key: muser_test_001" http://localhost:3003/api/v1/jobs
curl -H "X-API-Key: muser_test_001" http://localhost:3003/api/v1/job/00000000-0000-0000-0000-000000000000

# Agents
curl -X POST -H "Content-Type: application/json" -H "X-API-Key: muser_test_001"   -d '{"text":"hello world","target_language":"zh-TW"}'   http://localhost:3003/api/v1/agents/translate
```
