跳到主要内容

deleteTemplate

deleteTemplate(templateId)

DELETE /api/2.0/files/metadata/templates/{templateId}

Delete a metadata template

Deletes a metadata template together with its fields, its assignments and every value written for its fields on any file, folder or room of the portal. Only a DocSpace admin can delete templates. The deletion is irreversible and there is no confirmation: the affected entries lose the template at once, their search documents are rebuilt and the clients viewing them are told to refresh. A template that does not exist, or was already deleted, is answered with 404. To take the template off a single entry and keep it for the others use DELETE api/2.0/files/metadata/file/{fileId}/templates/{templateId} instead.

Parameters​

NameInTypeDescriptionNotes
templateIdpathInteger (int32)The template ID.[required] [example: 1]

Responses​

Status codeDescriptionTypeResponse headers
200OK-X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403You don't have enough permission to perform the operation--
404Template not found--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.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​

null (empty response body)

Authorization​

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

HTTP request headers​

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