jstefanop / apolloapi-v2

Apollo WebOS 2 Backend
Other
15 stars 2 forks source link

Question about my Apollo II mining stats #11

Open daviddahl opened 1 month ago

daviddahl commented 1 month ago

I would like to pull stats from my Apollo II and visualize them in grafana on another machine on my network.

I see there is some stats collection here: https://github.com/jstefanop/apolloapi-v2/blob/main/src/store/api/miner/minerStats.js

is there any documentation on the best way to call an endpoint to get this data? Is graphQL accessible on the box?

michelem09 commented 1 month ago

Hello, you can query Apollo API via GraphQL using this endpoint http://:5000/api/graphql

To find out what to query you can look at this https://github.com/jstefanop/apolloui-v2/blob/main/src/graphql/miner.js

Sorry still no documentation for this but we could think about it.

daviddahl commented 1 month ago

That does not work via localhost or the local network, I get a 404...

image
michelem09 commented 1 month ago

GET method doesn't work with GraphQL, you have to use a client/ide or make a POST method query.

https://www.apollographql.com/blog/what-is-a-graphql-query-graphql-query-using-apollo-explorer