Reset system API cache¶
Drops the cached answers of a system API whose settings have enableCaching, for example get table meta or get secret.
| Method | POST |
| URL | /api/system-api/admin/reset-redis-cache-system-apis : admin is the user path of your account |
| Body | { name, tenantUsername? } or an array of them |
| Answer | data : the number of cache entries removed |
| From code | g.sys.cache.resetCacheSystemApis |
The call¶
Body : several, one for a tenant
[ { "name": "Get table meta data" }, { "name": "Get secret key-keys", "tenantUsername": "acme" } ]
nameis the name shown on the System API page : Encrypt data, Decrypt data, Hash data, Get token, Call external API, Execute plain query, Get secret key-keys, Get redis key-keys, Set redis key-keys, Remove redis key-keys, Reset database cache, Reset custom apis cache, Reset system apis cache, Get table meta data, Create indexes, Drop indexes, Get indexes, Emit event, Emit event WS, Is valid data for table, Is valid data for custom API, Multi tenant instance updated, Is valid connection string. An unknown name gives-1and a404inerrors.
From code¶
A tenant¶
- The cache of a system API called for one tenant of a multi-tenant instance, with the x-am-tenant-username header. Without a tenant, the cache of every tenant is reset too.
Access, headers and errors¶
- Over HTTP, a system API answers only once its settings open it :
TOKEN_ACCESS(the token of an API user whose group grants this system API) orIS_PUBLIC. Without settings it isNO_ACCESS: only your code (g.sys) and the admin panel reach it. - The settings can also keep the answer in the cache, or ask for the token of a person (
authProviders). Pre and post hooks run around it, as around any API. - It takes the request headers and answers the envelope.
401: no valid token, or the API isNO_ACCESS.403: no group grants it.400: the body is wrong, and the message names the key.
Related : All APIs · System API settings · System APIs from code