API Call Events¶
KnowledgeLake writes one audit event for each call to most public API actions: a success event or an error event, with the user the token acts as and the main ids of the request. Use them to see which integrations call what, how often, how long calls take, and which calls fail, without instrumenting each client.
At a glance
- Filter category API (
apps, openapi) - Default filter Every event on this page passes
- Two shapes
apps, openapi, invoke, success | error, {Method}for most actions, andapps, openapi, workitem, success | error, {Method}for the work item, Jobs, RPA and Automation actions (these are also copied to the Monitor work item history) - Not audited
V1_EventsAPI/WriteEvent, and the read actions listed as "no event" below
Summary¶
| Event | Meaning | Reaches the provider |
|---|---|---|
apps, openapi, invoke, success | error, {Action} |
V1_KWorkItemAPI call |
Yes |
apps, openapi, invoke, success | error, {Action} |
V1_WorkflowAPI call |
Yes |
apps, openapi, workitem, success | error, {Method} |
Jobs, RPA, processing and automation call | Yes |
apps, openapi, invoke, success | error, {Action} |
Repository call | Yes |
apps, openapi, invoke, success | error, {Action} |
V1_IntuitiveAIAPI call |
Yes |
apps, openapi, invoke, success | error, {Action} |
V1_BatchAPI call |
Yes |
apps, openapi, ... |
Trigger, apps and Learn call | Yes |
openapi, {your scopes} |
Write Event API | No (blocked) |
Common properties¶
Every API call event carries:
| Property | Meaning |
|---|---|
tokenName |
The display name of the user the token acts as (not the token's own name) |
methodName |
The action, usually the same as {Method} in the scopes |
event_userToken, AppsUserToken |
The token's user |
errorMessage or exception |
On an error event: errorMessage (most V1_KWorkItemAPI, V1_WorkflowAPI, V1_IntuitiveAIAPI actions, which also set DurationMs) or exception (the others) |
The extra properties per action are listed below. "Ids from the batch token" means batchId, lockId and locationId.
Work items: V1_KWorkItemAPI¶
Shape apps, openapi, invoke, success | error, {Action}, with DurationMs.
| Action | Extra properties |
|---|---|
NewWorkItem, DeleteWorkItem, SetDocumentOcr, AddDocument, AddPage, SetDocumentFile, StoreBatchFile, UpsertWorkItemMetadata, UpsertDocumentMetadata, UpsertPageMetadata, RemoveDocument, RemoveDocumentFile, GetPageOcrData, GetDocumentOcrData |
workItemId |
SetPageOcr |
workItemId, docId, pageId |
AddPagesFromBatchFiles |
workItemId, docId, pageCountToAdd |
GetWorkState, QueryWorkState, GetWorkItem |
None |
GetWorkItemHistory, GetWorkflowHistory |
workItemId, but see the warning below |
GetDocumentFile, GetPageFile |
See the warning below |
Two traps on this group
- History actions On
GetWorkItemHistoryandGetWorkflowHistory, the value ofworkItemIdis the literal type nameKL.Apps.OpenAPI.Controllers.Domain.DTO.PaasWorkItem.PaasWorkItemIdDTO, not the id. Do not join on it. - File downloads On
GetDocumentFileandGetPageFile, a successful download writes the error event with no message. No success event is written for these two.
Workflows and global variables: V1_WorkflowAPI¶
Shape apps, openapi, invoke, success | error, {Action}, with DurationMs.
| Action | Extra properties |
|---|---|
SendToWorkflow |
WorkflowId, WorkItemId, WorkflowVersion, WorkflowStep |
ReleaseHold |
WorkItemId |
AddWorkflow |
WorkflowName, WorkflowId |
DeleteWorkflow |
WorkflowId |
SetGlobalVariable, SetSecretGlobalVariable, GetGlobalVariable, GetGlobalVariableMetadata |
VariableName. The value is never logged. |
GetWorkflow, GetAllWorkflows, GetWorkflowDOT and the Get{Step}Config actions (GetIndexConfig, GetUploadToDestinationConfig and the others) |
None |
Jobs, RPA, processing and automation¶
Shape apps, openapi, workitem, success | error, {Method}. Note that {Method} differs from the action name for four actions.
| Action | Method and properties |
|---|---|
V1_JobsAPI/QueryForJobRuns |
Method QueryJobMonitorInformation. requestBody (the filter). |
V1_JobsAPI/QueryForJobHistories |
Method GetJobHistory. requestBody. |
V1_JobsAPI/ResubmitJob |
Method ResubmitJob. requestBody (JobInstanceID). |
V1_RPAAPI/QueryForLatestRPATasks |
Method QueryLatestRPATasks. requestBody. |
V1_RPAAPI/ResubmitRPATask |
Method ResubmitRPATask. requestBody, which includes the Payload you sent. A call with no body or no TaskIdentifier writes an error event with exception only. |
V1_ProcessingAPI/QueryForWorkItems, QueryForWorkItemHistories |
None |
V1_ProcessingAPI legacy actions |
NewWorkItem (batchName, batchId), LockWorkItem, UnlockWorkItem, RemoveWorkItem, ReleaseHold, GetWorkitem, StartWorkitem, StopWorkitem, RestartWorkitem (batchId), ResubmitWorkitem (batchId, userToken), SendWorkItemToProcess (batchId, processId), GetProcess (processId, processName), GetAllWorkitems, GetWorkItemMonitorData. GetAllProcesses writes method GetProcess. |
V2_ProcessingAPI/RestartWorkitem |
batchId, useLatestProcessVersion, clearIndexMetadata |
V1_AutomationAPI/GetBots |
An error event only; no success event. |
Repository: V1_RepositoryAPI and V2_RepositoryAPI¶
Shape apps, openapi, invoke, success | error, {Action}.
| Action | Extra properties |
|---|---|
UploadDocument |
fileName, contentTypeId, internalId |
DownloadDocument |
connectorId, documentId |
SendDocumentToRecycleBin (V1 and V2) |
connectorId, documentId, nodeStateSignature. A recycle that returns false fails with no event. |
UpsertDocumentMetadata |
documentId, destinationId |
GetSavedSearches |
searchCatalogId |
RunSavedSearch |
searchId, searchCatalogId, startRow, rowLimit, and searchState on failure |
GetContentTypesByDestination |
destinationName |
AddContentType |
connectorId, internalContentTypeId, displayName, visible |
Content type and field changes: SetContentTypeDisplayName, SetContentTypeVisible, AddContentTypeField, SetContentTypeFieldStyle, SetContentTypeFieldLabel, SetContentTypeFieldEnabled, SetContentTypeFieldVisible, SetContentTypeFieldSequence, SetContentTypeFieldStyleConfiguration |
internalContentTypeId, fieldMetadataKey and the changed value |
Field behavior actions: AddContentTypeFieldBehavior, SetContentTypeFieldBehaviorSequence, SetContentTypeFieldBehaviorConfiguration |
An error event only; no success event. |
Permissions: GetIdentitiesWithAccessToContentType, GetContentTypesAccessibleByIdentity, AddContentTypePermissionForUser, RemoveContentTypePermissionForUser |
identityToken and internalContentTypeId as they apply |
GetDestinations, GetSources, GetContentTypes, V2_RepositoryAPI/ExportReservoirConfigJson |
None |
V2_RepositoryAPI/SendEmail |
toAddresses (comma-joined), with DurationMs |
GetMetadata, GetRemoteGateways |
No event |
Intuitive AI: V1_IntuitiveAIAPI¶
Shape apps, openapi, invoke, success | error, {Action}, with DurationMs.
| Action | Extra properties |
|---|---|
AddDocumentFile |
classId, fingerprintId (the subclass id, may be null), fileName, mimeType |
CreateNewClass, GetDefaultRuleAutoExtractionAction, SetDefaultRuleAutoExtractionAction, GetAllKnownClassInformation, GetClass, GetSubclass |
None |
Lower-level work item API: V1_BatchAPI¶
Shape apps, openapi, invoke, success | error, {Action}.
- Properties The ids from the batch token, plus the document, page and file ids involved (
documentId,pageId,documentFileId,newIndex,documentCount,pageCount, file name and MIME type on uploads). - Actions
GetBatch,UnlockBatch,CommitBatch,RemoveBatch,AddDocument,AddDocumentFile,AddBatchFile,AddBatchDocuments,AddBatchDocumentPages,GetDocumentFile,ReorderDocument,RemoveDocument,RemoveDocumentFile,AddPage,ReorderPage,RemovePage,UpsertBatchMetadata,MovePages,RemoveBatchMetadata,UpsertDocumentMetadata,RemoveDocumentMetadata,UpsertPageMetadata,RemovePageMetadata,ReadBatch,NewBatch. - Exception
LockBatchwrites an error event only; no success event.
Triggers, apps and legacy Learn¶
| Group | Actions and properties |
|---|---|
V1_TriggerAPI |
GetAllTriggerInformation, ExportTriggerDefinition (triggerId), ImportTrigger (triggerId, newWorkflowId). SetTags writes method SetTriggerTags (triggerId, tags). |
V1_AppsAPI |
SyncCatalog: catalogId. The event is written when the sync finishes, which can be after the API call returns. GetCatalogs, GetGroups, GetUsers, GetConnectivityStatus and the permission reads write no event. |
V1_LearnAPI (legacy) |
One event per action, with fingerprintId and the action's keys. See the notes below. |
V1_LearnAPI quirks:
GetFingerprintInformationandGetAllFingerprintInformationwrite the success event before the lookup, so a failing call writes success then error.AddRegexToOcrRulewrites methodAddRegexAnchorInteraction.AddStaticMetadataActionToDefaultRulewrites methodAddImageAnchorToOcrRule.
Write Event API¶
openapi, {your scopes}
- Meaning Written by
V1_EventsAPI/WriteEvent. - Properties The ones you sent, plus
event_userToken(the token's user) andevent_user(theUserfield you sent). - Audit event No API call audit event is written for this action.
- Default filter blocked. No category covers the first scope
openapi. - Instead Use the Custom Event step to put your own events in your provider.
Related¶
- Events Dictionary
- Sign-In and Security Events: API token create, change and delete events.
- Introduction to the API