KRON PAM API Collection v3.7.0
User Management
Update User
1 min
code examples curl location globoff '{{url}}/aioc rest web/rest/user/updateuser' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ header 'x xsrf token {{csrftoken}}' \\ \ data '"{\n \\"id\\" \\"d4251ded cf05 47af b245 4637ae3debdd\\",\n \\"eid\\" \\"bariscic\\",\n \\"personelid\\" null,\n \\"name\\" \\"bariscic\\",\n \\"passwordalgorithm\\" null,\n \\"password\\" null,\n \\"secondpassword\\" null,\n \\"email\\" null,\n \\"surname\\" \\"10297 )\\",\n \\"internal\\" false,\n \\"creationtime\\" 1703068414993,\n \\"groups\\" \[\n \\"default group sysyem users\\",\n \\"cf7013df 9b88 4ea8 a07f b65960788d14\\"\n ],\n \\"managergroups\\" \[],\n \\"lastlogin\\" null,\n \\"tempuserstarttime\\" null,\n \\"tempuserendtime\\" null,\n \\"lastloginip\\" null,\n \\"ubathreshold\\" \\"50\\",\n \\"properties\\" {\n \\"ubathreshold\\" \\"50\\",\n \\"objectguid\\" \\"c16e2cd1 f35c 41ef b4e0 f54b55db2f08\\",\n \\"externaldirectorysource\\" \\"ldap\\",\n \\"hey\\" \\"heyt\\"\n }\n}\n"'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); myheaders append("x xsrf token", "{{csrftoken}}"); var raw = json stringify("{\n \\"id\\" \\"d4251ded cf05 47af b245 4637ae3debdd\\",\n \\"eid\\" \\"bariscic\\",\n \\"personelid\\" null,\n \\"name\\" \\"bariscic\\",\n \\"passwordalgorithm\\" null,\n \\"password\\" null,\n \\"secondpassword\\" null,\n \\"email\\" null,\n \\"surname\\" \\"10297 )\\",\n \\"internal\\" false,\n \\"creationtime\\" 1703068414993,\n \\"groups\\" \[\n \\"default group sysyem users\\",\n \\"cf7013df 9b88 4ea8 a07f b65960788d14\\"\n ],\n \\"managergroups\\" \[],\n \\"lastlogin\\" null,\n \\"tempuserstarttime\\" null,\n \\"tempuserendtime\\" null,\n \\"lastloginip\\" null,\n \\"ubathreshold\\" \\"50\\",\n \\"properties\\" {\n \\"ubathreshold\\" \\"50\\",\n \\"objectguid\\" \\"c16e2cd1 f35c 41ef b4e0 f54b55db2f08\\",\n \\"externaldirectorysource\\" \\"ldap\\",\n \\"hey\\" \\"heyt\\"\n }\n}\n"); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("{{url}}/aioc rest web/rest/user/updateuser", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("{{url}}/aioc rest web/rest/user/updateuser") http = net http new(url host, url port); request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request\["x xsrf token"] = "{{csrftoken}}" request body = json dump("{\n \\"id\\" \\"d4251ded cf05 47af b245 4637ae3debdd\\",\n \\"eid\\" \\"bariscic\\",\n \\"personelid\\" null,\n \\"name\\" \\"bariscic\\",\n \\"passwordalgorithm\\" null,\n \\"password\\" null,\n \\"secondpassword\\" null,\n \\"email\\" null,\n \\"surname\\" \\"10297 )\\",\n \\"internal\\" false,\n \\"creationtime\\" 1703068414993,\n \\"groups\\" \[\n \\"default group sysyem users\\",\n \\"cf7013df 9b88 4ea8 a07f b65960788d14\\"\n ],\n \\"managergroups\\" \[],\n \\"lastlogin\\" null,\n \\"tempuserstarttime\\" null,\n \\"tempuserendtime\\" null,\n \\"lastloginip\\" null,\n \\"ubathreshold\\" \\"50\\",\n \\"properties\\" {\n \\"ubathreshold\\" \\"50\\",\n \\"objectguid\\" \\"c16e2cd1 f35c 41ef b4e0 f54b55db2f08\\",\n \\"externaldirectorysource\\" \\"ldap\\",\n \\"hey\\" \\"heyt\\"\n }\n}\n") response = http request(request) puts response read body import requests import json url = "{{url}}/aioc rest web/rest/user/updateuser" payload = json dumps("{\n \\"id\\" \\"d4251ded cf05 47af b245 4637ae3debdd\\",\n \\"eid\\" \\"bariscic\\",\n \\"personelid\\" null,\n \\"name\\" \\"bariscic\\",\n \\"passwordalgorithm\\" null,\n \\"password\\" null,\n \\"secondpassword\\" null,\n \\"email\\" null,\n \\"surname\\" \\"10297 )\\",\n \\"internal\\" false,\n \\"creationtime\\" 1703068414993,\n \\"groups\\" \[\n \\"default group sysyem users\\",\n \\"cf7013df 9b88 4ea8 a07f b65960788d14\\"\n ],\n \\"managergroups\\" \[],\n \\"lastlogin\\" null,\n \\"tempuserstarttime\\" null,\n \\"tempuserendtime\\" null,\n \\"lastloginip\\" null,\n \\"ubathreshold\\" \\"50\\",\n \\"properties\\" {\n \\"ubathreshold\\" \\"50\\",\n \\"objectguid\\" \\"c16e2cd1 f35c 41ef b4e0 f54b55db2f08\\",\n \\"externaldirectorysource\\" \\"ldap\\",\n \\"hey\\" \\"heyt\\"\n }\n}\n") headers = { 'accept' 'application/json', 'content type' 'application/json', 'x xsrf token' '{{csrftoken}}' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses { "id" "e5bd67aa a99e 4c72 b55f 28cd3c54fb0b", "eid" "bariscic", "personelid" null, "name" "bariscic", "passwordalgorithm" null, "password" null, "secondpassword" null, "email" null, "phonenumber" null, "surname" "10297 )", "fullname" null, "location" null, "internal" false, "locked" false, "forcepassword" false, "lockreason" null, "creationtime" 1705400708026, "groups" null, "groupnames" null, "usergroupmodels" null, "managergroups" null, "managergroupmodels" null, "lastlogin" null, "tempuserstarttime" null, "tempuserendtime" null, "lastloginip" null, "ubathreshold" null, "properties" { "ubathreshold" "51", "objectguid" "c16e2cd1 f35c 41ef b4e0 f54b55db2f08", "externaldirectorysource" "ldap", "added property test" "test vaule" }, "firstresult" 0, "maxresult" 50, "tempuser" false }