From fbf1d2fe56b900c3938bb5c645eef27c0180a458 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Mon, 25 Jul 2016 14:09:36 -0700 Subject: [PATCH] api docs --- website/source/docs/http/client-fs.html.md | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/website/source/docs/http/client-fs.html.md b/website/source/docs/http/client-fs.html.md index c1b9d130e..582e95d6f 100644 --- a/website/source/docs/http/client-fs.html.md +++ b/website/source/docs/http/client-fs.html.md @@ -133,6 +133,95 @@ allocation was placed. + + +
+
Description
+
+ Stream a tasks stdout/stderr logs. +
+ +
Method
+
GET
+ +
URL
+
`/v1/client/fs/logs/`
+ +
Parameters
+
+
    +
  • + task + required + The name of the task inside the allocation to stream logs from. +
  • +
  • + follow + required + A boolean of whether to follow logs. +
  • +
  • + type + Either, "stdout" or "stderr", defaults to "stdout" if omitted. +
  • +
  • + 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 logs 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