Create and manage tokens of AI Model Experiments
Last updated on
Prerequisites
Section titled “Prerequisites”Before creating a token, ensure you meet the following prerequisites:
- You have a STACKIT customer account: Create a customer Account
- You have a STACKIT user account: Create a user account
- You have a STACKIT project: Create a project
- You have an AI Model Experiments instance: Create an instance
Understanding tokens
Section titled “Understanding tokens”To interact with an AI Model Experiments instance via the MLflow™ Python SDK or REST API, you must first generate an access token. These tokens provide a secure authentication method for connecting your local development environments or CI/CD pipelines to the server. Please note that each token is instance-specific and cannot be used to access multiple instances.
Create a Token
Section titled “Create a Token”- On the sidebar click on AI Model Experiments.
- Click on the instance for which you like to create an auth token.
- On the left select Tracking tokens.
- On the top bar click on Create tracking token.
- Enter a Token name and optionally a Description and a Lifetime.
- Click on Save.
- Copy the generated token to a safe place.
To obtain a token with the API, you need an auth token for your user or for your service account. To distinguish it from the auth token for the AI Model Experiments-API, we call it STACKIT auth token. The following table gives you a complete overview about all parameters:
| Parameter | Meaning | Example |
|---|---|---|
| stackit-auth-token | User or service account auth token | BZasjkdasbu… |
| project-id | The ID of your project | 89783241-32… |
| region-id | The ID of your region | eu01 |
| instance-id | The ID of your instance | 12345678-12… |
| token-description | Description of the token’s purpose | My token |
| token-name | Name of the token | my-token |
| token-lifetime | Desired token lifetime | 30d |
curl -X POST https://model-experiments.api.stackit.cloud/v1alpha/projects/[project-id]/regions/[region-id]/instances/[instance-id]/tokens \--header "Authorization: Bearer [stackit-auth-token]" \--header "Content-Type: application/json" \--data '{"description": "[token-description]", "name": "[token-name]", "ttlDuration": "[token-lifetime]"}'List tokens
Section titled “List tokens”- On the sidebar click on AI Model Experiments.
- Click on the instance for which you like to list the auth token.
- On the left select Tracking tokens to see a list of all auth tokens associated with the instance.
- Click on a token to see its details pane.
To get a list of all available tokens, execute the following API call:
| Parameter | Meaning | Example |
|---|---|---|
| stackit-auth-token | User or service account auth token | BZasjkdasbu… |
| project-id | The ID of your project | 89783241-32… |
| region-id | The ID of your region | eu01 |
| instance-id | The ID of your instance | 12345678-12… |
curl -X GET https://model-experiments.api.stackit.cloud/v1alpha/projects/[project-id]/regions/[region-id]/instances/[instance-id]/tokens \--header "Authorization: Bearer [stackit-auth-token]"Update tokens
Section titled “Update tokens”- On the sidebar click on AI Model Experiments.
- Click on the instance for which you like to update the auth token.
- On the left select Tracking tokens to see a list of all auth tokens associated with the instance.
- Click on a token to see its details pane.
- Modify the desired entry.
- Click on Save to update the token.
To change the description or name of a token, use the following API call. In the shown example the description of a token is updated.
| Parameter | Meaning | Example |
|---|---|---|
| stackit-auth-token | User or service account auth token | BZasjkdasbu… |
| project-id | The ID of your project | 89783241-32… |
| region-id | The ID of your region | eu01 |
| instance-id | The ID of your instance | 12345678-12… |
| token-id | The ID of your token | 12341234-21… |
| token-description | Description of the tokens’s purpose | My token |
curl -X PATCH https://model-experiments.api.stackit.cloud/v1alpha/projects/[project-id]/regions/[region-id]/instances/[instance-id]/tokens/[token-id] \--header "Authorization: Bearer [stackit-auth-token]" \--header "Content-Type: application/json" \--data '{"description": "[token-description]"}'Delete tokens
Section titled “Delete tokens”- On the sidebar click on AI Model Experiments.
- Click on the instance for which you like to delete the auth token.
- On the left select Tracking tokens to see a list of all auth tokens associated with the instance.
- Click on the token’s three dots button and then on Delete to open the delete pane.
- Enter the tokens’s name and click on Delete to finally delete the token.
To delete a token, use the following API call:
| Parameter | Meaning | Example |
|---|---|---|
| stackit-auth-token | User or service account auth token | BZasjkdasbu… |
| project-id | The ID of your project | 89783241-32… |
| region-id | The ID of your region | eu01 |
| instance-id | The ID of your instance | 12345678-12… |
| token-id | The ID of your token | 12341234-21… |
curl -X DELETE https://model-experiments.api.stackit.cloud/v1alpha/projects/[project-id]/regions/[region-id]/instances/[instance-id]/tokens/[token-id] \--header "Authorization: Bearer [stackit-auth-token]"