PTC Arbortext Content Delivery Development > Development > Using REST Calls in ACD > Scenario 4: To Open a Document by Document ID
Scenario 4: To Open a Document by Document ID
This scenario explains how to open any document with the help of the document ID and the context ID. The context ID is optional here. Context ID is the ID of the product model number or serial number searched in Scenario 3.
* 
In this scenario, you will get the doc_id post making a REST call as a response, shown in the following image:
REST Call Template
<protocol>://<host>:<port>/<web_app_name>/servlet/servicecenter/rest/elements/<doc_id>
If you want to open a document in a specific context, you need to append effectivity query parameter in the REST call. See the below example:
Example of PartsList
Example of Media
Example of XML
Example of PDF
The example of context ID can either be independently used in scenario 3 or from the modelSearch result JSON file.
Header
The Header required for making REST calls for Search is:
To Retrieve the Content
If the response of any call is a document or file, then perform the steps below to download or render that document or file in the browser.
Input
Take the <href> from JSON response of any REST call.
Was this helpful?