Skip to content

HTTP API

Jackson Hoffart edited this page Feb 20, 2026 · 1 revision

Overview

vpp-sim can expose current state and telemetry over HTTP using schema v1 fields.

Start with API enabled:

cargo run --release -- --preset demo --api-bind 127.0.0.1:8080

Endpoints

GET /state

Returns the latest simulation snapshot object.

Example:

curl -s http://127.0.0.1:8080/state

GET /telemetry

Returns all collected telemetry rows.

Example:

curl -s http://127.0.0.1:8080/telemetry

GET /telemetry?from=<timestep>&to=<timestep>

Returns telemetry rows in the inclusive timestep range.

Example:

curl -s "http://127.0.0.1:8080/telemetry?from=4&to=8"

Data Contract

  • Field names are aligned with telemetry CSV schema v1.
  • Clients should treat unknown future fields as non-breaking extensions.
  • Consumers should validate numeric ranges where operational correctness matters.

Usage Notes

  • The API is intended for local inspection/integration workflows.
  • For performance experiments, prefer release builds (--release).
  • For analytics pipelines, CSV export is often the simplest ingestion path.

Clone this wiki locally