Skip to content

Create and manage instances of Telemetry Router

Last updated on

The Telemetry Router is a self-manageable component through which telemetry data can be introduced. In order to ingest data at the Telemetry Router endpoint, an individually creatable access token is required. Creating a Telemetry Router enables the setup of destinations, filtering, and emission of the captured data.

To execute the API commands in this guide, you must first export the following path parameters as environment variables in your terminal (or replace them directly in the commands):

  • $PROJECT_ID: Your unique STACKIT project ID (e.g., 16dbfb51...).
  • $REGION_ID: The region where your instance will be located (e.g., eu01 or eu02).
  • $TELEMETRY_ROUTER_ID: The unique ID of your Telemetry Router instance (required for View, Edit, and Delete operations).

To create a Telemetry Router instance, you need to call the appropriate endpoint.

Choose the properties for your new instance

Section titled “Choose the properties for your new instance”
Terminal window
stackit curl -X POST \
"https://telemetry-router.api.stackit.cloud/v1/projects/$PROJECT_ID/regions/$REGION_ID/telemetry-routers" \
-H "Content-Type: application/json" \
--data '{
"displayName": "<DISPLAY_NAME>",
"description": "<DESCRIPTION>"
}'
Terminal window
stackit curl -X POST \
"https://telemetry-router.api.stackit.cloud/v1/projects/16dbfb51-7a75-42d3-a51d-99f87f48cd32/regions/eu01/telemetry-routers" \
-H "Content-Type: application/json" \
--data '{
"displayName": "my-telemetry-router",
"description": "My Telemetry Router instance"
}'
Terminal window
stackit curl -X GET \
"https://telemetry-router.api.stackit.cloud/v1/projects/$PROJECT_ID/regions/$REGION_ID/telemetry-routers" \
-H "Content-Type: application/json"
Terminal window
stackit curl -X GET \
"https://telemetry-router.api.stackit.cloud/v1/projects/16dbfb51-7a75-42d3-a51d-99f87f48cd32/regions/eu01/telemetry-routers" \
-H "Content-Type: application/json"
Terminal window
stackit curl -X GET \
"https://telemetry-router.api.stackit.cloud/v1/projects/$PROJECT_ID/regions/$REGION_ID/telemetry-routers/$TELEMETRY_ROUTER_ID" \
-H "Content-Type: application/json"
Terminal window
stackit curl -X GET \
"https://telemetry-router.api.stackit.cloud/v1/projects/16dbfb51-7a75-42d3-a51d-99f87f48cd32/regions/eu01/telemetry-routers/d5b5cdcc-c155-4d66-82ef-4289db8e4557" \
-H "Content-Type: application/json"
Terminal window
stackit curl -X PUT \
"https://telemetry-router.api.stackit.cloud/v1/projects/$PROJECT_ID/regions/$REGION_ID/telemetry-routers/$TELEMETRY_ROUTER_ID" \
-H "Content-Type: application/json" \
--data '{
"displayName": "<DISPLAY_NAME>",
"description": "<DESCRIPTION>",
"filter": <FILTER_OBJECT>
}'
"attributes": [
{
"key": "my-special-filter",
"level": "scope",
"matcher": "=",
"value": "user"
}
]

Example of adding a filter to an existing Telemetry Router instance

Section titled “Example of adding a filter to an existing Telemetry Router instance”
Terminal window
stackit curl -X PUT \
"https://telemetry-router.api.stackit.cloud/v1/projects/16dbfb51-7a75-42d3-a51d-99f87f48cd32/regions/eu01/telemetry-routers/d5b5cdcc-c155-4d66-82ef-4289db8e4557" \
-H "Content-Type: application/json" \
--data '{
"filter": {
"attributes": [
{
"key": "my-special-filter",
"level": "scope",
"matcher": "=",
"value": "user"
}
]
}
}'

To delete a Telemetry Router instance, you need to call the DELETE endpoint.

Terminal window
stackit curl -X DELETE \
"https://telemetry-router.api.stackit.cloud/v1/projects/$PROJECT_ID/regions/$REGION_ID/telemetry-routers/$TELEMETRY_ROUTER_ID" \
-H "Content-Type: application/json"

Example:

Terminal window
stackit curl -X DELETE \
"https://telemetry-router.api.stackit.cloud/v1/projects/16dbfb51-7a75-42d3-a51d-99f87f48cd32/regions/eu01/telemetry-routers/d5b5cdcc-c155-4d66-82ef-4289db8e4557" \
-H "Content-Type: application/json"