ethersphere / bee

Bee is a Swarm client implemented in Go. It’s the basic building block for the Swarm network: a private; decentralized; and self-sustaining network for permissionless publishing and access to your (application) data.
https://www.ethswarm.org
BSD 3-Clause "New" or "Revised" License
1.45k stars 338 forks source link

append /network/neighbourhoods endpoint to accept a single neighbourhood #4736

Closed nikipapadatou closed 2 months ago

nikipapadatou commented 2 months ago

The /network/neighbourhoods endpoint returns all the neighbourhoods and their population, making it not straighforward to find information for a single neighbourhood.

We should append the endpoint to accept a neighbourhood as a parameter, and then it should return the relevant response only for this neighbourhood. If the parameter is not provided, it should be returning all the neighbourhoods, as it is at the moment.

istae commented 2 months ago

this is a swarm scanner API issue, closing

janos commented 2 months ago

SwarmScan API has been extended with the two endpoints that makes easier to get the population of a specific neighbourhood or a neighbourhood of the provided overlay address overlay address for the current or specific depth.

By neighbourhood

The endpoint that returns the population for the specific neighbourhood is described here https://api.swarmscan.io/#tag/Network/paths/~1v1~1network~1neighborhoods~1%7Bneighborhood%7D/get. Some examples:

By overlay address

The endpoint that returns the de population of the neighbourhood that a some overlay address belongs to is described here https://api.swarmscan.io/#tag/Network/paths/~1v1~1network~1neighborhoods~1address~1%7Boverlay%7D/get. Some examples: