Feb-28-2020, 12:56 PM
Hi
I've a question about a request I need to do on a python script.
In fact I use icinga and my request on bash is:
If you have any ideas please?
(I try with many docs examples but not with success)
Thanks
Alex
I've a question about a request I need to do on a python script.
In fact I use icinga and my request on bash is:
curl -k -s -u admin:XXXXXXXX H 'Accept: application/json' 'https://localhost:5665/v1/objects/hosts' | jq '.' | grep -c '__name'I can do curl request but not succeed to use jq and grep after.
request_url = "https://localhost:5665/v1/hosts" headers = { 'Accept': 'application/json', 'X-HTTP-Method-Override': 'GET' } r = requests.post(request_url, headers=headers, verify=True, auth=(api_login, api_password),)But for jq..
If you have any ideas please?
(I try with many docs examples but not with success)
Thanks
Alex