REST API - Delete Comment Request
9 min
api/v1/projects/{projectid}/artifacts/{artifactid}/comments/{commentid} description deletes the specified comment from an artifact you can only delete comments if blueprint is configured to allow the deletion of published comments url structure \[blueprint uri]/api/v1/projects/{projectid}/artifacts/{artifactid}/comments/{commentid} projectid the id of the project containing the comment you want to delete artifactid the id of the artifact that contains the comment commentid the id of the comment you want to delete supported methods delete docid\ vnmdtbrg59iwf4suh4zey you can override the delete docid\ vnmdtbrg59iwf4suh4zey method and use the post docid\ hsi lzxs8g rx ydudzkg method instead http status codes 200 ok 201 successfully created 206 partial content 400 bad request this error can occur for a variety of reasons at least one uri or request body parameter is invalid, such as one of the filter docid\ sv9gjverxczcgqdn28j7u , traces, offset or limit parameters a required value has not been provided if you are submitting a post docid\ hsi lzxs8g rx ydudzkg or patch docid\ rcjvhrlby6de zgkehxui request and have not added the x http method override parameter to your request header 401 unauthorized the blueprint token is missing, invalid or expired 403 forbidden the applicable permissions are needed for example, this error can occur when an author or collaborate license is needed for access comment permissions are needed on the artifact edit permissions are needed on the change summary job 404 notfound item is not found in the project for example, this error can occur when artifact not found artifact type not found project not found alm target not found change summary job not found user does not have edit permissions for this artifact, project or alm target 409 conflict reason for failure can be found in the response body additional information may also be found in the log 411 length required if the content length header is missing in the request 413 request entity too large if the provided file size is larger than allowed 415 unsupported media type if the provided media type is not of mime multipart content "form data " 416 request range not satisfiable if offset points to a part of a collection that is not available 500 internal server error 501 not implemented examples xml example request uri http //today/api/v1/projects/1978492/artifacts/1978633/comments/377374 response header {'content length' '106', 'x xss protection' '1; mode=block', 'x content type options' 'nosniff', 'expires' ' 1', 'server' 'blueprint', 'pragma' 'no cache', 'cache control' 'no cache', 'date' 'wed, 27 nov 2013 19 37 40 gmt', 'x frame options' 'deny', 'content type' 'application/xml; charset=utf 8'} response body \<?xml version="1 0" ?> \<string xmlns="http //schemas microsoft com/2003/10/serialization/">comment successfully deleted \</string> json example request uri http //today/api/v1/projects/1978492/artifacts/1978633/comments/377394 response header {'content length' '31', 'x xss protection' '1; mode=block', 'x content type options' 'nosniff', 'expires' ' 1', 'server' 'blueprint', 'pragma' 'no cache', 'cache control' 'no cache', 'date' 'wed, 27 nov 2013 18 51 38 gmt', 'x frame options' 'deny', 'content type' 'application/json; charset=utf 8'} response body "comment successfully deleted "