How do I create or modify content with a file attachment using the Knowledge Advanced REST API?
Knowledge Advanced REST API
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"),