Add or update map attachments - Fluid Topics - Latest

Fluid Topics API Reference Guide

Reference Guides

This web service adds (if new) or updates (if existing) attachments to publications based on metadata selection.

  • This web service is only available to users or API keys with the ADMIN, KHUB_ADMIN, or CONTENT_PUBLISHER role.
  • Users or API keys with the CONTENT_PUBLISHER role can only add or update a map attachment for a document published through a source they have permissions for.
  • It is necessary to define user credentials in the HTTP header when calling this web service.
Method Endpoint
PUT /api/admin/khub/maps/attachments?metadata1=value1&...&metadataN=valueN
Query string parameter Type Required? Description
metadata=value String Yes Any metadata key-value couple defining the publications to add or update.

To add or update a map attachment, the web service call requires a multipart/form-data request body where the different parts consist in:

  • Sending an order to the Fluid Topics server to attach a file to the matched publications.

    This requires the upload of an order.json file containing the attachment's metadata.

  • Uploading the attachment itself.


The following code block is an example of order.json file for attaching a document:

  "attachments": [
      "id": "my_attachment",
      "filename": "oleandor.jpeg",
      "displayName": "Oleandor Company Logo"
Field Type Description
id String The optional value used to identify the attachment (uses the filename by default).
filename String The file name of the map attachment.
displayName String The optional display name of the map attachment (uses filename by default).

The web service is sending asynchronous requests. It may take a while for the attachment to be uploaded and the publication to be updated.

Updating existing attachments requires calling the same web service with the same id (or filename if the id has not been specified), and by modifying the other properties (displayName, content-type, attachment content, or even the filename if an id has been specified).

An additional example of a Python implementation is available in the following topic of the Integrate the Fluid Topics API Technical Note: Upload map attachments.

Return code Description
202 ACCEPTED The update instruction was sent to the Fluid Topics processing pipeline.
400 BAD REQUEST Invalid query.
500 INTERNAL SERVER ERROR The server could not process the request.