概覽
Quicknode's decentralized storage solution allows you to upload, store, manage, and retrieve data on the IPFS, InterPlanetary File System, network. IPFS ensures data integrity, mitigates risks, and offers improved performance and resilience. With Quicknode's IPFS REST API, you can connect seamlessly to the IPFS network and utilize the following APIs:
- Gateway: Create and manage gateway from the IPFS network through the gateway API.
- Pinning: Pin, view and manage pinned content to ensure its availability.
- Account: Fetch account usage information, including bandwidth and storage metrics.
API Specifications (OpenAPI)
Download the machine-readable API specifications for use with compatible tooling (e.g. Swagger Editor).
The IPFS REST API Endpoint
To interact with the IPFS REST API, the following API endpoint is used:
https://api.quicknode.com/ipfs/rest
驗證
To authenticate with the IPFS REST API, an API key is required to be sent with each request in the HTTP headers, you must first generate an API key. This key will serve as an authentication mechanism for your requests and should be included as an x-api-key header as shown below:
'x-api-key: your-api-key-here'
Making IPFS REST API Requests
In this documentation, you will see example requests made with cURL and various programming languages for each supported IPFS method. This section will explain how to execute it on your machine.
cURL
大多數基於 *nix 的系統預設即支援 cURL。cURL 是一款用於透過 URL 傳輸資料的命令列工具及函式庫。請執行以下指令,確認您的系統是否已安裝:
curl -h
Python
要執行我們的 Python 程式碼範例,您需要先安裝 Python 以及 requests 套件。您可以透過以下指令安裝此套件:
python -m pip install requests
JavaScript
To run our JavaScript code examples, you'll need to have Node v18 and up installed. You can follow this official document to install the latest, stable version of Node globally. Check if you have it by running the following:
節點 -v
Ruby
To run our Ruby code examples, you'll need to have Ruby installed. You can follow this official installation document for more information. Check if you have it by running the following:
ruby -v
To learn more about Quicknode Storage, check out the following guide: How to Create and Host a Blog on IPFS using Quicknode Storage