Users
Creating a Maximo User using the REST api
Creating a maximo user can be done using the MXAPIPERUSER Object Structure. This will create the maximo user and person at the same time. The rest call is shown below:
POST /oslc/os/mxapiperuser
Body:
{"personid": "TESTADMIN1","firstname": "ABC","lastname": "XYZ","primaryemail": "abc_xyz@yahoo.com","primaryphone": "999 999 9999","city": "Boston","addressline1": "crazy road","stateprovince": "MA",
Note that you have to set the passwordinput and passwordcheck to be not restricted in the Object Structure as they are set to restricted at the object level by default. Also this is an example of creating a user when Maximo is the owner of authentication. If authentication is handled by the application server, we do not need to provide the passwordinput and passwordcheck attributes (or any other password management details like emailpswd, generatepswd, password hint question, force expiration etc) as Maximo does not manage passwords when mxe.useAppServerSecurity is set to 1.
Adding user to security group
We can use MXAPIPERUSER to add user to certain existing security group by leveraging following API call. Note, please ensure the headers conttain patchtype: MERGE
to avoid accidentally removing user from existing groups.
POST oslc/os/mxapiperuser?&lean=1x-method-override: SYNCpatchtype: MERGE
Body:
{"personid": "ABBY","maxuser": {"userid": "ABBY","groupuser": [{"groupname": "HR","_action": "AddChange"}