Topics Map > API Documentation

KB User's Guide - API - Article Helpfulness

This document provides information in the Article Helpfulness (e.g. the up-vote/ or down-vote) API for the KnowledgeBase. The last segment of the endpoint URL is a unique ID, for which the API client is responsible. More specifically, the software/program that makes the API request needs to supply a unique ID, such as a UUID.

Title

Article Helpfulness

Calls externally-published Article Helpfulness content for a specified site domain.

Endpoint

https://[KB site domain]/[subsite (optional)]/api/v1/article-helpfulness

Example: https://kb.wisc.edu/api/v1/article-helpfulness/[uniqueID/UUID] or https://kb.wisc.edu/helpdesk/api/v1/article-helpfulness/[uniqueID/UUID]

** APIs are not enabled for institution subsites unless specifically requested. Please contact the KB team if you would like to request an API for your subsite(s).

Method

PUT

Input/ Payload

Note: All values are required.

name example notes
id 7e346349-a89a-4388-ac45-b1c12d3b8fbe Required
vote -1
Required
articleId 53422 Required
user
bbadger@wisc.edu
Optional, defaults to null
site
external
Optional, defaults to null
siteGroupID
1
Required

Sample Input



Example payload for up-vote:

{
"vote": 1,
"articleId": 53422,
"user": "bbadger@wisc.edu",
"site": "external",
"siteGroupId": 1
}

Example payload for down-vote:

{
"vote": -1,
"articleId": 53422,
"user": "bbdager@wisc.edu",
"site": "external",
"siteGroupId": 1
}

Output/ Response

Note: All values are required.

name examples notes
id 7e346349-a89a-4388-ac45-b1c12d3b8fbe Required
vote -1
Required
articleId 53422 Required
user
bbadger@wisc.edu
Optional, defaults to null
userIP
129.104.19.80
Generally comes through as the client IP but can vary depending on network configuration.
site
external
Optional, defaults to null
siteGroupId
1
Required
timestamp
2018-10-30 15:34:39
?

Sample Output

{
    "id": "7e346349-a89a-4388-ac45-b1c12d3b8fbe",
    "vote": 1,
    "articleId": 53422,
    "user": "wwang4@wisc.edu",
    "userIp": "128.104.19.80",
    "site": "external",
    "siteGroupId": 1,
    "timeStamp": "2018-10-30 15:34:39",
    "_links": {
        "self": {
            "href": "https://kb.wisc.edu/api/v1/article-helpfulness/7e346349-a89a-4388-ac45-b1c12d3b8fbe"
        }
    }
}

Success Response

Code: 200 OK
Content: Content-type: application/hal+json

Error Response

Code: 404 Page Not Found
Content: { error : "Page not found." }

OR

Code: 405 Method Not Allowed
Content: { error : None }

Notes

  Caller to generate a unique ID or a UUID (Universally Unique ID) to prevent duplicates. User IP should generally come thru as the client IP. This can vary depending on network configuration.




Keywordsrestapi method url data params parameters success errors responses sample calls notes service   Doc ID87337
OwnerLeah S.GroupKB User's Guide
Created2018-10-30 09:45:40Updated2021-06-01 12:18:58
SitesKB User's Guide
Feedback  0   0