[icinga-checkins] icinga.org: icinga2/master: Update documentation for /v1/actions/ remove-downtime

git at icinga.org git at icinga.org
Tue May 17 11:44:11 CEST 2016


Module: icinga2
Branch: master
Commit: 693358f790e4b94549e13c97688b7fde1bbb8d1c
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=693358f790e4b94549e13c97688b7fde1bbb8d1c

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Thu May 12 10:57:51 2016 +0200

Update documentation for /v1/actions/remove-downtime

refs #11779

---

 doc/9-icinga2-api.md |   22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/doc/9-icinga2-api.md b/doc/9-icinga2-api.md
index b10853e..eca7eff 100644
--- a/doc/9-icinga2-api.md
+++ b/doc/9-icinga2-api.md
@@ -980,6 +980,28 @@ Example for removing all host downtimes using a host name filter for `example.lo
         ]
     }
 
+Example for removing a downtime from a host but not the services filtered by the author name. This example uses
+filter variables explained in the [advanced filters](9-icinga2-api.md#icinga2-api-advanced-filters) chapter.
+
+    $ curl -k -s -u root:icinga -H 'Accept: application/json' -X POST 'https://localhost:5665/v1/actions/remove-downtime' \
+            -d $'{
+      "type": "Downtime",
+      "filter": "host.name == filterHost && !service && downtime.author == filterAuthor",
+      "filter_vars": {
+        "filterHost": "example.localdomain",
+        "filterAuthor": "icingaadmin"
+      }
+    }' | python -m json.tool
+
+    {
+        "results": [
+            {
+                "code": 200.0,
+                "status": "Successfully removed downtime 'example.localdomain!mbmif.local-1463043129-3'."
+            }
+        ]
+    }
+
 ### <a id="icinga2-api-actions-shutdown-process"></a> shutdown-process
 
 Shuts down Icinga2. May or may not return.



More information about the icinga-checkins mailing list