Skip to content

Processing (V2)

V2_ProcessingAPI1 actionsLegacy

Process Designer work items. Keep existing integrations; do not build new ones.

Every call in this group

  • Method POST to https://{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 check Success.
  • 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 throws KL.APIClient.Client.ApiException.
  • Guides API introduction, Authentication

Actions

Action Summary
RestartWorkitem Restarts the process of the workitem provided as a parameter

RestartWorkitem

POST/api/V2_ProcessingAPI/RestartWorkitem

Restarts the process of the workitem provided as a parameter

  • Content type application/json
  • Status legacy. Keep existing integrations; do not build new ones.

Request

The work item to restart, along with preferences related to restart behavior.

Schema: RestartWorkItemParameter. The work item to restart, along with preferences related to restart behavior

Field Type Description
WorkItem object The work item to be restarted
UseLatestProcessVersion boolean If true, uses the latest version of the process assigned to the work item, if a newer version of the process exists
ClearIndexMetadata boolean If true, all metadata in the 'Index' bucket except for reserved word fields will be removed before the restart occurs

Response

The workitem as idenitfied by the passed in parameter

Envelope: DataResponseWorkItemDTO. Data is WorkItemDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "BatchName": null,
    "HoldId": null,
    "ScheduledDeletion": null,
    "UserLockTimeStamp": null,
    "WorkerLockTimeStamp": null,
    "UserToken": null,
    "Suspended": false,
    "LockWorkerId": null,
    "DueDate": "0001-01-01T00:00:00.0000000+00:00",
    "RoleId": null,
    "Status": "New",
    "ActivityActive": false,
    "ActivityId": null,
    "ItemId": "00000000-0000-0000-0000-000000000000",
    "HoldStatus": null,
    "ScheduledHoldVerification": 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 V2ProcessingAPIApi(config);

var response = await api.V2ProcessingAPIControllerRestartWorkitemAsync(new RestartWorkItemParameter
{
    WorkItem = new WorkItemDTO
    {
        Status = WorkItemDTOStatus.New,
        HoldStatus = WorkItemHoldStatus.None,
        BatchName = "string",
        HoldId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
        ScheduledDeletion = DateTime.Parse("2026-01-01T00:00:00Z"),
        UserLockTimeStamp = DateTime.Parse("2026-01-01T00:00:00Z"),
        WorkerLockTimeStamp = DateTime.Parse("2026-01-01T00:00:00Z"),
        UserToken = "string",
        // More properties: see WorkItemDTO on the Schemas page
    },
    UseLatestProcessVersion = false,
    ClearIndexMetadata = false,
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V2_ProcessingAPI/RestartWorkitem" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"WorkItem": null, "UseLatestProcessVersion": false, "ClearIndexMetadata": false}'
$body = @'
{
  "WorkItem": null,
  "UseLatestProcessVersion": false,
  "ClearIndexMetadata": false
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V2_ProcessingAPI/RestartWorkitem" `
  -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/V2_ProcessingAPI/RestartWorkitem",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "WorkItem": null,
                    "UseLatestProcessVersion": false,
                    "ClearIndexMetadata": 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/V2_ProcessingAPI/RestartWorkitem", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "WorkItem": null,
    "UseLatestProcessVersion": false,
    "ClearIndexMetadata": false
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);