Scan Controller Documentation

The ScanController handles media library scanning operations, including starting a new scan and checking the progress of an ongoing scan.

Controller Route: /api/scan

All routes within the ScanController are prefixed by /api/scan.


Summary of Endpoints

Endpoint Method Description Authorization
/api/scan/start POST Initiates a media library scan. Admin
/api/scan/progress GET Retrieves the current scan progress. Admin

Start a Media Library Scan

Initiates a new scan of the media library.

Details:

Parameters:

Responses:

Example Request (using curl):

curl -X POST "https://your-api-url.com/api/scan/start?skip=false" \
             -H "Authorization: Bearer <JWT-token>"
        

Get Scan Progress

Fetches the current progress of an ongoing scan, including the number of scanned and found files. If you want Realtime progress updates, use the client WebSocket SEND PROGRESS command.

Details:

Responses:

Example Request (using curl):

curl -X GET "https://your-api-url.com/api/scan/progress" \
             -H "Authorization: Bearer <JWT-token>"