Opening a document in Viewer

In third-party integrations, you can open a document in HCL Docs Viewer by the viewer application API.

Table 1. Viewer Application API

This table provides reference information for the Viewer Application API to open a document

Method URI Description Parameters or variables
GET /viewer/driverscallback Opens the document in Docs Viewer. This URI should be called by window.open to open Viewer.

repository: The value could be cmis and rest

file_id: The value is a document id

oauth_code (optional): The value is OAuth2 code obtained from the OAuth2 server

Example

  • GET /viewer/driverscallback?repository=cmis&file_id=a_file_id&code=oauth_code  
    GET /viewer/driverscallback?repository=rest&file_id=a_file_id&code=oauth_code

    Output: file_id will be opened in the window by HCL Docs Viewer.