openapi: 3.0.0 info: title: IPFS RPC Add Bitswap API version: v0 description: 'When a Kubo IPFS node is running as a daemon, it exposes an HTTP RPC API that allows you to control the node and run the same commands you can from the command line. In many cases, using this RPC API is preferable to embedding IPFS directly in your program — it allows you to maintain peer connections that are longer lived than your app and you can keep a single IPFS node running instead of several if your app can be launched multiple times. In fact, the `ipfs` CLI commands use this RPC API when operating in online mode.' x-providerName: IPFS x-logo: url: https://raw.githubusercontent.com/ipfs/ipfs-docs/55fe8bc6a53ba3b9023951fb4b432efbbc81fba5/docs/.vuepress/public/images/ipfs-logo.svg servers: - description: Local IPFS node url: http://localhost:5001 - description: Local IPFS node url: http://127.0.0.1:5001 - description: Infura hosted IPFS node url: https://ipfs.infura.io:5001 tags: - name: Bitswap paths: /api/v0/bitswap/ledger: post: operationId: bitswap/ledger description: Show the current ledger for a peer. externalDocs: url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-bitswap-ledger parameters: - name: arg in: query description: The PeerID (B58) of the ledger to inspect. required: true schema: type: string responses: '200': description: Successful response content: application/json: example: Exchanged: Peer: Recv: Sent: Value: tags: - Bitswap /api/v0/bitswap/reprovide: post: operationId: bitswap/reprovide description: Trigger reprovider. externalDocs: url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-bitswap-reprovide parameters: [] responses: '200': description: Successful response tags: - Bitswap /api/v0/bitswap/stat: post: operationId: bitswap/stat description: Show some diagnostic information on the bitswap agent. externalDocs: url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-bitswap-stat parameters: - name: verbose in: query description: Print extra information. schema: type: boolean - name: human in: query description: Print sizes in human readable format (e.g., 1K 234M 2G). schema: type: boolean responses: '200': description: Successful response content: application/json: example: BlocksReceived: BlocksSent: DataReceived: DataSent: DupBlksReceived: DupDataReceived: MessagesReceived: Peers: - ProvideBufLen: Wantlist: - /: tags: - Bitswap /api/v0/bitswap/wantlist: post: operationId: bitswap/wantlist description: Show blocks currently on the wantlist. externalDocs: url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-bitswap-wantlist parameters: - name: peer in: query description: Specify which peer to show wantlist for. schema: type: string responses: '200': description: Successful response content: application/json: example: Keys: - /: tags: - Bitswap externalDocs: url: https://docs.ipfs.tech/reference/kubo/rpc/