Skip to content

Services

This guide assumes that the Nexus platform has been successfully deployed and that both sample clients have ingested data, as covered in the previous guides. We will demonstrate how to retrieve this data using the Nexus Data API.

To continue with this guide, follow these steps:

  1. Deploy the Data API Sampler We provide a sample Nexus application that is not part of the base services. You will need to deploy this component manually to your environment.

  2. Request Data via REST Our examples utilize curl, though you can use any preferred REST client (e.g., Postman or Insomnia) to interact with the API.

In a GitHub driven deployment, the Data API Sampler is deployed just like the Nexus base components via GitHub Actions. We have pre-configured the necessary workflow within the repository.

To start the deployment, navigate to the Actions tab of your forked Nexus repository. Locate and trigger the following workflow:
“Build, Push and Deploy the Data-API Sampler service” (build-push-deploy-data-api-sampler.yml).

Once the pipeline has completed, verify that the service was successfully deployed. You can find it in the Google Cloud Console under the GKE Workloads screen.

Data API Sampler Deployed

The service is deployed within a dedicated namespace called sample-services, keeping it isolated from the Nexus SDV base-services.

To interact with the Data API Sampler service, you will need its external IP address. Select the data-api-sampler within the GKE console and you can find the assigned endpoint in the Exposing services section at the bottom of the Overview screen.

Data API Sampler Deployed

Now it is time to test the Data API Sampler. Run the following command and remember to replace the IP with your specific service endpoint:

Terminal window
$ curl <SERVICE_IP>:<SERVICE_PORT>/health | jq
{
"groups": [
"liveness",
"readiness"
],
"status": "UP"
}

To request data a different URL is needed: <SERVICE_IP>:<SERVICE_PORT>/data/<VIN>/datatypes/<DATATYPE>:<PROPERTY_ID>?lookback=<LOOKBACK_TIME>

  • VIN is used to identify the car
  • DATATYPE specifies whether a static or a dynamic property is requested
  • PROPERTY_ID specifies the exact property to retrieve
  • LOOKBACK_TIME specifies the timespan to look back for data.

You can use these commands to retrieve the data transmitted by the Go client:

Terminal window
$ curl <SERVICE_IP>:<SERVICE_PORT>/data/VEHICLE001/datatypes/dynamic:battery.temp | jq
{
"dynamic:battery.temp": [
"\"25.15\""
]
}
Terminal window
$ curl "<SERVICE_IP>:<SERVICE_PORT>/data/VEHICLE001/datatypes/dynamic:battery.temp?lookback=1d" | jq
{
"dynamic:battery.temp": [
"\"24.81\"",
"\"25.24\"",
"\"25.08\"",
"\"25.30\"",
"\"25.16\"",
"\"25.05\"",
"\"25.00\"",
"\"25.29\"",
"\"25.15\""
]
}

To retrieve data transmitted by the Python client, the request needs to be slightly modified:

Terminal window
$ curl "<SERVICE_IP>:<SERVICE_PORT>/data/VEHICLE001/datatypes/static:index?lookback=1d" | jq
{
"static:index": [
"\"0\"",
"\"1\"",
"\"2\"",
"\"3\"",
"\"4\"",
"\"5\"",
"\"6\""
]
}
Terminal window
$ curl "<SERVICE_IP>:<SERVICE_PORT>/data/VEHICLE001/datatypes/static:test_key?lookback=1d" | jq
{
"static:test_key": [
"\"test_value\"",
"\"test_value\"",
"\"test_value\"",
"\"test_value\"",
"\"test_value\"",
"\"test_value\"",
"\"test_value\""
]
}

We hope this guide helped you understand how data can be retrieved from BigTable using the Data API Sampler. You can use this service as a template to build your own custom applications on top of Nexus.

We plan to provide more sample services soon, including the ones featured in our IAA Mobility 2025 showcase. You can view the corresponding video on our Nexus SDV landing page.