Zamples, Inc. logo
 Home   Search   Solutions   My Zamples   FAQ   News   Contact 
Zamples ID:
Password:
   
0 anonymous users;
13 users logged in.

Deleting a Posting From a Knowledge Base

The only parameters for deleting a posting from a knowledge base is the code posting id, plus the common Zamples REST parameters.  Only the author of the code fragment, the moderator, the author of the document or the Zamples installation administrator can delete postings.  A brief success or failure message is returned in the HTTP response as text/plain as well as the HTTP status code.

Here is an example URL that deletes code fragment #42 as user myUid, password myPwd:

http://zamples.com/JspExplorer/zamples/delete?id=42&clientUser=myUid&clientPassword=myPwd

If you click on the Try It! button, then modify myUid and myPwd in the displayed code example, you will be able to delete any posting that you have authorization to modify.

<a href='/JspExplorer/zamples/delete?id=42&clientUser=myUid&clientPassword=myPwd'>Click to delete.</a>
Only the posting creator, the moderator, the editor and the Zamples supervisor have 
authority to delete a posting.

Typical Result

If the deletion succeeds, the following response is returned as well as a 200 HTTP status code:

Success: Posting #42 deleted by myUid.

If the deletion fails, the following response is returned as well as a 4xx or 5xx HTTP status code:

Error: Posting #42 was not deleted by myUid.

Possible error messages

In addition to the common Zamples REST status codes, this Zamples REST call might generate the following status codes and messages:

400 Bad Request - code posting id is missing No code posting ID was specified.
400 Bad Request - Invalid code posting id (1234) The requested code posting ID does not exist.
404 Not Found - code posting id 1234 does not exist in a knowledge base on this Zamples server The requested code posting ID does not exist.
500 Unknows Error - Deletion of posting #1234 failed The requested code posting could not be deleted for an unspecified reason


Modifying a Posting in a Knowledge Base Zamples Client REST Interface Specification