Fetch from URL makes Clarion call your URL on a schedule and record one number from the response on a metric. It’s the reverse of a push URL: nothing has to run on your side. An overview is on the JSON API integration page.
Only owners and admins can set up, change or remove a source, because it stores a credential and sends requests on the company’s behalf. Everyone can see where a metric’s values come from.
Before you start
You need an https:// URL that returns JSON containing the number. Clarion reads JSON only — not HTML, CSV or a spreadsheet link.
Set it up
-
Go to Metrics, click the metric’s row to expand it, and click Edit Metric.
-
In the Fetch from URL box, click Set up.
-
Enter the JSON URL (https).
-
Enter the Path to the number. Given this response:
{ "data": { "totals": { "revenue": 48210 } }, "items": [ { "count": 37 } ] }data.totals.revenuereads 48210 anditems[0].countreads 37. Leave the path blank if the whole response is just the number. -
If the API needs authentication, type the header name in Auth header (for example
AuthorizationorX-Api-Key) and its value in Header value (for exampleBearer sk_live_…). -
Choose How often: Every hour, Every 6 hours or Every day.
-
Click Test. Clarion fetches once and shows
Got 48,210— or the reason it failed — without recording anything. -
Click Save. The first fetch runs within a minute.
Each fetch writes the value to the metric’s current day, week or month, replacing that period’s earlier value, and fires the metric.ingested webhook.
Rules for the URL
https://only, on the standard port 443, with nouser:pass@in the URL — put credentials in the auth header.- The host must be public. Addresses on private, loopback or link-local networks are refused, checked on every fetch.
- Redirects aren’t followed; a
3xxis a failure. Use the final URL. - The response must arrive within 5 seconds and be under 256 KB.
- The value may be a number or a numeric string like
"1,234".
Clarion sends GET with Accept: application/json and User-Agent: Clarion-Metrics/1.0 (+https://onclarion.com), if you need to allow it through a firewall rule or recognise it in logs.
About the saved credential
The header value is stored encrypted and never shown again — the field shows only its last few characters. Leave it blank when editing to keep it. If you change the URL to a different host, the saved value is removed rather than sent to the new host; enter it again if that host needs it.
Check on it
The Fetch from URL box shows the schedule, host and path, the last value and when it was fetched, and the latest error, such as The server answered HTTP 401. or Nothing found at "data.total". Response bodies are never shown or stored.
After 10 failures in a row the source shows Paused and stops running. Fix the cause, then click Edit and Save to resume.
To stop fetching, click Remove. Values already recorded stay.