Create and manage access tokens
Prerequisites
Section titled “Prerequisites”- You have a Telemetry Router instance Create and manage instances
Create an access token
Section titled “Create an access token”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”| Parameter | Meaning | Example |
|---|---|---|
| accessToken | The individual access token of your service account | eyJhbGci0iJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi0iIxMjM0NTY30DkwIiwibmFtZSI6IkpvaG4gRG91IiwiaXNTb2NpYWwiOnRydWV9.4pcPyMD09o1PSyXnrXCjTwXyr4BsezdI1AVTmud2fU4 |
| projectId | Your individual project ID | 16dbfb51-7a75-42d3-a51d-99f87f48cd32 |
| regionId | The region your Telemetry Router instance is located | eu01 |
| telemetryRouterId | The ID of your Telemetry Router instance | d5b5cdcc-c155-4d66-82ef-4289db8e4557 |
| ttl | An integer or null to define the lifetime of the token in days. null represents a token with an infinite lifespan. | 28800 |
| displayName | A name for the Telemetry Router instance | my-telemetry-router |
| description | An optional description for your reference | My Telemetry Router instance |
curl -X POST \'https://telemetry-router.api.[regionId].stackit.cloud/v1alpha/projects/[projectId]/regions/[regionId]/telemetry-routers/[telemetryRouterId]/access-tokens' \--header 'Authorization: Bearer [accessToken]' \--header 'Content-Type: application/json' \--data-raw '{ "ttl": [ttl], "displayName": [displayName], "description": [description]}'Example
Section titled “Example”curl -X POST \'https://telemetry-router.api.eu01.stackit.cloud/v1alpha/projects/16dbfb51-7a75-42d3-a51d-99f87f48cd32/regions/eu01/telemetry-routers/d5b5cdcc-c155-4d66-82ef-4289db8e4557/access-tokens' \--header 'Authorization: Bearer eyJhbGci0iJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi0iIxMjM0NTY30DkwIiwibmFtZSI6IkpvaG4gRG91IiwiaXNTb2NpYWwiOnRydWV9.4pcPyMD09o1PSyXnrXCjTwXyr4BsezdI1AVTmud2fU4' \--header 'Content-Type: application/json' \--data-raw '{ "ttl": 180, "displayName": "my-telemetry-router-access-token", "description": "My Telemetry Router access token"}'List all access tokens
Section titled “List all access tokens”| Parameter | Meaning | Example |
|---|---|---|
| accessToken | The individual access token of your service account | eyJhbGci0iJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi0iIxMjM0NTY30DkwIiwibmFtZSI6IkpvaG4gRG91IiwiaXNTb2NpYWwiOnRydWV9.4pcPyMD09o1PSyXnrXCjTwXyr4BsezdI1AVTmud2fU4 |
| projectId | Your individual project ID | 16dbfb51-7a75-42d3-a51d-99f87f48cd32 |
| regionId | The region your Telemetry Router instance is located | eu01 |
| telemetryRouterId | The ID of your Telemetry Router instance | d5b5cdcc-c155-4d66-82ef-4289db8e4557 |
| ` |
curl -X GET \'https://telemetry-router.api.[regionId].stackit.cloud/v1alpha/projects/[projectId]/regions/[regionId]/telemetry-routers/[telemetryRouterId]/access-tokens' \--header 'Authorization: Bearer [accessToken]' \--header 'Content-Type: application/json'Example
Section titled “Example”curl -X GET \'https://telemetry-router.api.eu01.stackit.cloud/v1alpha/projects/16dbfb51-7a75-42d3-a51d-99f87f48cd32/regions/eu01/telemetry-routers/d5b5cdcc-c155-4d66-82ef-4289db8e4557/access-tokens' \--header 'Authorization: Bearer eyJhbGci0iJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi0iIxMjM0NTY30DkwIiwibmFtZSI6IkpvaG4gRG91IiwiaXNTb2NpYWwiOnRydWV9.4pcPyMD09o1PSyXnrXCjTwXyr4BsezdI1AVTmud2fU4' \--header 'Content-Type: application/json'View an access token
Section titled “View an access token”| Parameter | Meaning | Example |
|---|---|---|
| accessToken | The individual access token of your service account | eyJhbGci0iJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi0iIxMjM0NTY30DkwIiwibmFtZSI6IkpvaG4gRG91IiwiaXNTb2NpYWwiOnRydWV9.4pcPyMD09o1PSyXnrXCjTwXyr4BsezdI1AVTmud2fU4 |
| projectId | Your individual project ID | 16dbfb51-7a75-42d3-a51d-99f87f48cd32 |
| regionId | The region your Telemetry Router instance is located | eu01 |
| telemetryRouterId | The ID of your Telemetry Router instance | d5b5cdcc-c155-4d66-82ef-4289db8e4557 |
| accessTokenId | The ID of your access token for for the Telemetry Router instance | 988d3545-68fb-47f2-acd7-b3ea96036ba9 |
curl -X GET \'https://telemetry-router.api.[regionId].stackit.cloud/v1alpha/projects/[projectId]/regions/[regionId]/telemetry-routers/[telemetryRouterId]/access-tokens/[accessTokenId]' \--header 'Authorization: Bearer [accessToken]' \--header 'Content-Type: application/json'Example
Section titled “Example”curl -X GET \'https://telemetry-router.api.eu01.stackit.cloud/v1alpha/projects/16dbfb51-7a75-42d3-a51d-99f87f48cd32/regions/eu01/telemetry-routers/d5b5cdcc-c155-4d66-82ef-4289db8e4557/access-tokens/988d3545-68fb-47f2-acd7-b3ea96036ba9' \--header 'Authorization: Bearer eyJhbGci0iJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi0iIxMjM0NTY30DkwIiwibmFtZSI6IkpvaG4gRG91IiwiaXNTb2NpYWwiOnRydWV9.4pcPyMD09o1PSyXnrXCjTwXyr4BsezdI1AVTmud2fU4' \--header 'Content-Type: application/json'Edit an access token
Section titled “Edit an access token”| Parameter | Meaning | Example |
|---|---|---|
| accessToken | The individual access token of your service account | eyJhbGci0iJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi0iIxMjM0NTY30DkwIiwibmFtZSI6IkpvaG4gRG91IiwiaXNTb2NpYWwiOnRydWV9.4pcPyMD09o1PSyXnrXCjTwXyr4BsezdI1AVTmud2fU4 |
| projectId | Your individual project ID | 16dbfb51-7a75-42d3-a51d-99f87f48cd32 |
| regionId | The region your Telemetry Router instance is located | eu01 |
| telemetryRouterId | The ID of your Telemetry Router instance | d5b5cdcc-c155-4d66-82ef-4289db8e4557 |
| accessTokenId | The ID of your access token for for the Telemetry Router instance | 988d3545-68fb-47f2-acd7-b3ea96036ba9 |
| displayName | A name for the Telemetry Router instance. In this endpoint, the parameter is optional. | my-telemetry-router |
| description | An optional description for your reference | My Telemetry Router instance |
curl -X PUT \'https://telemetry-router.api.[regionId].stackit.cloud/v1alpha/projects/[projectId]/regions/[regionId]/telemetry-routers/[telemetryRouterId]/access-tokens/[accessTokenId]' \--header 'Authorization: Bearer [accessToken]' \--header 'Content-Type: application/json' \--data-raw '{ "displayName": [name], "description": [description]}'Example
Section titled “Example”curl -X GET \'https://telemetry-router.api.eu01.stackit.cloud/v1alpha/projects/16dbfb51-7a75-42d3-a51d-99f87f48cd32/regions/eu01/telemetry-routers/d5b5cdcc-c155-4d66-82ef-4289db8e4557/access-tokens/988d3545-68fb-47f2-acd7-b3ea96036ba9' \--header 'Authorization: Bearer eyJhbGci0iJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi0iIxMjM0NTY30DkwIiwibmFtZSI6IkpvaG4gRG91IiwiaXNTb2NpYWwiOnRydWV9.4pcPyMD09o1PSyXnrXCjTwXyr4BsezdI1AVTmud2fU4' \--header 'Content-Type: application/json' \--data-raw '{ "displayName": 'my-new-access-token-name', "description": 'My new description for the access token'}'Delete an access token
Section titled “Delete an access token”To delete a Telemetry Router instance, you need to call the DELETE endpoint.
| Parameter | Meaning | Example |
|---|---|---|
| accessToken | The individual access token of your service account | eyJhbGci0iJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi0iIxMjM0NTY30DkwIiwibmFtZSI6IkpvaG4gRG91IiwiaXNTb2NpYWwiOnRydWV9.4pcPyMD09o1PSyXnrXCjTwXyr4BsezdI1AVTmud2fU4 |
| projectId | Your individual project ID | 16dbfb51-7a75-42d3-a51d-99f87f48cd32 |
| regionId | The region your Telemetry Router instance is located | eu01 |
| telemetryRouterId | The ID of your Telemetry Router instance | d5b5cdcc-c155-4d66-82ef-4289db8e4557 |
| accessTokenId | The ID of your access token for for the Telemetry Router instance | 988d3545-68fb-47f2-acd7-b3ea96036ba9 |
curl -X DELETE \'https://telemetry-router.api.[regionId].stackit.cloud/v1alpha/projects/[projectId]/regions/[regionId]/telemetry-routers/[telemetryRouterId]/access-tokens/[accessTokenId]' \--header 'Authorization: Bearer [accessToken]' \--header 'Content-Type: application/json'Example:
curl -X DELETE \'https://telemetry-router.api.eu01.stackit.cloud/v1alpha/projects/16dbfb51-7a75-42d3-a51d-99f87f48cd32/regions/eu01/telemetry-routers/d5b5cdcc-c155-4d66-82ef-4289db8e4557/access-tokens/988d3545-68fb-47f2-acd7-b3ea96036ba9' \--header 'Authorization: Bearer eyJhbGci0iJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi0iIxMjM0NTY30DkwIiwibmFtZSI6IkpvaG4gRG91IiwiaXNTb2NpYWwiOnRydWV9.4pcPyMD09o1PSyXnrXCjTwXyr4BsezdI1AVTmud2fU4' \--header 'Content-Type: application/json' \