Product โ€” Operations Platform

Magnetar OpsMesh

A production-grade, multi-tenant logistics operations platform. Manage shipments, automate workflows, track escalations, and maintain a complete audit trail โ€” all through a unified REST API.

Live Platform Status
Checking...
Polling 9 microservices
๐Ÿข

Multi-Tenant

Complete data isolation via x-tenant-id header. Separate workflows, audit logs, and users per organisation.

โšก

Workflow Engine

Event-driven automation with log, notify, escalate, condition, and delay step types. Chain steps with success/failure branches.

๐Ÿ“ฆ

Shipment Tracking

Full lifecycle management with carrier, status transitions, estimated delivery, and event-bus integration.

๐Ÿ””

Escalation Management

Route critical events to the right team with severity levels. Assign, resolve, and audit the full escalation history.

๐Ÿ“‹

Audit Trail

Every platform event is recorded to Postgres. Query filtered logs by tenant, event type, and time range.

๐Ÿ”

JWT Auth

8-hour access tokens with 7-day refresh token rotation. Roles: tenant_admin, ops_agent, viewer.

API Reference

https://magnetarai.online/products/magnetar-Opsmesh/api

Authentication โ€” no x-tenant-id required

POST /auth/login Returns access token + refresh token
POST /auth/register Create user (requires tenantId in body)
POST /auth/refresh-token Exchange refresh token for new access token
GET /auth/me Get authenticated user profile

Tenants

GET /tenants List all tenants
POST /tenants Create a new tenant

Shipments

GET /shipments List shipments for tenant
POST /shipments Create shipment with tracking number, carrier, origin, destination
GET /shipments/:id Get single shipment
PATCH /shipments/:id/status Update shipment status (pending โ†’ in_transit โ†’ delivered)

Workflows

GET /workflows List workflow definitions
POST /workflows Create workflow with trigger and steps array
PATCH /workflows/:id Update workflow name, steps, or active state
POST /workflows/:id/trigger Execute workflow immediately with payload
GET /workflows/:id/runs Paginated run history with step results
DELETE /workflows/:id Delete workflow definition

Escalations

GET /escalations List escalations for tenant
GET /escalations/:id Get single escalation
PATCH /escalations/:id/resolve Resolve with resolvedBy and resolution note

Audit Events

GET /audit-events Query audit trail โ€” filter by x-tenant-id, ?limit=

1. Login and get your token

Exchange credentials for an 8-hour access token and 7-day refresh token. Contact admin@magnetarai.online to get a tenant account.

curl -X POST \
  https://magnetarai.online/products/magnetar-Opsmesh/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"you@org.com","password":"..."}'

# Response:
{
  "token": "eyJhbGci...",
  "refreshToken": "eyJhbGci...",
  "tenantId": "tenant-acme",
  "role": "tenant_admin"
}

2. Call the platform API

All data endpoints require Bearer token + x-tenant-id. The gateway routes to the correct microservice automatically.

TOKEN="eyJhbGci..."
TENANT="tenant-acme"
BASE="https://magnetarai.online/products/magnetar-Opsmesh/api"

# Create a shipment
curl -X POST $BASE/shipments \
  -H "Authorization: Bearer $TOKEN" \
  -H "x-tenant-id: $TENANT" \
  -H "Content-Type: application/json" \
  -d '{
    "trackingNumber": "TRK-001",
    "carrier": "DHL",
    "origin": {"city":"London"},
    "destination": {"city":"Berlin"}
  }'