From a4fb536aba4cfc278002c150add9155ae5c548dd Mon Sep 17 00:00:00 2001
From: Erik Reid <erik.reid@geant.org>
Date: Thu, 4 Jun 2020 21:51:07 +0200
Subject: [PATCH] added docs for /jobs/log

---
 README.md | 29 +++++++++++++++++++++++++----
 1 file changed, 25 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index dc2faf5c..96f09e2e 100644
--- a/README.md
+++ b/README.md
@@ -331,6 +331,27 @@ Any non-empty responses are JSON formatted messages.
   }
   ```
 
+* /jobs/log
+
+  This resource returns the state of the previous (or current)
+  tasks associated with a call to `/jobs/update`.  The response
+  contains error or warning messages, if any were generated.
+
+  ```json
+  {
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "type": "object",
+    "properties": {
+      "pending": {"type": "array", "items": {"type": "string"}},
+      "errors": {"type": "array", "items": {"type": "string"}},
+      "failed": {"type": "array", "items": {"type": "string"}},
+      "warnings": {"type": "array", "items": {"type": "string"}},
+    },
+    "required": ["pending", "errors", "failed", "warnings"],
+    "additionalProperties": False
+  }
+  ```
+
 * /jobs/reload-router-config/*`equipment-name`*
 
   This resource updates the inventory network data for
@@ -367,10 +388,10 @@ Any non-empty responses are JSON formatted messages.
 
   The source-equipment is the equipment that causes the trap, not the NMS that
   sends it.
-  
+
   The response will be an object containing the
   metadata, formatted according to the following schema:
-  
+
     ```json
     {
         "$schema": "http://json-schema.org/draft-07/schema#",
@@ -679,10 +700,10 @@ Any non-empty responses are JSON formatted messages.
 
   The source-equipment is the equipment that causes the trap, not the NMS that
   sends it.
-  
+
   The response will be an object containing the
   metadata, formatted according to the following schema:
-  
+
     ```json
     {
         "$schema": "http://json-schema.org/draft-07/schema#",
-- 
GitLab