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

Commit 57c7982

Browse files
committed
Added quotes to http, changed POST to GET where appropriate,
And also added `-X POST` where needed to POST requests.
1 parent db5747b commit 57c7982

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

apiary.apib

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ MerkleDAG.
1515

1616
#### curl
1717

18-
curl -F "file=@test" http://localhost:5001/api/v0/add
18+
curl -F "file=@test" "http://localhost:5001/api/v0/add"
1919

2020
+ Parameters
2121
+ arg (string, required) - The path to a file to be added to IPFS.
@@ -31,12 +31,12 @@ MerkleDAG.
3131

3232
#### Curl
3333

34-
curl -F "file=@test" http://localhost:5001/api/v0/add
34+
curl -F "file=@test" "http://localhost:5001/api/v0/add"
3535

3636
+ Body
3737

3838
```
39-
curl -F "file=@test" http://localhost:5001/api/v0/add
39+
curl -F "file=@test" "http://localhost:5001/api/v0/add"
4040
```
4141

4242
+ Response 200 (application/json)
@@ -73,12 +73,12 @@ MerkleDAG.
7373

7474
#### Curl
7575

76-
curl -F "file=@test" http://localhost:5001/api/v0/add?p
76+
curl -F "file=@test" "http://localhost:5001/api/v0/add?p"
7777

7878
+ Body
7979

8080
```
81-
curl -F "file=@test" http://localhost:5001/api/v0/add?p
81+
curl -F "file=@test" "http://localhost:5001/api/v0/add?p"
8282
```
8383

8484
+ Response 200 (application/json)
@@ -120,12 +120,12 @@ MerkleDAG.
120120

121121
#### Curl
122122

123-
curl -F "file=@test" http://localhost:5001/api/v0/add?t
123+
curl -F "file=@test" "http://localhost:5001/api/v0/add?t"
124124

125125
+ Body
126126

127127
```
128-
curl -F "file=@test" http://localhost:5001/api/v0/add?t
128+
curl -F "file=@test" "http://localhost:5001/api/v0/add?t"
129129
```
130130

131131
+ Response 200 (application/json)
@@ -160,12 +160,12 @@ MerkleDAG.
160160

161161
#### Curl
162162

163-
curl -F "file=@test" http://localhost:5001/api/v0/add?n
163+
curl -F "file=@test" "http://localhost:5001/api/v0/add?n"
164164

165165
+ Body
166166

167167
```
168-
curl -F "file=@test" http://localhost:5001/api/v0/add?n
168+
curl -F "file=@test" "http://localhost:5001/api/v0/add?n"
169169
```
170170

171171
+ Response 200 (application/json)
@@ -204,12 +204,12 @@ MerkleDAG.
204204

205205
#### Curl
206206

207-
curl -F "file=@test" http://localhost:5001/api/v0/add?w
207+
curl -F "file=@test" "http://localhost:5001/api/v0/add?w"
208208

209209
+ Body
210210

211211
```
212-
curl -F "file=@test" http://localhost:5001/api/v0/add?w
212+
curl -F "file=@test" "http://localhost:5001/api/v0/add?w"
213213
```
214214

215215
+ Response 200 (application/json)
@@ -248,12 +248,12 @@ MerkleDAG.
248248

249249
#### Curl
250250

251-
curl -F "file=@test" http://localhost:5001/api/v0/add?H
251+
curl -F "file=@test" "http://localhost:5001/api/v0/add?H"
252252

253253
+ Body
254254

255255
```
256-
curl -F "file=@test" http://localhost:5001/api/v0/add?H
256+
curl -F "file=@test" "http://localhost:5001/api/v0/add?H"
257257
```
258258

259259
+ Response 200 (application/json)
@@ -288,12 +288,12 @@ MerkleDAG.
288288

289289
#### Curl
290290

291-
curl -F "file=@test" http://localhost:5001/api/v0/add?s
291+
curl -F "file=@test" "http://localhost:5001/api/v0/add?s"
292292

293293
+ Body
294294

295295
```
296-
curl -F "file=@test" http://localhost:5001/api/v0/add?s
296+
curl -F "file=@test" "http://localhost:5001/api/v0/add?s"
297297
```
298298

299299
+ Response 200 (application/json)
@@ -372,12 +372,12 @@ MerkleDAG.
372372

373373
#### curl
374374

375-
curl -i http://localhost:5001/api/v0/add
375+
curl -i "http://localhost:5001/api/v0/add"
376376

377377
+ Body
378378

379379
```
380-
curl -i http://localhost:5001/api/v0/add
380+
curl -i "http://localhost:5001/api/v0/add"
381381
```
382382

383383
+ Response 400
@@ -414,12 +414,12 @@ Manipulate raw IPFS blocks.
414414

415415
#### curl
416416

417-
curl -i http://localhost:5001/api/v0/block
417+
curl -i "http://localhost:5001/api/v0/block"
418418

419419
+ Body
420420

421421
```
422-
curl -i http://localhost:5001/api/v0/block
422+
curl -i "http://localhost:5001/api/v0/block"
423423
```
424424

425425
+ Response 400
@@ -449,7 +449,7 @@ Manipulate raw IPFS blocks.
449449
}
450450
```
451451

452-
## get [POST /block/get{?arg}]
452+
## get [GET /block/get{?arg}]
453453

454454
Store data as a raw ipfs block.
455455

@@ -460,12 +460,12 @@ Store data as a raw ipfs block.
460460

461461
#### curl
462462

463-
curl -i http://localhost:5001/api/v0/block/get
463+
curl -i "http://localhost:5001/api/v0/block/get"
464464

465465
+ Body
466466

467467
```
468-
curl -i http://localhost:5001/api/v0/block/get
468+
curl -i "http://localhost:5001/api/v0/block/get"
469469
```
470470

471471
+ Response 400
@@ -490,16 +490,16 @@ Store data as a raw ipfs block.
490490

491491
The response is the same if the argument is invalid. For instance:
492492

493-
curl -i http://localhost:5001/api/v0/block/get?arg=kitten
493+
curl -i "http://localhost:5001/api/v0/block/get?arg=kitten"
494494

495495
#### curl
496496

497-
curl -i http://localhost:5001/api/v0/block/get?arg=
497+
curl -i "http://localhost:5001/api/v0/block/get?arg="
498498

499499
+ Body
500500

501501
```
502-
curl -i http://localhost:5001/api/v0/block/get?arg=
502+
curl -i "http://localhost:5001/api/v0/block/get?arg="
503503
```
504504

505505
+ Response 500
@@ -533,12 +533,12 @@ Store data as a raw ipfs block.
533533

534534
#### curl
535535

536-
curl -i http://localhost:5001/api/v0/block/get?arg=QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o
536+
curl -i "http://localhost:5001/api/v0/block/get?arg=QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o"
537537

538538
+ Body
539539

540540
```
541-
curl -i http://localhost:5001/api/v0/block/get?arg=QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o
541+
curl -i "http://localhost:5001/api/v0/block/get?arg=QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o"
542542
```
543543

544544
+ Response 200
@@ -575,12 +575,12 @@ Stores input as an IPFS block
575575

576576
#### curl
577577

578-
curl -i http://localhost:5001/api/v0/block/put
578+
curl -i -X POST "http://localhost:5001/api/v0/block/put"
579579

580580
+ Body
581581

582582
```
583-
curl -i http://localhost:5001/api/v0/block/put
583+
curl -i -X POST "http://localhost:5001/api/v0/block/put"
584584
```
585585

586586
+ Response 400
@@ -605,16 +605,16 @@ Stores input as an IPFS block
605605

606606
The response is the same if there is no data provided. For example:
607607

608-
curl -i -F "data=" http://localhost:5001/api/v0/block/put
608+
curl -i -X POST -F "data=" "http://localhost:5001/api/v0/block/put"
609609

610610
#### curl
611611

612-
curl -i -F "data=invalid" http://localhost:5001/api/v0/block/put
612+
curl -i -X POST -F "data=invalid" "http://localhost:5001/api/v0/block/put"
613613

614614
+ Body
615615

616616
```
617-
curl -i -F "data=invalid" http://localhost:5001/api/v0/block/put
617+
curl -i -X POST -F "data=invalid" "http://localhost:5001/api/v0/block/put"
618618
```
619619

620620
+ Response 500
@@ -652,12 +652,12 @@ Stores input as an IPFS block
652652

653653
#### curl
654654

655-
curl -i -F "data=@test" http://localhost:5001/api/v0/block/put
655+
curl -i -X POST -F "data=@test" "http://localhost:5001/api/v0/block/put"
656656

657657
+ Body
658658

659659
```
660-
curl -i -F "data=@test" http://localhost:5001/api/v0/block/put
660+
curl -i -X POST -F "data=@test" "http://localhost:5001/api/v0/block/put"
661661
```
662662

663663
+ Response 200
@@ -687,7 +687,7 @@ Stores input as an IPFS block
687687
}
688688
```
689689

690-
## stat [POST /block/stat?{arg}]
690+
## stat [GET /block/stat?{arg}]
691691
Retrieve information on a raw ipfs block.
692692

693693
+ Parameters
@@ -697,12 +697,12 @@ Retrieve information on a raw ipfs block.
697697

698698
#### curl
699699

700-
curl -i http://localhost:5001/api/v0/block/stat
700+
curl -i "http://localhost:5001/api/v0/block/stat"
701701

702702
+ Body
703703

704704
```
705-
curl -i http://localhost:5001/api/v0/block/stat
705+
curl -i "http://localhost:5001/api/v0/block/stat"
706706
```
707707

708708
+ Response 400
@@ -725,16 +725,16 @@ Retrieve information on a raw ipfs block.
725725

726726
The response is the same if there is no argument provided. For example:
727727

728-
curl -i -F "data=" http://localhost:5001/api/v0/block/stat/arg=
728+
curl -i -F "data=" "http://localhost:5001/api/v0/block/stat/arg="
729729

730730
#### curl
731731

732-
curl -i http://localhost:5001/api/v0/block/stat/arg=kitten
732+
curl -i "http://localhost:5001/api/v0/block/stat/arg=kitten"
733733

734734
+ Body
735735

736736
```
737-
curl -i http://localhost:5001/api/v0/block/stat/arg=kitten
737+
curl -i "http://localhost:5001/api/v0/block/stat/arg=kitten"
738738
```
739739

740740
+ Response 400
@@ -768,12 +768,12 @@ Retrieve information on a raw ipfs block.
768768

769769
#### curl
770770

771-
curl -i http://localhost:5001/api/v0/block/stat?arg=QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ
771+
curl -i "http://localhost:5001/api/v0/block/stat?arg=QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ"
772772

773773
+ Body
774774

775775
```
776-
curl -i http://localhost:5001/api/v0/block/stat?arg=QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ
776+
curl -i "http://localhost:5001/api/v0/block/stat?arg=QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ"
777777
```
778778

779779
+ Response 200

0 commit comments

Comments
 (0)