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

Lemmy Support

4657 readers
1 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS
 

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
[โ€“] kiko 2 points 3 weeks ago (1 children)

Thank you for the tip ... but whatever I try with the parameter post_ids in curl, my instance running 0.19.5 does not recognize the parameter and I receive a list with the latest comments over all posts ... !?

[โ€“] [email protected] 2 points 3 weeks ago

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_id should still be valid.