Hi,
I am new to the proxmox API and would like to consume this feature to generate an alert when the VM in the Proxmox environment crosses a min thresh hold .
I am using the Python with requests library but dont know the correct way to pass on the authentication parameters while placing the GET requests.
---------------------------------------------- try.py ------------------------------------------------------------------------------------------------------------------------
import requests
import urllib
import json
from datetime import datetime
r=requests.get("https://172.16.15.31:8006/api2/json/nodes/pve31/qemu/116/agent/network-get-interfaces",verify=False)
print(r)
Response
__________
root@pve1:~# python /etc/ansible/try.py
/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:849: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
<Response [401]>
Please suggest the proper way to pass the authentication parameters .
Regards
Anuj
I am new to the proxmox API and would like to consume this feature to generate an alert when the VM in the Proxmox environment crosses a min thresh hold .
I am using the Python with requests library but dont know the correct way to pass on the authentication parameters while placing the GET requests.
---------------------------------------------- try.py ------------------------------------------------------------------------------------------------------------------------
import requests
import urllib
import json
from datetime import datetime
r=requests.get("https://172.16.15.31:8006/api2/json/nodes/pve31/qemu/116/agent/network-get-interfaces",verify=False)
print(r)
Response
__________
root@pve1:~# python /etc/ansible/try.py
/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:849: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
<Response [401]>
Please suggest the proper way to pass the authentication parameters .
Regards
Anuj