Re: Suspend a user via REST ?

2016-10-06 Thread Francesco Chicchiriccò
I have added a dedicate sample in the Client Library section (there are not yet plain HTTP / JSON samples there, sorry): https://ci.apache.org/projects/syncope/reference-guide.html#client-library It's example 14 at the moment. Regards. - Il 6-ott-16, alle 15:27, John Peter ha scritto:

Re: Suspend a user via REST ?

2016-10-06 Thread John Peter
Oh great ! Thanks for your quick fix. Thanks. On Thu, Oct 6, 2016 at 6:53 PM, Francesco Chicchiriccò wrote: > On 6-oct-16, at 14:45, John Peter wrote: > > Francesco, > It doesn't work with username as value for the "key" field. > POST /syncope/rest/users/user1/status > { > "operation": "ADD

Re: Suspend a user via REST ?

2016-10-06 Thread Francesco Chicchiriccò
On 6-oct-16, at 14:45, John Peter wrote: > Francesco, > It doesn't work with username as value for the "key" field. > POST /syncope/rest/users/user1/status > { > "operation": "ADD_REPLACE", > "value": "", > "onSyncope": true, > "key": "user1", > "type": "SUSPEND", > "token": "", > "resources": [

Re: Suspend a user via REST ?

2016-10-06 Thread John Peter
Francesco, It doesn't work with username as value for the "key" field. POST /syncope/rest/users/user1/status { "operation": "ADD_REPLACE", "value": "", "onSyncope": true, "key": "user1", "type": "SUSPEND", "token": "", "resources": [] } Response is { "status": 404, "type": "No

Re: Suspend a user via REST ?

2016-10-06 Thread Francesco Chicchiriccò
On 6-oct-16, at 13:44, John Peter wrote: > It works!! > Is this right ? I though it should have been done with just username. > { > "operation": "ADD_REPLACE", > "value": "", > "onSyncope": true, > "key": "9248266f-bc58-48e0-8826-6fbc5808e03d", > "type": "SUSPEND", > "token": "", > "resources":

Re: Suspend a user via REST ?

2016-10-06 Thread John Peter
It works!! Is this right ? I though it should have been done with just username. { "operation": "ADD_REPLACE", "value": "", "onSyncope": true, "key": "9248266f-bc58-48e0-8826-6fbc5808e03d", "type": "SUSPEND", "token": "", "resources": [] } Thanks On Thu, Oct 6, 2016 at 3:34 PM, Jo

Suspend a user via REST ?

2016-10-06 Thread John Peter
Hi, I found rest api for suspending a user in [1] but I think its not valid for Syncope 2.0.0. In [2], Can I use /users/{key}/status for suspending a user ? [1] https://cwiki.apache.org/confluence/display/SYNCOPE/REST+API+upgrade [2] http://syncope.apache.org/rest/2.0/index.html Thanks.