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

Commit

Permalink
Added parents default, examples
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardLitt committed Mar 3, 2016
1 parent 99f430a commit fb5af11
Showing 1 changed file with 76 additions and 1 deletion.
77 changes: 76 additions & 1 deletion apiary.apib
Original file line number Diff line number Diff line change
Expand Up @@ -3705,7 +3705,7 @@ Note: all paths must be absolute.

+ Parameters
+ arg (string, required) - Path to dir to make.
+ parents (boolean, optional) - No error if existing, make parent directories as needed. Alias: p.
+ parents (boolean, optional) - No error if existing, make parent directories as needed. Default: false. Alias: p.
+ flush (boolean, optional) - Flush target and ancestors after write. Default: true. Alias: f.

+ Request Without Arguments
Expand Down Expand Up @@ -3932,6 +3932,81 @@ Note: all paths must be absolute.
```
```

+ Request With Embedded Argument and Without Parents Option

#### curl

curl -i "http://localhost:5001/api/v0/files/mkdir?arg=/testing/test/test"

+ Body

```
curl -i "http://localhost:5001/api/v0/files/mkdir?arg=/testing/test/test"
```

+ Response 500

+ Headers

```
Access-Control-Allow-Headers: X-Stream-Output, X-Chunked-Output
Access-Control-Expose-Headers: X-Stream-Output, X-Chunked-Output
Content-Type: application/json
Server: go-ipfs/0.4.0-dev
Trailer: X-Stream-Error
Transfer-Encoding: chunked
Date: Thu, 03 Mar 2016 16:00:58 GMT
Transfer-Encoding: chunked
```

+ Attributes (Error)
- Code: 0
- Message: "file does not exist"


+ Body

```
{
"Code": 0,
"Message": "file does not exist"
}
```

+ Request With Embedded Argument And Parents Option

#### curl

curl -i "http://localhost:5001/api/v0/files/mkdir?arg=/testing/test/test&parents"

+ Body

```
curl -i "http://localhost:5001/api/v0/files/mkdir?arg=/testing/test/test&parents"
```

+ Response 200

+ Headers

```
Access-Control-Allow-Headers: X-Stream-Output, X-Chunked-Output
Access-Control-Expose-Headers: X-Stream-Output, X-Chunked-Output
Content-Type: application/json
Server: go-ipfs/0.4.0-dev
Trailer: X-Stream-Error
Transfer-Encoding: chunked
Date: Thu, 03 Mar 2016 16:00:50 GMT
Transfer-Encoding: chunked
```

+ Attributes (string)

+ Body

```
```

## stat [GET /files/stat{?arg}{&flush}]
Display file status.

Expand Down

0 comments on commit fb5af11

Please sign in to comment.