跳到主要内容

deleteTemplates

BooleanWrapper deleteTemplates(DeleteTemplateFilesRequestDto)

DELETE /api/2.0/files/templates

Delete template files

Takes the listed files off the personal template list of the calling account, leaving the files themselves untouched: only the template mark is dropped. The body of this request is a bare JSON array of numeric file ids rather than an object with a field, and a request that carries no array at all is rejected as an invalid request. Every authenticated member type may manage their own list, a guest is refused, and read access to a file is required for its mark to be dropped. The answer is true whenever the array was understood, which an empty array, an id that does not exist and a file that was never a template all achieve, so it confirms nothing about what was removed. Repeating the call is safe. Use POST api/2.0/files/templates to put a file back on the list; that operation expects an object with a fileIds field, so the two bodies are not interchangeable.

Parameters​

NameInTypeDescriptionNotes
DeleteTemplateFilesRequestDtobodyListThe files to take off the template list, by id; this array is the whole request body. Only a file stored in the portal itself can be a template, which is why an id here is always numeric.[optional]

Responses​

Status codeDescriptionTypeResponse headers
200Always true: the files named in the array are no longer templates of the callerBooleanWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The caller is a guest--
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​

BooleanWrapper

Authorization​

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

HTTP request headers​

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