Kenesto Documents API

Kenesto Web API provides the same RESTful 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.

1.  Create Folder:

Description:  Create new folder and subfolders in the system.

Request:

https://{kenesto hostname}/Kenesto.Web.API/KDocuments.svc/CreateFolder?t={token}&pid={parentFolderId}&fn={folderName}&fd={folderDescription}&fk={folderKeyword}&iv={isVault}&ud={userData}

Http Method: Get

Content-Type: application/json

Parameters:

Name Type Required Description
t string yes token – User’s encrypted and encoded session token.
pid Guid no parentFolderId- Specify the parent folder. If empty – the new folder will be created under the root.
fn string yes folderName -The new requested folder’s name.
fd string no folderDescription – Description for the new folder
fk string no folderKeyword – Add search keyword for the folder.
iv bool no isVault – Is this should be a vault folder. Default value is false.
ud string no User Data – free text.

Response:

Type: Json Formatted String

Response Example

{

“ResponseData”: {

“Id”: “ee7ad22d-8a14-48b1-8a0c-891941fb8b9a”,

“Name”: “MyFolder”,

“Description”: “My new folder”,

“Keyword”: “key”

},

“ResponseStatus”: “OK”,

“UserData”: “My User Data”

}

2.  Delete Folder:

Description:  Delete existing folder

Request:

https://{kenesto hostname}/Kenesto.Web.API/KDocuments.svc/DeleteFolder?t={token}&fid={folderId}&ud={userData}

Http Method: Get

Content-Type: application/json

Parameters:

Name Type Required Description
t string yes token- User’s encrypted and encoded session token.
fid Guid yes folderId – The ID of the folder that should be deleted.
ud string no User Data – free text.

Response:

Type: Json Formatted String

Response status : OK or Fail

Response Example
    1. {
      “ResponseStatus”: “OK”,
      “UserData”: “My User Data”
      }

  • 3. List Items in Folder:

    Request:

    RetrieveDocuments?t={token}&fid={folderId}&ps={pageSize}&pn={pageNumber}&ud={userData}

    Http Method: Get

    Content-Type: application/json

    Parameters:

    Name Type Required Description
    fid guid no Folder ID, if not supplied, root folder is assumed
    ps int no Page size – the max number of results that will return. Allowed values: 25, 100 and 200. If not sent – default value is 25. If forbidden value was sent – Throwing an exception.
    pn int no Page number – the results page we want. Total results/Page size = number of pages. If requested page number is bigger than last page number – returning all results. If not sent – default value is 1.
    ud string no User data – free text

    Response:

    Type: Json Formatted String

    Response status – List of file versions – each version contains: file id and file name.

    Response Example

    4. List Document Versions:

    Request:

    RetrieveFileVersions?t={token}&fid={fileId}&ud={userData}

    Http Method: Get

    Content-Type: application/json

    Parameters:

    Name Type Required Description
    fid guid no Folder ID, if not supplied, root folder is assumed
    ud string no User data – free text

    Response:

    Type: Json Formatted String

    Response status – ok or failed

    Response Example

    5. Get Document Count:

    Description: Get number of items under the requested folder id or under the root if the folder id is empty.

    Request:

    https://{kenesto hostname}/Kenesto.Web.API/KDocuments.svc/RetrieveNumberOfDocuments?t={token}&fid={fileId}&ud={userData}

    Http Method: Get

    Content-Type: application/json

    Parameters:

    Name Type Required Description
    t string yes token – User’s encrypted and encoded session token.
    fid guid no Folder ID, if not supplied, root folder is assumed
    ud string no User data – free text

    Response:

    Type: Json Formatted String

    Response status – OK or Failed

    Response Example
        1. {
          “ResponseData”: {
          “TotalDocuments”: “3”,
          “FolderName”: “MyFolder”
          },
          “ResponseStatus”: “OK”,
          “UserData”: “My User Data”
          }

    6. Check In Document:

    Description: Check-in a document under vault

    Request:

    https://{kenesto hostname}/Kenesto.Web.API/KDocuments.svc/CheckIn?t={token}&ud={userData}

    Http Method: Post

    Content-Type: application/json

    Parameters:

    Name Type Required Description
    t string yes token – User’s encrypted and encoded session token.
    ud string no User data – free text
    Body example
        1. {
          “asset”: {
          “ID”:”6692d550-2583-4f2e-b918-45e0df168368″,
          “Comment”: “My comments on the operation”
          }
          }

    Response:

    Type: Json Formatted String

    Response status – OK or Failed

    Response Example
        1. {
          “ResponseStatus”: “OK”,
          “UserData”: “My User Data”
          }

    7. Check Out Document:

    Description: Check-out a document under vault

    Request:

    https://{kenesto hostname}/Kenesto.Web.API/KDocuments.svc/CheckOut?t={token}&did={documentId}&ud={userData}

    Http Method: Get

    Content-Type: application/json

    Parameters:

    Name Type Required Description
    t string yes token – User’s encrypted and encoded session token
    did guid yes Document ID
    ud string no User data – free text
    URL Example
    1. https://app.kenesto.com/Kenesto.Web.API/KDocuments.svc/CheckOut?t=MSm2dDAVJE0PyDFjo8HaCKP%2BI63lpJHjQDY00Xrx%2F6dtH2tfX2wv7qIlPMDA5dJLEwol2zMiTURLjZW16VeftMn7mMRp3iffHwW%2FuPb1PmSZYU1YtdP8hQ4mphCv8WOOztkTAvRbrNPI6ef9RyITaZ4LfdSOamZyftkj2pupC%2Fk%3D&did=8dcb6757-c96f-4d4b-9afe-3f94873eb594&ud=My User Data
    Response:

    Type: Json Formatted String

    Response status – OK or Fail

    Response Example
    1. {
      “ResponseStatus”: “OK”,
      “UserData”: “My User Data”
      }

    8. Discard Check Out:

    Description: Discard check-out made by shared user on a document under shared vault. Discard can be executed only by owner of the document.

    Request:

    https://{kenesto hostname}/Kenesto.Web.API/KDocuments.svc/DiscardCheckOut?t={token}&did={documentId}&ud={userData}

    Http Method: Get

    Content-Type: application/json

    Parameters:

    Name Type Required Description
    t string yes token – User’s encrypted and encoded session token.
    did guid yes Document ID
    ud string no User data – free text
    URL Example
    1. https://app.kenesto.com/Kenesto.Web.API/KDocuments.svc/DiscardCheckOut?t=MSm2dDAVJE0PyDFjo8HaCKP%2BI63lpJHjQDY00Xrx%2F6dtH2tfX2wv7qIlPMDA5dJLEwol2zMiTURLjZW16VeftMn7mMRp3iffHwW%2FuPb1PmSZYU1YtdP8hQ4mphCv8WOOztkTAvRbrNPI6ef9RyITaZ4LfdSOamZyftkj2pupC%2Fk%3D&did=8dcb6757-c96f-4d4b-9afe-3f94873eb594&ud=My User Data
    Response:

    Type: Json Formatted String

    Response status – OK or Fail

    Response Example
    1. {
      “ResponseStatus”: “OK”,
      “UserData”: “My User Data”
      }

    9. Check In Multiple Documents at Once:  

    Description: Check-in multi documents under vault

    Request:

    https://{kenesto hostname}/Kenesto.Web.API/KDocuments.svc/CheckInMultiple?t={token}&ud={userData}

    Http Method: Post

    Content-Type: application/json

    Parameters:

    Name Type Required Description
    t string yes token – User’s encrypted and encoded session token
    ud string no User data – free text
    URL Example
    1. https://app.kenesto.com/Kenesto.Web.API/KDocuments.svc/CheckInMultiple?t=MSm2dDAVJE0PyDFjo8HaCKP%2BI63lpJHjQDY00Xrx%2F6dtH2tfX2wv7qIlPMDA5dJLEwol2zMiTURLjZW16VeftMn7mMRp3iffHwW%2FuPb1PmSZYU1YtdP8hQ4mphCv8WOOztkTAvRbrNPI6ef9RyITaZ4LfdSOamZyftkj2pupC%2Fk%3D&ud=My User Data
    Body parameters:

    Name Type Requered Description
    documentIds guid array yes Document  IDs – an array of [document ids]
    Comment string no Comment – free text

    Example:

    {
    “documentIds”: [“8dcb6757-c96f-4d4b-9afe-3f94873eb594”, “32d2b570-d8ce-4c43-8753-0f48e6902284”],
    “asset”: {
    “Comment”: “My MULTIPLE Comments”
    }
    }

    Response:

    Type: Json Formatted String

    Response status – ok or Fail

    Response Example
    1. {
      “ResponseStatus”: “OK”,
      “UserData”: “My User Data”
      }

    10. Check Out Multiple Documents at Once:  

    Request:

    CheckOutMultiple?t={token}&ud={userData}

    Http Method: Post

    Content-Type: application/json

    Parameters:

    Name Type Required Description
    documentIds guid array yes Array of document IDs
    ud string no User data – free text

    Body parameters:

        • documentIds – an array of document ids

    Example: { “documentIds”: [“6692d550-2583-4f2e-b918-45e0df168368”, “c8b45966-6b96-4e5c-a447-9bf52b60241c”]}

    Response:

    Type: Json Formatted String

    Response status – OK or Failed

    Response Example

    {
    “ResponseStatus”: “OK”,
    “UserData”: null
    }

    11. Download File:

    Description:  Getting access URL to download a file version according to the requested ID.

    Request:

    DownloadFile?t={token}&fid={fileId}&ie={isExternal}&ud={userData}

    Http Method: Get

    Content-Type: application/json

    Parameters:

    Name Type Required Description
    token string yes User’s encrypted and encoded session token.
    fileId Guid yes The Id of the file version which we want to download.
    isExternal bool no Is external user.
    userData string no User Data – free text.

    Response:

    Type: URL

    Response status – a URL that gives access to download the file for the next hour

    Response Example

    {

    “ResponseStatus”: “OK”,

    “ResponseData”: {

    “AccessUrl”: “https://kenesto-app-nonproduction.s3.amazonaws.com/Customer%20Data/3/Files/8409ddd6-d8c7-4674-9b30-7d26a400a86e?AWSAccessKeyId=AKIAJIRQ2IKZC6VEPR5Q&Expires=1502371717&response-content-disposition=attachment%3B%20filename%3D%22Knife4.txt%22&Signature=eW0nitA36v6tLS7w4mouHBVGQ1A%3D”

    },

    “UserData”: “My User Data”

    }

    12. Share a Document

    Request:

    ShareDocument?t={token}&uid={userID}&ue={userEmail}&ud={userData}

    Http Method: Post

    Content-Type: application/json

    Parameters:

    Name Type Required Description
    uid guid yes User ID
    ue string no User Email
    ud string no User Data
    Body Parameters

    Body parameters:

        • asset – object to be shared that contains the following properties:
          • ID – guid id of the shared documents
          • UsersPermissions – an array of user permissions, each permission contains the following properties:
            • ParticipantUniqueID – user email
            • FamilyCode – participants type. Possible values:
              • PARTICIPANT_USER – registered user
              • EXTERNAL_USER – external user
            • ForUpdate (Boolean – mandatory) – is permission for update
            • PermissionTypeValue – permission type, possible values:
              • NONE – no permissions
              • VIEW_ONLY – view only permission
              • ALLOW_DOWNLOAD – view and download permissions
              • ALLOW_UPDATE_VERSIONS – view download and update permissions
            • Allow Share (Boolean – default value is false) – weather or not shared user will be allowed to re-share

    Allow Upload (Boolean – default value is false) – Applies for folders only, sets weather shared user will be able to upload documents to the shared folder

    Body Example

    Example (sharing a document with 2 participants):

    { “asset”: { “ID”: “c21c8e11-64f8-43fe-8826-bdc0fc459c8a”,

    “UsersPermissions”[

    {

    “ParticipantUniqueID”: “lisa@kenestodemo.com”,

    “FamilyCode”: “PARTICIPANT_USER”,

    “ForUpdate” :  false,

    “PermissionTypeValue” : “ALLOW_DOWNLOAD”,

    “AllowShare” : false

    },

    {

    “ParticipantUniqueID”: “jeff@kenestodemo.com”,

    “FamilyCode”: “PARTICIPANT_USER”,

    “ForUpdate” :  true,

    “PermissionTypeValue” : “ALLOW_DOWNLOAD”,

    “AllowShare” : true

    }

    ]}

    }

    Response:

    Type: Json Formatted String

    Response status – OK or Failed

    Response Example

    {
    “ResponseStatus”: “OK”,
    “UserData”: null
    }

    13. Share multiple files with multiple users:

    Request:

    MultiSelectShare?t={token}& ue={userEmail}&ud={userData}

    Http Method: Post

    Content-Type: application/json

    Parameters:

    Name Type Required Description
    ue string no User Email
    ud string no User Data
    Body Parameters

    Body parameters:

        • shareObject – object to be shared that contains the following properties:
          • Items – an array of
          • UsersPermissions – an array of user permissions, each permission contains the following properties:
            • ParticipantUniqueID – user email
            • FamilyCode – participants type. Possible values:
              • PARTICIPANT_USER – registered user
              • EXTERNAL_USER – external user
            • ForUpdate (Boolean – mandatory) – is permission for update
            • PermissionTypeValue – permission type, possible values:
              • NONE – no permissions
              • VIEW_ONLY – view only permission
              • ALLOW_DOWNLOAD – view and download permissions
              • ALLOW_UPDATE_VERSIONS – view download and update permissions
            • Allow Share (Boolean – default value is false) – weather or not shared user will be allowed to re-share

    Allow Upload (Boolean – default value is false) – Applies for folders only, sets weather shared user will be able to upload documents to the shared folder

    Body Example

    Example (sharing 2 documents and a folder with 2 participants):

    {  “shareObject”: {

    “UsersPermissions” :

    [

    {

    “ParticipantUniqueID”: “lisa@kenestodemo.com”,

    “FamilyCode”: “PARTICIPANT_USER”,

    “ForUpdate” :  true,

    “PermissionTypeValue” : “ALLOW_DOWNLOAD”,

    “AllowShare” : true,

    “AllowUpload” : false

    },

    {

    “ParticipantUniqueID”: “jeff@kenestodemo.com”,

    “FamilyCode”: “PARTICIPANT_USER”,

    “ForUpdate” :  true,

    “PermissionTypeValue” : “VIEW_ONLY”,

    “AllowShare” : false,

    “AllowUpload” : true

    }

    ],

    “Items”:

    [

    {

    “Id” : “65eae021-980e-48fc-a1e8-ab34db662f8a”,

    “Type” : “Document”

    },

    {

    “Id” : “f8f8b756-f1f7-4995-a870-97a0889687c4”,

    “Type” : “Folder”

    },

    {

    “Id” : “f45b0d51-4637-403e-a6db-27949d887f0b”,

    “Type” : “Document”

    }

    ]

    }

     

    Response:

    Type: Json Formatted String

    Response status – OK or Failed

    Response Example

    14. Share a Folder

    Request:

    ShareFolder?t={token}&uid={userID}&ue={userEmail}&ud={userData}

    Http Method: Post

    Content-Type: application/json

    Parameters:

    Name Type Required Description
    uid guid yes User ID
    ue string no User Email
    ud string no User Data
    Body Parameters

    Body parameters:

        • folder– object to be shared that contains the following properties:
          • ID – guid id of the shared documents
          • UsersPermissions – an array of user permissions, each permission contains the following properties:
            • ParticipantUniqueID – user email
            • FamilyCode – participants type. Possible values:
              • PARTICIPANT_USER – registered user
              • EXTERNAL_USER – external user
            • ForUpdate (Boolean – mandatory) – is permission for update
            • PermissionTypeValue – permission type, possible values:
              • NONE – no permissions
              • VIEW_ONLY – view only permission
              • ALLOW_DOWNLOAD – view and download permissions
              • ALLOW_UPDATE_VERSIONS – view download and update permissions
            • Allow Share (Boolean – default value is false) – weather or not shared user will be allowed to re-share

    Allow Upload (Boolean – default value is false) – Applies for folders only, sets weather shared user will be able to upload documents to the shared folder

    Body Example

    { “folder”: { “ID”: “f8f8b756-f1f7-4995-a870-97a0889687c4”,

    “UsersPermissions”[

    {

    “ParticipantUniqueID”: “lisa@kenestodemo.com”,

    “FamilyCode”: “PARTICIPANT_USER”,

    “ForUpdate” :  false,

    “PermissionTypeValue” : “ALLOW_DOWNLOAD”,

    “AllowShare” : “false”

    }

    ]}

    Response:

    Type: Json Formatted String

    Response status – OK or Failed

    Response Example

    {
    “ResponseStatus”: “OK”,
    “UserData”: null
    }

    15. Upload Document:

    It is a 3-step process:

          1. Get an url to upload the file: UploadFile
          2. Write the client code to upload the actual file contents
          3. Call to complete upload: UploadFileCompleted
    1. Get an url to upload the file
    Upload File

    UploadFile?t={token}&p={path}&fd={fileDescription}&fk={fileKeyword}&fid={folderId}&bid={baseFileId}&ud={userData}

    Name Required Description
    p Yes Path:

    Where client wants the file in Kenesto.

    There are 2 options: file name with extension (meaning this file will be in root) or folder path with file name extension.

    For example:

    Test.txt – will create new file in the root folder.

    Folder1\Folder2\Test.txt – will create new Folder1, new sub folder Folder2 and new Test.txt file in Folder2.

    fd No File Description
    fk No File Keyword
    fid No Folder Id – if client wants to attach file to existing folder
    bid No Base File Id – if client wants to update version for existing file

    Upload File response:

    Returns a URL that give access to upload file for the next 24 hours.

    2. Write the client code to upload the actual file contents
    Write Client Code

    Use the url returned in the previous step to write that will upload the file to Kenesto temporary path. Please see the code sample written in C# below for guidance.

    Code Example:

    filePath – points to the local file in your computer from where you are uploading

    url – the url returned from the previous step

    static void WriteFile(string filePath, string url)

    {

    HttpWebRequest httpRequest = WebRequest.Create(url) as HttpWebRequest;

    httpRequest.Method = “PUT”;

    httpRequest. ContentType = “multipart/form-data”;

    httpRequest.Timeout = System.Threading.Timeout.Infinite;

    httpRequest.AllowWriteStreamBuffering = false;

    httpRequest.ContentLength = new System.IO.FileInfo(filePath).Length;

    using (Stream dataStream = httpRequest.GetRequestStream())

    {

    byte[] buffer = new byte[8000];

    using (FileStream fileStream = new FileStream(filePath, FileMode.Open,          FileAccess.Read))

    {

    int bytesRead = 0;

    while ((bytesRead = fileStream.Read(buffer, 0, buffer.Length)) >0)

    {

    dataStream.Write(buffer, 0, bytesRead);

    }

    }

    }

    HttpWebResponse response = httpRequest.GetResponse() as HttpWebResponse;

    }

    3. Call to complete upload: UploadFileCompleted
    Complete the upload

    Http Method: Get

    UploadFileCompleted?t={token}&u={url}&ud={userData}

          • URL – pre-signed URL (return value from the first step)

    Upload File Completed response:

    File upload to Kenesto.

    16.  Delete Document:

    Request:

    DeleteAsset?t={token}&aid={assetId}&fc={familyCode}&ud={userData}

    Http Method: Get

    Content-Type: application/json

    Parameters:

    Name Type Required Description
    aid guid no assetId same as document ID
    fc string no Use family code “GENERAL”
    ud string no User data – free text
    URL Example

    https://app.kenesto.com/Kenesto.Web.API/KDocuments.svc/DeleteAsset?t=FKHHJFGHH%2bI63lpJHjQDY00Xrx%2f6dtH2tfX2wv7qIlPMDA5dJLC9DRgTrSQ6qa6%2fNv7URDI601MvlQiI3NmdkenOubfBQ79Y0GhHbrVYIGGv8kptg%2bSq6zSa6BboHJEKjC6tcKFSnqT3tNj4gTWzSMVA0Oj%2fE%3d&aid=02917842-fe32-45b5-844b-775c0c848867&fc=GENERAL&ud=blabla

    Response:

    Type: Json Formatted String

    Response status – ok or failed

    Response Example

    17. RetrieveDocuments:

     Description:  Get all Documents and folders under the requested folder id or under the root if the folder id is empty.

    Request:

    RetrieveDocuments?t={token}&fid={folderId}&ps={pageSize}&pn={pageNumber}&sb={sortBy}&sd={sortDirection}&ao={asOwner}&ud={userData}

    Http Method: Get

    Content-Type: application/json

    Parameters:

    Name Type Required Description
    token string yes User’s encrypted and encoded session token.
    fid Guid no The Id of the requested parent folder. If empty – get the root folder.
    pageSize int no Page size – the max number of results that will return. Allowed values: 25, 100 and 200. If not sent – default value is 25.
    pageNumber int no Page number – the results page we want. Total results/Page size = number of pages. If requested page number is bigger than last page number – returning all results. If not sent – default value is 1.
    sortBy string no Sort the results by one of the following options:

    MODIFICATION_DATE (default), FILE_EXTENSION, ASSET_NAME, CURRENT_VERSION_SIZE

    sortDirection string no Results sort direction options:

    desc (default)- Descending,

    asc – Ascending

    asOwner bool no Get only documents owned by the requestor. Default value is false.
    userData string no User Data – free text.

    Response:

    Type: Json Formatted String

    Response status – ok or failed

    Response Example

    {

    “ResponseData”: {

    “DocumentsList”: [

    {

    “Id”: “2c4a0d5c-4a44-47a7-8049-3b6c76a73966”,

    “Name”: “Knife3”,

    “ExternalToken”: “”,

    “SharedObjectId”: “2c4a0d5c-4a44-47a7-8049-3b6c76a73966”,

    “FamilyCode”: “GENERAL”,

    “ViewerUrl”: “http://localhost/PLMPlus.UI.Client/UserExternal/GetViewerUrl?isExternal=False&token=TVNtMmREQVZKRTBQeURGam84SGFDS1AlMmJJNjNscEpIalFEWTAwWHJ4JTJmNmR0SDJ0Zlgyd3Y3cUlsUE1EQTVkSkxFd29sMnpNaVRVUkxqWlcxNlZlZnRQaFI1cmVobHF0MEZoWlVOcnZHR1RtSWdzJTJiTVBRYnA2UVUzVkVkTzlWUnRYdEFISkw4UndFQkwwJTJmcXdBeEZPYXViSGdGblJVY0NYR1lOMWxod3ZGcjglM2Q=&assetId=2c4a0d5c-4a44-47a7-8049-3b6c76a73966&AssetFamilyCode=GENERAL&isSessionToken=True&mobile=True”,

    “IsExternalLink”: false,

    “ExternalLinkType”: “REGULAR”,

    “IsCheckedOut”: false,

    “ChceckedOutBy”: “”,

    “HasThumbnail”: false,

    “IsVault”: false,

    “FileExtension”: “.txt”,

    “FileName”: “Knife3.txt”,

    “MimeType”: “text/plain”,

    “ModificationDate”: “2017-08-07T08:59:12.0940000Z”,

    “IconName”: “file”,

    “CurrentVersionSize”: 1205

    },

    {

    “Id”: “801f3e70-d87a-4655-b2da-fdb7d0740800”,

    “Name”: “Knife2”,

    “ExternalToken”: “”,

    “SharedObjectId”: “801f3e70-d87a-4655-b2da-fdb7d0740800”,

    “FamilyCode”: “GENERAL”,

    “ViewerUrl”: “http://localhost/PLMPlus.UI.Client/UserExternal/GetViewerUrl?isExternal=False&token=TVNtMmREQVZKRTBQeURGam84SGFDS1AlMmJJNjNscEpIalFEWTAwWHJ4JTJmNmR0SDJ0Zlgyd3Y3cUlsUE1EQTVkSkxFd29sMnpNaVRVUkxqWlcxNlZlZnRQaFI1cmVobHF0MEZoWlVOcnZHR1RtSWdzJTJiTVBRYnA2UVUzVkVkTzlWUnRYdEFISkw4UndFQkwwJTJmcXdBeEZPYXViSGdGblJVY0NYR1lOMWxod3ZGcjglM2Q=&assetId=801f3e70-d87a-4655-b2da-fdb7d0740800&AssetFamilyCode=GENERAL&isSessionToken=True&mobile=True”,

    “IsExternalLink”: false,

    “ExternalLinkType”: “REGULAR”,

    “IsCheckedOut”: false,

    “ChceckedOutBy”: “”,

    “HasThumbnail”: false,

    “IsVault”: false,

    “FileExtension”: “.txt”,

    “FileName”: “Knife2.txt”,

    “MimeType”: “text/plain”,

    “ModificationDate”: “2017-08-07T08:59:03.4790000Z”,

    “IconName”: “file”,

    “CurrentVersionSize”: 1205

    }

    ],

    “TotalDocuments”: “2”,

    “TotalFiles”: “2”,

    “TotalFolders”: “0”,

    “next_href”: “”,

    “FolderId”: “69155ac0-4f97-42dd-a169-5543b951c8e2”,

    “FolderName”: “folder1”

    },

    “ResponseStatus”: “OK”,

    “UserData”: “My User Data”

    }

    18. RetrieveFileVersions:

    Description:  Gets the requested file versions information.

    Request:

    RetrieveFileVersions?t={token}&fid={fileId}&ud={userData}

    Http Method: Get

    Content-Type: application/json

    Parameters:

    Name Type Required Description
    token string yes User’s encrypted and encoded session token.
    fileId Guid yes The Id of the base version of the file.
    userData string no User Data – free text.

    Response:

    Type: Json Formatted String

    Response status – ok or failed

    Response Example

    {

    “ResponseStatus”: “OK”,

    “ResponseData”: {

    “FileVersionsList”: [

    {

    “Id”: “801f3e70-d87a-4655-b2da-fdb7d0740800”,

    “Name”: “Knife2”,

    “OwnerId”: “be3a3293-bc0a-a046-bbcd-704bfb088a2f”,

    “OwnerName”: “Joe Engineer”,

    “IsCurrentVersion”: false,

    “ModificationDate”: “/Date(-62135596800000)/”,

    “FileSize”: 1203,

    “VersionNumber”: “1”

    },

    {

    “Id”: “96a7bdfd-ce8a-4839-af16-a0b5a84f037a”,

    “Name”: “Knife2”,

    “OwnerId”: “be3a3293-bc0a-a046-bbcd-704bfb088a2f”,

    “OwnerName”: “Joe Engineer”,

    “IsCurrentVersion”: true,

    “ModificationDate”: “/Date(-62135596800000)/”,

    “FileSize”: 1205,

    “VersionNumber”: “2”

    }

    ]},

    “UserData”: “My User Data”

    }

    19. RetrieveNumberOfDocuments:

    Description: Gets the number of items (files and folders) under root or specific folder.

    Request:

    RetrieveNumberOfDocuments?t={token}&fid={folderId}&ud={userData}

    Http Method: Get

    Parameters:

    Name Type Required Description
    token string yes User’s encrypted and encoded session token.
    folderId Guid no The folder Id. If empty – get number of items under the root folder.
    userData string no User Data – free text.

    Response:

    Type: Json Formatted String

    Response status – ok or failed

    Response Example

    {

    “ResponseData”: {

    “TotalDocuments”: “2”,

    “FolderName”: “MyFolder”

    },

    “ResponseStatus”: “OK”,

    “UserData”: “My User Data”

    }

    20. CreateDocumentSequenceNumber:

    Create new document sequence number.

    Request:

    CreateDocumentSequenceNumber?t={token}&ud={userData}

    Http Method: Post

    Parameters:

    Name Type Required Description
    token string yes User’s encrypted and encoded session token.
    sequenceName string yes The name for the sequence. Unique in the tenant level.
    sequencePrefix string no The prefix of the sequence. Free text.
    sequenceNumber int yes The initial number of the sequence.
    userData string no User Data – free text.

    Body Example:

    {

    “sequenceName”: “MySeqFile1”,

    “sequencePrefix”: “TEST_”,

    “sequenceNumber”: “10”

    }

    Response:

    Type: Json Formatted String

    Response status – ok or failed

    Response Example

    {

    “ResponseStatus”: “OK”,

    “UserData”: “My User Data”

    }

    21. GetNextDocumentSequenceValue:

    Get the next sequence value.

    Request:

    GetNextDocumentSequenceValue?t={token}&sn={sequenceName}&lock={isLock}&rp={replacementSequencePrefix}&rn={replacementSequenceNumber}&ud={userData}

    Http Method: Get

    Parameters:

    Name Type Required Description
    token string yes User’s encrypted and encoded session token.
    sequenceName string yes The name of the requested sequence.
    replacementSequencePrefix string no New prefix for the sequence. Free text.
    replacementSequenceNumber string no Initializing the number of the sequence (The next call to the method will return this number).
    isLock bool no Enables to lock the sequence (Can’t get new sequence until releasing – will throw an exception).
    userData string no User Data – free text.

     

    Response:

    Type: Json Formatted String

    Response status – ok or failed

    Response Example

    {

    “ResponseStatus”: “OK”,

    “ResponseData”: “TEST_10”,

    “UserData”: “My User Data”

    }

    22. ReleaseDocumentSequence:

    Releasing the sequence locking – enables to call GetNextDocumentSequenceValue again

    Request:

    ReleaseDocumentSequence?t={token}&ud={userData}

    Http Method: Post

    Parameters:

    Name Type Required Description
    token string yes User’s encrypted and encoded session token.
    sequenceName string yes The name for the sequence. Unique in the tenant level.
    replacementSequencePrefix string no New prefix for the sequence. Free text.
    replacementSequenceNumber int no Initializing the number of the sequence (The next call to the method will return this number).
    userData string no User Data – free text.

    Body Example:

    {

    “sequenceName”: “MySeqFile1”,

    “replacementSequencePrefix”: “TEST2_”,

    “replacementSequenceNumber”: “50”

    }

    Response:

    Type: Json Formatted String

    Response status – ok or failed

    Response Example

    {

    “ResponseStatus”: “OK”,

    “UserData”: “My User Data”

    }

    23. GetAllDocumentSequencesInfo:

    Get collection of all the sequences info for the current tenant.

    Request:

    GetAllDocumentSequencesInfo?t={token}&ud={userData}

    Http Method: Get

    Parameters:

    Name Type Required Description
    token string yes User’s encrypted and encoded session token.
    userData string no User Data – free text.

    Response:

    Type: Json Formatted String

    Response status – ok or failed

    Response Example

    {    “ResponseData”: {

    “RESULTS”: {

    “Object 0”: {

    “DOCUMENT_SEQ_META”: {

    “TENANT_ID”: “3”,

    “FAMILY_ID”: “100707”,

    “OBJECT_ID”: “b55510ec-0066-4f70-8e56-1a0966b379e1”,

    “NAME”: “MySeqFile1”,

    “PREFIX”: “AMIR_”,

    “IS_LOCKED”: “False”,

    }

    },

    “Object 1”: {

    “DOCUMENT_SEQ_META”: {

    “TENANT_ID”: “3”,

    “FAMILY_ID”: “100707”,

    “OBJECT_ID”: “96c0ff8b-f0d6-4e69-bae2-1e0a53b01adf”,

    “NAME”: “MySeqFile2”,

    “PREFIX”: “AMIR_”,

    “IS_LOCKED”: “False”,

    }

    }

    },        “INFO”: {            “TOTAL_PAGES”: 2

    }

    },

    “ResponseStatus”: “OK”,

    “UserData”: “uuuuddd”

    }

    24. GetParticipantPermissionsForObject:

    Get Participant (user/group) Permissions For Object (file/folder).

    Request:

    GetParticipantPermissionsForObject?t={token}&oid={objectId}&ofc={objectFamilyCode}&pid={participantId}&ud={userData}”

    Http Method: Get

    Parameters:

    Name

    Type

    Required

    Description

    token

    string

    yes

    User’s encrypted and encoded session token.

    objectId

    guid

    yes

    The Id of the document/folder.

    objectFamilyCode

    string

    yes

    GENERAL/ BASE_FOLDER

    participantId

    guid

    yes

    The Id of the user/group.

    userData

    string

    no

    User Data – free text.

    Response:

    Type: Json Formatted String

    Response Example

    {

        ResponseData“: {

            “ALLOW_OWNER”: “False”,

            “ALLOW_VIEW”: “True”,

            “ALLOW_EDIT”: “False”,

            “ALLOW_SHARE_F”: “True”,

            “ALLOW_DELETE”: “False”,

            “ALLOW_UPLOAD_F”: “False”,

            “ALLOW_VIEW_CONTENT_F”: “False”,

            “ALLOW_DOWNLOAD”: “True”,

            “ALLOW_UPDATE_VERSIONS”: “False”,

            “SHARE_EXPDATE”: “29/03/2018 00:00:00”

        },

        ResponseStatus“: “OK”,

        UserData“: “My User Data”

    }

    25. GetCurrentSequenceNumber:

    This function retrieves the raw sequence number without the prefix used.

    Http Method: Get

    GetCurrentDocumentSequenceNumber?t=MSm2dDAVJE0PyDFjo8HaCKP%2BI63lpJHjQDY00Xrx%2F6dtH2tfX2wv7qIlPMDA5dJLA%2BVp4mGlzb1pq9OFCXn25Emz2wMOtrMKkCDUP%2BK76Q4r%2BobJcQ%2BETdE8mC9rd6%2FW1ZPqevcf59cXmNtCxfkAuaQQIRQB0fiAUgOtEkipEFc%3D&sn=MySequence

    Parameters:

    Name

    Type

    Required

    Description

    token

    string

    yes

    User’s encrypted and encoded session token.

    sn

    string

    yes

    Sequence Name

    userData

    string

    no

    User Data – free text.

    Note: You can’t use CURRVAL until you have used NEXTVAL at least once

    Response:

    Type: Json Formatted String

    Response Example

    {

    “ResponseStatus”: “OK”,

    “ResponseData”: “1”,

    “UserData”: null

    }

    26. RemoveDocumentSequence :

    This function removes the sequence from Kenesto.

    Http Method: POST

    RemoveDocumentSequence?t=MSm2dDAVJE0PyDFjo8HaCKP%2BI63lpJHjQDY00Xrx%2F6dtH2tfX2wv7qIlPMDA5dJLA%2BVp4mGlzb1pq9OFCXn25Emz2wMOtrMKkCDUP%2BK76Q4r%2BobJcQ%2BETdE8mC9rd6%2FW1ZPqevcf59cXmNtCxfkAuaQQIRQB0fiAUgOtEkipEFc%3D

    Parameters:

    Name

    Type

    Required

    Description

    token

    string

    yes

    User’s encrypted and encoded session token.

    sn

    JSON

    yes

    Sequence Name

    userData

    string

    no

    User Data – free text.

    Response:

    Type: Json Formatted String

    Response Example

    {

    “ResponseStatus”: “OK”,

    “UserData”: null

    }

    27. RetrieveDocumentHistory :

    Retrieves the requested document history records

    Http Method: Get

    RetrieveDocumentHistory?t={token}&dId={documentId}&ud={userData}

    Parameters:

    Name Type Required Description
    did guid yes Document ID
    ud string no User data – free text
    URL Example

    https://stage-app.kenesto.com/Kenesto.Web.API/KDocuments.svc/RetrieveDocumentHistory?t={token}&dId={documentId}&ud={userData}

    Response:

    Type: Json Formatted String

    Response Example

    {

    “ResponseData”:{

    “UPDATE_HISTORY”:[

    {

    “Date”:”2018-08-02T11:26:59.5354420Z”,

    “User”:”Scott Supplier”,

    “Event”:”Create”,

    “Value”:”145275T004_MODEL_SOLIDS”

    },

    {

    “Date”:”2018-08-02T11:27:03.2901610Z”,

    “User”:”Scott Supplier”,

    “Event”:”Modify”,

    “Value”:”Attribute: File Size; Old Value: 18726; New Value: 18038″

    }

    ],

    “VIEW_HISTORY”:[

    {

    “Date”:”2018-08-02T11:27:29.2513740Z”,

    “User”:”Scott Supplier”,

    “Event”:”View”,

    “Value”:”View: Document; Type: General, Name: 145275T004_MODEL_SOLIDS”

    },

    {

    “Date”:”2018-08-02T11:28:18.0218380Z”,

    “User”:”Scott Supplier”,

    “Event”:”Local Copy”,

    “Value”:”Download: Document; Type: General, Name: 145275T004_MODEL_SOLIDS.asm ”

    }

    ]},

    “ResponseStatus”:”OK”,

    “UserData”:null

    }

    28. SetCurrentFileVersion :

    Set current version of a document

    Stream SetCurrentFileVersion(string token, Guid fileId, string userData = null);

    Http Method: Post

    SetCurrentFileVersion?t={token}&ud={userData}

    Parameters:

    Name Type Required Description
    fileId guid yes  The file Id
    ud string no User data – free text
    URL Example

    https://stage-app.kenesto.com/Kenesto.Web.API/KDocuments.svc/SetCurrentFileVersion?t={token}&ud={userData}

    JSON Request Body

    {   “fileId”:”6692d550-2583-4f2e-b918-45e0df168368″    }

    Response:

    Type: Json Formatted String

    Response Example

    Response status – OK or Failed

    {“ResponseStatus”:”OK”,”UserData”:null}

    Need more help with Kenesto?

    Contact Support

    • This field is for validation purposes and should be left unchanged.