The dashlet preferences service allows managing dashboard widgets (dashlets) for users.
Get dashlets for current user
# <CORE_HOST> FlowerDocs Core base URL
# <TOKEN> authentication token
curl -X GET "<CORE_HOST>/rest/preferences/dashlets" \
-H "token: <TOKEN>"
Get dashlets for specific authorities
Create a dashlet
# <CORE_HOST> FlowerDocs Core base URL
# <TOKEN> authentication token
curl -X POST "<CORE_HOST>/rest/preferences/dashlets" \
-H "token: <TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"title": "My Documents",
"type": "SEARCH",
"configuration": {
"searchId": "mySearchId",
"maxResults": 10
}
}'
Update a dashlet
# <CORE_HOST> FlowerDocs Core base URL
# <TOKEN> authentication token
# <ID> dashlet identifier
curl -X POST "<CORE_HOST>/rest/preferences/dashlets/<ID>" \
-H "token: <TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"title": "My Updated Documents",
"type": "SEARCH",
"configuration": {
"searchId": "mySearchId",
"maxResults": 20
}
}'
Delete dashlets
# <CORE_HOST> FlowerDocs Core base URL
# <TOKEN> authentication token
# <IDS> dashlet identifiers (comma-separated)
curl -X DELETE "<CORE_HOST>/rest/preferences/dashlets/<IDS>" \
-H "token: <TOKEN>"