The GetInterviewFile method enables the host application to retrieve a specified file from a HotDocs Package File stored in CloudWeb Services.
In this Topic Hide
Use the GetInterviewFile method when you need additional files for the interview. When the interview requires the file:
You must define the endpoint URLs for the Interview File callbacks in the Get Interview call.
Typically, you use the GetInterviewFile method to retrieve the files in the table below.
File Type | Example File Name | Description | Interview Setting in Get Interview |
Interview Definition file | ExampleTemplate.docx.js | A JavaScript file used when rendering the interview. This file defines the interview layout and content. | InterviewDefUrl |
Image Files (optional) | DialogImage.png | Any image used by Image-type Dialog Elements in the interview. Images used by Dialog Elements are stored in the HotDocs Package File containing the Template. | TempInterviewUrl |
For more information on the files required by the interview, see Displaying HotDocs Interviews.
GET http://{machineName}:{portNumber}/HDSWebAPI/api/hdcs/interviewfile/{subscriberID}/{packageID}?filename={filename}
Name | Location | Required | Description |
machineName |
Path |
Yes |
The name of the server on which the Web Service is installed. |
portNumber |
Path |
Yes |
The port through which the Web Service is accessible. |
subscriberID | Path | Yes | Set this value to 0. |
packageID | Path | Yes | An ID identifying the package containing the template about which you are requesting information. This is set when uploading the package file. If you are using the HotDocs Hub to store templates, see Get a Package ID from HotDocs Hub. |
filename | Query string | Yes | The name of the file to retrieve from the package file. For example, ExampleTemplate1.docx.js. |
RetrieveFromHub |
Query string |
No |
Note: this parameter may require additional Web Services configuration. See Retrieve Templates from HotDocs Hub for more information. Enables you to retrieve a HotDocs template from the HotDocs Hub instead of a template stored in the Web Services cache. Select from the following options (case-insensitive):
|
http://machine-name:80/HDSWebApi/api/hdcs/interviewfile/0/ed40775b-5e7d-4a51-b4d1-32bf9d6e9e29?filename=example.docx.js
If successful, this method returns a Stream containing the requested file.
GET http://machine-name/HDSWEBAPI/api/hdcs/interviewfile/0/ed40775b-5e7d-4a51-b4d1-32bf9d6e9e29?filename=ExampleTemplate.docx.js HTTP/1.1 Keep-Alive: false Host: machine-name Connection: Keep-Alive
For a full walkthrough of retrieving an Interview File from a template package in Web Services, see the Web Services Example 5: Get Interview File article in the HotDocs Integrations documentation.
For a full code example of retrieving an Interview File from a template package in Web Services, see the WebServiceExample5InterviewFile project in the HotDocs Integration Examples.