{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zoomin/json-schema/zoomin-topic-schema.json",
  "title": "Topic",
  "description": "Information about a topic within a publication.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zoomin-openapi.yml#/components/schemas/Topic",
  "required": [
    "breadcrumbs_html",
    "bundle_id",
    "bundle_landing_page",
    "bundle_title",
    "canonical_link",
    "dates",
    "dislikes",
    "is_watched",
    "keywords",
    "likes",
    "page_id",
    "page_key",
    "related_links",
    "title",
    "topic_html",
    "topic_language",
    "views"
  ],
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "The title of this topic."
    },
    "topic_html": {
      "type": "string",
      "description": "The full HTML content of this topic.",
      "format": "html"
    },
    "breadcrumbs_html": {
      "type": "string",
      "description": "Breadcrumbs in HTML format, ending with the topic itself. Breadcrumbs are a sequence of parent topics that describes the path from the root of the publication to this topic.",
      "format": "html"
    },
    "views": {
      "minimum": 0,
      "type": "integer",
      "description": "The number of views of this topic."
    },
    "dates": {
      "$ref": "#/$defs/Dates"
    },
    "like_url": {
      "type": "string",
      "description": "A link that can be the target of a POST form to like this topic.",
      "format": "url"
    },
    "dislike_url": {
      "type": "string",
      "description": "A link that can be the target of a POST form to dislike this topic.",
      "format": "url"
    },
    "likes": {
      "minimum": 0,
      "type": "integer",
      "description": "The number of likes of this topic."
    },
    "dislikes": {
      "minimum": 0,
      "type": "integer",
      "description": "The number of dislikes of this topic."
    },
    "rating": {
      "type": "number",
      "description": "The average rating of this topic."
    },
    "metadata": {
      "type": "object",
      "properties": {},
      "description": "Metadata key-value pairs specified for this topic. Both topic-level metadata and bundle-level metadata are included."
    },
    "labels": {
      "type": "array",
      "description": "The labels applied to this topic in the classification map.",
      "items": {
        "$ref": "#/$defs/Label"
      }
    },
    "keywords": {
      "type": "array",
      "description": "The keywords for this topic.",
      "items": {
        "type": "string"
      }
    },
    "attachments": {
      "$ref": "#/$defs/TopicAttachments"
    },
    "bundle_title": {
      "type": "string",
      "description": "The title of the publication."
    },
    "page_id": {
      "type": "string",
      "description": "The path and file name of the topic within the bundle."
    },
    "bundle_id": {
      "type": "string",
      "description": "The bundle ID of the publication."
    },
    "bundle_landing_page": {
      "type": "string",
      "description": "The landing page for the publication. To create a link to the publication, link to this page."
    },
    "is_watched": {
      "type": "boolean",
      "description": "Whether any user is subscribed to this topic."
    },
    "is_in_fav": {
      "type": "boolean",
      "description": "Whether this topic is in included in a collection for any user."
    },
    "is_liked": {
      "$ref": "#/$defs/IsLiked"
    },
    "your_rating": {
      "type": "number",
      "description": "The rating of this topic by the current user, if the user has rated this topic."
    },
    "page_key": {
      "$ref": "#/$defs/PageKey"
    },
    "read_time_data": {
      "$ref": "#/$defs/ReadTimeData"
    },
    "breadcrumbs": {
      "type": "array",
      "description": "A sequence of parent topics that describes the path from the root of the publication to this topic. The breadcrumbs do not include the topic itself.",
      "items": {
        "$ref": "#/$defs/Topic_breadcrumbs"
      }
    },
    "topic_language": {
      "type": "string",
      "description": "The language of this topic.",
      "format": "language"
    },
    "bundle_subtitle": {
      "type": "string",
      "description": "The subtitle of the publication containing this topic."
    },
    "related_links": {
      "type": "array",
      "description": "A [group of links](https://docs.zoominsoftware.com/bundle/ZDPT/page/about_related_links.html) directing your users to additional useful content. Related links can be [created](https://docs.zoominsoftware.com/bundle/ZCI/page/how_to_create_related_links.html) by content authors.",
      "items": {
        "$ref": "#/$defs/Topic_related_links"
      }
    },
    "topic_cluster": {
      "$ref": "#/$defs/Topic_topic_cluster"
    },
    "preprocessed_PDF": {
      "type": "string",
      "description": "A link to the [pre-published PDF](https://docs.zoominsoftware.com/bundle/ZCI/page/how_to_include_a_pdf_in_a_zoomin_bundle.html) for the publication, if it exists.",
      "format": "url"
    },
    "canonical_link": {
      "type": "string",
      "description": "The [canonical link](https://docs.zoominsoftware.com/bundle/ZAC/page/canonical_links.html) of the topic, if it exists.",
      "format": "url"
    }
  },
  "$defs": {
    "Attachment": {
      "title": "Attachment",
      "required": [
        "filename",
        "url"
      ],
      "type": "object",
      "properties": {
        "filename": {
          "type": "string",
          "description": "The file name of the attachment."
        },
        "url": {
          "type": "string",
          "description": "A link to download the attachment.",
          "format": "url"
        }
      },
      "description": "A file that is attached to a bundle or topic."
    },
    "Dates": {
      "title": "Dates",
      "required": [
        "Added on",
        "Initial upload"
      ],
      "type": "object",
      "properties": {
        "Created on": {
          "type": "string",
          "description": "The date when the content was created. Provided by the authoring tool or upload plug-in.",
          "format": "date-time"
        },
        "Initial upload": {
          "type": "string",
          "description": "The date when the content was first uploaded. This is automatically added by Zoomin.",
          "format": "date-time"
        },
        "Updated on": {
          "type": "string",
          "description": "The date when the content was last updated. Provided by the authoring tool or upload plug-in.",
          "format": "date-time"
        },
        "Added on": {
          "type": "string",
          "description": "The date when the content was last uploaded. This is automatically added by Zoomin.",
          "format": "date-time"
        }
      },
      "description": "The dates associated with a bundle or topic. All dates are in the UTC time zone."
    },
    "IsLiked": {
      "title": "Is Liked",
      "type": "boolean",
      "description": "If this content was voted on, whether it was liked (`true`) or disliked (`false`)."
    },
    "Label": {
      "title": "Taxonomy label",
      "required": [
        "aliases",
        "hidden",
        "key",
        "navtitle",
        "outputclasses",
        "visibility"
      ],
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The primary identifier of this label",
          "format": "label-id"
        },
        "aliases": {
          "type": "array",
          "description": "Additional identifiers for this label",
          "items": {
            "type": "string",
            "format": "label-id"
          }
        },
        "navtitle": {
          "type": "string",
          "description": "Human readable name of the label in the default language"
        },
        "subjectHeadId": {
          "type": "string",
          "description": "The label-id of the top-level label in the subject scheme that contains this label. If this facet is itself at the top level, this field is `null`.",
          "format": "label-id"
        },
        "subjectheadNavtitle": {
          "type": "string",
          "description": "Human readable name of the top-level label in the subject scheme that contains this label. If this facet is itself at the top level, this field is `null`."
        },
        "hidden": {
          "type": "boolean",
          "description": "Whether this label should be hidden from end users in the search UI"
        },
        "outputclasses": {
          "type": "array",
          "description": "Custom HTML output classes that are applied to this label in the search UI. Does not include built-in output classes that enable Zoomin features.",
          "items": {
            "type": "string"
          }
        },
        "visibility": {
          "title": "Label UI visibility property",
          "type": "string",
          "description": "Indicates the parts of the UI that have been selected in the subject scheme for the label to be visible. Deprecated - use output classes instead.",
          "deprecated": true,
          "enum": [
            "hide-facet",
            "advanced-search",
            "refine-search",
            "show-facet"
          ]
        },
        "isSubjectHead": {
          "type": "boolean",
          "description": "Whether this label is at the top level in the subject scheme"
        }
      },
      "description": "A taxonomy label from the subject scheme. Used to classify content in classification maps for use in search and to assign content permissions in CRGs."
    },
    "PageKey": {
      "title": "Page Key",
      "minimum": 0,
      "type": "integer",
      "description": "The numeric ID of the page. The numeric ID is required for certain API features, such as comments and ratings."
    },
    "ReadTimeData": {
      "title": "Read Time Data",
      "type": "object",
      "properties": {
        "word_count": {
          "minimum": 0,
          "type": "integer",
          "description": "The number of words in the topic body."
        },
        "char_count": {
          "minimum": 0,
          "type": "integer",
          "description": "The number of characters in the topic body."
        },
        "img_count": {
          "minimum": 0,
          "type": "integer",
          "description": "The number of images included in the topic."
        },
        "video_links": {
          "type": "array",
          "description": "A list of the video links included in the topic.",
          "items": {
            "type": "string",
            "format": "url"
          }
        },
        "read_time": {
          "minimum": 0,
          "type": "integer",
          "description": "An estimate of the read time of the topic in minutes, calculated from the data in the other fields."
        }
      },
      "description": "Information that can be used to estimate the read time of a topic."
    },
    "TopicAttachments": {
      "title": "Topic Attachments",
      "type": "object",
      "properties": {
        "topic_attachments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Attachment"
          }
        },
        "all_attachments": {
          "type": "string",
          "description": "A link to download all topic attachments as a single zip file.",
          "format": "url"
        }
      },
      "description": "The files attached to this topic."
    },
    "Topic_breadcrumbs": {
      "required": [
        "title"
      ],
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "description": "The title of the parent topic."
        },
        "topicID": {
          "type": "string",
          "description": "The path and file name of the parent topic."
        }
      }
    },
    "Topic_related_links": {
      "required": [
        "scope"
      ],
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "The URL of the related link, if the scope of the related link is `external`.",
          "format": "url"
        },
        "topic": {
          "type": "string",
          "description": "The path and file name of the linked topic, if the scope of the related link is `peer` or `internal`."
        },
        "bundle": {
          "type": "string",
          "description": "The bundle ID of the linked topic, if the scope of the related link is `peer`.",
          "format": "bundle-id"
        },
        "role": {
          "type": "string",
          "description": "The role of the related link.",
          "enum": [
            "parent",
            "child",
            "friend"
          ]
        },
        "scope": {
          "type": "string",
          "description": "The scope of the related link. Possible values:\n- `local` - A link to a topic within the same publication\n- `peer` - A link to a topic in a different publication on the same Zoomin site\n- `external` - A link to a different site",
          "enum": [
            "local",
            "peer",
            "external"
          ]
        },
        "title": {
          "type": "string",
          "description": "The title of the related link."
        },
        "type": {
          "type": "string",
          "description": "The type of the related link.\n\nFor DITA content with scope local or peer, the possible values are: concept, topic, task, reference. Other values are possible for other content."
        }
      }
    },
    "Topic_topic_cluster": {
      "required": [
        "clustered_by",
        "clustered_labels",
        "clustered_topics"
      ],
      "type": "object",
      "properties": {
        "clustered_topics": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Topic_topic_cluster_clustered_topics"
          }
        },
        "clustering_title": {
          "type": "string",
          "description": "If clustering by publication title, the clustering title of this topic."
        },
        "clustered_by": {
          "$ref": "#/$defs/Topic_topic_cluster_clustered_by"
        },
        "clustered_labels": {
          "type": "array",
          "description": "The labels of this topic that were used for clustering.",
          "items": {
            "type": "string",
            "format": "label-id"
          }
        }
      },
      "description": "Information about how this topic is [clustered](https://docs.zoominsoftware.com/bundle/ZDPT/page/search_results_clustering.html) with others in search results."
    },
    "Topic_topic_cluster_clustered_by": {
      "required": [
        "enabled"
      ],
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Whether clustering is enabled."
        },
        "type": {
          "type": "string",
          "description": "If clustering is enabled, the type of clustering. Possible values:\n- `pubtitle` - Cluster by publication title\n- `publication` - Cluster by publication\n- `subjecthead` - Cluster by subject head label",
          "enum": [
            "pubtitle",
            "publication",
            "subjecthead"
          ]
        },
        "primary_key": {
          "type": "string",
          "description": "If clustering by subject head label is enabled, the label ID of the label used as the primary key for clustering.",
          "format": "label-id"
        },
        "primary_sort": {
          "type": "string",
          "description": "If clustering by subject head label is enabled, the sort order of clustered topics. Possible values:\n- `bottom-up` - sort topics A-Z\n- `top-down` - sort topics in reverse order, Z-A",
          "enum": [
            "bottom-up",
            "top-down"
          ]
        },
        "secondary_key": {
          "type": "string",
          "description": "If clustering by subject head label is enabled and a secondary key is specified, the label ID of the label used as the secondary key for clustering.",
          "format": "label-id"
        },
        "secondary_sort": {
          "type": "string",
          "description": "If clustering by subject head label is enabled and a secondary key is specified, the sort order of clustered topics within each group with the same primary key. Possible values:\n- `bottom-up` - sort topics A-Z by secondary key\n- `top-down` - sort topics in reverse order, Z-A, by secondary key",
          "enum": [
            "bottom-up",
            "top-down"
          ]
        }
      },
      "description": "Information about the type of clustering that is enabled."
    },
    "Topic_topic_cluster_clustered_topics": {
      "required": [
        "clustering_title",
        "es_archived_content"
      ],
      "type": "object",
      "properties": {
        "bundle_id": {
          "type": "string",
          "description": "The bundle ID of the clustered topic.",
          "format": "bundle-id"
        },
        "page_id": {
          "type": "string",
          "description": "The path and file name of the clustered topic within its publication.",
          "format": "nav-path"
        },
        "clustering_title": {
          "type": "string",
          "description": "The clustering title for the clustered topic."
        },
        "es_archived_content": {
          "type": "boolean",
          "description": "Whether the clustered topic is archived."
        }
      },
      "description": "A topic that is clustered together with this topic."
    }
  }
}