meta { name: Get User Visible Libraries type: http seq: 1 } get { url: {{base_url}}/api/libraries/visible auth: inherit } headers { Content-Type: application/json } tests { test_get_visible_libraries_success(status, headers, body) { if (status !== 200) { throw new Error("Expected status 200, got " + status); } const contentType = headers["content-type"]; if (!contentType || !contentType.includes("application/json")) { throw new Error("Expected content-type to contain application/json, got " + contentType); } // Verify response body is valid JSON and has expected structure let data; try { data = JSON.parse(body); } catch (e) { throw new Error("Response body is not valid JSON"); } if (!Array.isArray(data)) { throw new Error("Expected response body to be an array"); } // Validate each library in array (all should be visible) data.forEach((library, index) => { if (!library || typeof library !== "object") { throw new Error("Library at index " + index + " is not an object"); } if (!library.id) { throw new Error("Library at index " + index + " missing required field: id"); } if (!library.name) { throw new Error("Library at index " + index + " missing required field: name"); } if (library.is_visible !== true) { throw new Error("Library at index " + index + " is not marked as visible"); } }); return true; } } settings { encodeUrl: true timeout: 0 } docs { ## Get User Visible Libraries Retrieves all libraries that are visible to regular users. **Method:** GET **Endpoint:** /api/libraries/visible **Authentication:** Required (Bearer token) **Response:** Array of visible library objects - `id` (string): Library UUID - `name` (string): Library name - `description` (string, optional): Library description - `type` (string): Library type (ebooks, audiobooks, videos, other) - `is_visible` (boolean): Always true for this endpoint - `media_count` (number): Number of media items in library - `created_at` (string): Creation timestamp **Status Codes:** - 200: Success - 401: Unauthorized - 500: Internal server error }