Document Loader Service

Note: Before proceeding, ensure the SmartHub to Connectivity Hub connection is configured.

See Connectivity Hub Settings Configuration.

 

About

The DocumentLoader service is located at the following URL: 

https://<smarthub-web-app>/_bai/v1/document

  • Replace <smarthub-web-app> with the address of your own SmartHub instance.

There is one endpoint to call:

  • https://<smarthub-web-app>/_bai/v1/document/load

Load

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 also need to configure your SmartHub instance to communicate with Connectivity Hub.
    • Follow the instructions here.

Request details:

  • Method: GET
  • Parameters:
    • source
      • Query string, Mandatory
        • 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.
    • mode

      • Query string, Optional

      • The mode used when loading file.

      • Options: "" (this is the default), "inline", "ignoremsg"

        • If set to "inline", the Content-Disposition header of the response is set to "inline", otherwise the header value is set to "attachment".

        • "ignoremsg" should be used only if the item extension is "msg" or "vcf".
          If mode is set to "ignoremsg" when requesting a "msg" or "vcf" file, then the ContentType Header of the response is set to "application/octet-stream", otherwise it is set to "application/msoutlook".

    • filename

      • Query string, Optional

      • The desired name for the downloaded file.

Example:

https://<smarthub-web-app>/_bai/v1/document/load?source=spworks%3A%2F%2F.....