fedidb / issues

Public issue tracker for fedidb.org
https://fedidb.org
5 stars 0 forks source link

API - Add endpoint to list all servers from a specific software #3

Open Booteille opened 9 months ago

Booteille commented 9 months ago

Is your feature request related to a problem? Please describe. I would love to be able to use FediDB API on third party softwares but for cases where we need to list all known instances for a specific software, we can't do it by calling the API just once for now.

If I want to list all instances of Lemmy, from what I understand, I would actually need to fetch api/v1/servers?limit=40 first, save the result in a variable, and in a loop, call the links.next endpoint and add the result to my variable until there is no more "next". Finally, I would need to filter all instances to get only those from Lemmy.

That's a lot of requests and there is no informations about how FediDB rate limits work for now.

Describe the solution you'd like I would like to have an endpoint or an option for /api/v1/servers (or /api/v1/software/{slug}) to list all existing instances with only one API call.

Describe alternatives you've considered I don't really know which design could be the best (and I don't really mind) but:

Anyway, thanks for FediDB!

dansup commented 9 months ago

@Booteille I'm willing to add an endpoint that lists all servers by software, what kind of data would you expect from such an endpoint?

Would a list of domains be enough?

Booteille commented 9 months ago

Hi! Thanks for your fast answer and your willingness to add this endpoint!

I think we can add all server related informations already available on /api/v1/endpoint, so:

I am not sure I would need something else for now.

Thanks!