Deleting versions of a document
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 30, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Removes versions of a file from your library. You cannot delete the current (most recent) version of a file using this request -- to delete all versions of a file, use [[Deleting a file and its metadata ic50|Deleting a file and its metadata]] instead.

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 Retrieving file metadata API with the acls parameter set to true , and check the <td:permission> element for the Delete flag.

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.

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

Input
Method URI Description
DELETE /files/{auth}/api/myuserlibrary/document/{document-id}/feed Removes one or more versions of a file from your library.
Name Type Optional Description
document-id
string No {document-id} is the value of the <td:uuid> or <td:label> element in the Atom entry document of the file.
auth
enumerated No The authorization protocol being used by your application to access Connections Cloud.
Authorized values:
  • basic
  • oauth
Name Type Optional Description
category
string No Identifies the resource being deleted. Provide the parameter using the syntax: category=version. This parameter is required.
deleteFrom
string No Specifies the latest version to delete. This version and all earlier versions are deleted, excluding the current version, which cannot be deleted. This parameter is required.
identifier
string Yes 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.
Name Type Optional Description
X-Method-Override
string Yes Tunnels a DELETE request over the HTTP POST request.
X-Update-Nonce
string Yes String. Represents a unique data string generated by the server upon request that you can provide to secure the request. See Getting a nonce key for information about how to request the data string.
Authorization
enumerated No The authentication mechanism selected by your application to access the API.
Basic is the Base64 encoding of the IBM Connections Cloud username and password: Base64(username:password). For example, Base64(twatson@us.ibm.com:password).
Bearer is the oauth 2.0 access token that is generated when the user grants your application access to IBM Connections Cloud services.
See the reference topic "OAuth 2.0 APIs for web server flow" for more information.
Authorized values:
  • bearer
  • basic
Output
Code Description
204
Indicates that the versions were successfully removed from the collection.
401
Unauthorized.
403
Forbidden.
404
Not Found.