http_poll) sends a GET request to a URL on a schedule. It compares each response with the last one. It sends an event only when something changed, and it tells you what changed.
Use it for exchange rates, stock levels, tenders, status pages and partner APIs that send no webhooks.
Watch a URL sources need a Pro project.
Modes
- Document
- Items
Watch one value. When it changes, you get
http_poll.changed with before, after and changed_fields.Example: watch the rates object of an exchange-rate API.If the response is not JSON, hooksnode watches the text. Leave Select empty.
Settings
Paths
A path is a list of keys with dots:$.data.items or data.items. A number picks an array element: $.data.0.price. $ or an empty path is the whole response.
How it works
- Test first. When you create or change the source, hooksnode runs a test poll. If it fails, nothing is saved.
- Baseline. The first poll stores what it sees. It sends no events. A change to the URL, mode or paths takes a new baseline.
- Poll. Each poll is a
GETwithUser-Agent: Hooksnode-Poller/1.0and a 30 second timeout. - Compare and send. hooksnode stores each event first, then moves its cursor. A failed step leaves the cursor, and the next poll sends the same idempotency keys. You never get the same change twice.
- Check now. Press Check now to poll at once.
Limits
The event shows the URL with no query string, because a query string can hold keys.
Errors
- A
401or403response sets the source toerrorand emails the project owner. Polling stops until you save settings that pass a test poll. - Other errors back off. The interval doubles each time, up to 1 hour.