Skip to main content

Insight API

The Insight API (minsight) provides node discovery, mesh connectivity, and tunneling capabilities for mimOE. This mim is pre-deployed as part of the mesh-foundation addon and enables devices to discover each other on the local network, across accounts, and via proximity, as well as route traffic across network boundaries.

Base URL

http://localhost:8083/mimik-mesh/insight/v1
info

The Insight API is pre-deployed with the mesh-foundation addon. No additional installation is required.

Authentication

All endpoints require a Bearer token in the Authorization header:

Authorization: Bearer 1234

The default API key is 1234, configured in the [minsight-v1] section of the addon .ini file. See Addon Configuration for details.

Token Requirements

Endpoints that use linkLocal, self, or supernode scope work with the API key alone. Account-scoped operations (account, proximity) and backend endpoint queries (bep, sep) require a JWT to be stored first via PUT /token.

Quick Reference

MethodEndpointDescription
GET/nodesDiscover nodes on the mesh
GET/infoGet node and mesh info
PUT/tokenStore JWT for account-scoped operations

Token Requirements

Discovery TypeStored JWT Required
linkLocalNo
selfNo
supernodeNo
accountYes
proximityYes
bepYes
sepYes

Node Discovery

Discover Nodes

Discover other mimOE nodes on the mesh. The discovery scope depends on the type query parameter.

Request

GET /nodes?type={type}

Query Parameters

ParameterTypeRequiredDescription
typestringYesDiscovery scope: linkLocal, account, or proximity

Discovery Types

TypeDescriptionJWT Required
linkLocalNodes on the same local networkNo
accountNodes associated with the same accountYes
proximityNearby nodes discovered via proximity servicesYes

Response (200 OK)

{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"accountId": "acct-123456",
"name": "Living Room Hub",
"os": "linux",
"addresses": [
{
"type": "local",
"url": {
"href": "http://192.168.1.100:8083"
}
}
],
"services": [
{
"id": "svc-001",
"serviceType": "ai-agent-v1",
"version": "1.0.0",
"status": "running",
"tenant": "default"
}
]
}
]
}

See Node Object for field descriptions.

Example

curl -X GET "http://localhost:8083/mimik-mesh/insight/v1/nodes?type=linkLocal" \
-H "Authorization: Bearer $API_KEY"
Account-Based Discovery

To discover nodes across your account, first store a JWT with PUT /token, then query with type=account:

curl -X GET "http://localhost:8083/mimik-mesh/insight/v1/nodes?type=account" \
-H "Authorization: Bearer $API_KEY"

Node Information

Get Node Info

Retrieve information about the current node and its mesh connectivity. Supports multiple info types in a single request.

Request

GET /info?types={types}

Query Parameters

ParameterTypeRequiredDescription
typesstringYesComma-separated info types: self, supernode, bep, sep

Info Types

TypeDescriptionJWT Required
selfCurrent node informationNo
supernodeSupernode connection detailsNo
bepBackend endpoint (cloud relay) statusYes
sepService endpoint for cross-network tunnelingYes

Self Info

Returns the current node's identity and network addresses.

Example

curl -X GET "http://localhost:8083/mimik-mesh/insight/v1/info?types=self" \
-H "Authorization: Bearer $API_KEY"

Response (200 OK)

{
"data": {
"self": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"accountId": "acct-123456",
"name": "My Device",
"os": "linux",
"addresses": [
{
"type": "local",
"url": {
"href": "http://192.168.1.100:8083"
}
}
],
"services": []
}
}
}

Supernode Info

Returns the supernode this node is connected to for mesh coordination.

curl -X GET "http://localhost:8083/mimik-mesh/insight/v1/info?types=supernode" \
-H "Authorization: Bearer $API_KEY"

Response (200 OK)

{
"data": {
"supernode": {
"id": "sn-a1b2c3d4",
"name": "Supernode-US-West",
"addresses": [
{
"type": "public",
"url": {
"href": "https://sn-us-west.mimik.com"
}
}
]
}
}
}

BEP (Backend Endpoint)

Returns the backend endpoint status for cloud relay connectivity.

curl -X GET "http://localhost:8083/mimik-mesh/insight/v1/info?types=bep" \
-H "Authorization: Bearer $API_KEY"

Response (200 OK)

{
"data": {
"bep": {
"url": "https://bep.mimik.com",
"status": "connected"
}
}
}

SEP (Service Endpoint)

Returns the service endpoint used for cross-network tunneling. The response includes routing headers needed to forward requests to this node from outside the local network.

curl -X GET "http://localhost:8083/mimik-mesh/insight/v1/info?types=sep" \
-H "Authorization: Bearer $API_KEY"

Response (200 OK)

{
"data": {
"sep": {
"nodeId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"url": "https://sep.mimik.com",
"headers": {
"x-mimik-port": "8083",
"x-mimik-routing": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
"status": "available"
}
}
}

Multiple Types

Request multiple info types in a single call:

curl -X GET "http://localhost:8083/mimik-mesh/insight/v1/info?types=self,supernode,bep,sep" \
-H "Authorization: Bearer $API_KEY"

Response (200 OK)

{
"data": {
"self": { "id": "a1b2c3d4-...", "..." : "..." },
"supernode": { "id": "sn-a1b2c3d4", "..." : "..." },
"bep": { "url": "https://bep.mimik.com", "status": "connected" },
"sep": { "nodeId": "a1b2c3d4-...", "url": "https://sep.mimik.com", "..." : "..." }
}
}

Tunneling via SEP

The SEP response provides everything needed to route requests to a node across network boundaries. Use the url as the base and include the routing headers from the headers field.

Example: Calling a mim on a remote node

curl -X GET "https://sep.mimik.com/my-agent/v1/data" \
-H "Authorization: Bearer $API_KEY" \
-H "x-mimik-port: 8083" \
-H "x-mimik-routing: a1b2c3d4-e5f6-7890-abcd-ef1234567890"

This routes the request through the mimik cloud relay to the target node, where it is forwarded to the local mim at /my-agent/v1/data.

info

Tunneling requires that the target node has a valid JWT stored and an active BEP connection. See Tunneling for the full workflow.


Token Management

Store Token

Store a JWT for account-scoped operations. Once stored, endpoints that require a JWT (account discovery, proximity discovery, BEP, SEP) become available.

Request

PUT /token

Headers

HeaderRequiredValue
Content-TypeYesapplication/json
AuthorizationYesBearer <apiKey>

Request Body

FieldTypeRequiredDescription
tokenstringYesJWT access token
expiresAtintegerNoToken expiration time (Unix timestamp in seconds)

Example

curl -X PUT "http://localhost:8083/mimik-mesh/insight/v1/token" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"token": "eyJhbGciOiJSUzI1NiIs...",
"expiresAt": 1729677600
}'

Response (200 OK)

{
"status": "ok"
}
Usage Flow

The typical workflow for account-scoped operations:

  1. Obtain a JWT access token via Account Association
  2. Store the token with PUT /token
  3. Use account-scoped endpoints (GET /nodes?type=account, GET /info?types=sep, etc.)

Schemas

Node Object

FieldTypeDescription
idstringUnique node identifier
accountIdstringAccount the node is associated with
namestringHuman-readable node name
osstringOperating system (e.g., linux, darwin, android, ios)
addressesarrayNetwork addresses (Address Entry)
servicesarrayDeployed services (Service Entry)

Address Entry

FieldTypeDescription
typestringAddress type (e.g., local, public)
url.hrefstringFull URL of the node endpoint

Service Entry

FieldTypeDescription
idstringService identifier
serviceTypestringType of service (mim image name)
versionstringService version
statusstringService status (e.g., running)
tenantstringTenant identifier

Error Responses

Error Format

{
"message": "Description of the error",
"statusCode": 400
}

Error Codes

CodeDescription
400Bad request (invalid query parameter or request body)
401Unauthorized (missing or invalid API key)
403Forbidden (stored JWT missing or expired for account-scoped operation)
500Internal server error