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
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| templateId | path | Integer (int32) | The template ID. | [required] [example: 1] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | OK | - | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
| 403 | You don't have enough permission to perform the operation | - | - |
| 404 | Template not found | - | - |
| 401 | Unauthorized | ErrorApiResponse | - |
| 429 | Too Many Requests. | ErrorApiResponse | Retry-After |
| 500 | Internal Server Error. | ErrorApiResponse | - |
| 400 | Bad Request. | ErrorApiResponse | - |
| 502 | Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
| 503 | Service 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