docs: fix unregister endpoint description — supports uuid + pattern modes
This commit is contained in:
@@ -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 |
|
| 6 | GET | `/api/v1/stats/sftpgo` | SFTPGo service status |
|
||||||
| 7 | GET | `/api/v1/stats/inference` | LLM/embedding health |
|
| 7 | GET | `/api/v1/stats/inference` | LLM/embedding health |
|
||||||
| 8 | POST | `/api/v1/files/register` | Register video file → file_uuid |
|
| 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 |
|
| 10 | GET | `/api/v1/files/scan` | Scan directory for new files |
|
||||||
| 11 | GET | `/api/v1/file/:file_uuid/probe` | ffprobe metadata |
|
| 11 | GET | `/api/v1/file/:file_uuid/probe` | ffprobe metadata |
|
||||||
| 12 | POST | `/api/v1/file/:file_uuid/process` | Start processing pipeline |
|
| 12 | POST | `/api/v1/file/:file_uuid/process` | Start processing pipeline |
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ curl http://localhost:3002/health/detailed
|
|||||||
| # | Method | Path | Description |
|
| # | Method | Path | Description |
|
||||||
|---|--------|------|-------------|
|
|---|--------|------|-------------|
|
||||||
| 9 | POST | `/api/v1/files/register` | Register video → file_uuid |
|
| 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 |
|
| 11 | GET | `/api/v1/files/scan` | Scan directory for new files |
|
||||||
| 12 | GET | `/api/v1/files` | List files (paginated) |
|
| 12 | GET | `/api/v1/files` | List files (paginated) |
|
||||||
| 13 | GET | `/api/v1/file/:file_uuid` | Single file detail |
|
| 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}
|
{"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
|
```bash
|
||||||
|
# By UUID
|
||||||
curl -X POST http://localhost:3002/api/v1/unregister \
|
curl -X POST http://localhost:3002/api/v1/unregister \
|
||||||
-H "X-API-Key: muser_68600856036340bcafc01930eb4bd839_1774418104_97221b69" \
|
-H "X-API-Key: muser_..." -H "Content-Type: application/json" \
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-d '{"uuid":"53e3a229bf68878b7a799e811e097f9c"}'
|
-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
|
```json
|
||||||
{"success":true,"uuid":"53e3a229bf68878b7a799e811e097f9c","message":"File unregistered successfully"}
|
{"success":true,"uuid":"53e3a229bf68878b7a799e811e097f9c","message":"File unregistered successfully"}
|
||||||
|
|||||||
Reference in New Issue
Block a user