I try to get comment data for my posts via API from my Lemmy instance, but whatever I try on using the GetComments endpoint it delivers an empty array.
For example ... GET https://programming.dev/api/v3/comment/list?post_id=20878811
leads to:
{
"comments": []
}
I want to ask here, before creating an issue. Has someone a hint?
4 Comments
Kovukono@pawb.social · 4 pts · 1y
In 0.19.5, they removed the deprecatedpost_idtag, and replaced it with thepost_idsarray. If you ran that against an instance still running 0.19.4, it should work.This is for posts, not comments, and doesn't affect the comment API.
kiko@programming.dev · 2 pts · 1y
Thank you for the tip ... but whatever I try with the parameter
post_idsin curl, my instance running 0.19.5 does not recognize the parameter and I receive a list with the latest comments over all posts ... !?Kovukono@pawb.social · 2 pts · 1y
Yeah, you're right. I didn't read enough of the docs. The new field is only for posts, not for comments. It looks like
post_idshould still be valid.nmtake@lemm.ee · 3 pts · 1y
Oddly, the endpoint on lemm.el and lemmy.ml return comments:
I think it would be better to ask the admin of the instance before creating the issue.