From 7f5238ec003d88c55b5776aa0fac2c8d72baf5a0 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Wed, 13 Jul 2016 16:50:37 -0600 Subject: [PATCH] document endpoint --- website/source/docs/http/client-fs.html.md | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/website/source/docs/http/client-fs.html.md b/website/source/docs/http/client-fs.html.md index 24e404214..c1b9d130e 100644 --- a/website/source/docs/http/client-fs.html.md +++ b/website/source/docs/http/client-fs.html.md @@ -54,6 +54,85 @@ allocation was placed. +
+
Description
+
+ Stream contents of a file in an allocation directory. +
+ +
Method
+
GET
+ +
URL
+
`/v1/client/fs/stream/`
+ +
Parameters
+
+
    +
  • + path + required + The path relative to the root of the allocation directory. It + defaults to `/` +
  • +
  • + offset + The offset to start streaming from. Defaults to 0. +
  • +
  • + origin + Origin can be either "start" or "end" and applies the offset relative to + either the start or end of the file respectively. Defaults to "start". +
  • +
+
+ +
Returns
+
+ + ``` +... + { + "File":"alloc/logs/redis.stdout.0", + "Offset":3604480 + "Data": "NTMxOTMyCjUzMTkzMwo1MzE5MzQKNTMx..." + } + { + "File":"alloc/logs/redis.stdout.0", + "FileEvent": "file deleted" + } + ``` + +
+ + +
Field Reference
+
+ The return value is a stream of frames. These frames contain the following + fields: + +
    +
  • + Data + A base64 encoding of the bytes being streamed. +
  • +
  • + FileEvent + An event that could cause a change in the streams position. The possible + values are "file deleted" and "file truncated". +
  • +
  • + Offset + Offset is the offset into the stream. +
  • +
  • + File + The name of the file being streamed. +
  • +
+
+
+
Description