Skip to main content

pages/{pageid}/comments/{commentnumber}/content (GET) (MT4)


Retrieve the comment text only

  • REST Method: GET
  • Method Access: public

Uri Parameters

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

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 Read access to the page is required
Not Found 404 The requested comment could not be found

Message Format


Implementation Notes


C# Code Sample: Retrieve Comment Count

The following code example retrieves the contents of the first comment on the home page:

Sample Code

Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
DreamMessage msg = p.At("pages", "home", "comments", "1", "content").Get();
String commentText = msg.AsText();

Implementation notes 

Add notes about requirements or config values

Curl Code Sample: Retrieve Comment Count

The following command retrieves only the content of a specified comment (commentnumber = 1) made on page "foo":

Sample Code

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

Sample Response from executing Code

Fetch the content of this comment

Content-Type: text/plain

I am the Batman

Implementation notes 

curl flags

Provides external user authentication. Note that if anonymous access is available and authentication is not forced, this flag may be omitted.
Outputs the HTTP response headers. Useful for debugging.

Pages comments

To view a list of all comments within a page, follow the instructions here.
  • Was this article helpful?