List attachments - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

This web service lists the resources attached to a document and provides information about each resource.

Method Endpoint
GET
/api/khub/documents/{khubId}/attachments
Path parameter Type Description
{khubId} String Expects the id of the targeted document.

This web service requires authentication on portals with mandatory authentication.

Response body

The following lines show an example of a JSON response body with three attachments:

[
  {
    "id": "i0PPXvOmYE4jy~39ptx~lZ",
    "name": "Qoala Team's Mascot",
    "file": "QoalaTeamsMascot.jpg",
    "mimeType": "image/jpeg",
    "externalLink": false,
    "viewerUrl": "/viewer/document-attachment/jRbmsakXkovi6x5bu5ynpg/i0PPXvOmYE4jy~39ptx~lZ",
    "size": 160844
  },
  {
    "id": "j1QQYwPnZF5kz~40quy~mA",
    "name": "My Document Archive",
    "file": "TN_WS_use_cases.zip",
    "mimeType": "application/zip",
    "externalLink": false,
    "viewerUrl": "/viewer/document-attachment/jRbmsakXkovi6x5bu5ynpg/j1QQYwPnZF5kz~40quy~mA",
    "size": 87458
  },
  {
    "id": "k2RRZxQoAG6la~51rvz~nB",
    "name": "AI Templates",
    "file": "Templates_(AI).pdf",
    "mimeType": "application/pdf",
    "externalLink": false,
    "viewerUrl": "/viewer/document-attachment/jRbmsakXkovi6x5bu5ynpg/k2RRZxQoAG6la~51rvz~nB",
    "size": 146196
  }
]
Field Type Description
id String The attachment's khubId.
name String The attachment's name as it appears in the portal.
file String The attachment's filename.
mimeType String The attachment's MIME type.
externalLink Boolean Is true if the value of the file field is a URL.
viewerUrl String The URL fragment that opens the attachment in the portal. Not available if the value of externalLink is true.
size Number The attachment size in bytes.