跳到主要内容

getDefaultTemplates

DefaultTemplateSettingsWrapper getDefaultTemplates()

GET /api/2.0/files/settings/defaulttemplate

Get the default template setting

Returns the blank document the portal creates for each format: one entry per extension the built-in template set covers, with the file that has been chosen as the blank for it, if any. An entry whose selectedFile is null means no custom template has been set and the built-in blank is used; the remaining fields - title, size, modification moment and view address - are filled only for a custom one. The list is assembled from the portal's built-in template set on every call, so an extension the set no longer covers disappears from it. Entries come in the order the interface shows them: the text document, spreadsheet, presentation and PDF formats first, the rest by extension. Reading the setting requires the portal settings permission, so only the portal owner and a DocSpace administrator may call it. Use PUT api/2.0/files/settings/defaulttemplate to choose an existing file and the matching POST to upload one.

Parameters​

This endpoint does not need any parameter.

Responses​

Status codeDescriptionTypeResponse headers
200The blank document configured for each supported extensionDefaultTemplateSettingsWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The caller has no portal-settings right--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

DefaultTemplateSettingsWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json