Hi Francesco,

I have a use case where I need to add thousands or more users in a single 
request.  i.e. bulk user creation.
Is it possible in Syncope ?

Regards,
Vellingiri

From: Francesco Chicchiriccò [mailto:ilgro...@apache.org]
Sent: Monday, September 19, 2016 3:46 PM
To: user@syncope.apache.org
Subject: Re: Syncope user creation from REST client

On 19/09/2016 12:15, Mani, Vellingiri (Nokia - IN) wrote:
Thanks Francesco!!
After adding username, it works.

Glad it helped :-)
Regards.


From: Francesco Chicchiriccò [mailto:ilgro...@apache.org]
Sent: Monday, September 19, 2016 3:39 PM
To: user@syncope.apache.org<mailto:user@syncope.apache.org>
Subject: Re: Syncope user creation from REST client

On 19/09/2016 12:03, Mani, Vellingiri (Nokia - IN) wrote:
Hi,

Currently, I am evaluating syncope for our usage. I would need to do bulk user 
creation from REST. I started to create single user from REST client and it 
fails.
From postman, I tried to create a user with below inputs. I get '400 Bad 
Request'.

If there is anything wrong in the request, please correct me. Is all fields 
mandatory during user creation.


POST - http://135.249.22.223:8080/syncope/rest/users

Authorization:
Basic Auth - admin/password

Headers:
Content-type: application/json

Body:
{
  "@class": "org.apache.syncope.common.lib.to.UserTO",
  "creator": "admin",
  "lastModifier": "admin",
  "key": "rest1",
  "type": "USER",
  "realm": "/",
  "status": "Active",
  "auxClasses": [],
  "plainAttrs": [],
  "derAttrs": [],
  "virAttrs": [],
  "resources": []
}

Hi,
you should remove (not troublesome, just ignored):

* creator
* lastModifier
* key
* status

About what is mandatory, I can see there is no username.
Moreover, it depends on how you can your schemas and classes configured.

Please also take a look at logs to figure out what might go wrong.

Regards.


--

Francesco Chicchiriccò



Tirasa - Open Source Excellence

http://www.tirasa.net/



Member at The Apache Software Foundation

Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail

http://home.apache.org/~ilgrosso/

Reply via email to