Monitor .check
Run a Monitor once, now, and record what it saw as an Event, at the price of the call it wraps.
- Price
- Free
- Success rate
- 99.6% of 2,079,088 calls
- Freshness
- Read fresh each call
- Emits
Monitor.checked- Capability
- Schedules
POST https: //api.sb/ {your-domain}/ monitors/ check
Inputs
| Name | Type | Default | Meaning |
|---|---|---|---|
monitor | Monitor | Required | The Monitor to run. Also served at /, as the hub defines it. |
Outputs
| Field | Type | What null means |
|---|---|---|
monitor | Monitor | Never null: with its latest result. |
ranAt | string, in ISO 8601 | Never null. |
changed | boolean | Never null: whether this run crossed the Monitor’s change and threshold. |
summary | string | Never null: what moved, in one sentence. |
event | string | Never null: the address of the Event this run recorded. |
cost | Cost, in USD | Never null: what the wrapped call spent. |
Read the result
| Field | Value | What it means | What to do |
|---|---|---|---|
changed | false | The run saw nothing past the threshold. It still recorded the reading, so the curve has the point. | Nothing; read the trend with Metric.query, not run by run. (the contract every data call keeps) |
changed | true once, then false | A one-run move is usually noise in ranks and AI answers. | Act on a change that holds for 2 runs in a row, or 2 weeks for answers. (our planning number) |
Effects
- Action class
None: no approval rule names it, so it runs within its seat’s Permissions and Limits
- Modes
try: Runs the wrapped call and returns what it saw; nothing is recorded and nothing is billed.send: Returns a pending Action at once; its Event carries the rows when the read finishes.do: Waits for the read and returns the rows, billed per result.
- Idempotency
The same
Idempotency-Keywith the same input replays the first answer at $0; with other input it returns 409.- Saved or shared
Records the run as an Event on the Monitor, with the wrapped call’s own Event beside it.
- Emits
Monitor.checkedwith{ monitor,changed, summary, event } - Performed by
- Price
Free. Free: the check itself; the wrapped call bills at its own price.
- Reliability
The first route succeeds 99.6% of 2,079,088 calls. If it fails, the call refuses with
sources-busyand nothing is spent.- Freshness
Every call reads fresh. Readings about people are never shared across startups.
- Batch and pages
Up to 1 Monitor a call. It answers in one response.
- Rate
The shared rate rules: 10 calls a second per key, and an array input counts as one call.
Refuses when
This call has no refusals of its own. Every data call can also meet the shared data-call refusals: filter-unsupported, input-missing, limit-exceeded, max-cost, rate-limited, sources-busy, venue-unsupported.
When it waits
Returns in one response; nothing waits.
Example
Check the rank Monitor on “rent tracking app for landlords” now.To retry, send the same Idempotency-Key: the retry returns the first answer for $0. A new key reads again.
Test values
A sk_test_ key answers these the same way every time, at $0 (every test value).
| Test value | Always returns | What it is for |
|---|---|---|
maxCost: | Refuses with max-cost | Any priced call with a maxCost of 0.0001 is refused before it spends: the price is above the cap. |
rate-limited.test | Refuses with rate-limited | Any call naming this hostname answers 429 with Retry-After, so your retry logic runs. |
sources-busy.test | Refuses with sources-busy | Any call naming this hostname answers 503 as if every route were busy, and nothing is spent. |
Used by
None.