feat: Face JSON v2 schema - add schema_version, bbox x2/y2/center, keep embeddings, update clustering
This commit is contained in:
@@ -1,60 +1,208 @@
|
||||
# API Workspace
|
||||
---
|
||||
title: API Documentation Index
|
||||
version: 1.0
|
||||
date: 2026-10-24
|
||||
author: Core Team
|
||||
status: Active
|
||||
---
|
||||
|
||||
## Purpose
|
||||
# API Documentation Index
|
||||
|
||||
This directory is the **single source of truth** for all API documentation modules.
|
||||
Generated outputs go to `../GUIDES/` as assembled deliverable documents.
|
||||
Complete API reference for Momentry Core. All endpoints are documented with request/response formats, examples, and error handling.
|
||||
|
||||
## Workflow
|
||||
---
|
||||
|
||||
## 📋 Module Overview
|
||||
|
||||
### Core APIs (01-19)
|
||||
|
||||
| Module | File | Description |
|
||||
|--------|------|-------------|
|
||||
| **01** | [auth.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/01_auth.md) | Authentication - login, logout, JWT, API key |
|
||||
| **02** | [health.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/02_health.md) | Health check endpoints |
|
||||
| **03** | [register.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/03_register.md) | File registration |
|
||||
| **04** | [lookup.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/04_lookup.md) | File lookup and metadata |
|
||||
| **05** | [process.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/05_process.md) | Video processing pipeline |
|
||||
| **06** | [search.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/06_search.md) | Search operations |
|
||||
| **07** | [identity.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/07_identity.md) | Identity management |
|
||||
| **08** | [identity_agent.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/08_identity_agent.md) | Identity agent operations |
|
||||
| **08** | [media.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/08_media.md) | Media access and proxy |
|
||||
| **09** | [tmdb.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/09_tmdb.md) | TMDb integration |
|
||||
| **10** | [pipeline.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/10_pipeline.md) | Pipeline management |
|
||||
| **11** | [error_codes.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/11_error_codes.md) | Error code reference |
|
||||
| **12** | [agent.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/12_agent.md) | Agent API |
|
||||
| **13** | [config.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/13_config.md) | Configuration management |
|
||||
| **14** | [identity_history.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/14_identity_history.md) | Identity history tracking |
|
||||
| **15** | [tkg.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/15_tkg.md) | Temporal Knowledge Graph |
|
||||
| **16** | [workspace.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/16_workspace.md) | Workspace management |
|
||||
| **17** | [progress.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/17_progress.md) | Progress tracking |
|
||||
| **18** | [profile.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/18_profile.md) | File profile and metadata |
|
||||
| **19** | [people_api.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/19_people_api.md) | People management API |
|
||||
|
||||
---
|
||||
|
||||
### New APIs (20-24)
|
||||
|
||||
| Module | File | Description | Status |
|
||||
|--------|------|-------------|--------|
|
||||
| **20** | [service_management_api.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/20_service_management_api.md) | Service start/stop/health | ✅ P0 - Critical |
|
||||
| **21** | [monitor_api.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/21_monitor_api.md) | Queue/Worker/Pipeline monitoring | ✅ P1 - Important |
|
||||
| **22** | [trace_agent_api.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/22_trace_agent_api.md) | Trace and TKG operations | ✅ P1 - Important |
|
||||
| **23** | [vlm_search_api.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/23_vlm_search_api.md) | Vision Language Model search | ✅ P1 - Important |
|
||||
| **24** | [pose_appearance_api.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/24_pose_appearance_api.md) | Pose keypoints and appearance colors | ✅ P2 - Standard |
|
||||
|
||||
---
|
||||
|
||||
### Studio Team Guides (21-26)
|
||||
|
||||
| Module | File | Description |
|
||||
|--------|------|-------------|
|
||||
| **21** | [studio_team_guide.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/21_studio_team_guide.md) | Integration guide for Studio team |
|
||||
| **22** | [studio_pipeline_changes.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/22_studio_pipeline_changes.md) | Pipeline changes documentation |
|
||||
| **23** | [studio_face_group_name_fix.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/23_studio_face_group_name_fix.md) | Face group name fix guide |
|
||||
| **24** | [studio_trace_profile_read_write_bug.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/24_studio_trace_profile_read_write_bug.md) | Trace profile bug documentation |
|
||||
| **25** | [face_filter_api.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/25_face_filter_api.md) | Face filtering API |
|
||||
| **26** | [trace_thumbnail_regenerate.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/26_trace_thumbnail_regenerate.md) | Thumbnail regeneration |
|
||||
|
||||
---
|
||||
|
||||
### Additional Modules
|
||||
|
||||
| File | Description |
|
||||
|------|-------------|
|
||||
| [scene_vlm_stats_api.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/scene_vlm_stats_api.md) | Scene VLM statistics API |
|
||||
| [99_incomplete.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/99_incomplete.md) | Incomplete features reference |
|
||||
| [_template.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/_template.md) | Documentation template |
|
||||
|
||||
---
|
||||
|
||||
## 🔍 Quick Reference by Category
|
||||
|
||||
### Authentication & Security
|
||||
|
||||
- [Auth API](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/01_auth.md) - Login, logout, JWT tokens, API keys
|
||||
|
||||
### File Operations
|
||||
|
||||
- [Register](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/03_register.md) - Register new files
|
||||
- [Lookup](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/04_lookup.md) - File metadata and lookup
|
||||
- [Process](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/05_process.md) - Video processing
|
||||
- [Profile](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/18_profile.md) - File profile
|
||||
|
||||
### Search & Query
|
||||
|
||||
- [Search](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/06_search.md) - General search
|
||||
- [VLM Search](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/23_vlm_search_api.md) - Vision Language Model search
|
||||
- [TKG](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/15_tkg.md) - Temporal Knowledge Graph
|
||||
|
||||
### Identity & People
|
||||
|
||||
- [Identity](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/07_identity.md) - Identity management
|
||||
- [Identity Agent](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/08_identity_agent.md) - Agent operations
|
||||
- [Identity History](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/14_identity_history.md) - History tracking
|
||||
- [People API](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/19_people_api.md) - People management
|
||||
- [Trace Agent](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/22_trace_agent_api.md) - Trace operations
|
||||
- [Pose & Appearance](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/24_pose_appearance_api.md) - Pose and appearance data
|
||||
|
||||
### System & Monitoring
|
||||
|
||||
- [Health](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/02_health.md) - Health checks
|
||||
- [Service Management](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/20_service_management_api.md) - Service control
|
||||
- [Monitor](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/21_monitor_api.md) - System monitoring
|
||||
- [Progress](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/17_progress.md) - Progress tracking
|
||||
- [Pipeline](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/10_pipeline.md) - Pipeline management
|
||||
|
||||
### Media & Content
|
||||
|
||||
- [Media](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/08_media.md) - Media access
|
||||
- [TMDb](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/09_tmdb.md) - TMDb integration
|
||||
|
||||
### Configuration & Management
|
||||
|
||||
- [Config](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/13_config.md) - Configuration
|
||||
- [Workspace](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/16_workspace.md) - Workspace management
|
||||
- [Agent](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/12_agent.md) - Agent API
|
||||
|
||||
---
|
||||
|
||||
## 📖 Usage Guidelines
|
||||
|
||||
### Authentication
|
||||
|
||||
Most API endpoints require authentication via API key:
|
||||
|
||||
```bash
|
||||
# 1. Edit a module
|
||||
vim modules/09_tmdb.md
|
||||
|
||||
# 2. Preview the generated output
|
||||
make _build/API_ENDPOINTS.md
|
||||
|
||||
# 3. Check diff against current GUIDES/ content
|
||||
make check
|
||||
|
||||
# 4. Deploy to GUIDES/
|
||||
make deploy
|
||||
|
||||
# 5. Regenerate all
|
||||
make all
|
||||
curl -H "X-API-Key: your-api-key" \
|
||||
http://localhost:3002/api/v1/...
|
||||
```
|
||||
|
||||
## Directory Structure
|
||||
See [Auth API](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/01_auth.md) for details.
|
||||
|
||||
```
|
||||
API_WORKSPACE/
|
||||
├── modules/ ← 11 module files (01_auth ... 11_error_codes)
|
||||
├── configs/ ← 7 assembly recipies (.toml)
|
||||
├── narratives/ ← narrative intros for specific output files
|
||||
├── _build/ ← generated output (gitignored)
|
||||
├── Makefile ← build targets
|
||||
├── assemble_docs.sh ← assembly engine
|
||||
└── README.md
|
||||
```
|
||||
### Base URLs
|
||||
|
||||
## Available `make` Targets
|
||||
| Environment | Base URL |
|
||||
|------------|----------|
|
||||
| Production | `http://localhost:3002` |
|
||||
| External | `https://m5api.momentry.ddns.net` |
|
||||
| Development | `http://localhost:3003` |
|
||||
|
||||
| Target | Output |
|
||||
|--------|--------|
|
||||
| `make reference` | `_build/API_REFERENCE.md` |
|
||||
| `make endpoints` | `_build/API_ENDPOINTS.md` |
|
||||
| `make quickref` | `_build/API_QUICK_REFERENCE.md` |
|
||||
| `make errors` | `_build/API_ERROR_CODES.md` |
|
||||
| `make index` | `_build/API_INDEX.md` |
|
||||
| `make marcom` | `_build/API_TRAINING_MARCOM.md` |
|
||||
| `make tmdb` | `_build/TMDb_User_Guide.md` |
|
||||
| `make all` | All of the above |
|
||||
| `make deploy` | Copy `_build/*` → `../GUIDES/` |
|
||||
| `make check` | `diff` against existing `../GUIDES/` files |
|
||||
### Common Patterns
|
||||
|
||||
## Adding a New Endpoint
|
||||
#### File Processing
|
||||
|
||||
1. Add the endpoint to the appropriate module (e.g., `modules/XX_files.md`)
|
||||
2. Follow the template in `modules/_template.md`
|
||||
3. `make all && make check`
|
||||
4. `make deploy`
|
||||
1. Register file: `POST /api/v1/register`
|
||||
2. Process file: `POST /api/v1/process`
|
||||
3. Check progress: `GET /api/v1/progress/{file_uuid}`
|
||||
4. Search results: `GET /api/v1/search`
|
||||
|
||||
#### Identity Management
|
||||
|
||||
1. List identities: `GET /api/v1/identities`
|
||||
2. Bind faces: `POST /api/v1/identities/{identity_uuid}/bind`
|
||||
3. Search identities: `GET /api/v1/search/identities`
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Development
|
||||
|
||||
### Adding New Endpoints
|
||||
|
||||
1. Use [_template.md](/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/_template.md)
|
||||
2. Follow naming convention: `NN_topic.md`
|
||||
3. Add YAML frontmatter
|
||||
4. Include complete examples
|
||||
5. Add to this index
|
||||
|
||||
### Documentation Standards
|
||||
|
||||
All modules must include:
|
||||
- ✅ YAML frontmatter
|
||||
- ✅ Module metadata (module, description, depends)
|
||||
- ✅ Endpoint documentation with examples
|
||||
- ✅ Error codes
|
||||
- ✅ Version history
|
||||
|
||||
---
|
||||
|
||||
## 📊 Statistics
|
||||
|
||||
| Metric | Count |
|
||||
|--------|-------|
|
||||
| **Total API Modules** | 31 |
|
||||
| **Core APIs** | 20 |
|
||||
| **New APIs** | 5 |
|
||||
| **Studio Guides** | 6 |
|
||||
| **Total Endpoints** | 100+ |
|
||||
|
||||
---
|
||||
|
||||
## Version History
|
||||
|
||||
| Version | Date | Changes |
|
||||
|---------|------|---------|
|
||||
| 1.0 | 2026-10-24 | Initial comprehensive API index |
|
||||
|
||||
---
|
||||
|
||||
**Last Updated**: 2026-10-24
|
||||
**Maintained By**: Core Team
|
||||
Reference in New Issue
Block a user