Skip Navigation
Expand
Knowledge Advanced REST API -- Modifying content with file attachments
Answer ID 8616   |   Last Review Date 03/18/2019

How do I create or modify content with a file attachment using the Knowledge Advanced REST API?

Environment:

Knowledge Advanced REST API

Resolution:

The Knowledge Advanced REST API supports creating and modifying articles with file attachments. There needs to be a properly privileged console user, an API user and a content type with a file in the schema. All requests to the REST API have to be 'multipart/form-data'.

Form Data Details

  • "contentBO" is the form name of the payload for creation and modifying articles.
  • "translateContent" is the form name of the payload for translation of articles.
  • "filesToUpload" is the form name for file attachments.
  • JSON requests do not use the CompositeContent as the base key. XML requests do.
  • Form data payloads need to explicitly declare 'application/json' or 'application/xml'.
    • e.g. PHP: curl_file_create(<filename>, "application/xml"),

Example Files

ExampleContentPOSTWithAttachments (docx)
ExampleContentTranslateWithAttachments (docx)


Online Documentation

REST API for Oracle Service Cloud Knowledge Advanced

Available Languages for this Answer:

Notify Me
The page will refresh upon submission. Any pending input will be lost.