Epilykos Wiki
Data sources

REST API

Read values from any web API that returns JSON.

The REST API source reads any web address that returns JSON, whether it's a device on your own network (for example http://192.168.1.50/status) or a service on the internet, and turns parts of the response into metrics.

Set it up

In Settings → Sources, press + Add REST source and give it a name.

Enter the address. If the API needs a key, include it in the address itself, for example https://api.example.com/v1/data?key=….

Press 📋 Fetch Fields to see every value in the response, or + Add Mapping to add one yourself with its JSON path and a metric name. Test Path shows what a path currently reads.

Save changes.

Read all REST sources every … seconds controls how often they're read: every 60 seconds by default, and no more often than every 5.

JSON paths

A path is written with dots between the names, and list items are picked by their number:

ResponsePath
{"data": {"power": 1234}}data.power
{"results": [{"temperature": 21.5}]}results.0.temperature (not results[0])
{"current": {"temp_c": 30}}current.temp_c

Limits

  • Epilykos fetches the address with a plain GET and waits up to 10 seconds; it can't send extra headers.
  • Addresses on your local network are fine. Loopback addresses (localhost, 127.0.0.1), link-local addresses and cloud metadata addresses are blocked, so an API on the same computer as Epilykos has to be reached through its network address instead.

Last updated on

On this page