#Perform REST request to proxmox

2 messages · Page 1 of 1 (latest)

idle veldt
#

Hi,
I'm trying to perform my first REST request to proxmox.
Here is what i have in my rest.yaml:

  - authentication: basic
    username: "ha_audit@pve"
    password: "password"
    headers:
      authorization: "Bearer ha_audit_tokenGF45re"
      content-type: application/json
    resource:  "https://proxmox2.home:8006/api2/json/nodes"
    verify_ssl: false

    scan_interval: 10
    sensor:
      - name: "Proxmox2_vm112_fsinfo"
        value_template: >
          {% if value_json is defined %}
            {{ value_json }}
          {% else %}
            value_json IS NOT DEFINED
          {% endif %}        

Looks like value_json is never defined. I have nothing in the core log. So i'm a bit lost.
i tested http/https ... with or without Bearer...
and it works fine in Chrome 😉
I guess it's related to authentification.... i have created my own certificate ( expires November 5, 2026 at 5:54:02 AM) .
Any idea on how to have logs somewhere ?
Thx

idle veldt
#

Oh, and i can have i using curl now 😉 but not using rest inside HA 😦 Arghhh ....;-))