Fiber Trace API

Parse OTDR traces from your own code. Send a .sor, .msor, or .trc file, get back structured JSON. The same engine behind the free browser tools, built for automation.

If you're processing traces in bulk or on a schedule, you don't need to drive a browser. This is the parser from the analyzer as a plain HTTP endpoint: one trace in, structured results out. Files are parsed in memory and never stored.

Want a key? The API is in early access while we bring on the first teams. Tell us what you're building and we'll set you up.

Request API access →

Authentication

Every request needs your API key in the Authorization header as a bearer token (or an X-API-Key header). Keep it server-side; treat it like a password.

# every request carries your key
Authorization: Bearer jts_live_…

Parse a trace

POST https://johnstonetechs.com/api/v1/parse

Send the file as base64 in a JSON body. Supported today: .sor, .msor (Bellcore/Telcordia SR-4731), and EXFO .trc. Max 4 MB per file.

Request body

FieldTypeNotes
file_base64stringRequired. The file's bytes, base64-encoded. A data: prefix is stripped if present.
filenamestringOptional. Helps format detection (e.g. "span12.sor").

Example

# base64 the file and POST it
B64=$(base64 -w0 span12.sor)
curl -s https://johnstonetechs.com/api/v1/parse \
  -H "Authorization: Bearer $JTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"filename\":\"span12.sor\",\"file_base64\":\"$B64\"}"

Response

Returns the same structure the analyzer produces: headline stats, the full events table, and instrument meta.

{
  "ok": true,
  "filename": "span12.sor",
  "result": {
    "format": "sor",
    "meta": { "otdr_vendor": "Viavi", "otdr_model": "ONA-800", "wavelength_nm": 1550, … },
    "stats": { "total_length_km": "100.935", "total_loss_db": "29.97", … },
    "events": [ { "dist_m": 100934, "loss_db": 0.31, "reflectance_db": -45.2, "type": "…" }, … ],
    "warnings": [ ]
  }
}

Errors

StatusMeaning
401Missing, invalid, or inactive API key.
400No file_base64, bad base64, or empty file.
413File over 4 MB.
422Not a recognized OTDR trace / couldn't parse.

Good to know

  • Same engine as the site. The API runs the exact parser behind the browser analyzer, so results match what you'd see there.
  • Nothing is stored. Files are parsed in memory for the request and discarded.
  • The browser tools stay free. The API is the paid path for programmatic and bulk use; the tools remain free for interactive work.
  • Coming next: a batch /analyze endpoint for whole-job, per-fiber pass/fail (the Fiber Analysis pipeline), plus .opm and OLTS support.

Ready to build on it? Request a key and we'll get you a working example on your own traces.

Request API access →