Skip to content
POST /key-store/{id}/move-secrets

Team admins only (signed-in users; API tokens get 403). Moves every secret of the environment that Truto still encrypts, or that is in another of its key stores, into this key store, in the background. The other store's copy is deleted a couple of minutes after its row moves. The store must be current and active (400 otherwise). Returns how many integrated accounts and environment integrations were waiting to move; follow the progress with GET /key-store/{id}/usage (in_truto and in_other_stores going down to 0). Safe to call again while a move runs: each row moves with a conditional update. A row that fails to move is logged and skipped; calling this again retries it.

Path Parameters

idstring · uuid
required

Response Body

environment_integrationsinteger
integrated_accountsinteger

Errors

StatusDescription
400The key store is not active.
curl -X POST 'https://api.truto.one/key-store/{id}/move-secrets' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
const response = await fetch('https://api.truto.one/key-store/{id}/move-secrets', {
  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}/move-secrets"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}

response = requests.post(url, headers=headers, params=params)
print(response.json())