Activate key store
/key-store/{id}/activate
Team admins only (signed-in users; API tokens get 403). Makes this active (verified) key store the environment's current one; the store that was current stops being current in the same transaction. The store is verified again first (the same probe as POST /key-store/{id}/verify): if that fails, it is not made current, it becomes validation_error with the reason in last_error, and the call returns 400. New credential writes go to this store, and POST /key-store/{id}/move-secrets on it moves what is still in Truto or in the other stores. Rows not moved yet keep reading from the store they're in, so keep that store's access working until GET /key-store/{id}/usage shows it holds nothing, then delete it. The current store is returned as is.
Path Parameters
Response Body
Non-secret settings; the fields per provider are listed by GET /key-store-provider. For aws_secrets_manager: region, secret_name_prefix (default truto/; each account is stored at <prefix><environment_id>/<integrated_account_id>, its integration_override at <prefix><environment_id>/<integrated_account_id>/integration-override, and an environment integration's override at <prefix><environment_id>/environment-integration/<environment_integration_id>), an optional kms_key_id, and account_id / partition, which Truto reads from AWS for the store's credentials. The store's credentials are write-only and never returned.
When the key store last stopped being current (UTC). It can be deleted a minute after this. Null if it was never current.
The environment whose secrets live in this store. An environment can have many key stores, at most one active.
Whether this is the environment's current key store (at most one): new and updated secrets in the environment are written to it; existing ones move on their next write, or all at once with POST /key-store/{id}/move-secrets. A store that isn't current keeps serving what is already in it. A current store whose verification fails stays current: its secrets are only there.
Why the last verification failed.
When verification last succeeded (UTC).
The store. aws_secrets_manager: AWS Secrets Manager, with secrets encrypted by the customer's KMS key when config.kms_key_id is set.
aws_secrets_manager
Whether the store works, like an integrated account's status. connecting: created, or its settings changed while it holds nothing; not proven yet, and nothing is written to it. active: the last POST /key-store/{id}/verify passed. validation_error: the last verification failed (why is in last_error); a verification that passes sets it back to active. Which store is used is is_current.
connectingactivevalidation_error
Errors
| Status | Description |
|---|---|
400 | The key store isn't active (not verified, or its latest verification failed), or verifying it again failed. |
409 | The key store changed while it was being activated. |
curl -X POST 'https://api.truto.one/key-store/{id}/activate' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json'const response = await fetch('https://api.truto.one/key-store/{id}/activate', {
method: 'POST',
headers: {
'Authorization': 'Bearer <your_api_token>',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);import requests
url = "https://api.truto.one/key-store/{id}/activate"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
}
response = requests.post(url, headers=headers, params=params)
print(response.json())