6

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?

you are viewing a single comment's thread
view the rest of the comments
[-] nmtake@lemm.ee 3 points 3 weeks ago

Oddly, the endpoint on lemm.el and lemmy.ml return comments:

> curl 'https://lemm.ee/api/v3/comment/list?post_id=45734814' | jq '.comments.[] | .comment.content[:50]'
"Yeah, you're right. I didn't read enough of the do"
"Thank you for the tip ... but whatever I try with "
"~~In 0.19.5, they removed the deprecated `post_id`"

> curl 'https://lemmy.ml/api/v3/comment/list?post_id=21766749' | jq '.comments.[] | .comment.content[:50]'
"Yeah, you're right. I didn't read enough of the do"
"Thank you for the tip ... but whatever I try with "
"~~In 0.19.5, they removed the deprecated `post_id`"

I think it would be better to ask the admin of the instance before creating the issue.

this post was submitted on 25 Oct 2024
6 points (100.0% liked)

Lemmy Support

4658 readers
19 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS