KB User's Guide - API - Audiences
This document provides information in the Audiences API for the KnowledgeBase.
Title
Get Audiences
Calls externally-published Audiences for a specified site domain.
Collection Endpoint
https://[KB site domain]/[subsite (optional)]/api/v1/audiences
Example: https://kb.wisc.edu/api/v1/audiences or https://kb.wisc.edu/helpdesk/api/v1/audiences
** 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
GET
URL Params
parameter | type | description |
---|---|---|
showAllAttributes | integer | set value to 1 to display more attributes in output |
Collection Sample Response
{
"_links": {
"self": {
"href": "https://kb.wisc.edu/demo/api/v1/audiences?showAllAttributes=&page=1"
},
"first": {
"href": "https://kb.wisc.edu/demo/api/v1/audiences?showAllAttributes="
},
"last": {
"href": "https://kb.wisc.edu/demo/api/v1/audiences?showAllAttributes=&page=1"
}
},
"_embedded": {
"audiences": [
...
{
"audId": "219",
"audName": "2017 Conference Speakers"
},
{
"audId": "220",
"audName": "Data Analysts"
}
]
},
"page_count": 1,
"page_size": 25,
"total_items": 7,
"page": 1
}
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 }