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

Commit

Permalink
Fixed object put call
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardLitt committed Apr 19, 2016
1 parent 720439f commit 5c1854b
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions apiary.apib
Original file line number Diff line number Diff line change
Expand Up @@ -8231,43 +8231,44 @@ Stores input as a DAG object, outputs its key.

```
{
"Data": "hello world"
"data": "hello world"
}
```

#### curl

curl -i -X POST -F "data=@test" "http://localhost:5001/api/v0/object/put&inputenc=json"
curl -i -X POST -F "data=@test" "http://localhost:5001/api/v0/object/put?inputenc=json"

+ Body

```
curl -i -X POST -F "data=@test" "http://localhost:5001/api/v0/object/put&inputenc=json"
curl -i -X POST -F "data=@test" "http://localhost:5001/api/v0/object/put?inputenc=json"
```

+ Response 400
+ Response 200

+ Headers

```
Access-Control-Allow-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length
Access-Control-Expose-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length
Content-Type: application/json
Server: go-ipfs/0.4.0-dev
Trailer: X-Stream-Error
Transfer-Encoding: chunked
Date: Thu, 04 Feb 2016 17:11:57 GMT
Connection: close
Date: Sun, 20 Mar 2016 23:32:13 GMT
Transfer-Encoding: chunked
```

+ Attributes (Error)
- Message: "This command can't be called directly. Try one of its subcommands."
- Code: 1
+ Attributes (object)
- Hash (Multihash)
- Links (array, nullable)

+ Body

```
{
"Message": "This command can't be called directly. Try one of its subcommands.",
"Code": 1
"Hash": "QmU1Sq1B7RPQD2XcQNLB58qJUyJffVJqihcxmmN1STPMxf",
"Links": []
}
```

Expand Down

0 comments on commit 5c1854b

Please sign in to comment.