List Knowledge Base Articles
GET /articles - List Knowledge Base Articles
Retrieve a list of all articles in the knowledge base with basic information including their content versions. This endpoint is useful for synchronization, validation, and getting an overview of your knowledge base content.
Endpoint
GET /v1/knowledgebase/articlesRequest Headers
Header | Value | Required |
|---|---|---|
|
| Yes |
Request Parameters
Query Parameters
Parameter | Type | Required | Description |
|---|---|---|---|
|
| No | Filter articles by category correlation ID. Use |
Examples
- All articles:
GET /articles - Articles in specific category:
GET /articles?correlationCategoryId=tutorials - Root articles (no category):
GET /articles?correlationCategoryId=null
Response Format
Success Response (200 OK)
{
"articles": [
{
"id": "123",
"correlationId": "getting-started-001",
"lastModified": "2024-01-15T10:30:00Z",
"categoryId": 456,
"isPrivate": false,
"isHidden": false,
"isFeatured": true,
"featuredOrder": 1,
"order": 5,
"version": "v1",
"alternateSlugs": "{\"en\":[\"getting-started\",\"start-guide\"]}",
"contents": [
{
"id": "789",
"correlationId": "content-en-001",
"lang": "en",
"published": true,
"lastModified": "2024-01-15T10:30:00Z"
},
{
"id": "790",
"correlationId": "content-es-001",
"lang": "es",
"published": false,
"lastModified": "2024-01-14T15:20:00Z"
}
]
}
]
}Response Fields
Article Object
Field | Type | Description | Example |
|---|---|---|---|
|
| Internal database ID of the article |
|
|
| Custom correlation ID (if set) |
|
|
| ISO 8601 timestamp of last modification |
|
|
| ID of the category (null if no category) |
|
|
| Whether article is private |
|
|
| Whether article is hidden from navigation |
|
|
| Whether article is featured |
|
|
| Display order for featured articles |
|
|
| Display order within category |
|
|
| Article format version |
|
|
| JSON string of alternate slugs by language |
|
|
| Array of content versions | See Content Object below |
Content Object (contents[])
Field | Type | Description | Example |
|---|---|---|---|
|
| Internal database ID of the content |
|
|
| Custom correlation ID for content (if set) |
|
|
| Language code (ISO 639-1) |
|
|
| Whether this content version is published |
|
|
| ISO 8601 timestamp of last modification |
|
Examples
Example 1: Get All Articles
curl -X GET "https://api.productfruits.com/v1/knowledgebase/articles" \
-H "Authorization: Bearer YOUR_API_TOKEN"Example 2: Get Articles in Specific Category
curl -X GET "https://api.productfruits.com/v1/knowledgebase/articles?correlationCategoryId=tutorials" \
-H "Authorization: Bearer YOUR_API_TOKEN"Example 3: Get Root Articles (No Category)
curl -X GET "https://api.productfruits.com/v1/knowledgebase/articles?correlationCategoryId=null" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response:
{
"articles": [
{
"id": "1",
"correlationId": "getting-started",
"lastModified": "2024-01-15T10:30:00Z",
"categoryId": 1,
"isPrivate": false,
"isHidden": false,
"isFeatured": true,
"featuredOrder": 1,
"order": 1,
"version": "v1",
"alternateSlugs": null,
"contents": [
{
"id": "1",
"correlationId": "getting-started-en",
"lang": "en",
"published": true,
"lastModified": "2024-01-15T10:30:00Z"
}
]
},
{
"id": "2",
"correlationId": "faq",
"lastModified": "2024-01-14T15:20:00Z",
"categoryId": null,
"isPrivate": false,
"isHidden": false,
"isFeatured": false,
"featuredOrder": 0,
"order": 10,
"version": "v1",
"alternateSlugs": "{\"en\":[\"frequently-asked-questions\"]}",
"contents": [
{
"id": "3",
"correlationId": "faq-en",
"lang": "en",
"published": true,
"lastModified": "2024-01-14T15:20:00Z"
},
{
"id": "4",
"correlationId": "faq-es",
"lang": "es",
"published": false,
"lastModified": "2024-01-14T14:00:00Z"
}
]
}
]
}Best Practices
- Use Filtering: Filter by
correlationCategoryIdto get specific content sets - Cache Responses: Store results locally and use
lastModifiedtimestamps for change detection - Monitor Content: Use this endpoint to validate article states before making updates
- Backup Data: Call this endpoint before bulk operations to create snapshots
- Track Languages: Monitor which articles have content in specific languages
Common Use Cases
Content Synchronization
Use this endpoint to compare your local content with the knowledge base:
- Identify articles that need updates based on
lastModifiedtimestamps - Detect missing translations by checking
contentsarrays - Validate correlation IDs before performing imports
Content Audit
Review your knowledge base structure:
- Find articles without categories (
categoryId: null) - Identify unpublished content (
published: false) - Check featured article organization (
isFeatured,featuredOrder)
Migration Planning
Prepare for bulk operations:
- Get all correlation IDs for reference
- Understand current content structure
- Plan category assignments and reorganization
Performance Considerations
- This endpoint returns all articles at once
- Large knowledge bases may have significant response times
- Consider caching responses if calling frequently
- Use
lastModifiedtimestamps to implement incremental synchronization
Error Response Examples
401 Unauthorized
{
"error": "Authentication required or invalid API token"
}500 Internal Server Error
{
"error": "Internal server error occurred while retrieving articles"
}Rate Limiting
For detailed information about API limits and optimization strategies, consult this guide.