Skip to main content
NICE CXone Expert
Expert Success Center

files/{fileid}/{filename} (DELETE)

Overview

Delete file attachment

  • REST Method: DELETE
  • Method Access: public

Uri Parameters

Name Type Description
fileid int identifies a file by ID
filename string Double uri-encoded file name. Should be prefixed with "=" if it does not have an extension.
pageid string either an integer page ID, "home", or "=" followed by a double uri-encoded page title

Query Parameters

Name Type Description
authenticate bool? Force authentication for request (default: false)
redirects int? If zero, do not follow page redirects (only applies when {pageid} is present).

Return Codes

Name Value Description
OK 200 The request completed successfully
Bad Request 400 Invalid input parameter or request body
Forbidden 403 Update access to the page is required
Not Found 404 The requested file could not be found

Message Format

None

Implementation Notes

This feature works in exactly same way files/{fileid} (DELETE) does. A doubly encoded filename could be appended to the end of the path for confidence check or other purposes. Note that only the {fileid} parameter is of importance when deleting a file. The {filename} parameter is not used at all, and so does not need to match the existing file.

Curl Code Sample: Delete a File

The following command removes an attachment (file ID = 1) with file name "foo". The file is placed in the archive where it can be restored or permanently deleted.

Sample Code

curl -u username:password -X DELETE -i http://mindtouch.address/@api/deki/files/1/=foo

Implementation notes 

curl flags

-u
Provides external user authentication.
-X
Specifies the HTTP request method.
-i
Outputs the HTTP response headers. Useful for debugging.
  • Was this article helpful?