How can I retrieve a page comments using the REST API (Kentico 13)

Alphonse Fy asked on December 17, 2024 13:31

Hello,

I am writing a bash script that is using the Kentico 13 REST API to retrieve all page information like this:

json=$(curl -u USERNAME:PASSWORD -X GET https://mykentico.site/xp-admin/rest/content/currentsite/en-us/all?format=json)

Then I'm parsing every object in that file by querying individual AliasPaths, to get more detailed information about each page (title, category, content, etc.) like this for example:

json2=$(curl -u USERNAME:PASSWORD -X GET https://mykentico.site/xp-admin/rest/content/currentsite/en-us/document/News-Overview/June-2024/Hello-World?format=json)

However I am not finding the correct API endpoint to retrieve comments. It does not seem to be documented in Kentico 13. In particular, this does not work:

comments=$(curl -u USERNAME:PASSWORD -X GET https://mykentico.site/xp-admin/rest/blog.comment/?format=json)

Can any experienced Kentico developer point me to the right API endpoint in Kentico 13?

Recent Answers


Juraj Ondrus answered on December 18, 2024 06:18

Are you sure you are using Kentico 13? I am asking because blog comments were removed in Kentico 13 (see Release notes). So, this explains why there is no endpoint. This sounds like some customization and you may want to reach out to the developers who implemented this to see how it was done. Maybe the object type code name is bit different?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.