Skip to main content

WOPI discovery

WOPI discovery is the process of helping a WOPI host discover WOPI client capabilities by requesting the discovery XML from online office. The WOPI host uses the discovery XML to determine how to interact with online office. The request is sent to https://FilezOfficeServer/docs/hosting/discovery.

WOPI discovery actions

The action elements in the discovery XML provide key capabilities of online office, including:

  • available document actions in online office;
  • supported file formats (extensions).

WOPI actions

NameDescription
viewRenders a non-editable view of a document.
editAllows users to edit a document.
mobileViewRenders a non-editable view optimized for mobile devices such as smartphones.
mobileEditAllows users to edit a document on mobile devices such as smartphones.

Attributes

NameDescription
requiresThe WOPI REST endpoints required to use the action.
urlsrcThe URL to navigate to in order to invoke the action for a specific file.

Example

<action name="edit" ext="docx" requires="locks,update" urlsrc="https://FilezOfficeServer/docs/app/wopi/we/wordviewerframe.aspx?<hid=HOST_SESSION_ID&><sc=SESSION_CONTEXT&><WOPISrc=WOPI_SOURCE&><ui=UI_LLCC>"/>

Discovery query parameters are parameters exposed in the urlsrc attribute that the host may replace to customize editor behavior (for example, changing the UI language).

These parameters are exposed as placeholders in the discovery XML urlsrc. Each optional parameter is enclosed in angle brackets (< and >) and follows the pattern "<name=PLACEHOLDER_VALUE[&]>", where:

  • name is the query parameter name;
  • PLACEHOLDER_VALUE is a placeholder value that the host can replace.

By convention, placeholder values in Web action URLs are uppercase.

Placeholder replacement rules:

  • If the host does not know PLACEHOLDER_VALUE, remove the entire parameter including the angle brackets.
  • If PLACEHOLDER_VALUE is known but the host wants to ignore it (or use the default), remove the entire parameter including the angle brackets.
  • If PLACEHOLDER_VALUE is known, remove the angle brackets, keep the name=... part, and replace PLACEHOLDER_VALUE with the actual value. If the optional & exists, it must be preserved.

Placeholders supported by FilezOffice

NameExampleDescription
UI_LLCCen-usIndicates the UI language used by FilezOffice online document pages. Any language can be provided as long as it matches the format described in [RFC1766]. FilezOffice might not support all languages; if the requested language is not supported, a fallback language may be used. If you do not set this placeholder, FilezOffice will attempt to use the browser's supported language (the Accept-Language header).
WOPI_SOURCEhttps://<host_address>/docs/app/wopi/files/(file_id)The WOPISrc value. It tells the WOPI client which URL to call back when performing WOPI operations. This parameter is required.
HOST_SESSION_IDHost-provided value to associate the FilezOffice session with the host session identifier. This helps FilezOffice engineers locate logs faster using the host-specific session identifier during troubleshooting.
SESSION_CONTEXTAny host-defined string value. If provided, it is passed back to the host in subsequent CheckFileInfo and CheckFolderInfo calls via the X-WOPI-SessionContext request header. There is no explicit length limit, but since it is passed via query string, it is limited by URL length constraints.