# Reset Third Party API Cache Example

> See how to reset caches for integrated third-party APIs with API Maker examples.

Source: https://docs.apimaker.dev/v1/examples/sys/cache/resetCacheThirdPartyApis.html

`g.sys.cache.resetCacheThirdPartyApis` calls the [reset third party API cache system API](https://docs.apimaker.dev/v1/docs/apis-all/system-apis/system-generated-reset-redis-cache-third-party-api.html) from your code.

### Reset cache of Third party APIs

Reset Third party API cache using global object 'g'.

```ts
await g.sys.cache.resetCacheThirdPartyApis({
    "apiBundleName": "bundle_name",
    "apiVersionName": "api_version_name"
});
```

### Multi-tenant
- The cache of the third party APIs called for one tenant of a [multi-tenant](https://docs.apimaker.dev/v1/docs/features/multi-tenant.html) instance, with the [x-am-tenant-username](https://docs.apimaker.dev/v1/docs/apis-all/header/requestHeader.html#x-am-tenant-username) header. Without a tenant, the cache of every tenant is reset too.

```ts
await g.sys.cache.resetCacheThirdPartyApis({
    "apiBundleName": "bundle_name",
    "apiVersionName": "api_version_name",
    "tenantUsername": "acme"
});
```

## Related

- [Reset third party api cache system API](https://docs.apimaker.dev/v1/docs/apis-all/system-apis/system-generated-reset-redis-cache-third-party-api.html) · [Automatic caching](https://docs.apimaker.dev/v1/docs/features/automatic-caching.html) · [The global object g](https://docs.apimaker.dev/v1/docs/pre-defined-terms/global-object-g.html)
