Skip to main content

resetDefaultTemplate

DefaultTemplateSettingsWrapper resetDefaultTemplate(DefaultTemplateSettingsResetRequestDto)

DELETE /api/2.0/files/settings/defaulttemplate

Reset the default template setting

Drops the custom blank document configured for one extension and returns the full set of templates as it now stands. New documents of that extension are created from the portal's built-in blank again, and the file that served as the custom one is deleted from the template storage - the original the template was copied from is untouched. The extension is named in the request body, and the entry for it comes back with selectedFile null. Resetting an extension that has no custom blank is accepted and changes nothing, which makes a repeated call safe; an extension the built-in template set does not cover is ignored in the same way. Requires the portal settings permission, so only the portal owner and a DocSpace administrator may call it. To set a blank instead of dropping it, use PUT api/2.0/files/settings/defaulttemplate. Documents already created from the custom blank are left as they are - the reset only decides what the next new document of that extension starts from. The set as it stands can also be read with GET api/2.0/files/settings/defaulttemplate.

Parameters​

NameInTypeDescriptionNotes
DefaultTemplateSettingsResetRequestDtobodyDefaultTemplateSettingsResetRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The blank document configured for each supported extension after the resetDefaultTemplateSettingsWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read or has no fileExtension--
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: application/json
  • Accept: application/json