This web service returns the HTML content of a HTML section (a topic or whole document).
Method | Endpoint |
---|---|
GET |
/api/khub/section/html?${CONTEXT_ID}=1234&${FILTER_1}=value_1&...&${FILTER_N}=value_n |
Query string parameter | Type | Required? | Description |
---|---|---|---|
${CONTEXT_ID} |
String | Yes | Depends on the content type. For instance, it can be ait:code for Author-it content or dita:mapPath and dita:topicPath for DITA content. |
${FILTER_1}/${FILTER_N} |
String | No | Is any metadata key-value couple that differentiates the section, for example version=3.7 or product=Fluid_Topics . Use as many metadata as needed to define unique content. |
Full example:
http://myportal.fluidtopics.net/api/khub/section/html?ft:baseId=12345&version=3.0&docType=Reference_20Guide
To learn more about how to use metadata to filter content in the web service's scope, see Deep links.
This web service cannot return more than 32 topics. If users want the content of a section containing more than 32 topics, they should get the content of its individual subsections instead.
Use case
A common use case would be the inline-help scenario.
From a third-party integration, an integrator wants to point to HTML content already available in Fluid Topics, and display it in context to its end-users, for instance in a pop-up.
Return code | Description |
---|---|
200 OK |
Returns text/html content. |
400 BAD REQUEST |
Invalid request. |
404 NOT FOUND |
The search yielded no results. No section was found matching the criteria. |
Response body
The web service returns text/html
content.
Example
In the OD2000 Time Machine User Guide
publication, the topic How to Time Travel
has three topic children:
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 following request is used:
https://oleandor.fluidtopics.net/api/khub/section/html?dita:topicPath=how_to_time_travel.dita&dita:ditavalPath=Novice.ditaval
It returns the following HTML content:
<section class="ft-section">
<div id="1SooKJEmtVO55uSVTWUYEQ" class="ft-topic">
<h1 class="ft-topic-title ft-toc-level-1">How to Time Travel</h1>
<article class="ft-topic-body">
<div class="content-locale-en-US content-locale-en">
<div id="how_to_time_travel">
<div class="body">
<p class="p">Before time traveling, it is important to know at what time point and zone time you want to travel to and for how much time...</p>
<br>
<div class="imagecenter">
<img class="image imagecenter" src="data:image/png;base64,...">
</div>
<br>
</div>
</div>
</div>
</article>
</div>
<div id="MyP3~w_nsPyBnjcZRLjDHA" class="ft-topic">
<h1 class="ft-topic-title ft-toc-level-2">Set Local Date and Time</h1>
<article class="ft-topic-body">
<div class="content-locale-en-US content-locale-en">
<div id="set_local_date_and_time">
<div class="body">
<p class="p">As a reference, it is crucial to set local date and time prior to setting destination date and time.</p>
<p class="p">In
<span class="ph menucascade">
<span class="ph uicontrol">Settings</span> >
<span class="ph uicontrol">Date and Time</span> >
<span class="ph uicontrol">Date</span>
</span>, set the current date in the following format:
<samp class="ph codeph">mm-dd-yyyy</samp>.
</p>
<p class="p">In
<span class="ph menucascade">
<span class="ph uicontrol">Settings</span> >
<span class="ph uicontrol">Date and Time</span> >
<span class="ph uicontrol">Time</span>
</span>, set the current local time in the following format:
<samp class="ph codeph">hh:mm</samp>.
</p>
</div>
</div>
</div>
</article>
</div>
<div id="EVi~_emWAIDHiD90WLzN0w" class="ft-topic">
<h1 class="ft-topic-title ft-toc-level-2">Set Destination Date and Time</h1>
<article class="ft-topic-body">
<div class="content-locale-en-US content-locale-en">
<div id="set_destination_date_and_time">
<div class="body">
<p class="p">To make sure you arrive in the desired date and time, set a destination <strong class="ph b">local</strong> date and time</p>
<p class="p">In
<span class="ph menucascade">
<span class="ph uicontrol">Settings</span> >
<span class="ph uicontrol">Destination settings</span> >
<span class="ph uicontrol">Date and Time</span> >
<span class="ph uicontrol">Date</span>
</span>, set the arrrival date in the following format:
<samp class="ph codeph">mm-dd-yyyy</samp>.
</p>
<p class="p">In
<span class="ph menucascade">
<span class="ph uicontrol">Settings</span> >
<span class="ph uicontrol">Destination settings</span> >
<span class="ph uicontrol">Date and Time</span> >
<span class="ph uicontrol">Time</span>
</span>, set the arrival local time in the following format:
<samp class="ph codeph">hh:mm</samp>.
</p>
</div>
</div>
</div>
</article>
</div>
<div id="J9c1O60yym0oe~ECOeXZAg" class="ft-topic">
<h1 class="ft-topic-title ft-toc-level-2">Set a Destination Location</h1>
<article class="ft-topic-body">
<div class="content-locale-en-US content-locale-en">
<div id="set_destination_location">
<div class="body">
<p class="p">To make sure you arrive in the desired place, set a destination location.</p>
<p class="p">In
<span class="ph menucascade">
<span class="ph uicontrol">Settings</span> >
<span class="ph uicontrol">Destination settings</span> >
<span class="ph uicontrol">Location</span>
</span>, enter the GPS coordinates of the chosen time travel location in the Degrees, minutes, and seconds (DMS) format.
</p>
<p class="p">Example: 41°24'12.2" N 2°10'26.5" E</p>
</div>
</div>
</div>
</article>
</div>
</section>