GET/db/equipment/{eid}/recordsUnlimited
POST/db/equipment/{eid}/records201
GET/db/records/{rid}
PUT/db/records/{rid}
POST/db/records/{rid}/unlock
DELETE/db/records/{rid}204
| Field | Type | Notes |
|---|---|---|
test_date | string | YYYY-MM-DD. Stored as written, no timezone is applied. |
tested_by | string | The technician's name as it should appear on the report, not a user id. |
form_type | string | Selects the renderer. Usually matches the device's device_type. |
form_data | object | The measurements. Not validated. |
status | string | "pass" / "fail" / anything else counts as incomplete. |
locked | boolean | Blocks further PUTs. Clear it with POST …/unlock. |
notes | string |
Records are returned newest first, so [0] is the current state of the device, which is what the roll-up counts and last_status are computed from.
Importing trip-test data#
Bulk import runs as two calls on purpose. The preview parses the file and tells you what it matched without writing anything; the confirm applies it. That split exists because an import that silently attaches results to the wrong breaker is worse than one that fails.
POST/db/assemblies/{aid}/import-trip-test/preview
POST/db/assemblies/{aid}/import-trip-test/confirm
Generating the project report#
Renders every record on the project into one NETA document. The response is the file, not JSON.
GET/db/projects/{pid}/generate-reportreturns a file
curl "$BASE/db/projects/312/generate-report" \ -H "Authorization: Bearer $TOKEN" \ --max-time 120 \ -o cedar-ridge.pdf # Content-Type: application/pdf # Errors still come back as JSON: check the type before writing the file.