04-11-2014 07:45 AM
Bonjour
J'utilise REST API pour supprimer un user. Mais je voudrais nettoyer le compte.
voici le log de la séquence:
Première séquence de 1 à 5:
>>>>check if user exists
404
>>>> create user
----------query on Workspace for user
SELECT * FROM Document WHERE ecm:path STARTSWITH '/default-domain/UserWorkspaces/' and dc:title = 'qqqq@lal.in2p3.fr'
==> ws uid=85eadbef-e345-4306-b38b-8b035dd4d5aa state=project
----------query on UserProfile
SELECT * FROM UserProfile WHERE ecm:path STARTSWITH '/default-domain/UserWorkspaces/qqqq-lal-in2p3-fr'
==> up uid=2fd7bc21-5aca-4405-93e7-c5a1ae7ee86a state=undefined
>>>> delete user qqqq@lal.in2p3.fr
-------- destruction de WS
----------query on Workspace for user
SELECT * FROM Document WHERE ecm:path STARTSWITH '/default-domain/UserWorkspaces/' and dc:title = 'qqqq@lal.in2p3.fr'
no workspace
Deuxième séquence à partir de 6:
>>>>check if user exists
404
>>>> create user
----------query on Workspace for user
SELECT * FROM Document WHERE ecm:path STARTSWITH '/default-domain/UserWorkspaces/' and dc:title = 'qqqq@lal.in2p3.fr'
==> ws uid=3b0a3781-a727-4c95-b0df-3d1271ea5056 state=project
----------query on UserProfile
SELECT * FROM UserProfile WHERE ecm:path STARTSWITH '/default-domain/UserWorkspaces/qqqq-lal-in2p3-fr'
no profile
===> Mais si je change la séquence en ne supprimant pas le Workspace, alors tout se passe bien, la recréation est correcte
Donc: la question est : comment nettoyer un compte après sa suppression?
Merci de vos conseils
Christian
02-18-2016 08:09 AM
Hi, Hope this helps you, http://nuxeo.github.io/api-playground/#/resources/id/0/DELETE
02-18-2016 08:15 AM
Hi
Thanks a lot for this answer
I'll make some tests about your suggestion.
Indeed it's seems correct
Regards Christian
02-18-2016 08:57 AM
Most welcome. Accept the answer if it helped you
02-18-2016 09:23 AM
There s a blog entry about that subject mentionning a dedicated REST API for managing users (/api/v1/user/)
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.