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.
Using payload CID
GET request
GET /cid/<cid>Curl request
curl https://<INDEXER NODE ADDRESS>/cid/<payload CID>curl https://cid.contact/cid/bafybeigvgzoolc3drupxhlevdp2ugqcrbcsqfmcek2zxiw5wctk3xjpjwyQuery using the multihash
GET request
GET /mh/<multihashCurl request
curl https://<INDEXER NODE ADDRESS>/mh/<multihash>curl https://cid.contact/multihash/QmcgwdNjFQVhKt6aWWtSPgdLbNvULRoFMU6CCYwHsN3EEHPOST Request
POST /mhThe body for the POST request can be found here as a JSON.
Find command
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 --helpstoretheindex find --helpGo client library
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 updated