import Triglit from 'triglit';
const client = new Triglit({
apiKey: 'My API Key',
});
const trigger = await client.triggers.retrieve('trg_abc123def456');
console.log(trigger.id);{
"id": "trg_abc123def456",
"tenantId": "tenant_123",
"workflowVersionId": "wfv_abc123def456",
"name": "User Registration Webhook",
"type": "webhook",
"config": {},
"isActive": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"subTenantId": "sub_tenant_456"
}Retrieves a specific trigger by its ID. Accepts both public and secret keys.
import Triglit from 'triglit';
const client = new Triglit({
apiKey: 'My API Key',
});
const trigger = await client.triggers.retrieve('trg_abc123def456');
console.log(trigger.id);{
"id": "trg_abc123def456",
"tenantId": "tenant_123",
"workflowVersionId": "wfv_abc123def456",
"name": "User Registration Webhook",
"type": "webhook",
"config": {},
"isActive": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"subTenantId": "sub_tenant_456"
}Chave de API do tenant (publishable key ou secret key)
Chave de API do tenant (publishable key ou secret key)
Trigger identifier
"trg_abc123def456"
Trigger retrieved successfully
Unique trigger identifier
"trg_abc123def456"
Tenant identifier
"tenant_123"
Workflow version identifier
"wfv_abc123def456"
Trigger name
"User Registration Webhook"
Trigger type
schedule, webhook "webhook"
Trigger configuration
Whether the trigger is active
true
Creation timestamp
"2024-01-15T10:30:00.000Z"
Last update timestamp
"2024-01-15T10:30:00.000Z"
Sub-tenant identifier
"sub_tenant_456"
Was this page helpful?