0

I'm using Services 7.x-3.12 and able to create a single new user using REST/Json post, and that works well.

Is it possible to create multiple new users in one request? I couldn't find any documentation on this and wasn't able to make it work. I tried separating the users with a comma inside the Json body, like so:

{{"username":"testuser27”,"mail”:"testuser27@gmail.com","pass”:"test","roles":"2","status":"1"},{"username":"testuser27”,"mail”:"testuser27@gmail.com","pass”:"test","roles":"2","status":"1”}}

but no success - I get this error:

[ "Missing required argument account" ]

Any help/pointers would be appreciated.

  • I read or heard somewhere that you can't do multiple stuff in one request. – No Sssweat Jul 29 '16 at 4:35
0

Out of the box no.

But you could write a module that supplies you're own resource that takes multiple user objects.

  • Very cool idea! I can see how to create the custom resource, for example this tutorial, but how can I set the resource to take multiple user objects? – longboardnode Aug 1 '16 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.