tl;dr: How can I read these values via de API?
They are in a json schema, but not in a service
I'm interested in reading values such as "power_drawn_in_watts" and "amperage_drawn_in_milliamps" from a POE switch.
I see these are available in a json schema:
But this schema does not seem to be used in any service:
I'm trusting these values are not unavailable via the API. All I can see available is integer values of power, which is clearly insufficient information for somebody who specifically bought a POE switch and is interested in reading the power out of it.
P.S. I am very new to REST API, so excuse me if my lingo makes no sense.
What model of switch ?
i get this with a 2530
VERBOSE: GET http://192.168.44.241/rest/v4/poe/ports/stats with 0-byte payload
VERBOSE: received -byte response of content type application/json
poe_detection_status : PPDS_DELIVERING uri : /ports/1/poe/stats port_id : 1
port_voltage_in_volts : 55
power_denied_count : 0
over_current_count : 0
mps_absent_count : 0
short_count : 0
actual_power_in_watts : 5
power_class : 4
Thanks for your response alagoutte (btw, I thought I would receive an email notification for a response to my thread, but I did not).
The model is 2930F. I get pretty much the same information as you. I'm guessing the REST API does not offer "amperage_drawn_in_milliamps" (which is a value measured by the switch) and, therefore, the power is only made available in integer values on watts, which is very poor resolution.
I ended up resolving it using the REST CLI and parsing the response, or using SNMP. I ended spending much more time on this that I'd have expected.
I recommend making the power in milliwatts available in the REST API.
need to ask on innovate zone...
At Aruba, we believe that the most dynamic customer experiences happen at the Edge. Our mission is to deliver innovative solutions that harness data at the Edge to drive powerful business outcomes.
© Copyright 2021 Hewlett Packard Enterprise Development LPAll Rights Reserved.