Editing user preferencesΒΆ
The prefs
action makes changes to the user preferences for individual accounts. It contains an array of preferences and new settings. There is an additional field used with the prefs
action in the user API:
- json
The
user_id
and array of prefs each contains the pref code and setting value to be modified.
Expected JSON object:
{
"user_id": 11,
"prefs":[
{
"pref":"statusTopn",
"setting":10
},
{
"pref":"language",
"setting":"english"
}
]
}
Field |
Description |
user_id |
Required for the user with preferences to change |
prefs |
An array of user preferences and setting values |
pref |
The Plixer Scrutinizer user preference to edit |
setting |
The value that will be set for the |
JSON object returned:
{
"data": {
"updated": [
"statusTopn updated to 10 for user_id 11",
"language updated to english for user_id 11"
],
"errors": []
}
}
Field |
Description |
data |
An array of responses for each preference change updated or attempted |
updated |
Messages for any preference successfully changed |
errors |
Any errors encountered while changing preferences |
Example API call:
curl --location --insecure --request POST '{{scrutinizer}}/fcgi/scrut_fcgi.fcgi' \
--form 'authToken={{authToken}}' \
--form 'rm=user_api' \
--form 'action=prefs' \
--form 'json=
{
"user_id":11,
"prefs":[
{
"pref":"statusTopn",
"setting":10
},
{
"pref":"language",
"setting":"english"
}
]
}'