GetRootContainer (ecosystem)

Required for: iOS Android
GET /wopi/ecosystem/root_container_pointer

The GetRootContainer operation returns the root container. A WOPI client can use this operation to get a reference to the root container, from which the client can call EnumerateChildren (containers) to navigate a container hierarchy.

See also

This operation is also exposed as a shortcut operation.

Query Parameters:
 
  • access_token (string) – An access token that the host will use to determine whether the request is authorized.
Status Codes:

See also

Standard WOPI request and response headers
In addition to the request/response headers listed here, this operation may also use the Standard WOPI request and response headers.

Response

The response to a GetRootContainer call is JSON (as specified in RFC 4627).

All optional values default to the following values based on their type:

Type Default value
Boolean false
String The empty string
Integer/Long Varies; see individual properties for details
Array Empty array

Important

No properties should be set to null. If you do not wish to set a property, simply omit it from the response and WOPI clients will use the default value.

Required response properties

The following properties must be present in all GetRootContainer responses:

ContainerPointer

A JSON-formatted object containing the following properties:

Name
The name of the container without a path. This value should match the Name property in a CheckContainerInfo response. Required.
Url

A URI to the container, including a valid access token. Required.

Danger

This property includes an access token and thus has important security implications. See Preventing ‘token trading’ for more details.

Other response properties

ContainerInfo

Hosts can optionally include the ContainerInfo property, which should match the CheckContainerInfo response for the root container.

If not provided, the WOPI client will call CheckContainerInfo to retrieve it. Including this property in the response is strongly recommended so that the WOPI client does not need to make an additional call to CheckContainerInfo.

Sample response

{
  "ContainerPointer" : {
    "Url" : "http://.../wopi*/containers/<containerId>?access_token=<per_container_token>",
    "Name" : "Container Name"
  },
  "ContainerInfo" : {
    "Name" : "Container Name",
    "HostUrl" : "",
    "SharingUrl" : "",
    "UserCanCreateChildContainer" : false,
    "UserCanCreateChildFile" : false,
    "UserCanDelete" : false,
    "UserCanRename" : false
  }
}