To add a new document to a the portal Directory, send a POST request containing the necessary data to the portal URL.
POST http://host/portal/server.pt/api/v1/kd/{FOLDER ID} { "document": { "name": "NAME", "description": "DESCRIPTION", "datasourceid": "DATA SOURCE ID", "contenturl": "CONTENT URL" } }
For increased security, all JSON used in the API must be comment filtered. The JSON data should be wrapped in /* */ for any JSON, either in the API request or response. In addition, all JSON output will be wrapped in a plain { } block so that it can't be used directly in a script src tag.
Variable | Description |
---|---|
FOLDER ID | The ID of the Directory folder to access. The folder must already
exist in the portal. If you do not know the folder ID, there are two
ways to retrieve one:
|
NAME | The name of the document to be displayed in the Directory. |
DESCRIPTION | The description of the document to be displayed in the Directory. |
DATA SOURCE ID | The Content Source ID for the document. The ID must be a valid Content Source configured in the portal. For example, the World Wide Web Content Source is ID 104. |
CONTENT URL | The full file path to the document. |
{ "document": { "name": "Document name", "objectid": "2143", "folderid": "1983", "folderpath": "\Knowledge Directory\test folder\submits" } }To view a complete implementation of this API, see the Submit to Knowledge Directory portlet included with the Oracle WebCenter Interaction installation (in the image service under /plumtree/portal/private/kdsubmit/).