Docs menu

API Sources

An API Source polls a third-party REST API and forwards what it gets. When it does not, start here.

Quick checks

  1. Node color - is the API Source red?
  2. Live Stream - is there a red entry from the source, and what does its Error say?
  3. Interval - is a Polling Interval (ms) set, or is the source manual only?
  4. Pause - does the Polling tab say Resume Polling?
  5. Pull Now - for a manual source, does a pull return data?

Common issues

The node is red. Open the red entry in the Live Stream and read Error:

  • HTTP 401: Unauthorized or HTTP 403: Forbidden - the credentials are wrong or expired. Check the Auth tab.
  • HTTP 404, or another status - the Endpoint has a typo, or the API moved.
  • An OUTBOUND_ code - OpenX refused the address before calling it, for example OUTBOUND_HOST_NOT_PUBLIC or OUTBOUND_SCHEME_REFUSED. The endpoint must be https, name a public host and carry no user name or password. A redirect (OUTBOUND_REDIRECT_REFUSED) is not followed: use the final address. A reply that is not JSON (OUTBOUND_RESPONSE_NOT_JSON) fails too.

The node stays red after the API is back. The node clears when a poll succeeds. Wait one interval. If the source is manual, press Pull Now. The red also follows the last recorded poll, so a node that was red when you paused it stays red until a poll succeeds.

An interval is set but nothing arrives on schedule. Scheduled polling starts only after you Save and Deploy: Deploy creates the Azure Function that polls. Check that the interval is in milliseconds (30000 is thirty seconds, not thirty minutes), that the Polling tab does not say Resume Polling, and that the node was not switched off in the Inspector header, which pauses it.

There is no Pull Now button. It is shown only when no interval is set. A source with an interval is polled by its function; to pull it by hand, call the Pull Now route.

Pull Now returns nothing, or the wrong data.

  1. Call the endpoint from a browser or cURL: does it return JSON, and is the data where you think?
  2. Check the Response Mapping. It follows dots only: $.data.items, not $..items or $.data[0]. A path that does not exist forwards nothing.
  3. A poll makes one request, so only the first page of a paged API is read.

Pull Failed: "The source answered, but its data did not reach data connection ...". The endpoint worked; the connection did not take the data. For an IoT Hub connection whose reason says it has no device on its IoT hub yet, Deploy the workspace and pull again.

A failed scheduled poll shows nothing in the Live Stream. Check the source is not paused: entries that arrive after a pause are hidden. Clear the Live Stream filters (All Connections, and the filter text). Check that the Deploy that creates the function finished.

The old entries came back after Clear. Clear is remembered in your browser, for that workspace. Cleared on another machine or in another browser, the older entries still show here: clear again.

Pause Polling did not stop it right away. Pausing hides new Live Stream entries at once, but the Azure Function keeps polling until you Save and Deploy. Then it is deleted. Resume Polling, Save and Deploy create it again with the same interval.

On this page