Opening a document in third-party integrations
In third-party integrations, you can open a document in IBM Docs by the editor application API.
Method | URI | Description | Parameters or variables |
---|---|---|---|
GET | /docs/driverscallback | This URI should be called by window.open to open the document in IBM Docs. |
repository: Values are cmis and rest file_id: The value is a document ID oauth_code (optional): The value is OAuth2 code obtained from the OAuth2 server |
GET | /docs/app/doc/external.rest/${file_id}/edit/content | This URI should be called by window.open to open the document in IBM Docs and the URI can be used as the value of HTML iframe src attribute to render the document in HTML iframe. |
repository: Value is rest file_id: The value is a document ID |
Example
-
GET /docs/driverscallback?repository=cmis&file_id=a_file_id&code=oauth_code GET /docs/driverscallback?repository=rest&file_id=a_file_id&code=oauth_code
Output: The file with file_id will be opened in IBM Docs.
-
GET /docs/app/doc/external.rest/a_file_id/edit/content
Output: The file with file_id will be opened in IBM Docs.
- When the URI is used in HTML iframe, example is:
< iframe src="https://docs.com/app/doc/external.rest/a_file_id/edit/content" width="600" height="400" scrolling="yes" frameborder="0"> </iframe >