Topics Map > Advanced HTML
Topics Map > API Documentation
KB User's Guide - API - Articles
Title
Get External Documents
Calls externally-published document content for the specified site domain.
Collection Endpoint
https://[KB site domain]/[subsite (optional)]/api/v2/articles
Example: https://kb.wisc.edu/api/v2/articles or https://kb.wisc.edu/helpdesk/api/v2/articles
Method
URL Parameters
Note: When making a call with parameters, you may need to include an extra slash between the collection and the parameters, e.g. https://kb.wisc.edu/api/v2/articles/?cat=1234. You may encounter a CORS error if the slash before the question mark is missing.
All URL parameters are optional.
parameter | type | description |
---|---|---|
q | text string | One or more search terms, separated by a plus sign (+) |
cat | integer | ID number of an active topic |
aud | integer | ID number of an active audience |
sort | integer |
If both sort and query are undefined, results will be sorted first by search priority, then by updated date (descending). If query is supplied but sort is undefined, results will be sorted first by search priority, then by title match (descending), keywords match (descending), and summary match (descending). This default sort order for queries is referred to as "relevance". 1 = sort by id, ascending |
mode | integer | 0 or undefined = Title + Keywords search (default) 1 = Fulltext search 2 = Attachments search 3 = Title + Keywords + Attachments search 4 = Fulltext + Attachments search 5 = Title only search 6 = Keywords only search |
size | integer |
The number of results you would like to return per page (defaults to 25) |
page | integer |
Specifies the page for responses where the number of results exceed the "size" parameter, i.e. controls pagination. |
Collection Sample Response
{ "query_time": "2.5140779018402 seconds", "semantic_search": "Off", "total_items": 14521, "page_count": 581, "page_size": 25, "page_current": 1, "_links": { "self": { "href": "https://kb.wisc.edu/api/v2/articles/" }, "first": { "href": "https://kb.wisc.edu/api/v2/articles/?page=1" }, "last": { "href": "https://kb.wisc.edu/api/v2/articles/?page=581" }, "next": { "href": "https://kb.wisc.edu/api/v2/articles/?page=2" } }, "_embedded": { "article": [ { "id": 118538, "title": "Student Information System (SIS)", "keywords": "25Live, add, change, course (courses, class), course search and enroll, dars (DARS), degree (degrees, degree planner), drop, gpa (GPA), hold, honors, indicators, name, permission, plan (plans, planner), record (records), requisite (prerequisite), schedule (scheduler), sis (SIS), swap, textbook (textbooks), transcript, transfer, wait (waitlist, wait list), withdraw (withdrawal)", "summary": "View this Table of Contents for supplemental training and reference materials that will help you use the Student Information System (SIS). Training must be completed via Canvas courses. Additionally, you must have access to SIS to complete the tasks outlined in the documents below. Please see the <a href=\"https://registrar.wisc.edu/sis/\"> Office of the Registrar SIS webpage </a> for more information on requesting access.", "created": "2022-05-13 08:32:03", "updated": "2024-05-14 12:29:46", "reviewed": "2024-05-14 12:29:46", "activation": "2022-05-13 08:32:03", "expiration": "3000-01-01 00:00:00", "searchPriority": 1, "instAccess": 0, "type": 1, "ownerGroup": "Office of the Registrar", "ownerGroupId": 208, "viewsCumulative": 10157, "viewsThisWeek": 27, "isAttachment": 0, "pageUrl": "https://kb.wisc.edu/118538", "_links": { "self": { "href": "https://kb.wisc.edu/api/v2/articles/118538" } } }, { "id": 1, "title": "Get Help from DoIT", "keywords": "DoIT help desk mission statement support policies statistics stats employment jobs satellite service desk hours operation walk in chat email walkin walk-in wihd dayton computer sciences comp sci hslc east campus mall up contacting us more information HD sd online helponline \"Level 2\" HDL2 techstore tech store bucky bot wiscit cherwell east HDL2 HD \"Help Desk\" remote remotely resources resource", "summary": "The DoIT Help Desk provides support to students, faculty, and staff at UW-Madison on general computing issues and various UW applications. The Help Desk provides remote support via phone, email, and live chat.", "created": "2000-07-12 19:00:00", "updated": "2024-05-14 00:00:01", "reviewed": "2024-05-14 00:00:01", "activation": "2024-05-14 00:00:00", "expiration": "3000-01-01 00:00:00", "searchPriority": 1, "instAccess": 0, "type": 1, "ownerGroup": "DoIT Help Desk", "ownerGroupId": 1, "viewsCumulative": 1351430, "viewsThisWeek": 118, "isAttachment": 0, "pageUrl": "https://kb.wisc.edu/1", "_links": { "self": { "href": "https://kb.wisc.edu/api/v2/articles/1" } } }, ... } ] } }
Entity Endpoint
/api/v2/articles/[doc_id]
Example: /api/v2/articles/7990
URL Params
Note: All URL params are optional.
parameter | type | description |
---|---|---|
doms | text string | allows consumer to specify the desired dom to be displayed in the response output |
Entity Sample Response
{ "id": 13905, "title": "What is the KnowledgeBase?", "keywords": "Knowledge base management kms document information core tenets philosophies preserve share collaborate improve content types pros advantages", "summary": "The KnowledgeBase is a system for documenting and maintaining information for your staff and customers. The KnowledgeBase is made up of many documents containing a wide variety of information. ", "body": "<style type=\"text/css\"> \r\n div.special {}\r\n .special h4{margin-top:0px; margin-bottom:1px;}\r\n .special h4.red{color:#CD9B9B; font-weight:bold;}\r\n .special h4.right{align:right;}\r\n .special p{margin-top:0px; margin-bottom:0px;}\r\n .special ul{margin-top:0px; margin-bottom:1px;}\r\n .special td{padding:10px;}\r\n</style>\r\n<div class=\"special\">\r\n<br />\r\n<h4>Manage Your Knowledge<br /><br /></h4>\r\n<p>The KnowledgeBase allows you to preserve, share, collaborate, and improve. </p>\r\n<br />\r\n \r\n<table cellpadding=\"10\" width=\"400\">\r\n \r\n<tbody>\r\n<tr>\r\n \t\r\n<td style=\"background-color:#7198ca;\" valign=\"top\" align=\"left\">\r\n<h4>Preserve</h4>Document the knowledge essential to your operations.</td>\r\n \r\n<td style=\"background-color:#eeeeee;\" valign=\"top\" align=\"left\">\r\n<h4 class=\"right\">Share</h4>Each partner site can share documentation with other partner sites.</td>\r\n </tr>\r\n \r\n<tr>\r\n \t\r\n<td style=\"background-color:#eeeeee;\" valign=\"top\" align=\"left\">\r\n<h4>Collaborate</h4><span style=\"color:#505050\">Work with authors, partners, and your customers to improve your documentation.</span></td>\r\n \r\n<td style=\"background-color:#7198ca;\" valign=\"top\" align=\"left\">\r\n<h4>Improve</h4>Once you have captured your knowledge, you can begin to improve your processes.</td>\r\n </tr>\r\n \r\n </tbody></table><br />\r\n \r\n<br />\r\n<h4 style=\"color:#7198ca;\">Some examples of the type of information a KnowledgeBase document could contain are:</h4>\r\n<ul>\r\n<li>Employee policies</li>\r\n<li>Administrative procedures</li>\r\n<li>Technical Information</li>\r\n<li>Customer Information</li>\r\n</ul>\r\n\r\n<br />\r\n<h4 style=\"color:#7198ca;\">The KnowledgeBase can help you:</h4> \r\n<ul>\r\n<li>Communicate information to customers</li>\r\n<li>Consolidate scattered content</li>\r\n<li>Reduce training time for new staff</li>\r\n<li>Reduce redundancy by using shared content</li>\r\n<li>Prevent knowledge loss</li>\r\n</ul>\r\n\r\n<br />\r\n<h4 style=\"color:#7198ca;\">How does it work?</h4> \r\n<ul>\r\n<li>The KnowledgeBase is a web-based tool for managing your knowledge</li>\r\n<li>Each partner site has ability to control access to their content</li>\r\n<li>Document authors are automatically notified of aging documentation, which helps to keep content fresh</li>\r\n<li>Readers can submit vital feedback on your documentation</li>\r\n</ul>\r\n<div><br /></div>\r\n</div>", "owner": "Leah S.", "updater": "Leah S.", "created": "2010-04-28 00:00:00", "updated": "2022-07-06 18:08:16", "reviewed": "2024-02-14 20:56:43", "activation": "2010-04-28 00:00:00", "expiration": "2024-08-12 00:00:00", "ownerGroup": "KB User's Guide", "ownerGroupId": 41, "ownerInstId": 1, "searchPriority": 3, "instAccess": 0, "blog": 0, "slug": "", "disableFeedback": false, "pageUrl": "https://kb.wisc.edu/13905" }
Success Response
Code: 200 OK
Content: Content-type: application/hal+json
Error Response
Code: 403 Forbidden
Content: {"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html","title":"Forbidden","status":403,"detail":"Forbidden"}
OR
Code: 404 Page Not Found
Content: Page not found.
OR
Code: 405 Method Not Allowed
Content: None
OR
Code: 500 Unexpected error
Content: { error : "Error producing an iterator" }
Notes
Single string parameter query search for "accounting" in the articles of the Help Desk.
https://kb.wisc.edu/helpdesk/api/v2/articles/?q=accounting
Multiple string parameter query search for "semantic" in the articles of the Help Desk.
https://kb.wisc.edu/helpdesk/api/v2/articles/?q=semantic+database