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.svc/ relative to the root of the Content Service.

Component Links

Command: /linking.svc/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/componentLink?sourcePageURI=tcm:1-50-64&targetComponentURI=tcm:1-55-16&excludeTemplateURI=tcm:0-0-0&linkText=MyLink

Binary Links

Command:/linking.svc/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/binaryLink?binaryComponentURI=tcm:9-1389-16&anchor=a1&linkText=alinkText&linkTagAttributes='id=1'&showTextOnFail=false

Dynamic Component Links

Command: /linking.svc/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/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.svc/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/pageLink?targetPageURI=tcm:9-1-64&anchor=myAnchor&linkTagAttributes="style='color: red'"&linkText=text&showTextOnFail=true&parameters="a=b"