ScreenStepsScreenSteps API v2 JSON APIResolving Internal Links in the API

Resolving Internal Links in the API

Internal links in ScreenSteps use data-attributes to expose the ID of the article you are trying to. A typical URL might look like this:

<a href="../../1/l/2-title" data-internal-link-id="24" data-internal-link="lesson" data-internal-manual-id="52" target="_blank">My link</a>

This table explains the meaning of these items:

Value Description
data-internal-link-id
This is the ScreenSteps id of the object that is being linked to.
data-internal-link
This is the type of object that is being linked to.
data-internal-anchor
This is an (optional) anchor name for the target

Because of some legacy content, data-internal link can have a variety of values. The table below will show you what you should use to resolve links using the API.

data-internal-link value API endpoint
article, lesson, or step The data-internal-link-id will be pointing to an article (or a step inside an article). 
chapter or section The data-internal-link-id will be pointing to a chapter in your site.
manual
The data-internal-link-id will be pointing to a manual.

In the coming months the API will standardize on 'article', 'chapter' and 'manual'. But to make sure that you are compatible with content previously authored you should account for the other values as well.

0 Comments

Add your comment

E-Mail me when someone replies to this comment