GetKBArticles()

Abstract

The GetKBArticles() API function is an XmlHttp function to obtain the list of Knowledge Base (KB) Article folders and Articles that match the criteria entered in the request.  GetKBArticles () must be called after a successful LogonUser() API call in order to obtain the security token.

API Address

https://api.tracker-rms.com/WebAPI/XmlHttpGetKBArticles.aspx

Request Format

The input format XML for this function is as follows:

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <GetKBArticles>
            <UserCredentials>
                <SecurityToken></SecurityToken>
                <Username></Username>
                <Password></Password>
            </UserCredentials>
            <KBFolderId></KBFolderId>
            <Public></Public>
            <SearchText></SearchText>
        </GetKBArticles>
    </WebAPI>
</TrackerRMS>
Parameter Notes
<SecurityToken> This will be the 40 character security token obtained from the LogonUser() function
<Username> The username is typically the email address for the user in the format name@domain.com
<Password> The password will be the same as their web based password and can contain a combination of upper case, lower case and alpha-numeric characters
<KBFolderId> The specific KnowledgeBase folder id if known
<Public> Set this to “Yes” to only return public Articles or “No” to only return non-public Articles.  Leave blank to return all Articles.
<SearchText> This can be used to restrict the KB Articles returned to only those whose name, description or text content contains the search parameters entered.  This can be a full boolean search if required (e.g. AND, OR, and NOT operators)

 Response Format

The function will return the standard RequestStatus section along with the matching KB Articles.

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <RequestStatus>
            <ReturnCode></ReturnCode>
            <ReturnDescription></ReturnDescription>
            <ReturnRecordCount></ReturnRecordCount>
        </RequestStatus>
        <GetKBArticles_Return>
            <KBFolders>
                <KBFolder id=”” public=""></KBFolder>
                ...
            </KBFolders>
            <KBArticles>
                <KBArticle id=”” public="">
                    <KBFolder id=""></KBFolder>
                    <Title></Title>
                    <Description></Description>
                    <ArticleHTML></ArticleHTML>
                    <ArticleText></ArticleText>
                    <Author></Author>
                    <LastUpdated></LastUpdated>
                    <ViewCount></ViewCount>
                </KBArticle>
                ...
            </KBArticles>
        </GetKBArticles_Return>
    </WebAPI>
</TrackerRMS>
Parameter Notes
<KBFolder> (collection) Within the <KBFolder> node is the individual <KBFolder> elements that contain the specific folder ids and names relating to entire Knowledge Base.
<KBArticle> (collection) Within the <KBArticles> node is the individual <KBArticle> elements that contain the specific KB Article information such as title, description, HTML, text author, last updated timestamp, view count and public availability.

Example of a valid return:

In this example below the function returns 2 Articles but all folders are always returned.  CDATA is used for HTML encoded text.

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <RequestStatus>
            <ReturnCode>0</ReturnCode>
            <ReturnDescription>Success</ReturnDescription>
            <ReturnRecordCount>6</ReturnRecordCount>
        </RequestStatus>
        <GetKBArticles_Return>
            <KBFolders>
                <KBFolder id=”1” public="Yes">General Articles</KBFolder>
                <KBFolder id=”2” public="No">Customer Articles</KBFolder>
                <KBFolder id=”3” public="No">Internal Articles</KBFolder>
            </KBFolders>
            <KBArticles>
                <KBArticle id=”1” public="Yes">
                    <KBFolder id="1">General Articles</KBFolder>
                    <Title>Customer Article</Title>
                    <Description>Customer Article Description</Description>
                    <ArticleHTML><![CDATA[...HTML...]]></ArticleHTML>
                    <ArticleText>...Plain Text version of HTML...</ArticleText>
                    <Author>John Doe</Author>
                    <LastUpdated>Aug 31 2014 11:31:34 AM</LastUpdated>
                    <ViewCount>16</ViewCount>
                </KBArticle>
                <KBArticle id=”2” public="No">
                    <KBFolder id="3">Internal Articles</KBFolder>
                    <Title>Internal Articles</Title>
                    <Description>Internal Article Description</Description>
                    <ArticleHTML><![CDATA[...HTML...]]></ArticleHTML>
                    <ArticleText>...Plain Text version of HTML...</ArticleText>
                    <Author>Jane Smith</Author>
                    <LastUpdated>Jun 4 2013 10:27:04 AM</LastUpdated>
                    <ViewCount>346</ViewCount>
                </KBArticle>
            </KBArticles>
        </GetKBArticles_Return>
    </WebAPI>
</TrackerRMS>