← Back to home

Getting started: OPC UA to i3X REST in 5 minutes

The i3X Portal turns any OPC UA server into a live i3X REST API — no installation, no SDK, no middleware. This guide takes you from zero to your first API call.

1. Sign in and launch an instance

Sign in (free — signup only exists so your instances stay private), then on the dashboard enter your OPC UA server endpoint, choose a security mode (None, Sign, or SignAndEncrypt) and optional credentials, and hit Launch. The portal spawns a dedicated node-i3x instance in an isolated process, connected to your server via node-opcua. Your OPC UA credentials are never stored, and instances shut down automatically after a few hours.

No OPC UA server handy? Use the free Sterfive demo server — it ships with representative companion-specification content (DI, Robotics, MachineVision, PackML, Machinery):

opc.tcp://opcuademo.sterfive.com:26541

2. Grab your endpoint URL and token

Each running instance card on the dashboard shows your private base URL and a bearer token scoped to your session. Every call below uses those two values — shown here as $BASE and $TOKEN.

3. Make your first i3X REST calls

The API is self-documenting: open $BASE/v1/docs in a browser for the interactive documentation, or fetch the OpenAPI description at $BASE/v1/openapi.json.

Browse the address space — namespaces, object types, objects:

curl -H "Authorization: Bearer $TOKEN" $BASE/v1/namespaces
curl -H "Authorization: Bearer $TOKEN" $BASE/v1/objects

Read the full state of an asset in one call — i3X's decomposable asset model returns an object and all of its child properties at once:

curl -X POST $BASE/v1/objects/value \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"elementIds": ["<elementId-from-browse>"], "maxDepth": 0}'

Subscribe to live value changes over Server-Sent Events — OPC UA subscriptions translated to a web-native stream:

const evt = await fetch(`${BASE}/v1/subscriptions`, {
  method: 'POST',
  headers: { Authorization: `Bearer ${TOKEN}` },
});
// then attach monitored items and consume the SSE stream —
// see `${BASE}/v1/docs` for the complete subscription workflow

Where to go next

The portal is a free evaluation sandbox, not a production endpoint: instances expire automatically, state resets, and uptime is best-effort. For production deployments, talk to Sterfive.