GET/db/projects/{pid}/all-equipmentUnlimited
GET/db/assemblies/{aid}/equipment
POST/db/assemblies/{aid}/equipment201
POST/db/equipment/{eid}/sub201
GET/db/equipment/{eid}
PUT/db/equipment/{eid}
PATCH/db/equipment/{eid}/sort
PATCH/db/equipment/{eid}/move
GET/db/equipment/{eid}/forms
DELETE/db/equipment/{eid}204
| Field | Type | Notes |
|---|---|---|
device_type | string | Required. One of the twelve database slugs. |
designation | string | Required. The tag: 52-1, T-3. |
manufacturer, model, serial_number | string | Nameplate. Copied onto the report. |
voltage_rating, amp_rating | string | Strings, not numbers: "480V", "15kV", "2000A". |
notes | string | |
sort_order | integer | |
parent_equipment_id | integer | Makes this sub-equipment. Prefer POST …/sub. |
Each device is returned with a denormalised substation (its assembly's name) and the state of its most recent test, so a device list renders without a second query per row.
{
"id": 5541,
"assembly_id": 881,
"device_type": "lv_breaker",
"designation": "52-1",
"manufacturer": "Square D",
"model": "MasterPact NW20H",
"serial_number": "SD-2210-4471",
"voltage_rating": "480V",
"amp_rating": "2000A",
"notes": "",
"sort_order": 0,
"parent_equipment_id": null,
"substation": "SWGR-1", the parent assembly's name
"created_at": "2026-09-01 09:31:40.229517",
"record_count": 2,
"last_tested": "2026-09-04", null when never tested
"last_status": "pass",
"sub_equipment": [ /* same shape, recursively */ ]
}Moving a device#
A breaker that turns out to be in a different cubicle is re-parented rather than deleted and recreated. That keeps its id and, more importantly, its test history.
curl -X PATCH "$BASE/db/equipment/5541/move" \ -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \ -d '{"assembly_id": 902}'
Available forms#
GET /db/equipment/{eid}/forms returns the form types valid for that device's device_type. Use it to populate a picker rather than mapping the twelve slugs yourself. The mapping is the backend's and will change with the forms.