favorite
Adds a board to the authenticated user’s favorites list.The ID of the board to favorite
The organization ID that the board belongs to
Returns
Returnsvoid on successful addition to favorites.
Example
Behavior
- Verifies that the board exists before adding to favorites
- Creates a
userFavoritesentry linking the user, board, and organization - Uses the
by_user_board_orgindex to check for existing favorites
Errors
- Unauthorized: Thrown when the user is not authenticated
- Board not found: Thrown when the specified board ID doesn’t exist
- Board already in favorite list: Thrown when the board is already favorited by the user
unFavorite
Removes a board from the authenticated user’s favorites list.The ID of the board to unfavorite
Returns
Returnsvoid on successful removal from favorites.
Example
Behavior
- Verifies that the board exists before attempting to unfavorite
- Removes the
userFavoritesentry for the user and board - Uses the
by_user_board_orgindex to locate the favorite entry
Errors
- Unauthorized: Thrown when the user is not authenticated
- Board not found: Thrown when the specified board ID doesn’t exist
- Board not in favorite list: Thrown when the board is not currently favorited by the user
Querying Favorites
To retrieve a user’s favorited boards, use theboards.get query with the favorites parameter.
Example
Returns
Array of board objects with
isFavorite: trueResponse Schema
Behavior
- Results are ordered by most recently favorited (descending order)
- Uses the
by_user_orgindex for efficient querying - Only returns boards that exist and are favorited by the authenticated user
Schema
TheuserFavorites table stores the relationship between users and their favorite boards.
UserFavorite Object
Indexes
TheuserFavorites table uses the following indexes for efficient queries:
by_board: Index onboardIdby_user_org: Composite index onuserIdandorgIdby_user_board: Composite index onuserIdandboardIdby_user_board_org: Composite index onuserId,boardId, andorgId