get_link_results
Retrieve simulation results for network links such as flow, velocity, headloss, and quality, with options for specific timesteps and link IDs. Returns min/max/mean over time when timesteps are omitted.
Instructions
Query simulation results for links (flow, velocity, headloss, unitHeadloss, quality, status, setting, head). Defaults to the last timestep and includes min/max/mean over time unless timesteps are given. Link ids are capped at 250, timesteps at 100. Pass the runId returned by run_simulation to pin results to a specific run; omit for the latest run. headloss is TOTAL headloss (unit headloss x length/1000 for pipes; valves report the raw column value). unitHeadloss is the raw per-1000-unit value. Pumps report head (head added, positive when pumping normally); their headloss/unitHeadloss are null. status is a raw EPANET status code (legend in units.status); statusLabel/statusWarning are decoded per link type. Units and a qualityAnalyzed flag are included in every response.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runId | No | The run id returned by run_simulation. Omit to use the latest run. | |
| offset | No | Zero-based index of the first link to return; combine with the cap to page through large networks. | |
| linkIds | No | Link ids to query. Omit for all links (capped at 250 per page). | |
| networkId | Yes | The network id returned by load_network. | |
| timesteps | No | Zero-based reporting timestep indices. Omit to get the last timestep plus min/max/mean over time. | |
| properties | No | Result properties to return. Defaults to flow. |