The Content Export API initiates a bulk export of the Knowledge Hub to a client-provided Amazon S3 bucket or SFTP server path. It returns a URL with a Job ID to enable tracking the status of this asynchronous operation.
Each export job can send multiple JSON files, depending on the total number of items to process. More than one bulk export can take place, as needed, one per portal.
- Only a client application can invoke this API.
- This API requires a site license (SKU: EG-CL-RTKA-PT).
Category of articles to return. If all is selected, it includes both browsable and searchable articles.
The ID of the portal being accessed.
A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
Determines which article version to export. If true, the latest unpublished version will be exported for each article where available, and articles that do not have an unpublished version will be omitted from the export. If this property is false or omitted, the latest published version will be exported for each article where available. Each request exports either all published or all unpublished article versions in a portal; never both.
Types of Knowledge Hub resources to export. Use 'all' to specify all resource types at once.
Below are the attributes that are returned for each resource type specified.
| Portal Attribute Name | Description |
|---|---|
| id | The ID of the Portal in Readable format. |
| alternateId | The system-generated ID of the Portal in long format. |
| name | The name of the Portal. |
| description | The Portal's description. |
| departmentId | ID of the department this Portal belongs to. |
| defaultContentLanguageId | The default ID of the language for the portal content. |
| Topic Attribute Name | Description |
|---|---|
| id | The ID of the Topic in Readable form. |
| alternateId | The system-generated ID of the Topic in long form. |
| name | The name of the Topic. |
| departmentId | ID of the department this Topic belongs to. |
| modifiedDate | The date when the Topic was last modified on. |
| topicHomeArticleId | The ID of the Article used as the home page of this Topic. |
| childCount | Total number of children sub-topis below the current Topic. |
| subTopicIds | Array with the list of sub-topics (all levels of the topic hierarchy). |
| parentTopicId | ID of the parent Topic. -1 if it is the root Topic. |
| imageURL | URL of the inline Topic image. |
| customAttributes | One or more comma-separated names for Topic custom attributes defined by the user to be returned. |
Export article's attributes returned are aligned with the response of the Get Article By ID with Editions API.
[ "articles" ]
- Export configuration using an SFTP destination
- Export configuration using an AWS S3 bucket destination
curl -i -X POST \
https://api.egain.cloud/knowledge/portalmgr/v4/content/export \
-H 'Accept-Language: en-US' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"articleCategories": "searchable",
"portalID": "PROD-1000",
"language": {
"code": "en-US"
},
"resourceTypes": [
"articles"
],
"dataDestination": {
"destinationType": "SFTP server",
"path": "exports/mydeptfolder",
"sftpDetails": {
"username": "rtka-user",
"password": "xyz1234",
"host": "sftp.yourcompany.com",
"port": 22
}
}
}'- Small jobs (< 1,000 items): 5-15 minutes
- Medium jobs (1,000-10,000 items): 15-60 minutes
- Large jobs (> 10,000 items): 1-4 hours (depending on content complexity)
No content