Open victorb opened 5 years ago
Metrics endpoint is now public and can be called. URL would be https://metrics.open-registry.dev/api/v1/query?query=open_registry_balance
and the value can be found like this:
curl 'https://metrics.open-registry.dev/api/v1/query?query=open_registry_balance' | jq ".data.result[0].value[1]"
The first version was supposed to show metrics for the registry and the finances, but ran out of time before being able to implement the backend side of things.
Uncommenting the following section should show some hardcoded values: https://github.com/open-services/open-registry-website/blob/master/index.html#L231-L345
What's missing is to have some recent hardcoded values instead of completely faked ones, so people without JS sees something.
If JS is activated, the page should hit an endpoint and parse the values to show the actual values. This could happen once every X seconds so we can updates values.
To get the metrics, there will be a GET request to something like:
And the response will look something like:
The correct value to read here is
21322
and you'll need to divide by 100 to get the full value, so it's213.22
and it's currency is EUR.All different values for financing can be found here: https://github.com/open-services/finance-watch#examples
In the meantime, while I get the backend working, the response can be hardcoded in the website.
TODO