Clarion
Sign in Get started
Docs · API & developers

Pull a metric's value from a JSON URL on a schedule

Set up Fetch from URL on a Clarion metric so it reads a number from a JSON API hourly, every 6 hours or daily — with a path, auth header and test.

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

  1. Go to Metrics, click the metric’s row to expand it, and click Edit Metric.

  2. In the Fetch from URL box, click Set up.

  3. Enter the JSON URL (https).

  4. Enter the Path to the number. Given this response:

    { "data": { "totals": { "revenue": 48210 } }, "items": [ { "count": 37 } ] }

    data.totals.revenue reads 48210 and items[0].count reads 37. Leave the path blank if the whole response is just the number.

  5. If the API needs authentication, type the header name in Auth header (for example Authorization or X-Api-Key) and its value in Header value (for example Bearer sk_live_…).

  6. Choose How often: Every hour, Every 6 hours or Every day.

  7. Click Test. Clarion fetches once and shows Got 48,210 — or the reason it failed — without recording anything.

  8. 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 no user: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 3xx is 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.

08 — Get started

Ready to build unstoppable momentum?

Join teams that are aligned, accountable, and growing — with a business operating system built to be lived in every day.

Get started free Book a demo
No credit card required · Set up in minutes