diff --git a/docs_v1.0/API_V1.0.0/API_DICTIONARY_V1.0.0.md b/docs_v1.0/API_V1.0.0/API_DICTIONARY_V1.0.0.md index b63e40f..2450c41 100644 --- a/docs_v1.0/API_V1.0.0/API_DICTIONARY_V1.0.0.md +++ b/docs_v1.0/API_V1.0.0/API_DICTIONARY_V1.0.0.md @@ -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 | diff --git a/docs_v1.0/API_V1.0.0/API_REFERENCE_V1.0.0.md b/docs_v1.0/API_V1.0.0/API_REFERENCE_V1.0.0.md index 575e879..74deb3b 100644 --- a/docs_v1.0/API_V1.0.0/API_REFERENCE_V1.0.0.md +++ b/docs_v1.0/API_V1.0.0/API_REFERENCE_V1.0.0.md @@ -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"}