This web service allows users to upload content to a Fluid Topics portal, through a source.
After the upload, users can monitor the publish job using the Get a publish report web service.
- The source must correspond to the content's format (an FTML source for FTML content, a DITA source for DITA content, etc.)
- Users or API keys with the
CONTENT_PUBLISHERrole can only upload content through a source they have permission for. - The size of the content to upload must not exceed 1.85 GB.
- The size of individual topics to upload must not exceed 100 MB.
- It is not possible to upload content on a consumer portal.
| Method | Endpoint |
|---|---|
POST |
|
| Path parameter | Type | Description |
|---|---|---|
{sourceId} |
String | The identifier of the source as obtained when listing available sources. |
| Query string parameter | Type | Required? | Description |
|---|---|---|---|
publisher |
String | No | A name that appears in the Publishing menu of the Knowledge Hub. If not set, it is the name of the API key. |
It is necessary to provide an Ft-Calling-App value when using Fluid Topics web services. See Fluid Topics calling app.
- The value of the
publisherparameter must be a UTF-8 URL-encoded string. - The
publisherparameter requires the use of an API key.
Example
To upload content, the web service call requires a multipart/form-data request body, like in the following curl command:
curl --request POST \
--form "file=@$MY_ARCHIVE.ZIP" \
--header "Authorization: Bearer $API_KEY" \
https://my-fluidtopics.net/api/admin/khub/sources/{sourceId}/upload?publisher=Jane%20Doe
The server automatically updates the ZIP file and adds information about the source.
Response body
{
"started": true,
"jobId": 1,
"uploadId": "d441085c-4209-45ce-ab5f-37998b059730",
"uuid": "9246b42a-bcea-4991-adeb-9cd2b696b97e",
"reportApiEndpoint": "http://doc.fluidtopics.com/api/khub/uploads/d441085c-4209-45ce-ab5f-37998b059730/report"
}
The link in the reportApiEndpoint field grants access to the publish report as described in Get a publish report.
| Return code | Endpoint |
|---|---|
200 OK |
The content has been uploaded. |
401 UNAUTHORIZED |
The credentials are invalid. |
403 FORBIDDEN |
The user or API key does not have the CONTENT_PUBLISHER or ADMIN role. |
404 NOT FOUND |
The source does not exist, or the CONTENT_PUBLISHER user or API key does not have the appropriate rights to use this source. |