API Explorer

Goal: Browse, test, and integrate with your workspace APIs using the governance-filtered API Explorer.


Opening the API Explorer

  1. Click APIs in the workspace menu (AppFrameBar)
  2. Select API Explorer

The modal opens with vertical category tabs on the left and endpoint cards on the right.


Consumer API Root

All consumer endpoints live under /oi-api/ on your workspace host. The full OpenAPI 3.1 specification is available at:

GET /oi-api/openapi

This spec is governance-filtered — it only includes endpoints your access rights permit.


Browsing Endpoints

The Explorer organizes endpoints into 7 categories:

CategoryWhat it covers
Cold DataHistorical data downloads by connection or surface
Warm QueriesNamed KQL queries and ad-hoc query execution
Live StreamReal-time device telemetry via WebSocket
Data StoresContainer and document endpoints for CosmosDB accounts your workspace owns
MCP ServerAI assistant integration via Model Context Protocol
Audit LogsTamper-evident event logging with hash-chained records
Amendment LogsDocumented corrections with maker/checker approval

A Device Connectivity tab also appears when your workspace has configured data connections, showing protocol details and connection information.

The Data Stores tab lists the document endpoints for containers activated on a surface. All four are listed for every table, whatever the surface owner has turned on, so an endpoint appearing here is not a guarantee that it will answer. An operation that has been turned off returns 403 when you call it, including from Try-Me.

Each endpoint card displays the HTTP method, path, and description. Click any card to expand its details.


Using Try-Me

Expand any endpoint card to reveal the Try-Me section:

  1. Fill in path parameters (e.g., query lookup, log lookup)
  2. Add any query parameters or request body
  3. Click Execute to call the endpoint
  4. View the response below

Code snippets are generated in three languages:

TabLanguage
curlShell command
TypeScriptfetch-based
Pythonrequests-based
Thinking Tip:

Use "Copy with my token" to include your active JWT in the generated snippet.


Authentication Panel

A collapsible authentication panel sits at the top of the API Explorer.

JWT tab:

  • Select a duration badge (15 min, 1 hour, 8 hours, 24 hours, 30 days)
  • Optionally select scopes for least-privilege tokens
  • Click Generate to create a JWT
  • The token auto-populates into all Try-Me forms
  • A countdown timer shows remaining token validity

OAuth 2.1 tab:

  • PKCE authorization flow details
  • Discovery URL for client registration
  • Configuration snippets

Connecting the MCP Server

The MCP Server tab includes quick-start commands for connecting AI coding assistants.

Install the fai CLI (one-time):

# macOS / Linux
curl -fsSL "https://www.fathym.com/fai/install.sh" | sh

# Windows (PowerShell)
iwr -useb "https://www.fathym.com/fai/install.ps1" | iex

Register the MCP server with all your coding agents:

fai mcp install https://{your-host}/oi-api/mcp --name open-industrial --auth "YOUR_JWT"

Launch the MCP Inspector to browse and test tools:

fai mcp preview open-industrial
Thinking Tip:

The install command configures Claude Code, Cursor, Cline, and other detected agents in a single step. Re-run with a fresh token when it expires.


Generating Scoped Tokens

For least-privilege access:

  1. Open API Keys from the workspace menu
  2. Select only the scopes your integration needs
  3. Click Generate JWT
  4. Copy the token

Or generate scoped tokens directly from the API Explorer's authentication panel.


Next Steps

If you want to...Go to...
See all endpoint detailsREST API Reference →
Connect Power BIPower BI →
Connect GrafanaGrafana →
Connect any AI assistantMCP Integration →
Understand audit trailsAudit Event Log →
Document correctionsAmendment Log →
On this page