Authorizations
Headers
Query Parameters
Example:
Example:
import Triglit from 'triglit';
const client = new Triglit({
apiKey: 'My API Key',
});
// Automatically fetches more pages as needed.
for await (const workflowVersion of client.workflows.versions.list1({ workflowId: 'workflowId' })) {
console.log(workflowVersion.id);
}{
"data": [
{
"id": "wfv_abc123def456",
"workflowId": "wf_abc123def456",
"tenantId": "tenant_123",
"subTenantId": "sub_tenant_456",
"version": 1,
"nodes": [
{
"id": "node_abc123def456",
"type": "trigger",
"version": "1.0.0",
"name": "Send Email",
"description": "Sends an email notification",
"config": {
"recipientType": "email",
"template": "welcome"
},
"inputSchema": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"subject": {
"type": "string"
}
}
},
"outputSchema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"messageId": {
"type": "string"
}
}
},
"canPause": false,
"position": {
"x": 100,
"y": 200
}
}
],
"edges": [
{
"id": "edge_abc123def456",
"sourceNodeId": "node_abc123def456",
"targetNodeId": "node_xyz789uvw123",
"sourceOutputKey": "onSuccess",
"targetInputKey": "input",
"condition": "result.success === true",
"label": "On Success"
}
],
"isActive": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"publishedAt": "2024-01-15T10:30:00.000Z"
}
],
"page": 0,
"lastPage": 2
}Retrieves a paginated list of workflow versions for a specific workflow. 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 workflowVersion of client.workflows.versions.list1({ workflowId: 'workflowId' })) {
console.log(workflowVersion.id);
}{
"data": [
{
"id": "wfv_abc123def456",
"workflowId": "wf_abc123def456",
"tenantId": "tenant_123",
"subTenantId": "sub_tenant_456",
"version": 1,
"nodes": [
{
"id": "node_abc123def456",
"type": "trigger",
"version": "1.0.0",
"name": "Send Email",
"description": "Sends an email notification",
"config": {
"recipientType": "email",
"template": "welcome"
},
"inputSchema": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"subject": {
"type": "string"
}
}
},
"outputSchema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"messageId": {
"type": "string"
}
}
},
"canPause": false,
"position": {
"x": 100,
"y": 200
}
}
],
"edges": [
{
"id": "edge_abc123def456",
"sourceNodeId": "node_abc123def456",
"targetNodeId": "node_xyz789uvw123",
"sourceOutputKey": "onSuccess",
"targetInputKey": "input",
"condition": "result.success === true",
"label": "On Success"
}
],
"isActive": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"publishedAt": "2024-01-15T10:30:00.000Z"
}
],
"page": 0,
"lastPage": 2
}Was this page helpful?