docs: fix unregister endpoint description — supports uuid + pattern modes

This commit is contained in:
Accusys
2026-05-14 17:38:35 +08:00
parent 4494935cc9
commit 8608d38548
2 changed files with 13 additions and 4 deletions

View File

@@ -61,7 +61,7 @@ Every path segment after the resource ID is a **verb** — an action on that res
| 6 | GET | `/api/v1/stats/sftpgo` | SFTPGo service status |
| 7 | GET | `/api/v1/stats/inference` | LLM/embedding health |
| 8 | POST | `/api/v1/files/register` | Register video file → file_uuid |
| 9 | POST | `/api/v1/unregister` | Delete file + all data |
| 9 | POST | `/api/v1/unregister` | Unregister file(s): by `uuid` or pattern match on `file_path`+`pattern` |
| 10 | GET | `/api/v1/files/scan` | Scan directory for new files |
| 11 | GET | `/api/v1/file/:file_uuid/probe` | ffprobe metadata |
| 12 | POST | `/api/v1/file/:file_uuid/process` | Start processing pipeline |

View File

@@ -96,7 +96,7 @@ curl http://localhost:3002/health/detailed
| # | Method | Path | Description |
|---|--------|------|-------------|
| 9 | POST | `/api/v1/files/register` | Register video → file_uuid |
| 10 | POST | `/api/v1/unregister` | Delete file + all data |
| 10 | POST | `/api/v1/unregister` | Unregister file(s): by `uuid` or pattern match (`file_path`+`pattern`) |
| 11 | GET | `/api/v1/files/scan` | Scan directory for new files |
| 12 | GET | `/api/v1/files` | List files (paginated) |
| 13 | GET | `/api/v1/file/:file_uuid` | Single file detail |
@@ -113,11 +113,20 @@ curl -X POST http://localhost:3002/api/v1/files/register -H "X-API-Key: muser_6
{"success":true,"file_uuid":"3abeee81d94597629ed8cb943f182e94","duration":5954.0}
```
Modes:
- By `uuid`: unregister a single file
- By `file_path` + `pattern` regex: unregister all matching files in a directory
```bash
# By UUID
curl -X POST http://localhost:3002/api/v1/unregister \
-H "X-API-Key: muser_68600856036340bcafc01930eb4bd839_1774418104_97221b69" \
-H "Content-Type: application/json" \
-H "X-API-Key: muser_..." -H "Content-Type: application/json" \
-d '{"uuid":"53e3a229bf68878b7a799e811e097f9c"}'
# By pattern (unregister all .mp4 files in directory)
curl -X POST http://localhost:3002/api/v1/unregister \
-H "X-API-Key: muser_..." -H "Content-Type: application/json" \
-d '{"file_path":"/data/demo","pattern":"\\.mp4$"}'
```
```json
{"success":true,"uuid":"53e3a229bf68878b7a799e811e097f9c","message":"File unregistered successfully"}