Skip to main content

deleteField

deleteField(templateId, fieldId)

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

Delete a metadata field

Deletes a metadata field from its template together with every value written for it on any file, folder or room of the portal. Only a DocSpace admin can change templates. The deletion is irreversible: the affected entries lose the value at once, their search documents are rebuilt and the clients viewing them are told to refresh. The template and its other fields stay as they are. A field that does not exist, or that belongs to another template than the one in the route, is answered with 404.

Parameters​

NameInTypeDescriptionNotes
templateIdpathInteger (int32)The template ID.[required] [example: 1]
fieldIdpathInteger (int32)The field 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--
404Field 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