Documentation Center

Content Service Linking API

The separate Linking API of the Content Service gets HTML representations of the various types of links. The linking commands are exposed under the URL /linking/ relative to the root of the Content Service.

Component Links

Command: /linking/componentLink

Input parameters:
Parameter nameDefault value
sourcePageURI(none)
targetComponentURI(none)
excludeTemplateURI(none)
linkTagAttributes(empty)
linkText(empty)
showTextOnFailtrue
showAnchorfalse

Parameters with no default value are mandatory, but can be set to the null value tcm:0-0-0.

Example:
http://myserver/linking/componentLink?sourcePageURI=tcm:1-50-64&targetComponentURI=tcm:1-55-16&excludeTemplateURI=tcm:0-0-0&linkText=MyLink

Binary Links

Command:/linking/binaryLink

Input parameters:
Parameter nameDefault value
binaryComponentURI(none)
anchor(empty)
linkText(empty)
linkTagAttributes(empty)
showTextOnFailtrue
variantId(empty)

binaryComponentURI is mandatory, but can be set to the null value tcm:0-0-0.

Example:
http://myserver/linking/binaryLink?binaryComponentURI=tcm:9-1389-16&anchor=a1&linkText=alinkText&linkTagAttributes='id=1'&showTextOnFail=false

Dynamic Component Links

Command: /linking/dynamicComponentLink

Input parameters:
Parameter nameDefault value
targetPageURI(none)
targetComponentURI(none)
targetTemplateURI(none)
linkTagAttributes(empty)
linkText(empty)
showTextOnFailtrue

Parameters with no default value are mandatory, but can be set to the null value tcm:0-0-0.

Example:
http://myserver/linking/dynamicComponentLink?targetPageURI=tcm:9-1-64&targetComponentURI=tcm:9-3166-16&targetTemplateURI=tcm:9-1-32&linkTagAttributes='id=1'&linkText=text

Page Links

Command: /linking/pageLink

Input parameters:
Parameter nameDefault value
targetPageURI(none)
anchor(empty)
linkTagAttributes(empty)
linkText(empty)
showTextOnFailtrue
parameters(none)

targetPageURI is mandatory, but can be set to the null value tcm:0-0-0. parameters must have a value.

Example:
http://myserver/linking/pageLink?targetPageURI=tcm:9-1-64&anchor=myAnchor&linkTagAttributes="style='color: red'"&linkText=text&showTextOnFail=true&parameters="a=b"