Kenesto Events API
Kenesto Web API provides the same API that Kenesto web app and Kenesto Drive uses. You can use it for all the same operations for manipulating folders, documents and tasks. You must first be registered with Kenesto which means you must have an account in Kenesto to use the API.
Kenesto API supports events registration mechanism which allows the 3rd party application to be
notified when changes were made on the requested entities.
The callback endpoint is provided by the registered application and must be https based.
The registration request can be to any one of the following entities:
• Documents
• Folders
• Projects
• Emails
The scope of the registration must also be provided:
• Organization
The following event types should be provided:
• Create
• Update (including access changes)
• Delete
• Share
• Unshare
Each combination of the 3 categories above can have its own endpoint and each endpoint registration
must be set within a sperate API call
Contents
Each method gets optional parameter called ud (userData) that returns same value. (To keep context or anything else)
Each method returns response status – ok or failed.
If it failed exception message is also returned.
Base URL: https://app.kenesto.com/Kenesto.Web.API/KEvents.svc/
1.Register Events Endpoint:
Description:
Registers a callback endpoint
Request:
https://app.kenesto.com/Kenesto.Web.API/KEvents.svc/RegisterEventsEndpoint
Http Method: POST
Content-Type: application/json
Parameters:
Name | Type | Required | Description |
token | string | yes | A valid session token. |
eventTypes | string array | yes | Specify the events this endpoint will be called upon |
eventScopes | string array | yes | Specify the scopes for the events notifications |
triggerFamilies | string array | yes |
Specify the entities for |
endpointUrl | string | yes | The endpoint url |
userData | string | no | User Data – free text. |
Request Example
Example 1:
{
“token”:”bMlO2sbzTRvFwPNTdKYWOSGghTdX/fBakGAdoOoo6doNoQa =”,
“eventTypes”:[“Create”,”Update”,”Delete”],
“eventScopes”:[“Organization”],
“triggerFamilies”:[“Documents”,”Folders”],
“endpointUrl”:”http://104.12.143.219:8086/EventsListener”,
“userData”:””
}
Example 2:
{
“token”:”0105SoavaK3jQZVj9dJa9jQdm3a1tDipy44UiCEqAO7dEf7uQYq6xbrav9T1t5YA457qEuJFdnixv39ZRcDLq29SzHjHeqSGqh9hRt59HfAN6JOqZjoSOk2sgDF1p4o7j78FQmSVeJdDn3BAA4qF7mY5ocNCrA=”,
“eventTypes”:[“Share”,”Unshare”],
“eventScopes”:[“Organization”],
“triggerFamilies”:[“Emails”],
“endpointUrl”:”http://192.168.88.166:8086//EventsListener”,
“userData”:””
}
Response:
Type: Json Formatted String
ResponseStatus – OK or FAILED
Response Example
{
“RegisterEventsEndpointResult”: {
“ErrorMessage”: “”,
“ResponseStatus”: “OK”,
“ResponseData”: null,
“UserData”: “”
}
}
2.Un-Register Events Endpoint:
Description:
Remove endpoint event registration
Request:
https://app.kenesto.com/Kenesto.Web.API/KEvents.svc/UnRegisterEventsEndpoint
Http Method: POST
Content-Type: application/json
Parameters:
Name | Type | Required | Description |
token | string | yes | A valid session token. |
eventTypes | Guid | yes | Specify the events this endpoint will be called upon |
eventScopes | string | yes | Specify the scopes for the events notifications. |
triggerFamilies | string | yes | Specify the entities for this endpoint callback. |
userData | string | no | User Data – free text. |
Request Example
https://app.kenesto.com/Kenesto.Web.API/KEvents.svc/UnRegisterEventsEndpoint
{
“token”:”bMlO2sbzTRvFwPNTdKYWOSGghTdX/fBakGAdoOoo6doNoQa =”,
“eventTypes”:[“Create”,”Update”,”Delete”],
“eventScopes”:[“Organization”],
“triggerFamilies”:[“Documents”,”Folders”],
“userData”:””
}
Type: Json Formatted String
ResponseStatus – OK or FAILED
Response Example
{
“UnRegisterEventsEndpointResult”: {
“ErrorMessage”: “”,
“ResponseStatus”: “OK”,
“ResponseData”: null,
“UserData”: “”
}
}
Callback Data:
Callback JSON Examples
Callback json data example 1:
[
{
“EventType”:”Update”,
“EventScope”:”Organization”,
“TenantId”:4,
“TriggerFamily”:”Documents”,
“EndpointUrl”:”http://104.12.143.219:8086/EventsListener”,
“SourceObjectId”:”35815456-1575-46d8-b67b-186679e4397b”,
“SourceFamilyCode”:”ASSET”,
“SourceInfo”:{
“Name”:”test1″,
“Version”:”1″,
“VersionId”:”35815456-1575-46d8-b67b-186679e4397b”,
“BaseVersionId”:”35815456-1575-46d8-b67b-186679e4397b”,
“ParentFolderId”:”00000000-0000-0000-0000-000000000000″
},
“ExecutionInfo”:{
“UserId”:”fd145ce7-8172-2e4d-97a5-0a47da5552ad”,
“Username”:”[email protected]”,
“DisplayName”:”Scott Supplier”,
“ExecutionDateUTC”:”2020-07-08T09:54:13.7545879Z”
}
}
]
Callback json data example 2:
[
{
“EventType”: “Share”,
“EventScope”: “Organization”,
“TenantId”: 4,
“TriggerFamily”: “Emails”,
“EndpointUrl”: “http://192.168.88.166:8086//EventsListener”,
“SourceObjectId”: “00000000-0000-0000-0000-000000000000”,
“SourceFamilyCode”: “MESSAGES”,
“SourceInfo”: {
“SUBJECT”: {
“EmailType”: “SHARED_NOTIFICATION”,
“ModuleType”: “DOCUMNETS_MANAGEMENT”,
“HandlerType”: “SharedObjectNotification”,
“FromEmailAddress”: “[email protected]”,
“ToEmailAddress”: “[email protected]”,
“ObjectTypeName”: “Folder”,
“SharedObjectName”: “test”,
“TenantName”: “Plastic Supplier Co.”
},
“BODY”: {
“TargetUser”: “Jeff Supplier”,
“SourceUser”: “Scott Supplier”,
“ObjectTypeName”: “Folder”,
“SharedObjectLink”: “https://app.kenesto.com/Kenesto/UserExternal/SharedObject? u=UFJDQiUyZktIVVd4MjQyWGVReExEcmtjclJyJTJmUXlhbmZDSiUyYk00d4545iVkRwSFlyZVlKMEc4WVU3alNwUTA2WnZ2ZjdENEVqSzcxc0hMNzVWc25xdyUyYk1GUDdLQW56YWNQaDh2VFNaQ3ZxZ2VWdkpub0o5SmZxQjg3ZiUyZjRLZm5hQ3klMmJNVnB1ZWcwZm1aVWFlaHklMmZwQmVXRU0lMmZ5YTljdDVxN2srfFSDssddoQXVxdjVsWDFDJTJiMXI4aENyb0hESDNHbXNkd2NvMGdxTmtTSE8zUSUzZCUzZA==&id=e8439513-0de4-42ec-acf0-7d64f325d268&familyCode=FOLDER”,
“SharedObjectName”: “test”,
“TenantName”: “Plastic Supplier Co.”,
“Description”: “Not Set”,
“ObjectPermissions”: “Update”,
“ExpirationDate”: “Not Set”,
“IsProjectAdmin”: “”,
“TenantId”: “4”,
“SharedObjectId”: “e8439513-0de4-42ec-acf0-7d64f325d268”
}
},
“ExecutionInfo”: {
“UserId”: “fd145ce7-8172-2e4d-97a5-0a47da5552ad”,
“Username”: “[email protected]”,
“DisplayName”: “Scott Supplier”,
“ExecutionDateUTC”: “2022-03-11T08:38:29.4067016Z”
}
}
]