Training Data Query API
Purpose
Lists training questions and answers saved for the site. Filter by category, a specific knowledgeId, search term, or page.
URL
Plain Text
https://api.sidetalk.ai/v1/knowledge/dataHTTP method
Plain Text
GETQuery parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| categoryId | String | No | - | Filter by category ID. |
| knowledgeId | String | No | - | Retrieve a specific entry by its training data identifier. Use this value unchanged as knowledgeId in the Answer Generation API. |
| search | String | No | - | Search for a string in the question or answer. |
| page | Integer | No | 1 | The page number. |
| limit | Integer | No | 20 | Items per page, up to 100. |
Example request
Bash
curl "https://api.sidetalk.ai/v1/knowledge/data?categoryId=1&page=1&limit=20" \
-H "Authorization: Bearer ${API_KEY}"Use --data-urlencode only when passing values containing Korean characters, spaces, or special characters, such as search terms.
Bash
curl -G "https://api.sidetalk.ai/v1/knowledge/data" \
-H "Authorization: Bearer ${API_KEY}" \
--data-urlencode "search=배송"Success response (200 OK)
JSON
{
"success": true,
"data": [
{
"site_id": "15",
"categoryId": "1",
"question": "배송 기간이 어떻게 되나요?",
"answer": "결제 후 2~3일 이내에 배송됩니다.",
"referenceUrl": null,
"knowledgeId": "456",
"createdAt": "20241108120639",
"updatedAt": "20241108120639"
}
],
"meta": {
"page": 1,
"limit": 20,
"totalCount": 1,
"totalPages": 1
}
}Response fields
| Field | Type | Description |
|---|---|---|
| success | Boolean | Whether the request succeeded. |
| data | Array | The list of training questions and answers. |
| data.site_id | Integer | The site ID. |
| data.categoryId | Integer | The category ID. |
| data.question | String | The saved question. |
| data.answer | String | The saved answer. |
| data.referenceUrl | String/null | The linked reference URL. |
| data.knowledgeId | Integer | The training data identifier. Pass it as knowledgeId to the Answer Generation API. |
| data.createdAt | String | Creation date and time. |
| data.updatedAt | String | Modification date and time. |
| meta.totalCount | Integer | Total search results. |
| meta.totalPages | Integer | The total number of pages. |
| meta.page | Integer | The current page number. |
| meta.limit | Integer | Items per page. |
Error response
JSON
{
"success": false,
"error": "Failed to fetch knowledge data"
}| Status code | Description |
|---|---|
| 400 | Invalid query parameters. |
| 403 | API key authentication failed. |
| 500 | A server error occurred while retrieving data. |
