Samples
This feature is not available in the Cloud API.
The Nimbus agent repository includes sample clients for Local API Gateway live stream and fleet Custom KPI WebSocket flows.
Download the ready-to-run Python source bundle:
C# Desktop Sample
Download the ready-to-run C# source bundle:
The sample targets .NET 10 and requires the .NET 10 SDK.
The C# sample uses:
Cogniteam.ApiGateway.CoreDTOs and a sample-owned ReFit route interface for login, robot listing, and stream listing.Cogniteam.ApiGateway.Clientfor the Fleet Custom KPI WebSocket and JSON deserialization.ClientWebSocketfor/streams/connect.- a sample-owned protobuf for the separate raw-stream
MessageStreamenvelope. - shared API Gateway DTOs for Fleet Custom KPI JSON frames.
Cogniteam.Nimbus.Messagesfor selected typed payload parsers.
The explicit self-signed HTTPS test option keeps a small sample-owned Fleet KPI socket path. Normal
trusted-certificate connections use Cogniteam.ApiGateway.Client.
Run it from the Nimbus Agent repository root:
dotnet run --project Nimbus.ApiGateway.SampleClient
The default base URL is:
http://<agent-host>:19992
Use Connect to subscribe to the selected robot stream. Use Fleet Custom KPIs to subscribe to
local-fleet Custom KPI JSON frames. Structured values such as poses are already JSON objects; the
sample bounds large image and point-cloud values only in its display log.
Python Sample
The Python sample lists local stream descriptors, connects to one live WebSocket stream, decodes the
binary MessageStream envelope, and prints compact typed summaries for known payload families. It
also includes a Fleet Custom KPI subscriber that parses JSON text frames directly with json.loads.
The descriptor package is used only by the separate raw robot-stream sample.
Install and run it from the Nimbus agent repository root, or from the extracted Python sample bundle root:
python3 -m pip install --target /tmp/nimbus-apigateway-python ./Nimbus.ApiGateway.PythonSampleClient
PYTHONPATH=/tmp/nimbus-apigateway-python \
python3 -m nimbus_apigateway_streams <local-user-token> <base-url> [filter]
Example:
PYTHONPATH=/tmp/nimbus-apigateway-python \
python3 -m nimbus_apigateway_streams 588e0a9f-8d2 http://<agent-host>:19992 pose
The optional filter searches descriptor display name, component name, stream name, stream type, source type, URL, and endpoint.
To subscribe to fleet Custom KPI updates from the local fleet manager:
PYTHONPATH=/tmp/nimbus-apigateway-python \
python3 -m nimbus_apigateway_fleet_custom_kpis <local-user-token> <base-url> [fleet-id]
fleet-id defaults to local-fleet.