This will work to create a user and add to group at the same time.
http://
<HostName or IPAddress>:<port>/spectrum/restful/model?mtypeid=0x10004&parentmh=
<UserGroup_ModelHandle>&relationid=0x10022&attr=0x1006e&val=
<UserName><HostName or IPAddress> --> Use either Host Name or IP Address of the OneClick Server.
<port> --> Use the port Number here (Ex: 8080)
<UserGroup_ModelHandle> --> Find out the User Group Model_Handle value and replace it
<UserName> --> Replace it with the User ID/Name
Here,
mtypeid=0x10004 represents the
modeltype_handle value for User model
relationid=0x10022 represents the relation name "
Has_Member"
attr=0x1006e represents the
Model_Name attribute
Hope this helps.
------------------------------
Thank you.
Rajashekar
------------------------------
Original Message:
Sent: 07-04-2019 03:29 AM
From: Praveen Venkatesan
Subject: User addition using API
Any suggestions
Original Message:
Sent: 07-02-2019 03:54 AM
From: Praveen Venkatesan
Subject: User addition using API
Hi All,
I have created a user using API and it was working fine ,now I want to add the user in group directly while creating. How to do this .
Creating user : http://localhost:80/spectrum/restful/model?landscapeid=0x2400000&mtypeid=0x10004&attr=0x1006e&val=test_user
Adding user in group:
Command :
http://localhost:80/spectrum/restful/associations/relation/0x10031/leftmodel/0x100016/rightmodel/0x285f0c8
Model handle which I have is used is Home model handle got from user -> advanced and user group -> advanced
Error :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<create-association-response
xmlns="http://www.ca.com/spectrum/restful/schema/response" error-message="The landscape 100000 does not exist." error="NoSuchLandscape"/>
Kindly suggest .