Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Commit

Permalink
Filled out block/put example
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardLitt committed Dec 26, 2015
1 parent 02ee57e commit afc33e5
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 3 deletions.
31 changes: 28 additions & 3 deletions apiary.apib
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ Store data as a raw ipfs block.
Stores input as an IPFS block

ipfs block put is a plumbing command for storing raw ipfs blocks.
It reads from stdin, and <key> is a base58 encoded multihash.

#### curl

Expand All @@ -141,12 +140,38 @@ It reads from stdin, and <key> is a base58 encoded multihash.
+ Parameters
+ arg (string, required) - The path to the data to be stored as an IPFS block

+ Response 200 (text/plain)
+ Response 200 (application/json)

+ Headers

```
Access-Control-Allow-Headers: X-Stream-Output, X-Chunked-Output
Access-Control-Expose-Headers: X-Stream-Output, X-Chunked-Output
Trailer: X-Stream-Error
Transfer-Encoding: chunked
Date: Sat, 26 Dec 2015 02:13:34 GMT
Transfer-Encoding: chunked
```

+ Attributes
+ Key (Multihash)
+ Size (number)

+ Body

```
{
"Key":"QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n",
"Size":0
}
```

+ Response 400 (text/plain)

+ Body

```
QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n
File argument 'data' is required
```

+ Response 403 (text/plain)
Expand Down
25 changes: 25 additions & 0 deletions dredd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
dry-run: null
hookfiles: null
language: nodejs
sandbox: false
server: ipfs daemon
server-wait: 3
init: false
custom: {}
names: false
only: []
reporter: apiary
output: []
header: []
sorted: false
user: null
inline-errors: false
details: false
method: []
color: true
level: info
timestamp: false
silent: false
path: []
blueprint: apiary.apib
endpoint: 'http://localhost:4001'
Empty file added test
Empty file.

0 comments on commit afc33e5

Please sign in to comment.