Delete all versions of a document 

Removes versions of a file from your library.

This request requires authentication. To delete all versions of a file, the currently authenticated user must be the owner of the user library containing the document, an administrator, or have been shared with as a document editor. To test whether the current user can delete versions, use the Retrieve file metadata API with the acls parameter set to true , and check the <td:permission> element for the Delete flag.

See Authenticating requests for information about how to authenticate the request.

Table 1. Atom API request details

Method URI Input and output representations
DELETE /basic/api/myuserlibrary/document/{document-id}/feed none


Note: {document-id} is the value of the <td:uuid> or <td:label> element in the Atom entry document of the file.

You can use the following header.

Table 2. Input header

Parameter Description
X-Method-Override Tunnels a DELETE request over the HTTP POST request.

You can provide the following input parameters. Separate multiple parameters with an ampersand (&).

Table 3. Input parameter

Parameter Description
category Identifies the resource being deleted. Provide the parameter using the syntax: category=version. This parameter is required.
deleteFrom Required for versions. This version number is the one to start deleting from. All version numbers less than or equal to this version number are deleted.
identifier Indicates how the document is identified in the {document-id} variable segment of the web address. By default, the lookup operation is performed with the expectation that the URL contains the value from the <td:uuid> element of a file Atom entry, so the value uuid is used. Specify label if the URL instead contains the value from the <td:label> element of the file Atom entry.


Input

None.


Output

None.

Returned HTTP headers

HTTP/1.1 204 No Content

Error codes


Parent topic

Work with versions

Related reference
File version content


   

 

});