LogoLogo
v1.x (Deprecated)
v1.x (Deprecated)
  • What is Boost?
  • Features
  • Architecture
    • Repository
    • Database
    • DAG store
    • libp2p Protocols
  • Hardware requirements
  • Getting started
    • As a storage provider
    • As a client
  • Migrate from Lotus to Boost
    • Migrate a monolith lotus-miner to Boost
    • Migrate a Lotus markets service process to Boost
    • Roll back to Lotus markets service process
  • Configuration
    • UI Settings
    • HTTP Transfer limit
    • Deal Filters
    • Remote CommP
    • Legacy Deal configuration
    • HTTP indexer announcement
  • Backup and Restore
  • Tutorials
    • How to store files with Boost on Filecoin
    • Using filters for storage and retrieval deals
    • Setting up a monitoring stack for Boost
  • Bitswap Retrieval
  • HTTP Retrieval
    • Serving files with booster-http
  • Troubleshooting
  • Experimental Features
    • FVM Contract Deals
    • Local Index Directory
      • Architecture
      • Requirements
      • Initialisation
  • GraphQL API
  • JSON-RPC API
  • FAQ
  • Need help?
Powered by GitBook
On this page
Edit on GitHub
Export as PDF

GraphQL API

PreviousInitialisationNextJSON-RPC API

Last updated 1 year ago

Boost exposes a GraphQL API that is used by the Web UI to query and update information about Boost deals. The GraphQL API query endpoint is at

You can also run your own queries against the GraphQL API using CURL or a programming language that has a .

Boost has a built-in GraphQL explorer at

You can test out queries, or explore the GraphQL API by clicking on the < Docs link at the top right of the page:

To run a graphql query with CURL:

curl -X POST
-H "Content-Type: application/json"
-d '{"query":"query { deals(offset: 5, limit: 10) { deals { ID CreatedAt PieceCid } } }"}'
http://localhost:8080/graphql/query | jq

This 1m video shows how to use these tools to build an run a GraphQL query against Boost:

Example Queries

1. Query failed deals

curl -X POST \
-H "Content-Type: application/json" \
-d '{"query":"query { deals(limit: 10, query: \"failed to get size of imported\") { deals { ID CreatedAt Message } } }"}' \
http://localhost:8080/graphql/query | jq

2. Cancel a deal where ab12345c-5678-90de-12f3-45a6b78cd9ef is the deal ID

curl -X POST \
-H "Content-Type: application/json" \
-d '{"query":"mutation { dealCancel(id: \"ab12345c-5678-90de-12f3-45a6b78cd9ef\") }"}' \
http://localhost:8080/graphql/query | jq
http://localhost:8080/graphql/query
GraphQL client
http://localhost:8080/graphiql
Use the GraphQL explorer to create a query against Boost