Get all bookmark categories
GET /api/browser/categories
Retrieve all bookmark categories with usage statistics and rules.
Returns all defined bookmark categories including:
- Category metadata (name, description, color)
- Bookmark count per category
- Auto-assignment rules
- Configuration settings
Returns: List of CategoryResponse objects containing:
id: Unique category identifiername: Category namedescription: Category descriptioncolor: Hex color code for UIbookmark_count: Number of bookmarks in categoryrules: URL pattern rules for auto-assignmentauto_assign: Whether auto-assignment is enabledcreated_at: ISO 8601 creation timestamp
Raises:
HTTPException 500: For database or retrieval errors
Usage: GET /api/browser/categories
Example Response:
[
{
"id": "cat_1234567890",
"name": "Research",
"description": "Academic papers and research content",
"color": "#3b82f6",
"bookmarkCount": 42,
"rules": ["*.edu", "scholar.google.com", "arxiv.org"],
"autoAssign": true,
"createdAt": "2024-12-20T10:30:00Z"
}
]Responses
Section titled “ Responses ”Successful Response
Response model for category data - COMPLETE CATEGORY INFORMATION.
Contains complete category metadata including usage statistics, rules, and configuration for bookmark organization. This is the SINGLE SOURCE OF TRUTH for category structure - frontend consumes this schema.
Fields:
id: Unique category identifiername: Category namedescription: Category descriptioncolor: Category color in hex formatbookmark_count: Number of bookmarks in this categoryrules: URL pattern rules for auto-assignmentauto_assign: Whether auto-assignment is enabledcreated_at: ISO 8601 timestamp of category creation
Usage Statistics:
bookmark_count provides real-time count of bookmarks using this category,
updated when bookmarks are created or deleted.
Auto-Assignment:
When auto_assign is true, bookmarks matching any rule pattern are
automatically assigned to this category during bookmark creation.
Usage: Returned from GET /api/browser/categories and POST /api/browser/categories endpoints.
JSON Example:
{
"id": "cat_1234567890",
"name": "Research",
"description": "Academic papers and research content",
"color": "#3b82f6",
"bookmarkCount": 42,
"rules": ["*.edu", "scholar.google.com", "arxiv.org"],
"autoAssign": true,
"createdAt": "2024-12-20T10:30:00Z"
}
Integration:
- Category Service: Returns category data
- Bookmark Service: Uses for auto-assignment
- Frontend: Displays in category management UI
object
Unique category identifier
Category name
Category description
Category color (hex)
Number of bookmarks
Auto-assignment URL pattern rules
Auto-assignment enabled
ISO 8601 creation timestamp