Upload content - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

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_PUBLISHER role 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.
Method Endpoint
POST
/api/admin/khub/sources/{sourceId}/upload?publisher=name
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.
  • The value of the publisher parameter must be a UTF-8 URL-encoded string.
  • The publisher parameter 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.