aleph-im / pyaleph

Next generation network of decentralized big data applications. Current connected chains: Ethereum, Solana, Polkadot/Substrate, Cosmos-SDK, NULS.
https://aleph.im
MIT License
74 stars 19 forks source link

Feature request: The root of /api/v0 should return the list of available endpoints #368

Open BjrInt opened 1 year ago

BjrInt commented 1 year ago

Problem description

When hitting https://api2.aleph.im/api/v0/ (or official.aleph.cloud), user are faced with a 404 error.

Proposal

This 404 is misleading as the base endpoint could also be used as a status check. Returning a list of available endpoints as a JSON object instead, would enhance the developer experience.

odesenfans commented 1 year ago

The right way to do this IMO is to provide an OpenAPI spec to the users. I think there's a way to do this with aiohttp but it would be much better to start using a better server-side framework that does this automatically for us.