JSON-RPC API
This page contains all Boost API definitions. Interfaces defined here are exposed as JSON-RPC 2.0 endpoints by the boostd daemon.
Go JSON-RPC client
To use the Boost Go client, the Go RPC-API library can be used to interact with the Boost API node.
Import the necessary Go module:
go get github.com/filecoin-project/go-jsonrpcCreate the following script:
package main
import (
"context"
"fmt"
"log"
"net/http"
jsonrpc "github.com/filecoin-project/go-jsonrpc"
boostapi "github.com/filecoin-project/boost/api"
)
func main() {
authToken := "<value found in ~/.boost/token>"
headers := http.Header{"Authorization": []string{"Bearer " + authToken}}
addr := "127.0.0.1:1288"
var api boostapi.BoostStruct
closer, err := jsonrpc.NewMergeClient(context.Background(), "ws://"+addr+"/rpc/v0", "Filecoin", []interface{}{&api.Internal, &api.CommonStruct.Internal}, headers)
if err != nil {
log.Fatalf("connecting with boost failed: %s", err)
}
defer closer()
// Now you can call any API you're interested in.
netAddrs, err := api.NetAddrsListen(context.Background())
if err != nil {
log.Fatalf("calling netAddrsListen: %s", err)
}
fmt.Printf("Boost is listening on: %s", netAddrs.Addrs[0])
}Run
go mod initto set up yourgo.modfileYou should now be able to interact with the Boost API.
Python JSON-RPC client
The JSON-RPC API can also be communicated with programmatically from other languages. Here is an example written in Python. Note that the method must be prefixed with Filecoin.
Groups
Actor
ActorSectorSize
There are not yet any comments for this method.
Perms: read
Inputs:
Response: 34359738368
Auth
AuthNew
Perms: admin
Inputs:
Response: "Ynl0ZSBhcnJheQ=="
AuthVerify
Perms: read
Inputs:
Response:
Blockstore
BlockstoreGet
There are not yet any comments for this method.
Perms: read
Inputs:
Response: "Ynl0ZSBhcnJheQ=="
BlockstoreGetSize
Perms: read
Inputs:
Response: 123
BlockstoreHas
Perms: read
Inputs:
Response: true
Boost
BoostDagstoreDestroyShard
Perms: admin
Inputs:
Response: {}
BoostDagstoreGC
Perms: admin
Inputs: null
Response:
BoostDagstoreInitializeAll
Perms: admin
Inputs:
Response:
BoostDagstoreInitializeShard
Perms: admin
Inputs:
Response: {}
BoostDagstoreListShards
Perms: admin
Inputs: null
Response:
BoostDagstorePiecesContainingMultihash
Perms: read
Inputs:
Response:
BoostDagstoreRecoverShard
Perms: admin
Inputs:
Response: {}
BoostDagstoreRegisterShard
Perms: admin
Inputs:
Response: {}
BoostDeal
Perms: admin
Inputs:
Response:
BoostDealBySignedProposalCid
Perms: admin
Inputs:
Response:
BoostDummyDeal
Perms: admin
Inputs:
Response:
BoostIndexerAnnounceAllDeals
There are not yet any comments for this method.
Perms: admin
Inputs: null
Response: {}
BoostMakeDeal
Perms: write
Inputs:
Response:
BoostOfflineDealWithData
Perms: admin
Inputs:
Response:
Deals
DealsConsiderOfflineRetrievalDeals
Perms: admin
Inputs: null
Response: true
DealsConsiderOfflineStorageDeals
Perms: admin
Inputs: null
Response: true
DealsConsiderOnlineRetrievalDeals
Perms: admin
Inputs: null
Response: true
DealsConsiderOnlineStorageDeals
There are not yet any comments for this method.
Perms: admin
Inputs: null
Response: true
DealsConsiderUnverifiedStorageDeals
Perms: admin
Inputs: null
Response: true
DealsConsiderVerifiedStorageDeals
Perms: admin
Inputs: null
Response: true
DealsPieceCidBlocklist
Perms: admin
Inputs: null
Response:
DealsSetConsiderOfflineRetrievalDeals
Perms: admin
Inputs:
Response: {}
DealsSetConsiderOfflineStorageDeals
Perms: admin
Inputs:
Response: {}
DealsSetConsiderOnlineRetrievalDeals
Perms: admin
Inputs:
Response: {}
DealsSetConsiderOnlineStorageDeals
Perms: admin
Inputs:
Response: {}
DealsSetConsiderUnverifiedStorageDeals
Perms: admin
Inputs:
Response: {}
DealsSetConsiderVerifiedStorageDeals
Perms: admin
Inputs:
Response: {}
DealsSetPieceCidBlocklist
Perms: admin
Inputs:
Response: {}
I
ID
Perms: read
Inputs: null
Response: "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"
Log
LogList
Perms: write
Inputs: null
Response:
LogSetLevel
Perms: write
Inputs:
Response: {}
Market
MarketCancelDataTransfer
Perms: write
Inputs:
Response: {}
MarketDataTransferUpdates
Perms: write
Inputs: null
Response:
MarketGetAsk
Perms: read
Inputs: null
Response:
MarketGetRetrievalAsk
Perms: read
Inputs: null
Response:
MarketImportDealData
Perms: write
Inputs:
Response: {}
MarketListDataTransfers
Perms: write
Inputs: null
Response:
MarketListIncompleteDeals
Perms: read
Inputs: null
Response:
MarketListRetrievalDeals
There are not yet any comments for this method.
Perms: read
Inputs: null
Response:
MarketPendingDeals
Perms: write
Inputs: null
Response:
MarketRestartDataTransfer
Perms: write
Inputs:
Response: {}
MarketSetAsk
Perms: admin
Inputs:
Response: {}
MarketSetRetrievalAsk
Perms: admin
Inputs:
Response: {}
Net
NetAddrsListen
Perms: read
Inputs: null
Response:
NetAgentVersion
Perms: read
Inputs:
Response: "string value"
NetAutoNatStatus
Perms: read
Inputs: null
Response:
NetBandwidthStats
Perms: read
Inputs: null
Response:
NetBandwidthStatsByPeer
Perms: read
Inputs: null
Response:
NetBandwidthStatsByProtocol
Perms: read
Inputs: null
Response:
NetBlockAdd
Perms: admin
Inputs:
Response: {}
NetBlockList
Perms: read
Inputs: null
Response:
NetBlockRemove
Perms: admin
Inputs:
Response: {}
NetConnect
Perms: write
Inputs:
Response: {}
NetConnectedness
Perms: read
Inputs:
Response: 1
NetDisconnect
Perms: write
Inputs:
Response: {}
NetFindPeer
Perms: read
Inputs:
Response:
NetLimit
Perms: read
Inputs:
Response:
NetPeerInfo
Perms: read
Inputs:
Response:
NetPeers
Perms: read
Inputs: null
Response:
NetPing
Perms: read
Inputs:
Response: 60000000000
NetProtectAdd
Perms: admin
Inputs:
Response: {}
NetProtectList
Perms: read
Inputs: null
Response:
NetProtectRemove
Perms: admin
Inputs:
Response: {}
NetPubsubScores
Perms: read
Inputs: null
Response:
NetSetLimit
Perms: admin
Inputs:
Response: {}
NetStat
Perms: read
Inputs:
Response:
Online
OnlineBackup
There are not yet any comments for this method.
Perms: admin
Inputs:
Response: {}
Pieces
PiecesGetCIDInfo
Perms: read
Inputs:
Response:
PiecesGetMaxOffset
Perms: read
Inputs:
Response: 42
PiecesGetPieceInfo
Perms: read
Inputs:
Response:
PiecesListCidInfos
Perms: read
Inputs: null
Response:
PiecesListPieces
Perms: read
Inputs: null
Response:
Runtime
RuntimeSubsystems
RuntimeSubsystems returns the subsystems that are enabled in this instance.
Perms: read
Inputs: null
Response:
Sectors
SectorsRefs
Perms: read
Inputs: null
Response:
Last updated

