Developer API

Integrate diagnostic reasoning into your stack.

Submit field evidence and get back a ranked, evidence-linked diagnosis and the next best test, over a simple REST API. JSON in, audit-ready RCA out.

BASE URL https://api.assetblue.ai/v1
cURL · create a diagnosis
curl https://api.assetblue.ai/v1/diagnoses \
  -H "Authorization: Bearer ab_live_8f2c…" \
  -H "Content-Type: application/json" \
  -d '{
    "asset": { "id": "PUMP-P-104", "type": "centrifugal_pump" },
    "evidence": [
      { "kind": "symptom", "text": "Bearing temp creeping up over the last shift, audible rumble at speed" },
      { "kind": "action",  "text": "Reapplied grease at last weekly PM — no change after 24 h" }
    ],
    "readings": [
      { "metric": "bearing_temp",   "value": 82.4, "unit": "C" },
      { "metric": "vibration_rms",  "value": 4.7,  "unit": "mm/s" }
    ]
  }'

Overview

The AssetBlue API turns messy field evidence into an inspectable diagnosis. You send the asset and whatever you have — natural-language evidence (symptoms, diagnostics, maintenance actions), structured sensor readings, photos, HMI screenshots, voice notes — and AssetBlue reasons through failure physics and your engineering knowledge graph to a ranked root cause and the next best test.

The API is organized around a single core resource, the diagnosis. It is REST over HTTPS, returns JSON, and uses standard verbs and status codes. Every response is evidence-linked and traceable, so a recommendation never arrives without its reasoning.

  • Base URL  https://api.assetblue.ai/v1
  • Content type  application/json for all request and response bodies
  • Evidence kinds  each evidence[] item is symptom, diagnostic, or action — all plain language
  • Structured readings  send sensor / SCADA / instrument data as readings[] for charts, thresholds, and trend reasoning
  • Multimodal input  attach images, audio, and HMI captures by reference on any evidence or reading

Authentication

Authenticate every request with a secret API key in the Authorization header as a bearer token. Keys are scoped per environment.

HTTP
Authorization: Bearer ab_live_8f2c9d4a1b6e…

Use ab_test_… keys against the sandbox and ab_live_… keys in production. Never expose a secret key in client-side code or a mobile bundle — proxy requests through your own backend. Rotate keys from the console at any time.

Quickstart

Create your first diagnosis in one call. AssetBlue accepts whatever evidence you have and begins reasoning immediately, returning a diagnosis you can poll or subscribe to.

Python
from assetblue import AssetBlue

ab = AssetBlue(api_key="ab_live_8f2c…")

dx = ab.diagnoses.create(
    asset={"id": "PUMP-P-104", "type": "centrifugal_pump"},
    evidence=[
        {"kind": "symptom", "text": "Rising bearing temperature with audible rumble at speed"},
        {"kind": "action",  "text": "Reapplied grease at last weekly PM, no change after 24 h"},
    ],
    readings=[
        {"metric": "bearing_temp",  "value": 82.4, "unit": "C"},
        {"metric": "vibration_rms", "value": 4.7,  "unit": "mm/s"},
    ],
)

dx = ab.diagnoses.wait(dx.id)          # block until reasoned
print(dx.leading_hypothesis.mechanism, dx.next_best_test.action)

The diagnosis lifecycle

A diagnosis moves through four states. You can act on it at any point, and a human always signs off before it becomes a finalized RCA.

01

Submitted

Evidence received; reasoning starts.

02

Reasoned

Ranked hypotheses and the next best test.

03

Validated

An engineer confirms or overrides.

04

Finalized

Audit-ready RCA and asset memory.

Statuses surface as status on the diagnosis object: submitted, reasoning, reasoned, validated, finalized. Subscribe to webhooks to react without polling.

Endpoints

Six endpoints cover the full lifecycle: create, retrieve, enrich, validate, report, and recall. Paths are relative to the base URL.

POST/v1/diagnoses

Start a diagnosis from any combination of evidence. Returns immediately with a diagnosis in the reasoning state.

FieldTypeDescription
assetobjectAsset id and type.required
evidencearrayOne or more natural-language evidence items. Each is { kind, text, at?, attachments? } where kind is one of symptom (what was observed), diagnostic (an engineer’s interpretation of a test or instrument), or action (a maintenance action that was performed). text is free-form prose — no metric/unit schema. Optional at ISO-8601 timestamp; optional attachments array of upload ids / URLs scoped to that item.required
readingsarrayStructured sensor / SCADA / instrument readings as { metric, value, unit, at? }. Send these in parallel with evidence[] — they drive charts, threshold comparisons, and trend reasoning. Engineers don’t have to interpret them in prose; AssetBlue will.
attachmentsarrayTop-level images, audio, or HMI captures that aren’t tied to a specific evidence item — by URL or upload id.
Request body · expanded
{
  "asset": { "id": "PUMP-P-104", "type": "centrifugal_pump" },
  "evidence": [
    {
      "kind": "symptom",
      "text": "Bearing temp creeping up over the last shift, audible rumble at speed",
      "at": "2026-06-04T13:47Z"
    },
    {
      "kind": "diagnostic",
      "text": "Spectrum shows clear 1x and 2x bearing sidebands; pattern matches an outer-race defect",
      "at": "2026-06-04T13:55Z",
      "attachments": ["upl_2Hk…"]
    },
    {
      "kind": "action",
      "text": "Reapplied grease at last weekly PM — no change in vibration after 24 h",
      "at": "2026-06-03T09:00Z"
    }
  ],
  "readings": [
    { "metric": "bearing_temp",  "value": 82.4, "unit": "C",    "at": "2026-06-04T13:55Z" },
    { "metric": "vibration_rms", "value": 4.7,  "unit": "mm/s", "at": "2026-06-04T13:55Z" }
  ]
}
201 · Response
{
  "id": "dg_3Qa9kR2xVb",
  "status": "reasoning",
  "asset": { "id": "PUMP-P-104", "type": "centrifugal_pump" },
  "created_at": "2026-06-04T14:18:07Z"
}
GET/v1/diagnoses/{id}

Retrieve the current reasoning state: ranked hypotheses, the evidence weighed for and against each, and the single next test that best discriminates the cause.

200 · Response
{
  "id": "dg_3Qa9kR2xVb",
  "status": "reasoned",
  "leading_hypothesis": {
    "mechanism": "bearing_fatigue.outer_race_spalling",
    "confidence": 0.86,
    "evidence_for": [
      { "claim": "BPFO spectral peak matches pump RPM", "source": "vibration" },
      { "claim": "Localized housing hotspot, not winding", "source": "thermal" }
    ],
    "evidence_against": [
      { "claim": "No lubricant odour reported", "source": "voice_note" }
    ]
  },
  "next_best_test": {
    "action": "Run envelope/SEE bearing spectrum at 2x RPM",
    "expected_confidence": 0.97
  }
}
POST/v1/diagnoses/{id}/evidence

Append one or more evidence items to an in-flight diagnosis — same shape as the evidence array on POST /v1/diagnoses. AssetBlue re-reasons and returns the updated diagnosis with revised confidence. To answer a clarifying question AssetBlue raised, set in_reply_to to its question_id.

FieldTypeDescription
kindstringOne of symptom, diagnostic, or action.required
textstringPlain-language description.required
atstringISO-8601 timestamp the evidence applies to. Defaults to now.
attachmentsarrayUpload ids or URLs scoped to this evidence item.
in_reply_tostringA question_id from a clarifying question AssetBlue raised, if this evidence answers it.
Request body
{
  "kind": "diagnostic",
  "text": "Envelope spectrum at 2x RPM shows a clean BPFO peak; outer race confirmed",
  "at": "2026-06-04T15:02Z",
  "attachments": ["upl_9Wq…"]
}
POST/v1/diagnoses/{id}/validate

Record a named engineer's decision. No work order is issued without sign-off. Returns the diagnosis in the finalized state with an rca_id.

Request body
{
  "engineer": { "id": "u_8821", "name": "R. Okafor" },
  "decision": "confirm",
  "note": "Spectrum confirms outer-race spalling. Schedule replacement."
}
GET/v1/diagnoses/{id}/rca

Fetch the audit-ready root-cause report: confirmed mechanism, the evidence trail, fault tree and FMEA, cited sources, and the validated action plan. Available once finalized; export as JSON or signed PDF.

GET/v1/assets/{id}/cases

Recall an asset’s accumulated memory: prior evidence (symptoms, diagnostics, and maintenance actions), confirmed mechanisms, corrective actions, and recurrence patterns. Every new diagnosis starts from this intelligence, not a blank form.

Webhooks

Subscribe to events instead of polling. AssetBlue POSTs a signed JSON payload to your endpoint when a diagnosis changes state.

  • diagnosis.reasoned — hypotheses and next best test are ready
  • diagnosis.validated — an engineer has signed off
  • diagnosis.finalized — the RCA report is available

Verify authenticity with the AssetBlue-Signature header (HMAC-SHA256 over the raw body using your signing secret). Respond 2xx within 5 seconds; failed deliveries retry with backoff for 24 hours.

SDKs

Official libraries wrap auth, retries, pagination, and webhook verification.

Python
pip install assetblue
Node
npm install @assetblue/sdk

Prefer raw HTTP? Every example here is a plain request you can run with curl or any client. The OpenAPI spec is published at /v1/openapi.json.

Errors & limits

AssetBlue uses conventional HTTP status codes and returns a structured error body.

422 · Error
{
  "error": {
    "type": "invalid_request",
    "code": "missing_field",
    "message": "asset.id is required",
    "param": "asset.id"
  }
}
400 · 422Malformed or invalid request body.
401Missing or invalid API key.
404No such diagnosis or asset.
429Rate limit exceeded. Default 600 req/min; reasoning jobs are async and uncapped.
5xxTransient server error. Retry idempotently with backoff.

Send an Idempotency-Key header on writes to safely retry without creating duplicate diagnoses.