Topics Map > Advanced HTML
Topics Map > API Documentation
KB User's Guide - API - Featured Articles
This document provides information in the Featured Articles API for the KnowledgeBase.
Title
Featured Articles
Calls externally-published list of featured document content for the specified site domain.
Collection Endpoint
[KB site domain]/api/v1/featured-articles
Method
URL Params
parameter | type | description |
---|---|---|
ids | integer | one or more comma-delimited article ID numbers Note: this parameter will override any articles that were specified using this method: KB User's Guide - API - Setting Featured Articles via the KB Admin Tools |
Collection Sample Response
{ "_links": { "self": { "href": "https://kb.wisc.edu/demo/api/v1/featured-articles?ids=14,74268&page=1" }, "first": { "href": "https://kb.wisc.edu/demo/api/v1/featured-articles?ids=14,74268" }, "last": { "href": "https://kb.wisc.edu/demo/api/v1/featured-articles?ids=14,74268&page=1" } }, "_embedded": { "featured_article": [ { "id": "14", "title": "KnowledgeBase Search Tips", "keywords": "KnowledgeBase kb website Search Tips exclusive searching query cross type cross topic", "summary": "This document gives an overview of how to effectively use the Search function of your KnowledgeBase.", "updated": "2017-04-12 20:03:17", "created": "2000-07-19 00:00:00", "reviewed": "2017-07-26 19:52:04", "activation": "2006-05-02 00:00:00", "expiration": "2017-09-04 19:52:04", "searchPriority": "3", "_links": { "self": { "href": "https://kb.wisc.edu/demo/api/v1/featured-articles/14" } } }, { "id": "74268", "title": "KB Demo - Embedded Content Examples", "keywords": "embedded excel spreadsheet workbook sheets attachment .xlsx .xls box widget", "summary": "This document contains examples of embedded content in a KB doc.", "updated": "2017-06-23 04:00:37", "created": "2017-06-22 21:53:21", "reviewed": "2017-06-23 04:00:37", "activation": "2017-06-22 16:51:32", "expiration": "2021-06-22 16:51:32", "searchPriority": "3", "_links": { "self": { "href": "https://kb.wisc.edu/demo/api/v1/featured-articles/74268" } } } ] }, "page_count": 1, "page_size": 25, "total_items": 2, "page": 1 }
Entity Endpoint
/api/v1/featured-articles/[doc_id]
Example: /api/v1/featured-articles/75344
Entity Sample Response
{ "id": "74268", "title": "KB Demo - Embedded Content Examples", "keywords": "embedded excel spreadsheet workbook sheets attachment .xlsx .xls box widget", "header": null, "alert": null, "summary": "This document contains examples of embedded content in a KB doc.", "body": "<h4>Excel Document\r\n\r\n<iframe src="\"/images/group40/74268/HelpDeskTrainingDocs.htm\"" width="\"800\"" height="\"400\"">\r\n\r\n<h4>Box Embed\r\n\r\n<iframe src="\"https://app.box.com/embed/preview/x9vcp3c84n5jp5ntwo4z0ofxts49zc8y?theme=dark\"" allowfullscreen="\"\"" webkitallowfullscreen="\"\"" msallowfullscreen="\"\"" width="\"700\"" height="\"500\"" frameborder="\"0\"">\r\n\r\n<h4>Google Docs\r\n\r\n<iframe src="\"https://docs.google.com/document/d/1ECZkH8Ez05eFJJ2QeOp_uK2Tx_SgDIBKdxfPH-cZBxo/pub?embedded=true\"" width="\"700\"" height="\"500\"">", "footer": null, "owner": "Leah S.", "updater": "Leah S.", "created": "2017-06-22 21:53:21", "updated": "2017-06-23 04:00:37", "reviewed": "2017-06-23 04:00:37", "activation": "2017-06-22 16:51:32", "expiration": "2021-06-22 16:51:32", "ownerGroup": "KB Demo", "_links": { "self": { "href": "https://kb.wisc.edu/demo/api/v1/featured-articles/74268" } } }
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" }