Automation¶
V1_AutomationAPI1 actions
List RPA bots and their status.
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 |
|---|---|
| GetBots | Retrieves state information for all bots |
GetBots¶
POST/api/V1_AutomationAPI/GetBots
Retrieves state information for all bots
- Token feature Get Bots
- Content type application/json
Request¶
No body. Send {} or an empty body.
Response¶
Returns a collection of objects containing bot information such as bot ID, display name, machine name, and status
Envelope: DataResponseBotStatusUpdate. Data is BotsStatusUpdate.
Example response
{
"Success": true,
"MessageKey": null,
"Data": {
"BotStatuses": [
{
"BotId": "00000000-0000-0000-0000-000000000000",
"DisplayName": "Example Bot",
"MachineName": "Example Bot Host",
"Status": "Online",
"MaintenanceMode": false
}
],
"StatusLastRetrievedUTC": "0001-01-01T00:00:00.0000000+00:00",
"Success": true,
"GetBotsOperationMessages": 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 V1AutomationAPIApi(config);
var response = await api.V1AutomationAPIControllerGetBotsAsync();
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_AutomationAPI/GetBots",
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_AutomationAPI/GetBots", {
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);