Skip to content

Instantly share code, notes, and snippets.

@jhorsman
Last active October 16, 2017 12:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhorsman/acb02a207f144025c82f7859ed28223a to your computer and use it in GitHub Desktop.
Save jhorsman/acb02a207f144025c82f7859ed28223a to your computer and use it in GitHub Desktop.
Example SDL Web 8.1 Content service request and response to resolve a dynamic component link; see https://tridion.stackexchange.com/a/16927/88
http://cd-server:8081/client/v4/content.svc/GetComponentLinkFunctionImport(PublicationId=29,SourcePageId=-1,TargetComponentId=2665,ExcludeTemplateId=-1,LinkText='',ShowTextOnFail=False,ShowAnchor=False)
// response with absolute URLs, this is the default configuration, OverrideDiscoveryService=false
{
"@odata.context": "http://cd-server:8081/client/v4/content.svc/$metadata#Links/$entity",
"@odata.id": "Links('944d65ab-bcb4-483e-b9f0-c9181b713c9b')",
"LinkUUID": "944d65ab-bcb4-483e-b9f0-c9181b713c9b",
"Url": "http://example.com/nl/news/article.html",
"Anchor": null,
"Parameters": null,
"TargetURI": "tcm:29-2521-64",
"Text": "",
"Attributes": null,
"TextOnFail": false
}
// response with relative URLs, OverrideDiscoveryService=true
{
"@odata.context": "http://cd-server:8081/client/v4/content.svc/$metadata#Links/$entity",
"@odata.id": "Links('944d65ab-bcb4-483e-b9f0-c9181b713c9b')",
"LinkUUID": "944d65ab-bcb4-483e-b9f0-c9181b713c9b",
"Url": "/nl/news/article.html",
"Anchor": null,
"Parameters": null,
"TargetURI": "tcm:29-2521-64",
"Text": "",
"Attributes": null,
"TextOnFail": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment