Document Loader Service
Before proceeding, ensure the SmartHub to Connectivity Hub connection is configured.
About
The DocumentLoader service is located at the following URL:
- http(s)://<smarthub-web-app>/Services/DocumentLoader.svc
-
- Replace the first part of the URL below with the address of your own SmartHub instance
There are 2 endpoints that you can call:
- http(s)://<smarthub-web-app>/Services/DocumentLoader.svc/downloadDocument
- http(s)://<smarthub-web-app>/Services/DocumentLoader.svc/loadApplication
DownloadDocument
The method provides the functionality needed to access documents without having to reach the source system and instead download them directly from the search page.
- Only items indexed through Connectivity Hub or Connector Framework can be used with this service.
- To enable the functionality you first have to configure the content so that the URLs indexed point to this service.
- Follow instructions here (under Content Configuration).
- The article describes how to do this for a FileShare Connector, but the approach is the same for any other connector.
- You must configure your SmartHub instance to communicate with Connectivity Hub.
- Follow the instructions here.
Request details:
- Method: GET
- Parameters:
- source
- Query string parameter that contains the encoded
escbase_crawlurl
property of the document you want to download. - This property ONLY exists for content crawled with Connectivity Hub or Connector Framework
- Query string parameter that contains the encoded
- source
Example:
-
https://<smarthub-web-app>/Services/DocumentLoader.svc/downloadDocument?source=spworks%3A%2F%2F.....
LoadApplication
-
This method provides the functionality needed to compose files from multiple pieces of metadata and download them.
-
These are usually needed for source systems that require launching an application via a file - like iManage NRL files.
Request details:
- Method: GET
- Parameters:
- filename - the name of the file that should be generated and downloaded (including the extension)
- content1 - the first line of the file to be generated
- content2- the 2nd line of the file to be generated
- .......
Note: content1 to n represent each a line in the document
- Basic text example:
- https://smartHub.com/Services/DocumentLoader.svc/LoadApplication?filename=test.txt&content1=stringtest
- NRL file example:
- https://smartHub.com/Services/DocumentLoader.svc/LoadApplication?filename=1234.nrl&content1=system..com&content2=!nrtdms:0:!.sql.com:!:!document:124:&content3=[Version]&content4=Latest%3DY