Comment methods

Each method represents a specific comment activity, for example getting a comment. You use each method by sending a request to the URI in a certain format. Upon successful request, the server always responds with a 200 OK status code.

In the following table, you can see details on the various methods you can use to manage comments.

Create a comment

HTTP POST request: /RestApi/comments-api/comments

Posted data JSON format:

Details of the published comment:

Get a comment

HTTP GET request: /RestApi/comments-api/comments/{key}
where key is the comment's identifier

Posted data JSON format:

Details of the requested comment:

Update a comment

HTTP PUT request: /RestApi/comments-api/comments

Posted data JSON format:

Details of the updated comment:

Get a collection of comments

HTTP GET request: /RestApi/comments-api/comments

Posted data JSON format:

Total number of comments and content of the comments filtered by the request parameters:

Get a collection of comments with extended filtering

HTTP POST request: /RestApi/comments-api/comments/filter

Posted data JSON format:

Total number of comments and content of the comments filtered by the request parameters:

Get the count of comments in a thread

HTTP GET request: /RestApi/comments-api/comments/count

Posted data JSON format:

Number of comments:

Batch-update the status of a collection of comments

HTTP PUT request: /RestApi/comments-api/comments/list 

Posted data JSON format:

Total number of comments and content of updated comments:

Delete a comment

HTTP DELETE request: /RestApi/comments-api/comments/{key}
where key is the comment's identifier

Posted data JSON format:

The comment is deleted.

Batch-delete a collection of comments 

HTTP DELETE request: /RestApi/comments-api/comments/list

Posted data JSON format:

The comments are deleted.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?