From 02ee57ebe6aff9f11b8fbff9a6bbba052f6581dd Mon Sep 17 00:00:00 2001 From: Richard Littauer Date: Fri, 25 Dec 2015 21:19:23 -0500 Subject: [PATCH] Added example curl requests --- apiary.apib | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apiary.apib b/apiary.apib index 6e7b1b0..1f61b11 100644 --- a/apiary.apib +++ b/apiary.apib @@ -12,6 +12,10 @@ Note that directories are added recursively, to form the ipfs MerkleDAG. A smarter partial add with a staging area (like git) remains to be implemented. +#### curl + + curl -F "file=@test/" -r http://localhost:5001/api/v0/add + + Parameters + arg (string, required) - The path to a file to be added to IPFS + recursive (boolean, optional) - Add directory paths recursively @@ -128,6 +132,12 @@ Stores input as an IPFS block ipfs block put is a plumbing command for storing raw ipfs blocks. It reads from stdin, and is a base58 encoded multihash. +#### curl + + curl -i -F "file=@test" http://localhost:5001/api/v0/block/put + + + + Parameters + arg (string, required) - The path to the data to be stored as an IPFS block