Merge pull request #920 from hashicorp/docs-fs
Added docs for the file system apis
This commit is contained in:
commit
bbe83dc01e
|
@ -188,6 +188,3 @@ PLATFORMS
|
|||
|
||||
DEPENDENCIES
|
||||
middleman-hashicorp!
|
||||
|
||||
BUNDLED WITH
|
||||
1.10.6
|
||||
|
|
53
website/source/docs/http/client-fs-cat.html.md
Normal file
53
website/source/docs/http/client-fs-cat.html.md
Normal file
|
@ -0,0 +1,53 @@
|
|||
---
|
||||
layout: "http"
|
||||
page_title: "HTTP API: /v1/client/fs/cat"
|
||||
sidebar_current: "docs-http-client-fs-cat"
|
||||
description: |-
|
||||
The '/1/client/fs/cat` endpoint is used to read the contents of a file in an
|
||||
allocation directory.
|
||||
---
|
||||
|
||||
# /v1/client/fs/cat
|
||||
|
||||
The `/fs/cat` endpoint is used to read the contents of a file in an allocation
|
||||
directory. This API endpoint is hosted by the Nomad client and requests have to
|
||||
be made to the Nomad client where the particular allocation was placed.
|
||||
|
||||
## GET
|
||||
|
||||
<dl>
|
||||
<dt>Description</dt>
|
||||
<dd>
|
||||
Read contents of a file in an allocation directory.
|
||||
</dd>
|
||||
|
||||
<dt>Method</dt>
|
||||
<dd>GET</dd>
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>`/v1/client/fs/cat/<ALLOCATION-ID>`</dd>
|
||||
|
||||
<dt>Parameters</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li>
|
||||
<span class="param">path</span>
|
||||
<span class="param-flags">required</span>
|
||||
The path relative to the root of the allocation directory. It
|
||||
defaults to `/`
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
|
||||
```
|
||||
2016/03/15 15:40:56 [DEBUG] sylog-server: launching syslog server on addr:
|
||||
/tmp/plugin096499590
|
||||
|
||||
```
|
||||
|
||||
</dd>
|
||||
|
||||
</dl>
|
66
website/source/docs/http/client-fs-ls.html.md
Normal file
66
website/source/docs/http/client-fs-ls.html.md
Normal file
|
@ -0,0 +1,66 @@
|
|||
---
|
||||
layout: "http"
|
||||
page_title: "HTTP API: /v1/client/fs/ls"
|
||||
sidebar_current: "docs-http-client-fs-ls"
|
||||
description: |-
|
||||
The '/1/client/fs/ls` endpoint is used to list files in an allocation
|
||||
directory.
|
||||
---
|
||||
|
||||
# /v1/client/fs/ls
|
||||
|
||||
The `/fs/ls` endpoint is used to list files in an allocation directory. This API
|
||||
endpoint is hosted by the Nomad client and requests have to be made to the Nomad
|
||||
client where the particular allocation was placed.
|
||||
|
||||
## GET
|
||||
|
||||
<dl>
|
||||
<dt>Description</dt>
|
||||
<dd>
|
||||
List files in an allocation directory.
|
||||
</dd>
|
||||
|
||||
<dt>Method</dt>
|
||||
<dd>GET</dd>
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>`/v1/client/fs/ls/<ALLOCATION-ID>`</dd>
|
||||
|
||||
<dt>Parameters</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li>
|
||||
<span class="param">path</span>
|
||||
<span class="param-flags">required</span>
|
||||
The path relative to the root of the allocation directory. It
|
||||
defaults to `/`, the root of the allocation directory.
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
|
||||
```javascript
|
||||
[
|
||||
{
|
||||
"Name": "alloc",
|
||||
"IsDir": true,
|
||||
"Size": 4096,
|
||||
"FileMode": "drwxrwxr-x",
|
||||
"ModTime": "2016-03-15T15:40:00.414236712-07:00"
|
||||
},
|
||||
{
|
||||
"Name": "redis",
|
||||
"IsDir": true,
|
||||
"Size": 4096,
|
||||
"FileMode": "drwxrwxr-x",
|
||||
"ModTime": "2016-03-15T15:40:56.810238153-07:00"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
</dd>
|
||||
|
||||
</dl>
|
56
website/source/docs/http/client-fs-stat.html.md
Normal file
56
website/source/docs/http/client-fs-stat.html.md
Normal file
|
@ -0,0 +1,56 @@
|
|||
---
|
||||
layout: "http"
|
||||
page_title: "HTTP API: /v1/client/fs/stat"
|
||||
sidebar_current: "docs-http-client-fs-stat"
|
||||
description: |-
|
||||
The '/1/client/fs/stat` endpoint is used to stat a file in an allocation
|
||||
directory.
|
||||
---
|
||||
|
||||
# /v1/client/fs/stat
|
||||
|
||||
The `/fs/stat` endpoint is used to stat a file in an allocation directory. This
|
||||
API endpoint is hosted by the Nomad client and requests have to be made to the
|
||||
Nomad client where the particular allocation was placed.
|
||||
|
||||
## GET
|
||||
|
||||
<dl>
|
||||
<dt>Description</dt>
|
||||
<dd>
|
||||
Stat a file in an allocation directory.
|
||||
</dd>
|
||||
|
||||
<dt>Method</dt>
|
||||
<dd>GET</dd>
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>`/v1/client/fs/stat/<ALLOCATION-ID>`</dd>
|
||||
|
||||
<dt>Parameters</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li>
|
||||
<span class="param">path</span>
|
||||
<span class="param-flags">required</span>
|
||||
The path of the file relative to the root of the allocation directory.
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
|
||||
```javascript
|
||||
{
|
||||
"Name": "redis-syslog-collector.out",
|
||||
"IsDir": false,
|
||||
"Size": 96,
|
||||
"FileMode": "-rw-rw-r--",
|
||||
"ModTime": "2016-03-15T15:40:56.822238153-07:00"
|
||||
}
|
||||
```
|
||||
|
||||
</dd>
|
||||
|
||||
</dl>
|
|
@ -91,6 +91,3 @@ appropriate region.
|
|||
|
||||
By default, the output of all HTTP API requests is minimized JSON. If the client passes `pretty`
|
||||
on the query string, formatted JSON will be returned.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -88,6 +88,22 @@
|
|||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li<%= sidebar_current("docs-http-client") %>>
|
||||
<a href="#">Client</a>
|
||||
<ul class="nav nav-visible">
|
||||
<li<%= sidebar_current("docs-http-client-fs-ls") %>>
|
||||
<a href="/docs/http/client-fs-ls.html">/v1/client/fs/ls</a>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-http-client-fs-cat") %>>
|
||||
<a href="/docs/http/client-fs-cat.html">/v1/client/fs/cat</a>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-http-client-fs-stat") %>>
|
||||
<a href="/docs/http/client-fs-stat.html">/v1/client/fs/stat</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-http-regions") %>>
|
||||
<a href="/docs/http/regions.html">Regions</a>
|
||||
|
|
Loading…
Reference in a new issue