Triggers¶
List, export and import triggers, and set trigger tags.
Every call in this group
- Method
POSTtohttps://{tenant}/api/{Group}/{Action}, also for reads. - Header
TempIdentityToken: <token>. Create tokens in Configuration > Services > API Access. - Success HTTP 200 with
{ "Success": true, "MessageKey": ..., "Data": ... }. Always checkSuccess. - Failure HTTP 412 with
{ "Success": false, "Messages": [ { "MessageKey": ... } ] }. The spec lists failures as 400; the server sends 412. HTTP 401 means the token or its features; HTTP 422 means the body does not match the model. - C# samples Use the generated client
KL.APIClient. Generate the client from your tenant's spec (how). A non-200 status throwsKL.APIClient.Client.ApiException. - Guides API introduction, Authentication
Actions¶
| Action | Summary |
|---|---|
| ExportTriggerDefinition | Export a Trigger definition. |
| GetAllTriggerInformation | Retrieve a list of metadata about every Trigger. |
| ImportTrigger | Import a Trigger's definition. |
| SetTags | Set the tags for a Trigger |
ExportTriggerDefinition¶
Export a Trigger definition.
- Token feature Manage Triggers
- Content type application/json
Request¶
The id of the Trigger.
Schema: TriggerIdParameter. An object containing the Id of a Trigger
| Field | Type | Description |
|---|---|---|
TriggerId |
string (uuid) | ID of the trigger |
Response¶
Returns the definition of a trigger for migration.
Envelope: DataResponseMigrateTrigger. Data is object.
{
"Success": true,
"MessageKey": null,
"Data": {
"Id": "248d30e6-838d-4530-a08d-2f9b7e5fb538",
"Name": "Test Trigger 1",
"AssociatedWorkflowId": "dc1bd7e4-7de9-4a46-b7ef-1d74997b82d2",
"Configuration": "{}",
"Tags": [
"triggerType1",
"triggerType2"
],
"LastModified": "2026-10-07T20:19:08.9218946+00:00",
"Modifier": "appsuser2_5c3cd6fc-f9ec-457b-8cc1-056ef4536550",
"Creator": "appsuser1_412c8f79-0c0a-4e9a-aed3-5c69eba35bd6",
"Locked": false,
"LockedTime": null,
"LockedBy": "",
"WorkflowName": null
}
}
Example¶
using KL.APIClient.Api;
using KL.APIClient.Client;
using KL.APIClient.Model;
var config = new Configuration { BasePath = "https://yourcompany.knowledgelake.io/api" };
config.AddApiKey("TempIdentityToken", Environment.GetEnvironmentVariable("KL_TOKEN"));
var api = new V1TriggerAPIApi(config);
var response = await api.V1TriggerAPIControllerExportTriggerDefinitionAsync(new TriggerIdParameter
{
TriggerId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
$body = @'
{
"TriggerId": "00000000-0000-0000-0000-000000000000"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_TriggerAPI/ExportTriggerDefinition" `
-Headers @{ TempIdentityToken = $env:KL_TOKEN } `
-ContentType "application/json" -Body $body
if (-not $r.Success) { throw $r.MessageKey }
$r.Data
import os, requests
r = requests.post("https://yourcompany.knowledgelake.io/api/V1_TriggerAPI/ExportTriggerDefinition",
headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
json={
"TriggerId": "00000000-0000-0000-0000-000000000000"
})
data = r.json()
if not data.get("Success"):
raise RuntimeError(data.get("MessageKey") or data.get("Messages"))
print(data["Data"])
const r = await fetch("https://yourcompany.knowledgelake.io/api/V1_TriggerAPI/ExportTriggerDefinition", {
method: "POST",
headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
body: JSON.stringify({
"TriggerId": "00000000-0000-0000-0000-000000000000"
})
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);
GetAllTriggerInformation¶
Retrieve a list of metadata about every Trigger.
- Token feature Manage Triggers
- Content type application/json
Request¶
No body. Send {} or an empty body.
Response¶
Returns a list of TriggerInformation objects with metadata about every trigger.
Envelope: DataResponseTriggerInformationList. Data is array of TriggerInformation.
{
"Success": true,
"MessageKey": null,
"Data": [
{
"Id": "18894566-4c2f-49ad-b553-af314a4e06be",
"Name": "Test Trigger 1",
"AssociatedWorkflowId": "d8bc145a-13a5-4a60-8dc3-78907a86b549",
"Tags": [
"triggerType1",
"triggerType2"
],
"LastModified": "2026-10-07T20:19:08.9218725+00:00",
"Modifier": "appsuser2_1f422b13-cc15-40d3-b79b-6cd941f302c2",
"Creator": "appsuser1_b477c841-a4f5-4f9f-b1d1-157787d43a1a",
"Locked": false,
"LockedTime": null,
"LockedBy": "",
"WorkflowName": null
}
]
}
Example¶
using KL.APIClient.Api;
using KL.APIClient.Client;
using KL.APIClient.Model;
var config = new Configuration { BasePath = "https://yourcompany.knowledgelake.io/api" };
config.AddApiKey("TempIdentityToken", Environment.GetEnvironmentVariable("KL_TOKEN"));
var api = new V1TriggerAPIApi(config);
var response = await api.V1TriggerAPIControllerGetAllTriggerInformationAsync();
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
import os, requests
r = requests.post("https://yourcompany.knowledgelake.io/api/V1_TriggerAPI/GetAllTriggerInformation",
headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
json={})
data = r.json()
if not data.get("Success"):
raise RuntimeError(data.get("MessageKey") or data.get("Messages"))
print(data["Data"])
const r = await fetch("https://yourcompany.knowledgelake.io/api/V1_TriggerAPI/GetAllTriggerInformation", {
method: "POST",
headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
body: JSON.stringify({})
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);
ImportTrigger¶
Import a Trigger's definition.
- Token feature Manage Triggers
- Content type application/json
Request¶
The migration Trigger components.
Schema: ImportTriggerParameter. An object describing the parameters to import a trigger
| Field | Type | Description |
|---|---|---|
Trigger |
object | Trigger |
NewWorkflowId |
string (uuid) | ID of the new workflow to set on the imported Trigger |
Response¶
Returns a TriggerInformation object with metadata about a trigger.
Envelope: DataResponseTriggerInformation. Data is object.
{
"Success": true,
"MessageKey": null,
"Data": {
"Id": "3d0e8a49-fda9-41b2-b592-e41d4713345a",
"Name": "Test Trigger 1",
"AssociatedWorkflowId": "64baabaf-a4ec-44f8-b98d-a30f9d2315c7",
"Tags": [
"triggerType1",
"triggerType2"
],
"LastModified": "2026-10-07T20:19:08.9219462+00:00",
"Modifier": "appsuser2_1f05c59f-dcc8-4a7f-9a73-558bae8712dd",
"Creator": "appsuser1_15a6c2cb-89f5-4e96-9b96-b80585080dd1",
"Locked": false,
"LockedTime": null,
"LockedBy": "",
"WorkflowName": null
}
}
Example¶
using KL.APIClient.Api;
using KL.APIClient.Client;
using KL.APIClient.Model;
var config = new Configuration { BasePath = "https://yourcompany.knowledgelake.io/api" };
config.AddApiKey("TempIdentityToken", Environment.GetEnvironmentVariable("KL_TOKEN"));
var api = new V1TriggerAPIApi(config);
var response = await api.V1TriggerAPIControllerImportTriggerAsync(new ImportTriggerParameter
{
Trigger = new MigrateTrigger
{
Id = Guid.Parse("00000000-0000-0000-0000-000000000000"),
Name = "string",
AssociatedWorkflowId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
VarConfiguration = "string",
Tags = new List<string> { "string" },
LastModified = DateTime.Parse("2026-01-01T00:00:00Z"),
Modifier = "string",
Creator = "string",
// More properties: see MigrateTrigger on the Schemas page
},
NewWorkflowId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
$body = @'
{
"Trigger": null,
"NewWorkflowId": "00000000-0000-0000-0000-000000000000"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_TriggerAPI/ImportTrigger" `
-Headers @{ TempIdentityToken = $env:KL_TOKEN } `
-ContentType "application/json" -Body $body
if (-not $r.Success) { throw $r.MessageKey }
$r.Data
import os, requests
r = requests.post("https://yourcompany.knowledgelake.io/api/V1_TriggerAPI/ImportTrigger",
headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
json={
"Trigger": null,
"NewWorkflowId": "00000000-0000-0000-0000-000000000000"
})
data = r.json()
if not data.get("Success"):
raise RuntimeError(data.get("MessageKey") or data.get("Messages"))
print(data["Data"])
const r = await fetch("https://yourcompany.knowledgelake.io/api/V1_TriggerAPI/ImportTrigger", {
method: "POST",
headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
body: JSON.stringify({
"Trigger": null,
"NewWorkflowId": "00000000-0000-0000-0000-000000000000"
})
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);
SetTags¶
Set the tags for a Trigger
- Token feature Manage Triggers
- Content type application/json
Request¶
Object representing the tags and id of the Trigger to apply them to.
Schema: SetTriggerTagsParameter. An object specifying tags to apply to a Trigger and the Trigger to apply it to
| Field | Type | Description |
|---|---|---|
TriggerId |
string (uuid) | ID of the trigger |
Tags |
array of string | Tags to apply to the Trigger |
ForceOverrideLock |
boolean | Allow this operation even if another user has the Trigger locked (will destroy the locked user session and cause any unsaved changes to be lost) |
Response¶
Returns a success object.
Envelope: KLApiResponse.
Example¶
using KL.APIClient.Api;
using KL.APIClient.Client;
using KL.APIClient.Model;
var config = new Configuration { BasePath = "https://yourcompany.knowledgelake.io/api" };
config.AddApiKey("TempIdentityToken", Environment.GetEnvironmentVariable("KL_TOKEN"));
var api = new V1TriggerAPIApi(config);
var response = await api.V1TriggerAPIControllerSetTagsAsync(new SetTriggerTagsParameter
{
TriggerId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
Tags = new List<string> { "string" },
ForceOverrideLock = false,
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response);
$body = @'
{
"TriggerId": "00000000-0000-0000-0000-000000000000",
"Tags": [
"string"
],
"ForceOverrideLock": false
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_TriggerAPI/SetTags" `
-Headers @{ TempIdentityToken = $env:KL_TOKEN } `
-ContentType "application/json" -Body $body
if (-not $r.Success) { throw $r.MessageKey }
$r.Data
import os, requests
r = requests.post("https://yourcompany.knowledgelake.io/api/V1_TriggerAPI/SetTags",
headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
json={
"TriggerId": "00000000-0000-0000-0000-000000000000",
"Tags": [
"string"
],
"ForceOverrideLock": false
})
data = r.json()
if not data.get("Success"):
raise RuntimeError(data.get("MessageKey") or data.get("Messages"))
print(data["Data"])
const r = await fetch("https://yourcompany.knowledgelake.io/api/V1_TriggerAPI/SetTags", {
method: "POST",
headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
body: JSON.stringify({
"TriggerId": "00000000-0000-0000-0000-000000000000",
"Tags": [
"string"
],
"ForceOverrideLock": false
})
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);