API reference

/add

POST https://api.token-project.eu/ipfs/add

The proxy adds the content to the local IPFS daemon and pins the resulting hash[es] in cluster.

Query Parameters

NameTypeDescription

quiet

Boolean

Write minimal output.

quieter

Boolean

Write only final hash.

silent

Boolean

Write no output.

progress

Boolean

Stream progress data.

trickle

Boolean

Use trickle-dag format for dag generation.

only-hash

Boolean

Only chunk and hash - do not write to disk.

wrap-with-directory

Boolean

Wrap files with a directory object.

chunker

String

Chunking algorithm, size-[bytes], rabin-[min]-[avg]-[max] or buzhash. Default: size-262144.

pin

Boolean

Pin this object when adding. Default: true.

raw-leaves

Boolean

Use raw blocks for leaf nodes. (experimental).

nocopy

Boolean

Add the file using filestore. Implies raw-leaves. (experimental).

fscache

Boolean

Check the filestore for pre-existing blocks. (experimental).

cid-version

Integer

CID version. Defaults to 0 unless an option that depends on CIDv1 is passed (experimental).

hash

String

Hash function to use. Implies CIDv1 if not sha2-256. (experimental). Default: sha2-256.

inline

Boolean

Inline small blocks into CIDs. (experimental).

inline-limit

Integer

Maximum block size to inline. (experimental). Default: 32.

Headers

NameTypeDescription

Content-Type

string

application/form-data

Authorization*

string

Bearer: $TOKEN

Request Body

NameTypeDescription

path*

file

File to upload

{
    "Name": "test.json",
    "Hash": "QmPcCSG7rDNLB2x6P95MZtEK8FopV82b4997pKLzYyFaLE",
    "Size": "31"
}

/get

POST https://api.token-project.eu/ipfs/get

Download IPFS objects.

Query Parameters

NameTypeDescription

arg*

String

The path to the IPFS object(s) to be outputted.

output

String

The path where the output should be stored.

archive

Boolean

Output a TAR archive.

compress

Boolean

Compress the output with GZIP compression.

compression-level

Integer

The level of compression (1-9).

Headers

NameTypeDescription

Content-Type

string

application/x-www-form-urlencoded

Authorization*

string

Bearer: $TOKEN

Qmdok1E4qxJNDfYHFiWetSPXAixqJsYr8gvYwZMuDbNyvd������������������������������������������������������0000644�0000000�0000000�00000270577�13755241430�017553� 0����������������������������������������������������������������������������������������������������ustar�00����������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%PDF-1.4
%����
1 0 obj
<</Creator (Mozilla/5.0 \(X11; Linux x86_64\) AppleWebKit/537.36 \(KHTML, like Gecko\) Chrome/86.0.4240.198 Safari/537.36)
/Producer (Skia/PDF m86)
/CreationDate (D:20201117135458+00'00')
/ModDate (D:20201117135458+00'00')>>
endobj
3 0 obj
<</ca 1
/BM /Normal>>
endobj
6 0 obj
<</CA 1
/ca 1
/LC 0
(...)

/pin/add

POST https://api.token-project.eu/ipfs/pin/add

The proxy pins the given CID in the cluster.

Query Parameters

NameTypeDescription

arg*

String

Path to object(s) to be pinned.

progress

Boolean

Show progress.

Headers

NameTypeDescription

Content-Type

string

application/x-www-form-urlencoded

Authorization*

string

Bearer: $TOKEN

{
    "Pins": [
        "QmPcCSG7rDNLB2x6P95MZtEK8FopV82b4997pKLzYyFaLE"
    ]
}

/pin/update

POST https://api.token-project.eu/ipfs/pin/update

The proxy updates the given pin to a new one in cluster.

Query Parameters

NameTypeDescription

arg*

String

Path to old object.

arg*

String

Path to a new object to be pinned.

unpin

Boolean

Remove the old pin. Default: true.

Headers

NameTypeDescription

Content-Type

string

application/x-www-form-urlencoded

Authorization*

string

Bearer: $TOKEN

{
    "Pins": [
        "QmPcCSG7rDNLB2x6P95MZtEK8FopV82b4997pKLzYyFaLE",
        "QmchBjNsmCXys1kQSkzyAS1Phxq3mg5kC3qhuYGPPKDqh8"
    ]
}

/pin/rm

POST https://api.token-project.eu/ipfs/pin/rm

The proxy unpins the given CID from cluster.

Query Parameters

NameTypeDescription

arg*

String

Path to object(s) to be unpinned.

Headers

NameTypeDescription

Content-Type

string

application/x-www-form-urlencoded

Authorization*

string

Bearer: $TOKEN

{
    "Pins": [
        "QmchBjNsmCXys1kQSkzyAS1Phxq3mg5kC3qhuYGPPKDqh8"
    ]
}

/pin/ls

POST https://api.token-project.eu/ipfs/pin/ls

The proxy lists the pinned items in cluster.

Query Parameters

NameTypeDescription

arg*

String

Path to object(s) to be listed.

type*

String

The type of pinned keys to list. Can be "direct", "indirect", "recursive", or "all". Default: all.

quiet*

Boolean

Write just hashes of objects.

stream*

Boolean

Enable streaming of pins as they are discovered.

Headers

NameTypeDescription

Content-Type

string

application/x-www-form-urlencoded

Authorization*

string

Bearer: $TOKEN

{
    "Keys": {
        "QmPcCSG7rDNLB2x6P95MZtEK8FopV82b4997pKLzYyFaLE": {
            "Type": "recursive"
        }
    }
}

/repo/stat

POST https://api.token-project.eu/ipfs/repo/stat

The proxy responds with aggregated /repo/stat from all connected IPFS daemons.

Query Parameters

NameTypeDescription

size-only

Boolean

Only report RepoSize and StorageMax.

human

Boolean

Print sizes in human readable format (e.g., 1K 234M 2G).

Headers

NameTypeDescription

Content-Type

string

application/x-www-form-urlencoded

Authorization*

string

Bearer: $TOKEN

{
    "RepoSize": 121213387,
    "StorageMax": 30000000000
}

/repo/gc

POST https://api.token-project.eu/ipfs/repo/gc

The proxy performs garbage collection on all IPFS daemons and responds with collected CIDs.

Query Parameters

NameTypeDescription

stream-errors

Boolean

Stream errors.

quiet

Boolean

Write minimal output.

Headers

NameTypeDescription

Content-Type

string

application/x-www-form-urlencoded

Authorization*

string

Bearer: $TOKEN

{"Key":{"/":"Qmd1Drph9zkL7TLPfzGFLESjLniuv4n2cMsfXbikdV4QA7"}}
{"Key":{"/":"QmR9xMynmwLqNJkuwXe4aN1EkhkkqUbbTzCCbWxehEKHyk"}}
{"Key":{"/":"bafyreidh4lnv2aaul7mujtovbjk3l2axylqgynq4knkmcrerjtxskizqvm"}}

/block/get

POST https://api.token-project.eu/ipfs/block/get

Get a raw IPFS block.

Query Parameters

NameTypeDescription

arg*

String

The base58 multihash of an existing block to get.

Headers

NameTypeDescription

Content-Type

string

application/x-www-form-urlencoded

Authorization*

string

Bearer: $TOKEN

��p�B\��    x�U�0��
ly�RX$hՂ�

RI��
�Pǂ8a*�)TEmḮW�uFG�u���4-�,*-(�� .o*�B����9��oޤ)8��~����g�<�����s�=��s�=wV�����2���rss�1�Fב��;t8]���9bx��>l���C��G��r�C��5�r�w����Y�������)$++;��\�ٴ��#��ƻ'���s��*>^:������Xx�g��3��N�K�w�Z�S�����g$���䌻���k��b1��8�
5��j}F��Z��������qW}>l�ṙ��s��]K�L�뚧Lq��|�����fq��L��a��?�

(...)

/block/put

POST https://api.token-project.eu/ipfs/block/put

Store input as an IPFS block.

Query Parameters

NameTypeDescription

format

String

cid format for blocks to be created with.

mhtype

String

multihash hash function. Default: sha2-256.

mhlen

Integer

multihash hash length. Default: -1.

pin

Boolean

pin added blocks recursively. Default: false.

Headers

NameTypeDescription

Content-Type

string

application/form-data

Authorization*

string

Bearer: $TOKEN

Request Body

NameTypeDescription

data*

file

Any kind of file, or multiple files.

{
    "Key": "QmU5NTBAyCNRGvJBbEo2HRdMAncuTDuvScmw3t6Lc1Cb9F",
    "Size": 2813452
}

/block/stat

POST https://api.token-project.eu/ipfs/block/stat

Print information of a raw IPFS block.

Query Parameters

NameTypeDescription

arg*

String

The base58 multihash of an existing block to stat.

Headers

NameTypeDescription

Content-Type

string

application/x-www-form-urlencoded

Authorization*

string

Bearer: $TOKEN

{
    "Key": "QmU5NTBAyCNRGvJBbEo2HRdMAncuTDuvScmw3t6Lc1Cb9F",
    "Size": 2813452
}

/object/stat

POST https://api.token-project.eu/ipfs/object/stat

Get stats for the DAG node named by.

Query Parameters

NameTypeDescription

arg*

String

Key of the object to retrieve, in base58-encoded multihash format.

human

Boolean

Print sizes in human readable format (e.g., 1K 234M 2G).

Headers

NameTypeDescription

Content-Type

string

application/x-www-form-urlencoded

Authorization*

string

Bearer: $TOKEN

{
    "Hash": "QmT7iBKicu3dVybBvxzsnffH3xHqV2Eocgr5WcV5AyCQmn",
    "NumLinks": 0,
    "BlockSize": 11,
    "LinksSize": 2,
    "DataSize": 9,
    "CumulativeSize": 11
}

/object/put

POST https://api.token-project.eu/ipfs/object/put

Store input as a DAG object, print its key.

Query Parameters

NameTypeDescription

inputenc

String

Encoding type of input data. One of: {"protobuf", "json"}. Default: json.

datafieldenc

String

Encoding type of the data field, either "text" or "base64". Default: text.

pin

Boolean

Pin this object when adding.

quiet

Boolean

Write minimal output.

Headers

NameTypeDescription

Content-Type

string

application/form-data

Authorization*

string

Bearer: $TOKEN

Request Body

NameTypeDescription

data*

file

JSON file with format {"Data": "whatever_your_data_is"}

{
    "Hash": "QmT7iBKicu3dVybBvxzsnffH3xHqV2Eocgr5WcV5AyCQmn"
}

/object/get

POST https://api.token-project.eu/ipfs/object/get

Get and serialize the DAG node named by.

Query Parameters

NameTypeDescription

arg*

String

Key of the object to retrieve, in base58-encoded multihash format.

data-encoding

String

Encoding type of the data field, either "text" or "base64". Default: text.

Headers

NameTypeDescription

Content-Type

string

application/x-www-form-urlencoded

Authorization*

string

Bearer: $TOKEN

{
    "Links": [],
    "Data": "\b\u0002\u0012\ufffd\ufffd\u0005%PDF-1.4\n%\ufffd\ufffd\ufffd\ufffd\n1 0 obj\n<</Creator (Mozilla/5.0 \\(X11; Linux x86_64\\) AppleWebKit/537.36 \\(KHTML, like Gecko\\) Chrome/86.0.4240.198 Safari/537.36)\n/Producer (Skia/PDF m86)\n/CreationDate (D:20201117135458+00'00')\n/ModDate (D:20201117135458+00'00')>>\nendobj\n3 0 obj\n<</ca 1\n/BM /Normal>>\nendobj\n6 0 obj\n<</CA 1\n/ca 1\n/LC 0\n/LJ 1\n/LW 1\n/ML 4\n/SA true\n/BM /Normal>>\nendobj\n7 0 obj\n<</ca .8471\n/BM /Normal>>\nendobj\n8 0 obj\n<</Type /XObject\n/Subtype /Form\n/Resources <</ProcSet [/PDF /Text /ImageB /ImageC /ImageI]\n/ExtGState <</G6 6 0 R>>>>\n/BBox [0 0 101 104]\n/Group <</Type /Group\n/S /Transparency\n/I true>>\n/Filter /FlateDecode\n/Length 289>> stream\nx\ufffdmR\ufffdn\ufffd0\f\ufffd\ufffd\u0015\ufffd\u000b\ufffd\u0015\ufffd\ufffd\ufffd\u0005\ufffd\ufffd\u000e\ufffd\u0000\ufffd\ufffd\ufffd\u0014H:\ufffd\ufffdCI\ufffd\ufffd\u0000\ufffd`\ufffd\ufffd\ufffd\ufffd$\ufffdW\ufffd\ufffdr\u000e\ufffd\ufffdH\u0012\ufffd(...)"
}

/object/data

POST https://api.token-project.eu/ipfs/object/data

Output the raw bytes of an IPFS object.

Query Parameters

NameTypeDescription

arg*

String

Key of the object to retrieve, in base58-encoded multihash format.

Headers

NameTypeDescription

Content-Type

string

application/x-www-form-urlencoded

Authorization*

string

Bearer: $TOKEN

��%PDF-1.4
%����
1 0 obj
<</Creator (Mozilla/5.0 \(X11; Linux x86_64\) AppleWebKit/537.36 \(KHTML, like Gecko\) Chrome/86.0.4240.198 Safari/537.36)
/Producer (Skia/PDF m86)
/CreationDate (D:20201117135458+00'00')
/ModDate (D:20201117135458+00'00')>>
endobj
3 0 obj
<</ca 1
/BM /Normal>>
(...)

/dag/resolve

POST https://api.token-project.eu/ipfs/dag/resolve

Resolve ipld block.

Query Parameters

NameTypeDescription

arg*

String

The path to resolve.

Headers

NameTypeDescription

Content-Type

string

application/x-www-form-urlencoded

Authorization*

string

Bearer: $TOKEN

{
    "Cid": {
        "/": "bafyreidh4lnv2aaul7mujtovbjk3l2axylqgynq4knkmcrerjtxskizqvm"
    },
    "RemPath": ""
}

/dag/put

POST https://api.token-project.eu/ipfs/dag/put

Add a dag node to ipfs.

Query Parameters

NameTypeDescription

format

String

Format that the object will be added as. Default: cbor.

input-enc

String

Format that the input object will be. Default: json.

pin

Boolean

Pin this object when adding.

hash

String

Hash function to use.

Headers

NameTypeDescription

Content-Type

string

application/form-data

Authorization*

string

Bearer: $TOKEN

Request Body

NameTypeDescription

object data*

file

JSON file by default.

{
    "Cid": {
        "/": "bafyreidh4lnv2aaul7mujtovbjk3l2axylqgynq4knkmcrerjtxskizqvm"
    }
}

/dag/get

POST https://api.token-project.eu/ipfs/dag/get

Get a dag node from ipfs.

Query Parameters

NameTypeDescription

arg*

String

The object to get.

Headers

NameTypeDescription

Content-Type

string

application/x-www-form-urlencoded

Authorization*

string

Bearer: $TOKEN

{
    "info": {
        "_id": "73ed9a82-1fd9-4b9c-9a8c-da4675a24fd",
    "protocolProfileBehavior": {}
}

/cat

POST https://api.token-project.eu/ipfs/cat

Show IPFS object data.

Query Parameters

NameTypeDescription

arg*

String

The path to the IPFS object(s) to be outputted.

offset

Int64

Byte offset to begin reading from.

length

Int64

Maximum number of bytes to read.

Headers

NameTypeDescription

Content-Type

string

application/x-www-form-urlencoded

Authorization*

string

Bearer: $TOKEN

%PDF-1.4
%����
1 0 obj
<</Creator (Mozilla/5.0 \(X11; Linux x86_64\) AppleWebKit/537.36 \(KHTML, like Gecko\) Chrome/86.0.4240.198 Safari/537.36)
/Producer (Skia/PDF m86)
/CreationDate (D:20201117135458+00'00')
/ModDate (D:20201117135458+00'00')>>
endobj
3 0 obj
<</ca 1
/BM /Normal>>
endobj
6 0 obj
<</CA 1
/ca 1
/LC 0
/LJ 1
/LW 1
/ML 4
(...)

/version

POST https://api.token-project.eu/ipfs/version

Show ipfs version information.

Query Parameters

NameTypeDescription

number

Boolean

Only show the version number.

commit

Boolean

Show the commit hash.

repo

Boolean

Show repo version.

all

Boolean

Show all version information.

Headers

NameTypeDescription

Content-Type

string

application/x-www-form-urlencoded

Authorization*

string

Bearer: $TOKEN

{
    "Version": "0.4.23",
    "Commit": "5b1687d",
    "Repo": "7",
    "System": "amd64/linux",
    "Golang": "go1.12.16"
}

Last updated