GetRootContainer (bootstrapper)
POST /wopibootstrapper
This operation is equivalent to the GetRootContainer (ecosystem) operation.
Important
The request/response semantics for this operation differ slightly from its counterpart on the Ecosystem endpoint since it is exposed on the Bootstrapper endpoint, and thus will use OAuth 2.0 access tokens for authorization instead of WOPI access tokens.
Request Headers
X-WOPI-EcosystemOperation – The string
GET_ROOT_CONTAINER
. Required.Authorization – A string in the format
Bearer: <TOKEN>
where<TOKEN>
is a Base64-encoded OAuth 2.0 token. If this header is missing, or the token provided is invalid, the host must respond with a 401 Unauthorized response and include the WWW-Authenticate header as described in WWW-Authenticate response header format.
Response Headers
- WWW-Authenticate – A string value formatted as described in WWW-Authenticate response header format. This header should only be included when responding with a 401 Unauthorized.
Status Codes
200 OK – Success
401 Unauthorized – Authorization failure; when responding with this status code, hosts must include a WWW-Authenticate response header with values as described in WWW-Authenticate response header format
404 Not Found – Resource not found/user unauthorized
500 Internal Server Error – Server error
501 Not Implemented – Operation not supported
Response
The response to a GetRootContainer call is JSON containing the following required properties:
Bootstrap - The contents of this property should be the response to a Bootstrap call.
RootContainerInfo - The contents of this property should be the response to a GetRootContainer (ecosystem) call.
Sample response:
{
"Bootstrap": {
"EcosystemUrl": "http://.../wopi*/ecosystem?access_token=<ecosystem_token>",
"UserId": "User ID",
"SignInName": "user@contoso.com",
"UserFriendlyName": "User Name"
},
"RootContainerInfo": {
"ContainerPointer" : {
"Url" : "http://.../wopi*/containers/<containerId>?access_token=<per_container_token>",
"Name" : "Container Name"
},
"ContainerInfo" : {
"Name" : "Container Name",
"HostUrl" : "http://contoso/324332",
"SharingUrl" : "http://contoso/323432/efewos",
"UserCanCreateChildContainer" : false,
"UserCanCreateChildFile" : false,
"UserCanDelete" : false,
"UserCanRename" : false
}
}
}