Skip to content

Multi tenant instance updated

Multi tenant instance updated System API

After the connection string of a tenant of a multi-tenant instance changed in the tenants table, tell API Maker. Every server drops the connection pools of that tenant, and the next request of the tenant connects with the new connection string.

await g.sys.system.multiTenantInstanceUpdated({ instanceName: 'crm', username: 'acme' });

Several instances or tenants at once, each item answered on its own:

1
2
3
4
5
const output = await g.sys.system.multiTenantInstanceUpdated([
    { instanceName: 'crm', username: 'acme' },
    { instanceName: 'billing', username: 'acme' },
]);
// [{ success: true, data: true }, { success: false, data: false, error: { code: 404, message: "..." } }]