To change a user, use a PUT to the same endpoint. In the following example, we will be removing access to the "api.example.com" domain and changing the portal theme to "dark".
https://api.nuubit.net/v1/users/55bff4b8c01a42a2348170f7
cURL example:
curl -H "Accept: application/json" \
-H "Authorization:X-API-KEY d6e08bfa-92bc-4f3b-aea0-5c3ae2ced841" \
-X PUT -T Change.json \
https://api.nuubit.net/v1/users/55bff4b8c01a42a2348170f7
The Change.json file would look like the following example. Note, the email field is removed. The email field cannot be modified.
{
"firstname": "Stan",
"lastname": "Lee",
"password": "Spider-Man",
"companyId": [
"5588869fbde7a0d00338ce8f"
],
"theme": "dark",
"role": "admin",
"domain": [
"www.example.com"
],
"access_control_list": {
"readOnly": false,
"test": true,
"configure": true,
"reports": true,
"dashBoard": true
}
}
0 Comments