Guides → Custom View: Any JSON API

Custom View: Wire Up Any JSON API

Every guided preset — Crypto, Stocks, Weather — is really just a Custom view with the API already filled in. This guide shows the raw mechanics so you can point DataPix at any API that returns JSON: your own server, a smart-home hub, a project tracker, anything. We'll use JSONPlaceholder, a free public test API that needs no key or sign-up, as a worked example.

The example endpoint

https://jsonplaceholder.typicode.com/users/1 returns a single user as plain JSON:

{
  "id": 1,
  "name": "Leanne Graham",
  "username": "Bret",
  "email": "[email protected]",
  "address": {
    "street": "Kulas Light",
    "city": "Gwenborough",
    ...
  },
  "phone": "1-770-736-8031 x56442",
  "website": "hildegard.org",
  "company": {
    "name": "Romaguera-Crona",
    ...
  }
}

Any of these fields — name, email, address.city, company.name, and so on — can become its own element on the panel, styled and positioned independently.

What you need

  • A DataPix, powered on and joined to your Wi-Fi (see Setup).
  • Any JSON API URL. JSONPlaceholder needs no key; most real APIs need one, passed as a request header (see Features).

Step by step

  1. Open the interface and start a Custom view

    From a browser on the same network, open the device's IP address, then go to Views → New view → Custom for a blank canvas.

    DataPix interface home menu with Views, WiFi Connection and other settings tiles
  2. Add a value from an API

    Click Add a value, keep the From API tab selected, and paste the endpoint URL. There's no key needed for this example.

    The Add a value dialog with the From API tab selected and the JSONPlaceholder URL pasted into the API URL field
  3. Test the API

    Click Test API to fetch a live sample. Every field in the response appears as an expandable, checkable tree — on a real DataPix testing this URL, that tree shows id, name, username, email, address.city, phone, website and company.name.

    The Test API results shown as an expandable checkable JSON tree

    The screenshot above is from the interface demo, which simulates a response locally rather than making a real network call — that's why its field names don't match JSONPlaceholder's. Tap a real device's Test API button against this URL and the tree matches the real payload shown above.

  4. Pick fields and add them to the canvas

    Tick one or more fields — picking several at once adds them all as separate elements in a single step — then click Add to Canvas.

    An added API value selected on the canvas, with Label, Format, Color and Font size fields for editing it
  5. Position, format and save

    Drag each value into place, and use a format string like {value:.1f} to control decimal places, or wrap it with your own text. Adding a second value from the same endpoint doesn't need re-testing — pick the saved source from the dropdown.

    The API source dropdown showing a previously saved JSONPlaceholder endpoint, ready to reuse without re-testing Two values positioned side by side on the canvas, with the Format field showing a decimal-place format string

    When everything's positioned, click Save View.

A few limits worth knowing: up to 8 custom data sources, each with up to 8 request headers, a 10-second minimum poll interval, and an 8 KB response size cap. See Specs for the full reference, or Features for everything else a Custom view can do — painted pixels, frame-by-frame animation, and mixing API values with static text on the same canvas.