carrect syntax to move users with curl and rest api?

Have anybody the correct and working syntax for a user move for me? I want move a lot of users from PO1 to PO2 with the command line to avoid a lot of clicking in the admin console.

Thanks for any hint!

Parents
  • Suggested Answer

    0  

    I usually would write a little script, maybe in python, to iterate through a csv file to do this type of thing, , you can have more control over things.   if you wish to do it from the command line then this command works for me.

    curl -k --user admin:n0v3ll -H "Content-Type: application/json" -X POST -d '{"postOfficeId":"POST_OFFICE.dom1.po2-1","sources":[{"id":"USER.DOM1.PO1-1.userr20","createNickname":"true"}]}' 172.17.2.180:9710/.../moverequests

    I would suggest you read the REST API documentation for more information, for instance you can pass down multiple users to move.

Reply
  • Suggested Answer

    0  

    I usually would write a little script, maybe in python, to iterate through a csv file to do this type of thing, , you can have more control over things.   if you wish to do it from the command line then this command works for me.

    curl -k --user admin:n0v3ll -H "Content-Type: application/json" -X POST -d '{"postOfficeId":"POST_OFFICE.dom1.po2-1","sources":[{"id":"USER.DOM1.PO1-1.userr20","createNickname":"true"}]}' 172.17.2.180:9710/.../moverequests

    I would suggest you read the REST API documentation for more information, for instance you can pass down multiple users to move.

Children