WOPI discovery

WOPI discovery is a process which helps the WOPI server discover a WOPI client by requesting the discovery XML from an online office. WOPI hosts use the discovery XML to specify how to interact with the online office.

The action element of the discovery XML provides the important characteristics about the online office. This element represents:

  • available document operations in the online office,
  • supported file formats (extensions).
Name Description
requires The WOPI REST endpoints required to use the actions.
urlsrc The URL that you navigate to in order to invoke the action on a particular file.
<action name="edit" ext="docx" requires="locks,update"

Discovery query parameters are the parameters that can be exposed by file storage in the urlsrc attribute to customize the editor behavior. For example, change a language, theme or chat.

Name Description Example
ui Indicates that the WOPI server includes the preferred UI language in the format described in [RFC1766]. en-us
rs Indicates that the WOPI server includes preferred data language in the format described in [RFC1766] for cases where the language can affect data calculation (in spreadsheet editor). en-us
thm Indicates that the WOPI server includes a value to designate the theme used. The current values are "1" to indicate a light-colored theme and "2" to indicate a dark-colored theme. 1
dchat Indicates that the WOPI server includes the value "1" to load a view of the document that does not create or join a chat session. 1

Please pay attention to the discovery.xml structure of the Collabora connectors. They open the editor via the MIME-type which is included in the app element of the following structure:

<app name="application/msword">
<action default="true" ext="" name="edit" urlsrc=""/>

The app element like this:

<app name="Word" favIconUrl="http://localhost:8000/web-apps/apps/documenteditor/main/resources/img/favicon.ico">

is ignored by the Collabora connectors.