Seguir a rede a montante
RegistosGET /topology/trace/upstream
Walks against the flow direction from a start node to find what feeds it, returning each reached node with its depth in links and the links traversed; the start node itself is not listed. By default closed links and inactive nodes stop the trace. Responds 400 when node_id is missing and 404 when it is not a topology node; requires network read access.
Parâmetros
node_idRequired ID of the topology node to trace back from.
include_closedBoolean (
trueorfalse, defaultfalse); whentruethe trace also passes through closed links and continues past inactive nodes.
Devolve
200 Trace
Mostrar atributos
start_node_iddirectionum de
upstream,downstreaminclude_closednodesMostrar atributos filhos
idtenant_idnode_codenamenode_typeum de
source_river,source_borehole,treatment_plant,reservoir,dma_inlet,junction,customer_tapelevation_metersstorage_capacity_m3latitudelongitudeactiveservice_area_iddma_iddevice_idLevel or flow device reporting measurements
meter_idCustomer meter attributed to a customer_tap
meter_serialSerial number of the referenced meter. Omitted when unknown.
meter_holder_nameDisplay name of the customer who holds the account the meter is installed on. Omitted when unknown.
created_atupdated_atdepth
linksMostrar atributos filhos
idtenant_idlink_codefrom_node_idto_node_idlink_typeum de
gravity_main,pumping_main,distribution_pipe,control_valvelength_metersdiameter_mmroughness_coefficientHazen-Williams C
statusum de
open,closed,throttledasset_idcreated_atupdated_at
Permissões network:read · Funções: admin, analyst, field_reader, field_supervisor, operations, owner, viewer
curl -X GET "$BUSINESS_API/topology/trace/upstream" \
-H "Authorization: Bearer sk_test_..."
# Sem comando CLI equivalente; use cURL ou HTTP directo.
const res = await fetch("$BUSINESS_API/topology/trace/upstream", {
method: "GET",
headers: {
Authorization: "Bearer sk_test_..."
}
});
const data = await res.json();
import requests
res = requests.get(
"$BUSINESS_API/topology/trace/upstream",
headers={
"Authorization": "Bearer sk_test_..."
}
)
data = res.json()
req, _ := http.NewRequest("GET", "$BUSINESS_API/topology/trace/upstream", nil)
req.Header.Set("Authorization", "Bearer sk_test_...")
resp, err := http.DefaultClient.Do(req)
{
"start_node_id": "sta_2r9QwjrYCzhCIxhykbbmgFLiy1J",
"direction": "upstream",
"include_closed": true,
"nodes": [
{
"id": "top_20EbJqgt7ECLvqS5fuUZFei3bys",
"tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
"node_code": "NOD-2026-000142",
"name": "Ana Matsinhe",
"node_type": "source_river",
"elevation_meters": 1,
"storage_capacity_m3": 1,
"latitude": -25.9653,
"longitude": 32.5892,
"active": true,
"service_area_id": "ser_23fmkpfkC17kSVJ2spjyiBbOED9",
"dma_id": "dma_2gE3tiwbLQQnDGcrVkstPO8Bjkg",
"device_id": "dev_2E2J9iiRr2o7PWMrj8wJrQyb9sK",
"meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
"meter_serial": "meter serial",
"meter_holder_name": "Ana Matsinhe",
"created_at": "2026-11-19T09:30:00Z",
"updated_at": "2026-11-19T09:30:00Z",
"depth": 1
}
],
"links": [
{
"id": "top_26ATL6Y7Pm2ppeMTl60jhySNHae",
"tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
"link_code": "LIN-2026-000142",
"from_node_id": "fro_2b3GWtBsQPTMCF5SOjDUUp7QKHr",
"to_node_id": "ton_2qKn74u1zmYRZmiRFqqbFqoplME",
"link_type": "gravity_main",
"length_meters": 1,
"diameter_mm": 1,
"roughness_coefficient": 1,
"status": "open",
"asset_id": "ass_2IIXBYi79uuRV0QXd685rmSLhO0",
"created_at": "2026-11-19T09:30:00Z",
"updated_at": "2026-11-19T09:30:00Z"
}
]
}