Skip to content
POST /integrated-account/refresh-mapping-cache

Truto caches the resolved unified models, unified mappings and integration configurations that every unified and proxy API request reads, so those requests do not have to fetch them again on each call. That cache expires on a timer, so an edit becomes visible on its own within roughly 23 minutes without calling anything. Call this endpoint right after editing a unified model, a unified mapping, or an integration's resources / API paths to cut that wait short. This is best-effort. It clears Truto's shared cache and the per-connection caches in the environment. It cannot purge the per-region edge cache, so a region already holding a copy can keep serving the previous value for up to roughly 6 minutes. A request that was already reading the previous value when the refresh ran can also put it back into the shared cache as it finishes. That, and the per-connection clears continuing in the background, is why the response is 202 Accepted rather than 200 OK. Pass integration_id when the edit was to that integration — its configuration, its API paths, or one of its mappings. Only that integration's connections can hold the affected entries, so naming it keeps the work proportional. Omit it after editing a unified model itself, which every connection in the environment caches. integration_id is also required to clear that integration's cached configuration. That entry is not scoped to an environment, so a call without integration_id cannot identify it and leaves it cached until it expires on its own. Unified models and unified mappings are cleared either way.

Request Body

environment_idstring · uuid

The environment whose cache to refresh. Optional when authenticating with an API token, which is already scoped to one environment — required otherwise.

Example: 9f1d8f52-6b4c-4c4e-9a0e-1b2c3d4e5f60
integration_idstring · uuid

Restrict the per-connection clears to this integration's connections, and also drop its cached integration configuration. Must be an integration installed in this environment.

Example: 1ba1f401-7183-47c5-9e39-e8e257e3c795

Response Body

cache_keys_truncatedboolean

True when the sweep did not finish — some shared entries are still cached and will expire on their own. Call again to continue.

Example: false
deleted_cache_key_countinteger

How many shared cache entries were deleted.

Example: 12
environment_idstring · uuid

The environment the refresh was applied to.

Example: 9f1d8f52-6b4c-4c4e-9a0e-1b2c3d4e5f60
integrated_account_countinteger

How many of the environment's connections are having their per-connection cache cleared.

Example: 17
integrated_accounts_truncatedboolean

True when the environment has more connections than one refresh covers, so some keep their cached copy until it expires.

Example: false
integration_idstring · uuid

The integration the refresh was narrowed to, if any.

Example: 1ba1f401-7183-47c5-9e39-e8e257e3c795
messagestring

The same caveat in prose, safe to surface to a user.

Errors

StatusDescription
400environment_id is required and could not be inferred from the credential.
403Forbidden — you do not have access to this environment.
404The integration named by integration_id is not installed in this environment.
curl -X POST 'https://api.truto.one/integrated-account/refresh-mapping-cache' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "environment_id": "9f1d8f52-6b4c-4c4e-9a0e-1b2c3d4e5f60",
  "integration_id": "1ba1f401-7183-47c5-9e39-e8e257e3c795"
}'
const body = {
  "environment_id": "9f1d8f52-6b4c-4c4e-9a0e-1b2c3d4e5f60",
  "integration_id": "1ba1f401-7183-47c5-9e39-e8e257e3c795"
};

const response = await fetch('https://api.truto.one/integrated-account/refresh-mapping-cache', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import requests

url = "https://api.truto.one/integrated-account/refresh-mapping-cache"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}
payload = {
    "environment_id": "9f1d8f52-6b4c-4c4e-9a0e-1b2c3d4e5f60",
    "integration_id": "1ba1f401-7183-47c5-9e39-e8e257e3c795"
}

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