概述
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 规范(OpenAPI)
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
要运行我们的 JavaScript 代码示例,您需要安装 Node v18 及以上版本。您可以按照这份官方文档的指引,全局安装最新稳定版的 Node。请运行以下命令检查是否已安装:
节点 -v
Ruby
要运行我们的 Ruby 代码示例,您需要安装 Ruby。您可以参考这份官方安装文档以获取更多信息。请运行以下命令检查是否已安装:
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
我们 ❤️ 反馈
❓ We want to hear from you! Please take a few minutes to fill out our IPFS API feedback form and let us know what you currently think about it. This helps us further improve the documentation.