Delete document using CURL or Java RestApi

Do you want to create a native client or integrate with third party applications: webservices are the solution.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
RescatorX
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: Tue Apr 03, 2018 11:45 am

Delete document using CURL or Java RestApi

Post by RescatorX » Tue Apr 03, 2018 11:54 am

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.

lnovoa
Expert Boarder
Expert Boarder
Posts: 119
Joined: Tue Mar 27, 2018 8:00 am

Re: Delete document using CURL or Java RestApi

Post by lnovoa » Wed Apr 04, 2018 8:43 am

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

RescatorX
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: Tue Apr 03, 2018 11:45 am

Re: Delete document using CURL or Java RestApi

Post by RescatorX » Wed Apr 04, 2018 8:47 am

Already solved, I used method 'purge' and everything is working well now. Thank you.

jllort
Moderator
Moderator
Posts: 10668
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Delete document using CURL or Java RestApi

Post by jllort » Thu Apr 05, 2018 3:22 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests