Querying Indexer Provider
How to query an indexer provider
An indexer node can be queried over HTTP or libp2p for a multihash or a payload CID.
GET /cid/<cid>
curl https://<INDEXER NODE ADDRESS>/cid/<payload CID>
curl https://cid.contact/cid/bafybeigvgzoolc3drupxhlevdp2ugqcrbcsqfmcek2zxiw5wctk3xjpjwy
GET /mh/<multihash
curl https://<INDEXER NODE ADDRESS>/mh/<multihash>
curl https://cid.contact/multihash/QmcgwdNjFQVhKt6aWWtSPgdLbNvULRoFMU6CCYwHsN3EEH
POST /mh
Both
storetheindex
as well as index-provider
binaries contain a find
command that can be used to query the indexer nodes for a multihash or a payload CID.provider find --help
storetheindex find --help
The storetheindex repo also ships a client library that can be integrated in other programs to query the indexer nodes. The client library can be used to query the indexer nodes over
HTTP
as well as libp2p
connections. This client library is also utilised by the
find
command in the storetheindex
as well as index-provider
binaries. Programmers can use these commands as reference implementations.Last modified 1yr ago