Skip to main content
MindTouch Success Center

pages/{pageid}/comments/{commentnumber} (DELETE)


Mark a comment as being deleted. This hides comment content from non admins

  • REST Method: DELETE
  • Method Access: public

Uri Parameters

Name Type Description
pageid string either an integer page ID, "home", or "=" followed by a double uri-encoded page path
commentnumber int identifies the comment on the page

Query Parameters

Name Type Description
authenticate bool? Force authentication for request (default: false)

Return Codes

Name Value Description
OK 200 The request completed successfully
Bad Request 400 Invalid input parameter or request body
Forbidden 403 Administrator access or comment author is required
Not Found 404 The requested comment could not be found

Message Format


Implementation Notes

Use pages/{pageid}/comments (GET) to retrieve a list of comments on a specified page.

C# Code Sample: Delete a Comment

The following code example deletes the second comment on the home page:

Sample Code

Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("pages", "home", "comments", "2").Delete();

Implementation notes 

Add notes about requirements or config values

Curl Code Sample: Delete a Comment

The following command deletes a comment (commentnumber = 1) posted on page "foo":

Sample Code

curl -u username:password -X DELETE -i http://mindtouch.address/@api/deki/pages/=foo/comments/1

Implementation notes 

curl flags

Provides external user authentication.
Specifies the HTTP request method.
Outputs the HTTP response headers. Useful for debugging.
  • Was this article helpful?