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 permissions 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=username
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 Yes An optional query parameter to define the publisher's username.
  • 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://localhost:8080/myPortal/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.