To create new User records
|
CALL Type: POST
URL:
http://<WebApp URL>/restapi/component/user
JSON Payload (example):
In the payload, include all the fields and values which need to be updated, for example:
{
"username": "demo",
"fullname": "Demo User",
"emailaddress": "demo@sai360.com",
"userdescription": "Demo User",
"password": "Demo123",
"activeaccountflag": true,
"temporarydisabledflag": false,
"domains": null,
"logintype": "Manual",
"timezone": null,
"dashboard": "Home (Simple)",
"locality": null,
"roles": [
"System Role - ALL USERS",
"User Role - Action - General"
],
"forceuserpasswordreset": false
}
|
To update existing User
|
CALL Type: PATCH
URL:
http://<WebApp URL>/restapi/component/user('UniqueID_of_User')
JSON Payload (example):
In the payload, include all the fields and values which need to be updated, for example:
{
"username": "demo",
"fullname": "Demo User",
"emailaddress": "demo@sai360.com",
"userdescription": "Demo User",
"password": "Demo123",
"activeaccountflag": true,
"temporarydisabledflag": false,
"domains": null,
"logintype": "Manual",
"timezone": null,
"dashboard": "Home (Simple)",
"locality": null,
"roles": [
"System Role - ALL USERS",
"User Role - Action - General"
],
"forceuserpasswordreset": false
}
NOTES:
If the number of Roles in the payload
- is 1:
the update will be append the new role to the existing list of roles - is more than 1:
the existing list of roles will be replaced with the new list of roles
To clear the roles, use the following in the payload:
{
"roles":[]
}
|