I'm trying to delete a document using the REST API for Content Server, but I get an Authentication Required error, but if I change my request method to GET from DELETE I do not get the error and the node details are returned.
Any ideas what can be wrong?
That is unusual. The OTCSTicket is being included in the header of both REST API calls I'm assuming. What do the user's permissions on the object look like?
> That is unusual. The OTCSTicket is being included in the header of both REST API calls I'm assuming. What do the user's permissions on the object look like?
Yes, I'm using the exact same request, just changing the method to DELETE. I'm currently using a system administrator to do the delete so permissions should not be an issue
What version of Content Server and the REST API are you using?
> What version of Content Server and the REST API are you using?
We are using Content Server 10 Update 2014_06 with REST API version 10.0.0
What are you using to do this test? Can you reproduce the behaviour with a REST API client in chrome or in firefox and the same data?
Hi Eben, just to be clear… you have authenticated into the REST API via:
username=<your admin username>
password=<your admin password>
And it returned an OTCSTICKET to you (a string of a jumble of letters/numbers/symbols). Using this OTCSTICKET, you set it as a header for the next call:
DELETE /nodes/1234 (where 1234 is the id of your document)
And it failed on authentication?
This forum thread I wrote might be helpful:
I tried this within my web app and from Chrome's Postman REST Client, I had the same issue on both
I'm doing my authentication a bit differently, I'm getting my OTCSTicket directly from Content Server and passing to through to the page, I can upload the document with the OTCSTicket, but I cannot delete it. With the Postman REST Client I do the POST/auth request first and use that OTCSTicket to do the delete request, but it fails as well
I've tried Postman as well, I get the same issue.
Currently what my goal is for this web app is that when a user submits his request the files are first uploaded to Content Server, once done we get the Data Ids from the response and submit them to be stored on the database along with the form data, if this form fails to submit we need to delete the documents from Content Server as they are confidential. If the form succeeds the files are then moved by the admin user to a secure location.
Can the problem be that I'm trying to delete a newly created document? I might have to try deleting an existing document when I get back to the office
Are you using IIS? If so, could you check something in your IIS? Under Default Web Site, locate the mapping to your <OTHOME>/cgi directory and look in 'Modules' and 'Handler Mappings'. Do you see anything called 'WebDAV' in there?
@Eben de Roock
Let me know how you go with deleting existing document, I did deleted newly created document with no issue. Do you have OTDS in the picture?
I have checked under IIS and the webdav is there.
We use the Open Text Directory Services Integration module for AD authentication
I have tried to delete the document via Chrome's POSTMan and Advanced REST Client, but both fail.
The message we are getting:
> 403 Forbidden: Access is denied.
> You do not have permission to view this directory or page using the
> credentials that you supplied.
We had some issues with DELETE and PUT not working because of webdav. First, could you try to run a PUT operation such as PUT /nodes/12345 (where 12345 is the id of your document), with name as a form parameter containing a new name for the document?
If this fails to work, then it is most likely webdav that's interfering (WebDAV interferes with both DELETE and PUT operations). In that case, you could try removing WebDAV from 'Modules' and 'Handler Mappings' in your IIS (I would do this after backing up whatever is necessary to restore your system to default). Or you could install a separate instance of Content Server in order to test this out.
@Eben, I have OTDS in the mix as well, but I did not have any issues, but I do not have WebDav in my case. Kevin could be on the money here.
You need to sign in before voting.
You need to sign in before voting.