From b4421b050055be1dc525f6f95c37fd7aa761645d Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Tue, 24 Feb 2026 21:33:16 -0500 Subject: [PATCH] fix(bruno): correct JSON syntax in Scan Media Items request MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix critical bug where library_id variable was not quoted in the request body, causing invalid JSON that was rejected by the API parser. Changes: - Quote library_id variable: {{library_id}} → "{{library_id}}" - Add explicit Content-Type header - Update request body format to use proper YAML multi-line string Root Cause: - Unquoted UUID in JSON: {"library_id": 551ac19c-896a-...} - Produced invalid JSON that failed c.Bind() in scanner handler - Handler returned 400 "invalid request" error Impact: - Bruno requests for scanning now work correctly - API scan endpoint accepts request successfully - Enables proper testing of scan functionality via Bruno Testing: - Verified scan request completes successfully - Job ID returned correctly - Scanner processes files as expected File: bruno/scanner/Scan Media Items.yml --- bruno/scanner/Scan Media Items.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/bruno/scanner/Scan Media Items.yml b/bruno/scanner/Scan Media Items.yml index 73ac5e8..860e6fa 100644 --- a/bruno/scanner/Scan Media Items.yml +++ b/bruno/scanner/Scan Media Items.yml @@ -2,13 +2,30 @@ info: name: Scan Media Items (Background) type: http seq: 1 + http: method: POST - url: '{{base_url}}/api/scanner/scan' - auth: inherit + url: "{{base_url}}/api/scanner/scan" + headers: + - name: Content-Type + value: application/json + params: + - name: "" + value: "" + type: query body: type: json - jsonBody: "{\n \"folder_paths\": [\"/path/to/media\"]" + data: |- + { + "library_id": "{{library_id}}" + } + auth: inherit + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 docs: |- ## Scan Media Items (Background)