Open Booteille opened 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?
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!
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 thelinks.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:
api/v1/servers/{software_slug}
which would return all servers from a selected softwareapi/v1/servers/?software={software_slug}
, a variant with a software GET parameterapi/v1/servers/?software={software_slug}&all=true
, the variant with a GET parameter to indicates we want to retrieve all serversapi/v1/servers/?limit=99999999
, which just increases the allowed limit to 9999999 so we can then filter by software (I don't really like this option)api/v1/servers/{slug}/list
, which list all known instances bound to {slug} software.Anyway, thanks for FediDB!