import Triglit from 'triglit';
const client = new Triglit({
apiKey: 'My API Key',
});
// Automatically fetches more pages as needed.
for await (const subTenant of client.subTenants.list()) {
console.log(subTenant.id);
}{
"data": [
{
"id": "st_abc123def456",
"tenantId": "tenant_123",
"subTenantId": "production",
"name": "Production Environment",
"isRegistered": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"description": "Main production environment for customer workflows"
}
],
"page": 0,
"lastPage": 2
}Retrieves a paginated list of registered sub-tenants for the tenant. Accepts both public and secret keys.
import Triglit from 'triglit';
const client = new Triglit({
apiKey: 'My API Key',
});
// Automatically fetches more pages as needed.
for await (const subTenant of client.subTenants.list()) {
console.log(subTenant.id);
}{
"data": [
{
"id": "st_abc123def456",
"tenantId": "tenant_123",
"subTenantId": "production",
"name": "Production Environment",
"isRegistered": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"description": "Main production environment for customer workflows"
}
],
"page": 0,
"lastPage": 2
}Chave de API do tenant (publishable key ou secret key)
Chave de API do tenant (publishable key ou secret key)
Number of sub-tenants per page
20
Page number (zero-based)
0
Was this page helpful?