| name | sc-files |
| description | List, inspect, filter, and delete files that have been indexed in the Content Search backend. Also lists available tags for use in Q&A filtering. Use when the user says "list files", "show indexed files", "what files are uploaded", "delete a file", "remove file", "list tags", or "manage files".
|
SC Files
List, inspect, and delete files indexed in the Content Search backend.
Agent: execute every command below directly using your terminal tool and relay
the output. Endpoints use the base URL http://127.0.0.1:9011.
Set $BASE = "http://127.0.0.1:9011" for all snippets.
Preconditions
Backend must be reachable — probe first:
$BASE = "http://127.0.0.1:9011"
Invoke-WebRequest -Uri "$BASE/api/v1/system/health" -UseBasicParsing |
Select-Object -ExpandProperty Content
If unreachable, use sc-doctor / sc-up.
1. List all indexed files
GET /api/v1/object/files/list — supports pagination and optional type filter.
The response is wrapped: { "data": { "files": [...] } } — not a bare array.
$BASE = "http://127.0.0.1:9011"
$r = Invoke-WebRequest -Uri "$BASE/api/v1/object/files/list?page=1&page_size=50" `
-UseBasicParsing
$files = ($r.Content | ConvertFrom-Json).data.files
$files | Select-Object file_name, @{N="type";E={$_.meta.type}}, @{N="size_mb";E={[math]::Round($_.size_bytes / 1MB, 2)}}, @{N="vectors";E={$_.index.vector_count}}, status |
Format-Table -AutoSize
Filter by file type
# Only documents
$r = Invoke-WebRequest -Uri "$BASE/api/v1/object/files/list?file_type=document" `
-UseBasicParsing
# Only videos
$r = Invoke-WebRequest -Uri "$BASE/api/v1/object/files/list?file_type=video" `
-UseBasicParsing
# Only images
$r = Invoke-WebRequest -Uri "$BASE/api/v1/object/files/list?file_type=image" `
-UseBasicParsing