scraping an API endpoint that requires a timeslot
Opened this issue · 1 comments
stefangweichinger commented
forgive me if I ask an FAQ here. I browsed the README and the issues for an example ... so far I couldn't find something helpful.
I need to scrape data from an URL like this:
https://monitoringapi.solaredge.com/site/10234567/power.json?startTime=2024-11-11%2011:00:00&endTime=2024-11-11%2014:35:00&api_key=<>
That API doesn't give me one current value but only lists of values for a given timeframe.
How I can I configure the json exporter and/or prometheus to only fetch the current value or only the last few values?
thanks for any pointers!
link to their API for reference, if someone is very interested ;-) Their call "URL: /site/{siteId}/currentPowerFlow" gives empty response.
stefangweichinger commented
found a "currentPower" value in another API call. So maybe I don't need the requested functionality anymore ... although I'd like to learn that anyway ;-)