Jobs¶
Query scheduled job runs and job history, and run a job now.
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 |
|---|---|
| QueryForJobHistories | Retrieves historical run data for all jobs, or jobs specified by filters. |
| QueryForJobRuns | Retrieves monitor data for all jobs, or jobs specified by filters |
| ResubmitJob | Resubmits a job identified by JobInstanceID (required). Immediately triggers the job to run. |
QueryForJobHistories¶
Retrieves historical run data for all jobs, or jobs specified by filters.
- Token feature Query Jobs
- Content type application/json
Request¶
An object filters for jobs.
Schema: FilterJobHistoryParameter. Request object to filter queried Job Histories. Parallels Monitor > Jobs History table filter functionality.
| Field | Type | Description |
|---|---|---|
JobStatus |
object | (Optional) Status of the job |
JobID |
string (uuid) | (Optional) Guid of the job |
JobDisplayName |
string | (Optional) The job's name as shown in the Jobs UI, for example 'Clean Up Cache'. The comparison is case-SENSITIVE here. |
EntryDateOnOrAfter |
string (date-time) | (Optional) Only return history entries that ran on or after this date/time. The boundary is inclusive: an entry whose date equals this value is returned. |
Skip |
integer | (Optional - Default is 0) The number of items to skip before returning results |
Take |
integer | (Optional - Default is 20) Max number of job history items to return (Max is 1000) |
OrderBy |
object | (Optional) How the list is sorted |
Direction |
object | (Optional - Default is Ascending) The direction the results are sorted in |
Response¶
Returns an object containing job history data
Envelope: DataResponseJobHistoryList. Data is array of JobHistoryDTO.
{
"Success": true,
"MessageKey": null,
"Data": [
{
"JobInstanceID": "08035def-a9fe-41f7-99e6-74b8ffc03c0e",
"JobScriptId": "a06ee719-f1a3-4675-a3c6-dad040d26779",
"ExecutionId": "de0bb36c-61dd-4461-91a1-1603fcf7a178",
"JobDisplayName": "Import File",
"ServiceName": "WorkerServiceActivity Processing",
"JobStatus": "Active",
"EntryDate": "2026-10-07T20:19:08.9196395+00:00",
"EventDescription": "Processing.Job.Start.ExecuteJob",
"ExceptionMessage": null
},
{
"JobInstanceID": "08035def-a9fe-41f7-99e6-74b8ffc03c0e",
"JobScriptId": "a06ee719-f1a3-4675-a3c6-dad040d26779",
"ExecutionId": "de0bb36c-61dd-4461-91a1-1603fcf7a178",
"JobDisplayName": "Import File",
"ServiceName": "WorkerServiceActivity Processing",
"JobStatus": "Active",
"EntryDate": "2026-10-07T20:19:08.9196399+00:00",
"EventDescription": "Processing.Job.Start.ExecuteJob",
"ExceptionMessage": 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 V1JobsAPIApi(config);
var response = await api.V1JobsAPIControllerQueryForJobHistoriesAsync(new FilterJobHistoryParameter
{
JobStatus = JobStatus.New,
OrderBy = JobOrderBy.Status,
Direction = SortDirection.Ascending,
JobID = Guid.Parse("00000000-0000-0000-0000-000000000000"),
JobDisplayName = "string",
EntryDateOnOrAfter = DateTime.Parse("2026-01-01T00:00:00Z"),
Skip = 0,
Take = 0,
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_JobsAPI/QueryForJobHistories" \
-H "TempIdentityToken: $KL_TOKEN" \
-H "Content-Type: application/json" \
-d '{"JobStatus": null, "JobID": "00000000-0000-0000-0000-000000000000", "JobDisplayName": "string", "EntryDateOnOrAfter": "2026-01-01T00:00:00Z", "Skip": 0, "Take": 0, "OrderBy": null, "Direction": null}'
$body = @'
{
"JobStatus": null,
"JobID": "00000000-0000-0000-0000-000000000000",
"JobDisplayName": "string",
"EntryDateOnOrAfter": "2026-01-01T00:00:00Z",
"Skip": 0,
"Take": 0,
"OrderBy": null,
"Direction": null
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_JobsAPI/QueryForJobHistories" `
-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_JobsAPI/QueryForJobHistories",
headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
json={
"JobStatus": null,
"JobID": "00000000-0000-0000-0000-000000000000",
"JobDisplayName": "string",
"EntryDateOnOrAfter": "2026-01-01T00:00:00Z",
"Skip": 0,
"Take": 0,
"OrderBy": null,
"Direction": null
})
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_JobsAPI/QueryForJobHistories", {
method: "POST",
headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
body: JSON.stringify({
"JobStatus": null,
"JobID": "00000000-0000-0000-0000-000000000000",
"JobDisplayName": "string",
"EntryDateOnOrAfter": "2026-01-01T00:00:00Z",
"Skip": 0,
"Take": 0,
"OrderBy": null,
"Direction": null
})
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);
QueryForJobRuns¶
Retrieves monitor data for all jobs, or jobs specified by filters
- Token feature Query Jobs
- Content type application/json
Request¶
An object filters for jobs.
Schema: FilterJobParameter. Request object to filter queried Jobs. Parallels Monitor > All Jobs table filter functionality
| Field | Type | Description |
|---|---|---|
JobDisplayName |
string | (Optional) The job's name as shown in the Jobs UI, for example 'Clean Up Cache'. The comparison is case-INsensitive here. |
JobID |
string (uuid) | (Optional) Guid of the job |
JobStatus |
object | (Optional) Status of the job |
PageIndex |
integer | (Optional - Default is 0) The page division (starts at 0) |
PageSize |
integer | (Optional - Default is 20) Max size of the job list (Max is 1000) |
LastRuntimeOnOrAfter |
string (date-time) | (Optional) Only return entries that ran on or after this date/time. The boundary is inclusive: an entry whose last runtime equals this value is returned. |
OrderBy |
object | (Optional) How the list is sorted |
Direction |
object | (Optional - Default is Ascending) The direction the results are sorted in |
Response¶
Returns an object containing job monitor data
Envelope: DataResponseJobDefinitionList. Data is array of JobRunDTO.
{
"Success": true,
"MessageKey": null,
"Data": [
{
"Status": "Error",
"JobID": "08035def-a9fe-41f7-99e6-74b8ffc03c0e",
"JobDisplayName": "Import File",
"LastRuntime": "2026-10-07T20:19:08.9196097+00:00",
"NextRuntime": "2026-10-07T20:19:08.9196093+00:00"
},
{
"Status": "Error",
"JobID": "08035def-a9fe-41f7-99e6-74b8ffc03c0e",
"JobDisplayName": "Import File",
"LastRuntime": "2026-10-07T20:19:08.9196101+00:00",
"NextRuntime": "2026-10-07T20:19:08.9196101+00:00"
}
]
}
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 V1JobsAPIApi(config);
var response = await api.V1JobsAPIControllerQueryForJobRunsAsync(new FilterJobParameter
{
JobStatus = JobStatus.New,
OrderBy = JobOrderBy.Status,
Direction = SortDirection.Ascending,
JobDisplayName = "string",
JobID = Guid.Parse("00000000-0000-0000-0000-000000000000"),
PageIndex = 0,
PageSize = 0,
LastRuntimeOnOrAfter = DateTime.Parse("2026-01-01T00:00:00Z"),
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_JobsAPI/QueryForJobRuns" \
-H "TempIdentityToken: $KL_TOKEN" \
-H "Content-Type: application/json" \
-d '{"JobDisplayName": "string", "JobID": "00000000-0000-0000-0000-000000000000", "JobStatus": null, "PageIndex": 0, "PageSize": 0, "LastRuntimeOnOrAfter": "2026-01-01T00:00:00Z", "OrderBy": null, "Direction": null}'
$body = @'
{
"JobDisplayName": "string",
"JobID": "00000000-0000-0000-0000-000000000000",
"JobStatus": null,
"PageIndex": 0,
"PageSize": 0,
"LastRuntimeOnOrAfter": "2026-01-01T00:00:00Z",
"OrderBy": null,
"Direction": null
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_JobsAPI/QueryForJobRuns" `
-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_JobsAPI/QueryForJobRuns",
headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
json={
"JobDisplayName": "string",
"JobID": "00000000-0000-0000-0000-000000000000",
"JobStatus": null,
"PageIndex": 0,
"PageSize": 0,
"LastRuntimeOnOrAfter": "2026-01-01T00:00:00Z",
"OrderBy": null,
"Direction": null
})
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_JobsAPI/QueryForJobRuns", {
method: "POST",
headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
body: JSON.stringify({
"JobDisplayName": "string",
"JobID": "00000000-0000-0000-0000-000000000000",
"JobStatus": null,
"PageIndex": 0,
"PageSize": 0,
"LastRuntimeOnOrAfter": "2026-01-01T00:00:00Z",
"OrderBy": null,
"Direction": null
})
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);
ResubmitJob¶
Resubmits a job identified by JobInstanceID (required). Immediately triggers the job to run.
- Token feature Manage Jobs
- Content type application/json
Request¶
An object identifying the job to run. JobInstanceID is required.
Schema: RunJobParameter. Parameters for running or resubmitting a job
| Field | Type | Description |
|---|---|---|
JobInstanceID |
string (uuid) | Guid of the job instance to run |
Response¶
Job was successfully resubmitted
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 V1JobsAPIApi(config);
var response = await api.V1JobsAPIControllerResubmitJobAsync(new RunJobParameter
{
JobInstanceID = Guid.Parse("00000000-0000-0000-0000-000000000000"),
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response);
$body = @'
{
"JobInstanceID": "00000000-0000-0000-0000-000000000000"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_JobsAPI/ResubmitJob" `
-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_JobsAPI/ResubmitJob",
headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
json={
"JobInstanceID": "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_JobsAPI/ResubmitJob", {
method: "POST",
headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
body: JSON.stringify({
"JobInstanceID": "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);