Community articleDeleting a comment
Added by IBM contributorIBM on March 25, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Delete a comment associated with a file belonging to you or to someone else and to which you have access.



Delete a comment associated with a file belonging to you or to someone else and to which you have access.

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

You can also find the URI of the resource in the value of the href attribute of the <link rel="edit"> element for each entry in the Comments feed.

  • {userid} is the value of the <snx:userid> of the person who owns the file. See Searching Profiles for information about how to determine a person's user ID.
  • {document-id} is the value of the <td:uuid> or <td:label> of the file and can be found in the file's Atom document. If you specify the document by label, you must also provide the identifier=label parameter as part of the request.

You can use this input header in a POST request instead of using the DELETE request.

You can use this input parameter with the DELETE request.

Input

None.

Output

None.

Input
Method URI Description
DELETE /files/basic/api/userlibrary/{userid}/document/{document-id}/comment/{comment-id}/entry Deletes a comment from a someone else's file.
DELETE /files/basic/api/myuserlibrary/document/{document-id}/comment/{comment-id}/entry Deletes a comment from one of your files.
Name Type Optional Description
userid
string No {userid} is the value of the <snx:userid> of the person who owns the file. See Searching Profiles for information about how to determine a person's user ID.
document-id
string No {document-id} is the value of the <td:uuid> or <td:label> of the file and can be found in the file's Atom document. If you specify the document by label, you must also provide the identifier=label parameter as part of the request.
Name Type Optional Description
identifier
string Yes Indicates how the document is identified in the {document-id} variable segment of the web address. By default, look up is performed with the expectation that the URL contains the value from the <td:uuid> element of a File Atom entry. Specify "label" if the URL instead contains the value from the <td:label> element of a File Atom entry.
Name Type Optional Description
X-Method-Override
string Yes Tunnels a DELETE request over HTTP POST
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.
Output
Code Description
200
OK. Indicates that the comment was successfully deleted.
401
Unauthorized.
404
Not Found. Can occur if you specify the document ID using the document label, but do not provide the identifier parameter to indicate that you are using the label as the identifier.