On 22/06/2016 09:38, Antonio Ciancio wrote:
Hi,
I'm trying to remove membership via REST call in syncope 1.2.5.
I made a POST request using the rest method
"/syncope/rest/users/user_id" and this payload:
{"membershipsToRemove": [{"role": "group_id"}]}
but something goes wrong.
Any suggestions?
Hi,
take a look at the REST reference, available at
http://syncope.apache.org/rest/1.2/index.html
for the latest 1.2 release available (1.2.8) or check the one available
with your deployment at
/syncope/rest/doc/
Click on /users on the sidebar, then on /{userId}, finally on "POST
(update)": a popup will appear with the request content type
(syncope1:userMod); if you click on that, you will be able to browse the
XSD schema for that.
This as general approach.
For your specific case, simply change
{"membershipsToRemove": [{"role": "group_id"}]}
to
{"id": 113,"membershipsToRemove": [101]}
assuming that user_id is 113 and the role for which you want to remove
the membership has id 101.
HTH
Regards.
--
Francesco Chicchiriccò
Tirasa - Open Source Excellence
http://www.tirasa.net/
Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC,
CXF Committer, OpenJPA Committer, PonyMail PPMC
http://home.apache.org/~ilgrosso/