# Export Knowledge ## Overview 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. ## Permission * Only a client application can invoke this API. ## License * This API requires a site license (SKU: EG-CL-RTKA-PT). Endpoint: POST /content/export Security: oAuthClient ## Header parameters: - `Accept-Language` (string, required) The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses). Enum: "en-US", "es-ES", "fr-FR", "it-IT", "de-DE", "nl-NL", "pt-BR", "pt-PT", "da-DK", "ru-RU", "fr-CA", "zh-CN", "ja-JP", "ko-KR", "sv-SE" ## Request fields (application/json): - `articleCategories` (string) Category of articles to return. If all is selected, it includes both browsable and searchable articles. Enum: "searchable", "all" - `portalID` (string, required) 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. Example: "PROD-1000" - `language` (object, required) The Knowledge Base language in which the content is created. - `language.code` (string, required) The code of the language. Enum: "en-US", "fr-FR", "en-GB", "es-ES", "it-IT", "nl-NL", "da-DA", "sv-SE", "pt-PT", "fi-FI", "no-NB", "no-NN", "ja-JA", "de-DE", "pt-BR", "zh-CN", "zh-TW", "ko-KO", "ru-RU", "el-EL", "tr-TR", "pl-PL", "cs-CS", "sk-SK", "hu-HU", "sr-SR", "ar-SA", "hr-HR", "ro-RO", "th-TH", "de-AT", "vi-VN", "id-ID", "ms-MY", "fil-PH", "fr-CA", "hi-IN", "uk-UA", "bg-BG", "sl-SI", "xx-XX" - `exportUnpublishedOnly` (boolean) 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. - `resourceTypes` (array, required) 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 Resource Type Attributes 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 Resource Type Attributes | 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. ##### Article Resource Type Attributes Export article's attributes returned are aligned with the response of the [Get Article By ID with Editions](../article/getarticlebyidwitheditions) API. Enum: "articles", "topics", "portals", "all" - `dataDestination` (object, required) - `dataDestination.destinationType` (string, required) Type of data destination Enum: "AWS S3 bucket", "SFTP server" - `dataDestination.path` (string, required) Path of the data destination. For S3 bucket, it can be root or a folder. For SFTP, it can be target directory on the server. Examples: * For S3: "s3://amzn-s3-demo-bucket/mydeptfolder" * For SFTP: "exports/mydeptfolder" Example: "s3://amzn-s3-demo-bucket/mydeptfolder" - `dataDestination.sftpDetails` (object) - `dataDestination.sftpDetails.username` (string, required) Example: "rtka-user" - `dataDestination.sftpDetails.password` (string) Example: "xyz1234" - `dataDestination.sftpDetails.host` (string, required) The hostname of the SFTP server Example: "sftp.yourcompany.com" - `dataDestination.sftpDetails.port` (integer) The server port number - `dataDestination.s3Details` (object) - `dataDestination.s3Details.region` (string, required) Region of the data destination Example: "us-west-2" - `dataDestination.s3Details.accessKey` (string, required) Example: "s3-access-key" - `dataDestination.s3Details.secretKey` (string, required) Example: "s3-access-secret" ## Response 400 fields (application/json): - `code` (string, required) A string that follows the pattern {integer}-{integer}. The first {integer} is the http status code. This code as a whole is unique. * For example, error codes "400-101" and "404-101" are distinctly different. - `developerMessage` (string, required) A summary of the error. - `details` (array) - `details.key` (string, required) - `details.value` (string) - `userMessage` (string) UI friendly messages are only supported by some APIs. The client must explicitly request UI friendly messages by passing the X-egain-error-message=yes* header. ## Response 401 fields (application/json): - `code` (string, required) A string that follows the pattern {integer}-{integer}. The first {integer} is the http status code. This code as a whole is unique. * For example, error codes "400-101" and "404-101" are distinctly different. - `developerMessage` (string, required) A summary of the error. - `details` (array) - `details.key` (string, required) - `details.value` (string) - `userMessage` (string) UI friendly messages are only supported by some APIs. The client must explicitly request UI friendly messages by passing the X-egain-error-message=yes* header. ## Response 403 fields (application/json): - `code` (string, required) A string that follows the pattern {integer}-{integer}. The first {integer} is the http status code. This code as a whole is unique. * For example, error codes "400-101" and "404-101" are distinctly different. - `developerMessage` (string, required) A summary of the error. - `details` (array) - `details.key` (string, required) - `details.value` (string) - `userMessage` (string) UI friendly messages are only supported by some APIs. The client must explicitly request UI friendly messages by passing the X-egain-error-message=yes* header. ## Response 404 fields (application/json): - `code` (string, required) A string that follows the pattern {integer}-{integer}. The first {integer} is the http status code. This code as a whole is unique. * For example, error codes "400-101" and "404-101" are distinctly different. - `developerMessage` (string, required) A summary of the error. - `details` (array) - `details.key` (string, required) - `details.value` (string) - `userMessage` (string) UI friendly messages are only supported by some APIs. The client must explicitly request UI friendly messages by passing the X-egain-error-message=yes* header. ## Response 406 fields (application/json): - `code` (string, required) A string that follows the pattern {integer}-{integer}. The first {integer} is the http status code. This code as a whole is unique. * For example, error codes "400-101" and "404-101" are distinctly different. - `developerMessage` (string, required) A summary of the error. - `details` (array) - `details.key` (string, required) - `details.value` (string) - `userMessage` (string) UI friendly messages are only supported by some APIs. The client must explicitly request UI friendly messages by passing the X-egain-error-message=yes* header. ## Response 500 fields (application/json): - `code` (string, required) A string that follows the pattern {integer}-{integer}. The first {integer} is the http status code. This code as a whole is unique. * For example, error codes "400-101" and "404-101" are distinctly different. - `developerMessage` (string, required) A summary of the error. - `details` (array) - `details.key` (string, required) - `details.value` (string) - `userMessage` (string) UI friendly messages are only supported by some APIs. The client must explicitly request UI friendly messages by passing the X-egain-error-message=yes* header. ## Response 202 fields