API Explorer
Goal: Browse, test, and integrate with your workspace APIs using the governance-filtered API Explorer.
Opening the API Explorer
- Click APIs in the workspace menu (AppFrameBar)
- 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:
| Category | What it covers |
|---|---|
| Cold Data | Historical data downloads by connection or surface |
| Warm Queries | Named KQL queries and ad-hoc query execution |
| Live Stream | Real-time device telemetry via WebSocket |
| Data Stores | Container and document endpoints for CosmosDB accounts your workspace owns |
| MCP Server | AI assistant integration via Model Context Protocol |
| Audit Logs | Tamper-evident event logging with hash-chained records |
| Amendment Logs | Documented 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:
- Fill in path parameters (e.g., query lookup, log lookup)
- Add any query parameters or request body
- Click Execute to call the endpoint
- View the response below
Code snippets are generated in three languages:
| Tab | Language |
|---|---|
| curl | Shell command |
| TypeScript | fetch-based |
| Python | requests-based |
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
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:
- Open API Keys from the workspace menu
- Select only the scopes your integration needs
- Click Generate JWT
- 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 details | REST API Reference → |
| Connect Power BI | Power BI → |
| Connect Grafana | Grafana → |
| Connect any AI assistant | MCP Integration → |
| Understand audit trails | Audit Event Log → |
| Document corrections | Amendment Log → |