Problem: Only a few gateways allow the read-only API

#1

In theory, the read-only API should be available on all gateways, but in practice, only a few gateways allow it.

The read-only API of a gateway allows access to commands like “cat”, “ls”, and “refs” without running a node

How to test if a gateway allows the read-only API

Take the gateway URL and append /api/v0/ls/QmcKi2ae3uGb1kBg1yBpsuwoVqfmcByNdMiZ2pukxyLWD8
If the result is a JSON with hashes, the read-only API is allowed

Examples

Gateways are taken from https://ipfs.github.io/public-gateway-checker/

:white_check_mark: https://ipfs.io/api/v0/ls/QmcKi2ae3uGb1kBg1yBpsuwoVqfmcByNdMiZ2pukxyLWD8
:x: https://ipfs.eternum.io/api/v0/ls/QmcKi2ae3uGb1kBg1yBpsuwoVqfmcByNdMiZ2pukxyLWD8
:white_check_mark: https://gateway.pinata.cloud/api/v0/ls/QmcKi2ae3uGb1kBg1yBpsuwoVqfmcByNdMiZ2pukxyLWD8
:x: http://cloudflare-ipfs.com/api/v0/ls/QmcKi2ae3uGb1kBg1yBpsuwoVqfmcByNdMiZ2pukxyLWD8
:x: https://ipfs.globalupload.io/api/v0/ls/QmcKi2ae3uGb1kBg1yBpsuwoVqfmcByNdMiZ2pukxyLWD8
:x: http://ipfs.infura.io/api/v0/ls/QmcKi2ae3uGb1kBg1yBpsuwoVqfmcByNdMiZ2pukxyLWD8
:x: https://ipfs.jes.xxx/api/v0/ls/QmcKi2ae3uGb1kBg1yBpsuwoVqfmcByNdMiZ2pukxyLWD8

1 Like