Page 1 of 1

Delete document using CURL or Java RestApi

PostPosted:Tue Apr 03, 2018 11:54 am
by RescatorX
Can anybody help me how to delete existing document by docId using CURL or Java RestApi ? Always when I execute delete method I get status 405 (Method not allowed) in response. Creating new document is working well. Thank you in advance.

Re: Delete document using CURL or Java RestApi

PostPosted:Wed Apr 04, 2018 8:43 am
by lnovoa
Hi!
First, you must verify that you have removal permission in this directory.
Could you show me how are you making the call to the service?

I give you a link to the service examples.
https://docs.openkm.com/kcenter/view/ok ... stful.html

Re: Delete document using CURL or Java RestApi

PostPosted:Wed Apr 04, 2018 8:47 am
by RescatorX
Already solved, I used method 'purge' and everything is working well now. Thank you.

Re: Delete document using CURL or Java RestApi

PostPosted:Thu Apr 05, 2018 3:22 pm
by jllort
For your understanding, delete really moves the node to the trash folder of the user, when you are doing a purge it is definitively removed from the system and can not be recovered. Use with care.