Miravo

Admin API

Interactive reference for Miravo's generated admin API contract.

Open Api Document

GET/openapi.json

Generated OpenAPI document for the Miravo admin API.

Response Body

application/json

application/json

curl -X GET "https://loading/openapi.json"
{
  "property1": null,
  "property2": null
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Health

GET/healthz

Liveness probe for the Miravo admin server.

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/healthz"
{
  "status": "ok",
  "environmentState": "idle",
  "tickCount": 0,
  "mqttEnabled": true,
  "mqttConnected": true,
  "opcuaEnabled": true,
  "opcuaConnected": true,
  "modbusEnabled": true,
  "modbusConnected": true,
  "stalled": true,
  "reason": "string",
  "environmentName": "string",
  "runId": "string"
}
{
  "status": "ok",
  "environmentState": "idle",
  "tickCount": 0,
  "mqttEnabled": true,
  "mqttConnected": true,
  "opcuaEnabled": true,
  "opcuaConnected": true,
  "modbusEnabled": true,
  "modbusConnected": true,
  "stalled": true,
  "reason": "string",
  "environmentName": "string",
  "runId": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Readiness

GET/readyz

Readiness probe for the Miravo admin server.

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/readyz"
{
  "status": "ok",
  "environmentState": "idle",
  "tickCount": 0,
  "mqttEnabled": true,
  "mqttConnected": true,
  "opcuaEnabled": true,
  "opcuaConnected": true,
  "modbusEnabled": true,
  "modbusConnected": true,
  "stalled": true,
  "reason": "string",
  "environmentName": "string",
  "runId": "string"
}
{
  "status": "ok",
  "environmentState": "idle",
  "tickCount": 0,
  "mqttEnabled": true,
  "mqttConnected": true,
  "opcuaEnabled": true,
  "opcuaConnected": true,
  "modbusEnabled": true,
  "modbusConnected": true,
  "stalled": true,
  "reason": "string",
  "environmentName": "string",
  "runId": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Metrics

GET/metrics

Engine metrics snapshot.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/metrics"
{
  "environmentName": "string",
  "core": {
    "state": "idle",
    "tickCount": 0,
    "simulationTimeSeconds": 0,
    "instanceCount": 0,
    "memberValueCount": 0,
    "quarantinedInstanceCount": 0,
    "engineErrorsCount": 0,
    "tickOverrunsCount": 0,
    "circuitBreakerTripsCount": 0,
    "uptimeMs": 0,
    "actualTicksPerSecond": 0
  },
  "fleet": {
    "modelBreakdown": [
      {
        "model": "string",
        "count": 0
      }
    ],
    "lifecycleBreakdown": {
      "property1": 0,
      "property2": 0
    },
    "activeFaultCount": 0,
    "faultBreakdown": [
      {
        "fault": "string",
        "count": 0
      }
    ]
  },
  "adapters": [
    {
      "name": "string",
      "metrics": {
        "connected": true,
        "messagesPublished": 0,
        "messagesAttempted": 0,
        "messagesFiltered": 0,
        "errorsCount": 0,
        "lastPublishMs": 0,
        "health": {
          "state": "healthy",
          "pendingWorkCount": 0,
          "completedLastTick": 0
        }
      }
    }
  ]
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

State

GET/state

Engine state snapshot.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/state"
{
  "environmentName": "string",
  "models": [
    {
      "name": "string",
      "memberCount": 0,
      "faultCount": 0,
      "faultNames": [
        "string"
      ],
      "hasLifecycle": true
    }
  ],
  "instances": [
    {
      "id": "string",
      "model": "string",
      "browsePath": [
        "string"
      ],
      "lifecycleStage": "string",
      "operatingHours": 0,
      "activeFaults": [
        "string"
      ],
      "isQuarantined": true
    }
  ],
  "config": {
    "seed": 0,
    "tickIntervalMs": 1,
    "timeMultiplier": 1,
    "adapters": [
      "string"
    ],
    "template": {
      "name": "string",
      "path": "string"
    }
  },
  "availableAdapters": [
    {
      "name": "string",
      "enabled": true,
      "pending": true,
      "endpoint": "string",
      "config": {
        "property1": null,
        "property2": null
      }
    }
  ]
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Bootstrap

GET/bootstrap

Console bootstrap payload.

Response Body

application/json

application/json

curl -X GET "https://loading/bootstrap"
{
  "authenticated": false
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Commands

POST/commands

Execute an engine command.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://loading/commands" \  -H "Content-Type: application/json" \  -d '{    "type": "spawn",    "model": "string",    "count": 1  }'
{
  "success": true,
  "command": "string",
  "correlationId": "string",
  "message": "string",
  "data": null,
  "error": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Shutdown

POST/shutdown

Request graceful shutdown.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://loading/shutdown" \  -H "Content-Type: application/json" \  -d '{}'
{
  "status": "shutting_down"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Instance Detail

GET/instances/{id}

Inspect a running instance.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Path Parameters

id*string
Length1 <= length

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/instances/string"
{
  "id": "string",
  "assetType": "string",
  "browsePath": [
    "string"
  ],
  "lifecycleStage": "string",
  "operatingHours": 0,
  "activeFaults": [
    "string"
  ],
  "isQuarantined": true,
  "parameters": {
    "property1": {
      "value": 0,
      "type": "string",
      "unit": "string"
    },
    "property2": {
      "value": 0,
      "type": "string",
      "unit": "string"
    }
  },
  "members": {
    "property1": {
      "value": 0,
      "quality": "good",
      "timestamp": 0,
      "meta": {
        "kind": "string",
        "dataType": "string",
        "access": "string",
        "unit": "string",
        "euRange": [
          0,
          0
        ]
      }
    },
    "property2": {
      "value": 0,
      "quality": "good",
      "timestamp": 0,
      "meta": {
        "kind": "string",
        "dataType": "string",
        "access": "string",
        "unit": "string",
        "euRange": [
          0,
          0
        ]
      }
    }
  },
  "methods": {
    "property1": {
      "description": "string",
      "inputArguments": [
        {
          "name": "string",
          "dataType": "string",
          "description": "string"
        }
      ],
      "outputArguments": [
        {
          "name": "string",
          "dataType": "string",
          "description": "string"
        }
      ]
    },
    "property2": {
      "description": "string",
      "inputArguments": [
        {
          "name": "string",
          "dataType": "string",
          "description": "string"
        }
      ],
      "outputArguments": [
        {
          "name": "string",
          "dataType": "string",
          "description": "string"
        }
      ]
    }
  }
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Model Detail

GET/models/{name}

Inspect a registered model schema.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Path Parameters

name*string
Length1 <= length

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/models/string"
{
  "name": "string",
  "description": "string",
  "parameters": {
    "property1": {
      "type": "string",
      "default": 0,
      "unit": "string"
    },
    "property2": {
      "type": "string",
      "default": 0,
      "unit": "string"
    }
  },
  "members": {
    "property1": {
      "kind": "string",
      "dataType": "string",
      "access": "string",
      "unit": "string",
      "euRange": [
        0,
        0
      ],
      "default": 0
    },
    "property2": {
      "kind": "string",
      "dataType": "string",
      "access": "string",
      "unit": "string",
      "euRange": [
        0,
        0
      ],
      "default": 0
    }
  },
  "methods": {
    "property1": {
      "description": "string",
      "inputArguments": [
        {
          "name": "string",
          "dataType": "string",
          "description": "string"
        }
      ],
      "outputArguments": [
        {
          "name": "string",
          "dataType": "string",
          "description": "string"
        }
      ]
    },
    "property2": {
      "description": "string",
      "inputArguments": [
        {
          "name": "string",
          "dataType": "string",
          "description": "string"
        }
      ],
      "outputArguments": [
        {
          "name": "string",
          "dataType": "string",
          "description": "string"
        }
      ]
    }
  },
  "faults": [
    "string"
  ],
  "lifecycle": {
    "stages": [
      "string"
    ],
    "totalHours": 0
  }
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Events

GET/events

Read paginated event log entries.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Query Parameters

type?string
Value in"fault:triggered" | "fault:cleared" | "lifecycle:changed" | "instance:created" | "instance:removed" | "engine:state-changed" | "platform:resource" | "platform:operation"
instanceId?string
Length1 <= length
limit?integer
Range0 < value <= 1000
cursor?|
Range0 <= value

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/events"
{
  "events": [
    {
      "id": 0,
      "type": "fault:triggered",
      "instanceId": "string",
      "fault": "string",
      "effects": {
        "property1": null,
        "property2": null
      },
      "tick": 0,
      "simulationTime": 0,
      "timestamp": 0
    }
  ],
  "nextCursor": 0,
  "hasMore": true
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Catalog Models

GET/catalog/models

List catalog models.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/catalog/models"
[
  {
    "name": "string",
    "description": "string",
    "memberCount": 0,
    "methodCount": 0,
    "faultCount": 0,
    "hasLifecycle": true,
    "lifecycleStageCount": 0,
    "source": "string"
  }
]
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Catalog Model Le Dt

GET/catalog/models/{name}/le-dt.json

Download LE Digital Twin JSON for a catalog model.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Path Parameters

name*string
Length1 <= length

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/catalog/models/string/le-dt.json"
{
  "property1": null,
  "property2": null
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Catalog Model Yaml

GET/catalog/models/{name}/yaml

Read raw YAML for a catalog model.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Path Parameters

name*string
Length1 <= length

Response Body

text/yaml

application/json

application/json

curl -X GET "https://loading/catalog/models/string/yaml"
"name: value\n"
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Catalog Model Detail

GET/catalog/models/{name}

Read catalog model schema.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Path Parameters

name*string
Length1 <= length

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/catalog/models/string"
{
  "name": "string",
  "description": "string",
  "parameters": {
    "property1": {
      "type": "string",
      "default": 0,
      "unit": "string"
    },
    "property2": {
      "type": "string",
      "default": 0,
      "unit": "string"
    }
  },
  "members": {
    "property1": {
      "kind": "string",
      "dataType": "string",
      "access": "string",
      "unit": "string",
      "euRange": [
        0,
        0
      ],
      "default": 0
    },
    "property2": {
      "kind": "string",
      "dataType": "string",
      "access": "string",
      "unit": "string",
      "euRange": [
        0,
        0
      ],
      "default": 0
    }
  },
  "methods": {
    "property1": {
      "description": "string",
      "inputArguments": [
        {
          "name": "string",
          "dataType": "string",
          "description": "string"
        }
      ],
      "outputArguments": [
        {
          "name": "string",
          "dataType": "string",
          "description": "string"
        }
      ]
    },
    "property2": {
      "description": "string",
      "inputArguments": [
        {
          "name": "string",
          "dataType": "string",
          "description": "string"
        }
      ],
      "outputArguments": [
        {
          "name": "string",
          "dataType": "string",
          "description": "string"
        }
      ]
    }
  },
  "faults": [
    "string"
  ],
  "lifecycle": {
    "stages": [
      "string"
    ],
    "totalHours": 0
  }
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Catalog Template Le Template Json

GET/catalog/templates/{id}/le-template.json

Download LE template JSON export.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Path Parameters

id*string
Length1 <= length

Query Parameters

host*string
Length1 <= length
protocol?string
Value in"mqtt" | "opcua" | "modbus"

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/catalog/templates/string/le-template.json?host=string"
{
  "property1": null,
  "property2": null
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Catalog Template Le Tags Csv

GET/catalog/templates/{id}/le-tags.csv

Download LE tags CSV export.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Path Parameters

id*string
Length1 <= length

Query Parameters

host*string
Length1 <= length
protocol?string
Value in"mqtt" | "opcua" | "modbus"

Response Body

text/csv

application/json

application/json

curl -X GET "https://loading/catalog/templates/string/le-tags.csv?host=string"
"name,value\nmotor.speed,42\n"
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Catalog Template Yaml

GET/catalog/templates/{id}/yaml

Read raw YAML for a catalog template.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Path Parameters

id*string
Length1 <= length

Response Body

text/yaml

application/json

application/json

curl -X GET "https://loading/catalog/templates/string/yaml"
"name: value\n"
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Catalog Template Detail

GET/catalog/templates/{id}

Read catalog template detail.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Path Parameters

id*string
Length1 <= length

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/catalog/templates/string"
{
  "id": "string",
  "name": "string",
  "description": "string",
  "category": "string",
  "models": [
    "string"
  ],
  "instanceCount": 0,
  "memberCount": 0,
  "source": "string",
  "topology": [
    {
      "name": "string",
      "lines": [
        {
          "name": "string",
          "twins": [
            {
              "model": "string",
              "count": 0,
              "variation": 0,
              "parameters": {
                "property1": 0,
                "property2": 0
              },
              "protocol_scope": [
                "mqtt"
              ]
            }
          ],
          "protocol_scope": [
            "mqtt"
          ]
        }
      ],
      "protocol_scope": [
        "mqtt"
      ]
    }
  ],
  "namespace": {
    "enterprise": "string",
    "site": "string",
    "prefix": "string"
  },
  "settings": {
    "tickIntervalMs": 1,
    "timeMultiplier": 1
  }
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Catalog Templates

GET/catalog/templates

List catalog templates.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/catalog/templates"
[
  {
    "id": "string",
    "name": "string",
    "description": "string",
    "category": "string",
    "models": [
      "string"
    ],
    "instanceCount": 0,
    "memberCount": 0,
    "source": "string"
  }
]
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Running Templates

GET/running-templates

List running template runs.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/running-templates"
[
  {
    "templateRunId": 0,
    "templateName": "string",
    "prefix": "string",
    "instanceIds": [
      "string"
    ],
    "models": [
      "string"
    ],
    "templatePath": "string"
  }
]
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Manifest

GET/manifest

Read unified protocol manifest.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/manifest"
{
  "template": "string",
  "generatedAt": "2019-08-24T14:15:22Z",
  "protocols": {
    "property1": {
      "enabled": true,
      "port": 1
    },
    "property2": {
      "enabled": true,
      "port": 1
    }
  },
  "tags": [
    {
      "instance": "string",
      "browsePath": "string",
      "member": "string",
      "model": "string",
      "dataType": "string",
      "unit": "string",
      "euRange": [
        0,
        0
      ],
      "access": "string",
      "kind": "variable",
      "protocols": {
        "property1": {
          "property1": null,
          "property2": null
        },
        "property2": {
          "property1": null,
          "property2": null
        }
      }
    }
  ],
  "summary": {
    "totalTags": 0,
    "totalInstances": 0,
    "enabledProtocols": [
      "string"
    ]
  }
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Auth Login

POST/auth/login

Authenticate and create an admin session.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://loading/auth/login" \  -H "Content-Type: application/json" \  -d '{    "username": "string",    "password": "string"  }'
{
  "ok": true,
  "changePassword": true
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Auth Logout

POST/auth/logout

Destroy the current admin session.

Response Body

application/json

application/json

curl -X POST "https://loading/auth/logout"
{
  "ok": true
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Auth Password

PUT/auth/password

Change the admin password.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PUT "https://loading/auth/password" \  -H "Content-Type: application/json" \  -d '{    "oldPassword": "string",    "newPassword": "string"  }'
{
  "ok": true
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Auth Status

GET/auth/status

Check the current session status.

Response Body

application/json

application/json

curl -X GET "https://loading/auth/status"
{
  "authenticated": true,
  "username": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Runtime Web Socket

GET/ws

Upgrade to the runtime WebSocket stream.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Response Body

application/json

application/json

curl -X GET "https://loading/ws"
Empty
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Platform Operations

GET/platforms/le/operations

List persisted platform operation summaries.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Query Parameters

type?string
Value in"apply" | "cleanup"
targetId?string
Length1 <= length
limit?integer
Range0 < value <= 500
offset?|
Range0 <= value

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/platforms/le/operations"
{
  "operations": [
    {
      "schemaVersion": 1,
      "operationId": "string",
      "operationType": "apply",
      "status": "success",
      "templateId": "string",
      "targetId": "string",
      "targetLabel": "string",
      "hostname": "string",
      "scope": [
        "string"
      ],
      "filters": {
        "area": "string",
        "line": "string",
        "instance": "string"
      },
      "successCount": 0,
      "failedCount": 0,
      "blockedCount": 0,
      "startedAt": 0,
      "completedAt": 0,
      "durationMs": 0,
      "resourceCounts": {
        "device": {
          "create": 0,
          "update": 0,
          "replace": 0,
          "delete": 0,
          "failed": 0,
          "total": 0
        },
        "model": {
          "create": 0,
          "update": 0,
          "replace": 0,
          "delete": 0,
          "failed": 0,
          "total": 0
        },
        "instance": {
          "create": 0,
          "update": 0,
          "replace": 0,
          "delete": 0,
          "failed": 0,
          "total": 0
        },
        "param-sync": {
          "create": 0,
          "update": 0,
          "replace": 0,
          "delete": 0,
          "failed": 0,
          "total": 0
        }
      },
      "error": "string"
    }
  ],
  "total": 0,
  "hasMore": true
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Platform Targets

GET/platforms/le/targets

List saved LE targets.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/platforms/le/targets"
{
  "targets": [
    {
      "id": "string",
      "platformId": "string",
      "label": "string",
      "hostname": "string",
      "apiToken": "string",
      "sourceHostname": "string",
      "lastUsedAt": 0
    }
  ]
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Platform Target Create

POST/platforms/le/targets

Create an LE target.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://loading/platforms/le/targets" \  -H "Content-Type: application/json" \  -d '{    "label": "string",    "hostname": "string",    "apiToken": "string",    "sourceHostname": "string"  }'
{
  "id": "string",
  "platformId": "string",
  "label": "string",
  "hostname": "string",
  "apiToken": "string",
  "sourceHostname": "string",
  "lastUsedAt": 0
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Platform Connection Test

POST/platforms/le/targets/test

Test LE target connectivity.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://loading/platforms/le/targets/test" \  -H "Content-Type: application/json" \  -d '{    "hostname": "string",    "sourceHostname": "string"  }'
{
  "connected": true,
  "hostname": "string",
  "sourceHostname": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Platform Target Detail

GET/platforms/le/targets/{id}

Read one LE target.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Path Parameters

id*string
Length1 <= length

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/platforms/le/targets/string"
{
  "id": "string",
  "platformId": "string",
  "label": "string",
  "hostname": "string",
  "apiToken": "string",
  "sourceHostname": "string",
  "lastUsedAt": 0
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Platform Target By Id

PUT/platforms/le/targets/{id}

Update one LE target.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Path Parameters

id*string
Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PUT "https://loading/platforms/le/targets/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "string",
  "platformId": "string",
  "label": "string",
  "hostname": "string",
  "apiToken": "string",
  "sourceHostname": "string",
  "lastUsedAt": 0
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Platform Target Delete

DELETE/platforms/le/targets/{id}

Delete one LE target.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Path Parameters

id*string
Length1 <= length

Response Body

application/json

application/json

application/json

curl -X DELETE "https://loading/platforms/le/targets/string"
{
  "message": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Platform Plan

POST/platforms/le/plan

Preview an LE apply plan.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://loading/platforms/le/plan" \  -H "Content-Type: application/json" \  -d '{    "targetId": "string"  }'
{
  "plan": {
    "sourceMode": "static",
    "targetHost": "string",
    "sourceHostname": "string",
    "scope": [
      "devices"
    ],
    "filters": {
      "area": "string",
      "line": "string",
      "instance": "string"
    },
    "entries": [
      {
        "action": "create",
        "resourceType": "device",
        "name": "string",
        "resourceId": "string",
        "protocol": "mqtt",
        "endpoint": "string",
        "detail": "string",
        "blockReason": "string"
      }
    ]
  }
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Platform Apply

POST/platforms/le/apply

Apply a platform plan.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://loading/platforms/le/apply" \  -H "Content-Type: application/json" \  -d '{    "targetId": "string"  }'
{
  "plan": {
    "sourceMode": "static",
    "targetHost": "string",
    "sourceHostname": "string",
    "scope": [
      "devices"
    ],
    "filters": {
      "area": "string",
      "line": "string",
      "instance": "string"
    },
    "entries": [
      {
        "action": "create",
        "resourceType": "device",
        "name": "string",
        "resourceId": "string",
        "protocol": "mqtt",
        "endpoint": "string",
        "detail": "string",
        "blockReason": "string"
      }
    ]
  },
  "applied": 0,
  "failed": 0,
  "error": "string"
}
{
  "plan": {
    "sourceMode": "static",
    "targetHost": "string",
    "sourceHostname": "string",
    "scope": [
      "devices"
    ],
    "filters": {
      "area": "string",
      "line": "string",
      "instance": "string"
    },
    "entries": [
      {
        "action": "create",
        "resourceType": "device",
        "name": "string",
        "resourceId": "string",
        "protocol": "mqtt",
        "endpoint": "string",
        "detail": "string",
        "blockReason": "string"
      }
    ]
  },
  "applied": 0,
  "failed": 0,
  "error": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Platform Cleanup Plan

POST/platforms/le/cleanup/plan

Preview an LE cleanup plan.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://loading/platforms/le/cleanup/plan" \  -H "Content-Type: application/json" \  -d '{    "targetId": "string"  }'
{
  "plan": {
    "sourceMode": "static",
    "targetHost": "string",
    "sourceHostname": "string",
    "scope": [
      "devices"
    ],
    "filters": {
      "area": "string",
      "line": "string",
      "instance": "string"
    },
    "entries": [
      {
        "action": "create",
        "resourceType": "device",
        "name": "string",
        "resourceId": "string",
        "protocol": "mqtt",
        "endpoint": "string",
        "detail": "string",
        "blockReason": "string"
      }
    ]
  }
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Platform Cleanup

POST/platforms/le/cleanup

Execute LE cleanup.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://loading/platforms/le/cleanup" \  -H "Content-Type: application/json" \  -d '{    "targetId": "string"  }'
{
  "plan": {
    "sourceMode": "static",
    "targetHost": "string",
    "sourceHostname": "string",
    "scope": [
      "devices"
    ],
    "filters": {
      "area": "string",
      "line": "string",
      "instance": "string"
    },
    "entries": [
      {
        "action": "create",
        "resourceType": "device",
        "name": "string",
        "resourceId": "string",
        "protocol": "mqtt",
        "endpoint": "string",
        "detail": "string",
        "blockReason": "string"
      }
    ]
  },
  "deleted": 0,
  "failed": 0,
  "error": "string"
}
{
  "plan": {
    "sourceMode": "static",
    "targetHost": "string",
    "sourceHostname": "string",
    "scope": [
      "devices"
    ],
    "filters": {
      "area": "string",
      "line": "string",
      "instance": "string"
    },
    "entries": [
      {
        "action": "create",
        "resourceType": "device",
        "name": "string",
        "resourceId": "string",
        "protocol": "mqtt",
        "endpoint": "string",
        "detail": "string",
        "blockReason": "string"
      }
    ]
  },
  "deleted": 0,
  "failed": 0,
  "error": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Platform Operation Cancel

POST/platforms/le/operations/{operationId}/cancel

Cancel an in-flight streaming LE operation.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Path Parameters

operationId*string
Length1 <= length

Response Body

application/json

application/json

application/json

curl -X POST "https://loading/platforms/le/operations/string/cancel"
{
  "cancelled": true
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Platform Apply Stream

POST/platforms/le/apply/stream

Stream LE apply progress over SSE.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

text/event-stream

application/json

application/json

curl -X POST "https://loading/platforms/le/apply/stream" \  -H "Content-Type: application/json" \  -d '{    "targetId": "string"  }'
"event: started\\ndata: {...}\\n\\n"
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}

Platform Cleanup Stream

POST/platforms/le/cleanup/stream

Stream LE cleanup progress over SSE.

Authorization

AdminSessionCookie
miravo_session<token>

Session cookie returned by POST /auth/login.

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

text/event-stream

application/json

application/json

curl -X POST "https://loading/platforms/le/cleanup/stream" \  -H "Content-Type: application/json" \  -d '{    "targetId": "string"  }'
"event: started\\ndata: {...}\\n\\n"
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}
{
  "code": "UNAUTHORIZED",
  "message": "string",
  "hint": "string"
}