Guide
Weekend days
Admin can change any user weekend preferences using the following command:
Arguments:
cURL
curl -X POST https://YOUR_ACCOUNT.fibery.io/api/commands \
-H 'Authorization: Token YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d \
'[
{
"command" : "fibery.user/apply-ui-preferences",
"args" : {
"user-id": "01f972c0-7a75-49ce-9e6e-044310e5ed38",
"ui-preferences-diff": {
"isoWeekends" : [6,7]
}
}
}
]'
Admin can read any user preferences using the following command
cURL
curl -X POST https://YOUR_ACCOUNT.fibery.io/api/commands \
-H 'Authorization: Token YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d \
'
{
"command": "fibery.entity/query",
"args": {
"query": {
"q/from": "fibery/user",
"q/select": {
"fibery/ui-preferences": "fibery/ui-preferences"
},
"q/limit": "q/no-limit",
"q/where": ["=", ["fibery/id"], "$userId"]
},
"params": {
"$userId": "01f972c0-7a75-49ce-9e6e-044310e5ed38"
}
}
}
'
Response
{
"success": true,
"result": [
{
"fibery/ui-preferences": {
"firstDayOfWeek": 1,
"weekends": [5],
"isoWeekends": [6,7]
}
}
]
}