Skip to content

Oversas

IPFS public HTTP Gateway & RPC API

HTTP Gateway

Add file

curl -v --data-binary @<file> https://ipfs.oversas.org/ipfs/    
import requests

headers = {
    'Content-Type': 'application/x-www-form-urlencoded',
}

with open('<file>', 'rb') as f:
    data = f.read()

response = requests.post('https://ipfs.oversas.org/ipfs/', headers=headers, data=data)

Arguments:

  • file [string] - The path to a file to be added to IPFS. Required: yes.

Response:

On success, the call to this endpoint will return with 201 and text/plain body.

Get content

curl https://ipfs.oversas.org/ipfs/<key>
wget https://ipfs.oversas.org/ipfs/<key>
import requests

response = requests.get('https://ipfs.oversas.org/ipfs/<key>')

Arguments

  • key [string] - The IPFS object hash. Required: yes.

Response:

On success, the call to this endpoint will return with 200 and text/plain body.

RPC API

Add

/api/v0/add

Add a file or directory to IPFS.

    curl -X POST -F file=@<file> "https://ipfs.oversas.org/api/v0/add?quiet=true&pin=true&progress=true"
import requests

params = {
    'quiet': 'true',
    'pin': 'true'
}

files = {
    'file': open('<file>', 'rb'),
}

response = requests.post('https://ipfs.oversas.org/api/v0/add', params=params, files=files)

Arguments:

  • file [string] - The path to a file to be added to IPFS. Required: yes.
  • quiet [bool] - Write minimal output.
  • quieter [bool]- Write only final hash.
  • silent [bool] - Write no output.
  • progress [bool] - Stream progress data.
  • wrap-with-directory [bool] - Wrap files with a directory object.
  • pin [bool] - Pin this object when adding. Default: true.
  • see all params on ipfs docs

Response:

On success, the call to this endpoint will return with 200 and the following body:

{"Name":"file1","Hash":"QmY9cxiHqTFoWamkQVkpmmqzBrY3hCBEL2XNu3NtX74Fuu","Size":"14"}

Result fields:

  • Name - Name of the object.
  • Hash - Hash of the uploaded object.
  • Size - Integer indication size in bytes.

There is no recursive param. If you want add directory, use:

curl -X POST -F file=@mydir/file1 -F file=@mydir/file2 "https://ipfs.oversas.org/api/v0/add?wrap-with-directory=true"

Cat

/api/v0/cat

Show IPFS object data.

curl -X POST "https://ipfs.oversas.org/api/v0/cat?arg=<key>"
import requests

params = {
    'arg': '<key>',
}

response = requests.post('https://ipfs.oversas.org/api/v0/cat', params=params)

Arguments:

  • arg [string] - The path (hash) to the IPFS object(s) to be outputted. Required: yes
  • see all params on ipfs docs

Response:

On success, the call to this endpoint will return with 200 and text/plain body.

Get

/api/v0/get

Download IPFS objects.

curl -X POST "https://ipfs.oversas.org/api/v0/get?arg=<key>&output=<value>&archive=false&compress=false&compression-level=-1"
import requests

params = {
    'arg': '<key>',
}

response = requests.post('https://ipfs.oversas.org/api/v0/get', params=params)

Arguments:

  • arg [string] - The path (hash) to the IPFS object(s) to be outputted. Required: yes.
  • output [string] - The path where the output should be stored.
  • archive [bool] - Output a TAR archive.
  • compress [bool] - Compress the output with GZIP compression.
  • compression-level [int] - The level of compression (1-9). The default is -1.
  • see all params on ipfs docs

Add --output <file> to save as binary or use: curl --location --request "https://ipfs.oversas.org/api/v0/cat?arg=<key>" --output <file> to save as text/plain

Response:

On success, the call to this endpoint will return with 200 and text/plain body.

Files stat

/api/v0/files/stat

Display file status.

curl -X POST "https://ipfs.oversas.org/api/v0/files/stat?arg=<key>"
import requests

params = {
    'arg': '<key>',
}

response = requests.post('https://ipfs.oversas.org/api/v0/files/stat', params=params)

Arguments:

  • arg [string] - Hash to file to stat. Required: yes.
  • hash [bool] - Print only hash. Implies '--format='. Conflicts with other format options.
  • size [bool] - Print only size. Implies '--format='. Conflicts with other format options.
  • see all params on ipfs docs

Response:

On success, the call to this endpoint will return with 200 and text/plain body.

Pin add

/api/v0/pin/add

Pin objects to local storage.

curl -X POST "https://ipfs.oversas.org/api/v0/pin/add?arg=<key>"
import requests

params = {
    'arg': '<key>',
}

response = requests.post('https://ipfs.oversas.org/api/v0/pin/add', params=params)

Arguments:

  • arg [string] - Path (hash) to object(s) to be pinned. Required: yes.
  • recursive [bool] - Recursively pin the object linked to by the specified object(s). Default: true.
  • progress [bool] - Show progress.
  • see all params on ipfs docs

Response:

On success, the call to this endpoint will return with 200 and text/plain body.

Pin ls

/api/v0/pin/ls

List objects pinned to local storage.

curl -X POST "https://ipfs.oversas.org/api/v0/pin/ls?arg=<key>"
import requests

params = {
    'arg': '<key>',
}

response = requests.post('https://ipfs.oversas.org/api/v0/pin/ls', params=params)

Arguments:

  • arg [string] - Path (hash) to object(s) to be listed. Required: yes.
  • see all params on ipfs docs

Response:

On success, the call to this endpoint will return with 200 and text/plain body.

Pin rm

/api/v0/pin/rm

Remove object from pin-list.

curl -X POST "https://ipfs.oversas.org/api/v0/pin/rm?arg=<key>"
import requests

params = {
    'arg': '<key>',
}

response = requests.post('https://ipfs.oversas.org/api/v0/pin/rm', params=params)

Arguments:

  • arg [string] - Path (hash) to object(s) to be unpinned. Required: yes.
  • recursive [bool]: Recursively unpin the object linked to by the specified object(s). Default: true.
  • see all params on ipfs docs

Response:

On success, the call to this endpoint will return with 200 and text/plain body.

Rounting findpeer

/api/v0/routing/findpeer

Find the multiaddresses associated with a Peer ID.

curl -X POST "https://ipfs.oversas.org/api/v0/routing/findpeer?arg=<peerID>
import requests

params = {
    'arg': '<peerID>',
}

response = requests.post('https://ipfs.oversas.org/api/v0/routing/findpeer', params=params)

Arguments:

  • arg [string]: The ID of the peer to search for. Required: yes.
  • see all params on ipfs docs

Response:

On success, the call to this endpoint will return with 200 and text/plain body.

Rounting findprovs

/api/v0/routing/findprovs

Find peers that can provide a specific value, given a key.

curl -X POST "https://ipfs.oversas.org/api/v0/routing/findprovs?arg=<key>
import requests

params = {
    'arg': '<key>',
}

response = requests.post('https://ipfs.oversas.org/api/v0/routing/findprovs', params=params)

Arguments:

  • arg [string]: The key (hash) to find providers for. Required: yes.
  • see all params on ipfs docs

Response:

On success, the call to this endpoint will return with 200 and text/plain body.

Online App

IPFS API

OpenEdit