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”:"[email protected]","pass”:"test","roles":"2","status":"1"},{"username":"testuser27”,"mail”:"[email protected]","pass”:"test","roles":"2","status":"1”}}

but no success - I get this error:

[ "Missing required argument account" ]

Any help/pointers would be appreciated.

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

1 Answer 1

0

Out of the box no.

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

1
  • 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? Aug 1, 2016 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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