JSON output instead of graph

Hey everyone,
I’m trying to make an api call to get out the current cpu/ram usage and some other monitoring information. I can’t seem to figure out how to do that, right now I can only get a graph returned as an image file.

curl -H ‘X-Auth-Token: eac1681292969b2df5b267e88de731a3’ http://example.com/api/v0/devices/localhost/device_processor

I saw on a forum post where this problem seemed to be solved for someone else, but I don’t understand the solution :frowning:
In the post they also mentioned there is a way of accessing the db of historical data through the api, if you could provide the endpoint for that too it would be amazing.

Thank you for the help in advanced!
sudo su