Favorite preferences

Manage user favorite components

The favorite preferences service allows managing favorite components (documents, folders, tasks, virtual folders) for users.

Get favorites for current user


# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN>      authentication token
curl -X GET "<CORE_HOST>/rest/preferences/favorites" \
  -H "token: <TOKEN>"

Get favorites for specific authorities


# <CORE_HOST>    FlowerDocs Core base URL
# <TOKEN>        authentication token
# <AUTHORITIES>  user or group identifiers (comma-separated)
curl -X GET "<CORE_HOST>/rest/preferences/favorites/users/<AUTHORITIES>" \
  -H "token: <TOKEN>"

Add a favorite


# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN>      authentication token
curl -X PUT "<CORE_HOST>/rest/preferences/favorites" \
  -H "token: <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "documentId",
  "category": "DOCUMENT"
}'

Remove a favorite by reference


# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN>      authentication token
# <CATEGORY>   component category (DOCUMENT, FOLDER, TASK, VIRTUAL_FOLDER)
# <ID>         component identifier
curl -X DELETE "<CORE_HOST>/rest/preferences/favorites/reference/<CATEGORY>/<ID>" \
  -H "token: <TOKEN>"

Delete favorites by ID


# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN>      authentication token
# <IDS>        favorite identifiers (comma-separated)
curl -X DELETE "<CORE_HOST>/rest/preferences/favorites/<IDS>" \
  -H "token: <TOKEN>"