Get topic metadata - Fluid Topics - Latest

Fluid Topics Designer Guide

Category
Reference Guides
Audience
public
Version
Latest

The getMetadata() JavaScript method provides the metadata of the currently open topic. It is only available in the Topic template designer.

Example

The following example prints the metadata of the currently open topic in the user's browser console.

async function getTopicMetadata() {
    try {
        const metadata = await topic.getMetadata();
        console.log(JSON.stringify(metadata, null, 2));
    } catch (error) {
        console.error("Error while fetching metadata:", error);
        return null;
    }
}

// Call the function to get the topic metadata
getTopicMetadata();

Response

The following example is the output of topic.getMetadata() for the API quick reference topic of the Fluid Topics API Reference Guide:

[
  {
    "key": "audience",
    "label": "Audience",
    "values": [
      "public"
    ]
  },
  {
    "key": "author",
    "label": "Author",
    "values": [
      "Jane Doe",
      "John Doe"
    ]
  },
  {
    "key": "tags",
    "label": "tags",
    "values": [
      "fluid-topics-reference-guide"
    ]
  },
  {
    "key": "Product",
    "label": "Product",
    "values": [
      "Fluid Topics"
    ]
  },
  {
    "key": "Category",
    "label": "Category",
    "values": [
      "Reference Guides"
    ]
  },
  {
    "key": "media_dir",
    "label": "media_dir",
    "values": [
      "images"
    ]
  },
  {
    "key": "FT_Version",
    "label": "Version",
    "values": [
      "Latest"
    ]
  },
  {
    "key": "ft:originId",
    "label": "ft:originId",
    "values": [
      "829dfd0ef5faa28a21acf880cb272844b6f56643e0b7047fce57a85e4ff5c04f-api-quick-reference"
    ]
  },
  {
    "key": "ft:title",
    "label": "ft:title",
    "values": [
      "API quick reference"
    ]
  },
  {
    "key": "ft:baseId",
    "label": "ft:baseId",
    "values": [
      "829dfd0ef5faa28a21acf880cb272844b6f56643e0b7047fce57a85e4ff5c04f-api-quick-reference"
    ]
  },
  {
    "key": "ft:publishStatus",
    "label": "ft:publishStatus",
    "values": [
      "visible"
    ]
  },
  {
    "key": "ft:publicationId",
    "label": "ft:publicationId",
    "values": [
      "Eb9T08h5UbpP~FAvJ84DHQ"
    ]
  },
  {
    "key": "ft:sourceId",
    "label": "ft:sourceId",
    "values": [
      "md"
    ]
  },
  {
    "key": "ft:sourceName",
    "label": "Source Name",
    "values": [
      "Markdown"
    ]
  },
  {
    "key": "ft:sourceType",
    "label": "ft:sourceType",
    "values": [
      "Markdown"
    ]
  },
  {
    "key": "ft:khubVersion",
    "label": "ft:khubVersion",
    "values": [
      "5.1.16"
    ]
  },
  {
    "key": "ft:locale",
    "label": "ft:locale",
    "values": [
      "en-US"
    ]
  },
  {
    "key": "ft:clusterId",
    "label": "ft:clusterId",
    "values": [
      "829dfd0ef5faa28a21acf880cb272844b6f56643e0b7047fce57a85e4ff5c04f-api-quick-reference"
    ]
  },
  {
    "key": "ft:topicTitle",
    "label": "ft:topicTitle",
    "values": [
      "API quick reference"
    ]
  },
  {
    "key": "ft:lastTechChange",
    "label": "ft:lastTechChange",
    "values": [
      "2026-05-21"
    ]
  },
  {
    "key": "ft:lastTechChangeTimestamp",
    "label": "ft:lastTechChangeTimestamp",
    "values": [
      "1779376592976"
    ]
  },
  {
    "key": "ft:searchableFromInt",
    "label": "ft:searchableFromInt",
    "values": [
      "0"
    ]
  },
  {
    "key": "ft:alertTimestamp",
    "label": "ft:alertTimestamp",
    "values": [
      "1779376592"
    ]
  },
  {
    "key": "ft:lastEdition",
    "label": "ft:lastEdition",
    "values": [
      "2026-05-21"
    ]
  },
  {
    "key": "ft:container",
    "label": "ft:container",
    "values": [
      "book"
    ]
  },
  {
    "key": "ft:openMode",
    "label": "ft:openMode",
    "values": [
      "fluidtopics"
    ]
  },
  {
    "key": "ft:tocPosition",
    "label": "ft:tocPosition",
    "values": [
      "285"
    ]
  },
  {
    "key": "ft:isPublication",
    "label": "ft:isPublication",
    "values": [
      "false"
    ]
  },
  {
    "key": "ft:isBook",
    "label": "ft:isBook",
    "values": [
      "false"
    ]
  },
  {
    "key": "ft:isArticle",
    "label": "ft:isArticle",
    "values": [
      "false"
    ]
  },
  {
    "key": "ft:isUnstructured",
    "label": "ft:isUnstructured",
    "values": [
      "false"
    ]
  },
  {
    "key": "ft:isHtmlPackage",
    "label": "ft:isHtmlPackage",
    "values": [
      "false"
    ]
  },
  {
    "key": "ft:isAttachment",
    "label": "ft:isAttachment",
    "values": [
      "false"
    ]
  },
  {
    "key": "ft:isSynchronousAttachment",
    "label": "ft:isSynchronousAttachment",
    "values": [
      "false"
    ]
  },
  {
    "key": "ft:publication_title",
    "label": "ft:publication_title",
    "values": [
      "Fluid Topics API Reference Guide"
    ]
  },
  {
    "key": "ft:publishUploadId",
    "label": "ft:publishUploadId",
    "values": [
      "f99ca54b-31b9-4b34-9d4f-a8d1ba48e28c"
    ]
  },
  {
    "key": "ft:document_type",
    "label": "ft:document_type",
    "values": [
      "topic"
    ]
  },
  {
    "key": "ft:prettyUrl",
    "label": "ft:prettyUrl",
    "values": [
      "Fluid-Topics-API-Reference-Guide/API-quick-reference"
    ]
  },
  {
    "key": "ft:wordCount",
    "label": "ft:wordCount",
    "values": [
      "1351"
    ]
  },
  {
    "key": "ft:outputSize",
    "label": "ft:outputSize",
    "values": [
      "82225"
    ]
  },
  {
    "key": "ft:lastPublication",
    "label": "ft:lastPublication",
    "values": [
      "2026-05-21T15:16:32.847147"
    ]
  }
]