Skip to content

Create and manage access tokens of Telemetry Router

Last updated on

Access Token are JSON Web Token (JWT) required in order to interact with a telemetry routers’ endpoint.

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 is located (e.g., eu01 or eu02).
  • $TELEMETRY_ROUTER_ID: The unique ID of your Telemetry Router instance.
  • $ACCESS_TOKEN_ID: The specific identifier of an access token (required for View, Edit, and Delete operations).

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

Choose the properties for your new access token

Section titled “Choose the properties for your new access token”
Terminal window
stackit curl -X POST \
"https://telemetry-router.api.stackit.cloud/v1/projects/$PROJECT_ID/regions/$REGION_ID/telemetry-routers/$TELEMETRY_ROUTER_ID/access-tokens" \
-H "Content-Type: application/json" \
--data '{
"ttl": <TTL>,
"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/d5b5cdcc-c155-4d66-82ef-4289db8e4557/access-tokens" \
-H "Content-Type: application/json" \
--data '{
"ttl": 180,
"displayName": "my-telemetry-router-access-token",
"description": "My Telemetry Router access token"
}'
Terminal window
stackit curl -X GET \
"https://telemetry-router.api.stackit.cloud/v1/projects/$PROJECT_ID/regions/$REGION_ID/telemetry-routers/$TELEMETRY_ROUTER_ID/access-tokens" \
-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/access-tokens" \
-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/access-tokens/$ACCESS_TOKEN_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/access-tokens/988d3545-68fb-47f2-acd7-b3ea96036ba9" \
-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/access-tokens/$ACCESS_TOKEN_ID" \
-H "Content-Type: application/json" \
--data '{
"displayName": "<DISPLAY_NAME>",
"description": "<DESCRIPTION>"
}'
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/access-tokens/988d3545-68fb-47f2-acd7-b3ea96036ba9" \
-H "Content-Type: application/json" \
--data '{
"displayName": "my-new-access-token-name",
"description": "My new description for the access token"
}'

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/access-tokens/$ACCESS_TOKEN_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/access-tokens/988d3545-68fb-47f2-acd7-b3ea96036ba9" \
-H "Content-Type: application/json"