add native python client example

This commit is contained in:
Yannik Schmidt
2022-01-06 11:38:17 +01:00
committed by GitHub
parent 41cbb00ce5
commit 7e9a6fd598

View File

@@ -25,6 +25,11 @@ For example:
-H "application/json" \
-d "{ "service_name" : "name", "token" : "secret_token" } \
https://server:port/
Or directly in native python:
import requests
requests.post("https://server:port/", json={"service_name" : "name", "token" : "secret_token" })
## Icinga (Serverside) Requests
Use the [python-script]() as a command to execute, you can pass *protocol*, *host*, *port* and *service\_name* as arguments.