This web service returns the styled HTML content of the targeted topic as a complete HTML page. The response includes the topic title, as well as the full CSS styling of the portal.
Method | Endpoint |
---|---|
GET |
|
Query string parameter | Type | Required? | Description |
---|---|---|---|
FILTER_1 |
String | Yes | The format of this parameter is any metadata key-value pair that differentiates the topic from other topics. |
FILTER_N |
String | No | Use as many metadata pairs as needed to target a unique topic. See Create deep links for examples of metadata pairs. |
- The Get a topic's content web service offers the unstyled content of a topic. Its response does not include the topic title, or any styling.
- The topic's children are not included in the response. Use the Get the content of an HTML section web service to get a topic and its children topics.
This web service requires authentication on portals with mandatory authentication.
Return code | Description |
---|---|
200 OK |
Returns text/html content. |
400 BAD REQUEST |
Invalid request. |
401 UNAUTHORIZED |
The authorization header is absent or invalid. |
404 NOT FOUND |
No topic matches the filters configured in the path parameters. |
Example
An integrator wants to take HTML content available on a Fluid Topics portal, and display it to end-users in an inline help window.
The integrator has chosen to target the How to Time Travel
topic. This topic belongs to the OD2000 Time Machine User Guide
publication, and its structure is as follows:
How to Time Travel
├── Set Local Date and Time
├── Set Destination Date and Time
└── Set a Destination Location
To retrieve the HTML content of the How to Time Travel
topic in its Novice
instance, the integrator sends the following request to the web service:
https://example.fluidtopics.net/api/khub/topic/styled-content?dita:topicPath=how_to_time_travel.dita&dita:ditavalPath=Novice.ditaval
In its response, the web service returns the following HTML content:
<!doctype html>
<html lang="en-US">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>I am the first part of the article</title>
<link href="http://example.fluidtopics.net/stylesheets/customizations.css?v=f02cb8db" rel="stylesheet">
</head>
<body>
<section class="title">
<div class="content-locale-en-US content-locale-en depth-1" lang="en-US">
<h1>I am the first part of the article</h1>
</div>
</section>
<section class="topic">
<div class="ft_node_extractor depth-1">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla molestie pellentesque porta.
Sed accumsan turpis eget condimentum auctor. Number aliquam tempor blandit.
Maecenas eu euismod nunc. Quisque posuere vitae nulla vel blandit.
Sed mattis eros eget tincidunt gravida.
Vestibulum tincidunt, metus non facilisis fermentum, enim nunc commodo lorem.
Vel dapibus sapien nulla sit amet eros.
Donec ultricies non metus at ullamcorper. Nulla imperdiet consectetur molestie.
</div>
</section>
</body>
</html>
Fluid Topics does not render cross-document links and internal links pointing outside of the topic in the response.
With internal links, it is possible to recreate them using the data-mapid
and data-tocid
values as follows:
Portal URL + /r/ + data-mapid value + / + data-tocid value
With cross-document links, it is possible to recreate them using the data-clusterid
value as part of a deep link.