Fission Web API

An introduction to the Fission Web API with some example requests

The Fission Web API provides an interface to our systems using a standard RESTful API. We'll go through a few interactions that you might find helpful, but for the full API, check out the Swagger docs.

Upload Content To IPFS

You can upload content to IPFS by sending a POST request to https://runfission.com/ipfs For this, you'll need a BasicAuth header with your Fission username & password, as well as a content-type: application/octet-stream header

With JSON:

$ curl -i \
-X POST \
-H "Content-Type: application/octet-stream" \
-u 'USERNAME:PASSWORD' \
--data '{
"test": 123
}' \
https://runfission.com/ipfs

With a file:

$ curl -i \
-X POST \
-H "Content-Type: application/octet-stream" \
-u 'USERNAME:PASSWORD' \
--data-binary @/path/to/file \
https://runfission.com/ipfs

If you want to do this programmatically, use your favorite REST client or the Fission TypeScript Client‚Äč

import { add } from '@fission-suite/client'
const auth = { username: "username", password: "password" }
const content = {
key1: 123,
key2: 456
}
const cid = await add(content, auth)

Pin Content To IPFS

Fission also offers a pinning service, if you already have content on IPFS and want the remote Fission node to help keep it online. To pin something, send a PUT request to https://runfission.com/ipfs/{cid}

For this, you'll need a BasicAuth header

For example:

curl -i \
-X PUT \
-u 'b55cf27ef01025e3c761:Gnu$N+OTlHrauuBg-q_6W1OrjrA_6z0eVhfBvc9sC2LNy,H' \
https://runfission.com/ipfs/QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u

If you want to do this programmatically, use your favourite REST client or the Fission TypeScript Client‚Äč

import { pin } from '@fission-suite/client'
const auth = { username: "username", password: "password" }
await pin("QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u", auth)

‚Äč

Get Content from IPFS

Use our gateway to call files directly, or do a GET request:

https://ipfs.runfission.com/ipfs/QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u

You can also use any IPFS gateway, or ask us to map a custom domain to ours.