Using recommendation APIs
Pega Knowledge Buddy™ provides two REST APIs that allow external systems to fetch and manage content recommendations. Organizations that store content in external systems, such as SharePoint, can use these APIs to integrate Knowledge Buddy recommendations into their own content management workflows.
Fetching recommendations
Use the POST /recommendations endpoint to retrieve content recommendations for a specific piece of content. The API uses the objectId and collection values to identify the content and returns the related recommendation tasks.
Endpoint: POST /recommendations
Request body:
{
"objectId": "string",
"collection": "string"
}
| Parameter | Type | Description | Required |
|---|---|---|---|
|
objectId |
String |
The unique identifier of the content item. |
Yes |
|
collection |
String |
The content collection that the item belongs to. |
Yes |
Response:
{
"results": [
{
"taskID": "string",
"taskDetails": "string",
"taskTitle": "string"
}
]
}
| Field | Type | Description |
|---|---|---|
|
taskID |
String |
The unique identifier of the recommendation task. |
|
taskDetails |
String |
Detailed description of the recommendation task. |
|
taskTitle |
String |
The title of the recommendation task. |
Updating a recommendation
Use the PATCH /recommendations/{ID} endpoint to update the status of an existing recommendation. The allowed status values are Completed and Rejected.
Endpoint: PATCH /recommendations/{ID}
Path parameter:
| Parameter | Location | Description |
|---|---|---|
|
ID |
Path |
The unique identifier of the recommendation to update. |
Request body:
{
"action": "string",
"notes": "string"
}
| Field | Type | Description | Required |
|---|---|---|---|
|
action |
String |
The new status of the recommendation. Allowed values: Completed, Rejected. |
Yes |
|
notes |
String |
Additional commentary about the status update. |
No |
This Topic is available in the following Module:
Want to help us improve this content?