REST API - Delete Traces Request
14 min
api/v1/projects/{projectid}/artifacts/{artifactid}/traces?reconcilewithtwoway={boolean} description deletes the specified trace(s) you can only delete manual traces (that is, a trace manually added by a user) you cannot delete parent/child relationships or other relationships you can delete more than one trace in a single request as long as the artifactid you specify in the request body has a trace relationship with the artifact in the request uri url structure \[blueprint uri]/api/v1/projects/{projectid}/artifacts/{artifactid}/traces projectid the id of the project that contains the first artifact in the trace relationship you want to delete a trace relationship always includes two artifacts artifactid the id of the first artifact in the trace relationship you want to delete a trace relationship always includes two artifacts supported methods delete docid\ vnmdtbrg59iwf4suh4zey you can override the delete docid\ vnmdtbrg59iwf4suh4zey method and use the post docid\ hsi lzxs8g rx ydudzkg method instead request uri parameters reconcilewithtwoway (optional) indicates how to handle the existence of an inverse trace this parameter can be set to true or false , and is used in conjunction with the direction parameter in the request body that is set to to or from if reconcilewithtwoway is set to true, and a bidirectional trace exists, the trace is not deleted; instead, the trace direction opposite to that in the request body is preserved (that is, the inverse trace replaces the bidirectional trace) the default is false if not specified the default is true if the parameter is included in the uri with no given value request body parameters the trace(s) must be included in the body of the request read more about how to specify one or more traces in the request body docid 5qd6 fuzdothy7 mrc1t1 blueprint result codes your response may contain resultcode and message parameters if your request involves changes to blueprint data these parameters provide detailed information about the result of your request 200 (ok) the artifact updated successfully 421 (trace not manual) only valid trace value is manual 422 (trace not found) the artifact does not have the specified trace 425 (trace cannot be managed) in order to manage a trace, you need to have trace permissions for both traced artifacts and edit permissions for at least one artifact 500 internal server error 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 example 1 request uri https //production blueprintcloud com/api/v1/projects/847739/artifacts/847741/traces request body \<?xml version="1 0" ?> \<traces xmlns\ i="http //www w3 org/2001/xmlschema instance" xmlns="http //www blueprintsys com/blueprint/api/v1"> \<trace> \<artifactid>843925\</artifactid> \<type>manual\</type> \</trace>\</traces> example 2 using the reconcilewithtwoway parameter to retain the inverse of a bidirectional trace relationship request uri https //production blueprintcloud com/api/v1/projects/847739/artifacts/843921/traces?reconcilewithtwoway=true request body \<?xml version="1 0" ?> \<traces xmlns\ i="http //www w3 org/2001/xmlschema instance" xmlns="http //www blueprintsys com/blueprint/api/v1"> \<trace> \<artifactid>843927\</artifactid> \<direction>from\</direction> \<type>manual\</type> \</trace>\</traces> response body language php template \<tracedeleteresults xmlns\ i="http //www w3 org/2001/xmlschema instance" xmlns="http //www blueprintsys com/blueprint/api/v1"> \<tracedeleteresult> \<artifactid>843927\</artifactid> \<direction>twoway\</direction> \<message>trace has been successfully deleted \</message> \<resultcode>200\</resultcode> \</tracedeleteresult> \</tracedeleteresults> json examples example 1 request uri https //production blueprintcloud com/api/v1/projects/847739/artifacts/847741/traces request body \[ { "artifactid" 847750, "direction" "twoway", "type" "manual", "message" "trace has been successfully deleted ", "resultcode" 200 }] example 2 using the reconcilewithtwoway parameter to retain the inverse of a bidirectional trace relationship request uri https //production blueprintcloud com/api/v1/projects/847739/artifacts/843921/traces?reconcilewithtwoway=true request body \[ { "type" "manual", "artifactid" 843923, "direction" "to" }] response body \[ { "artifactid" 843923, "direction" "twoway", "type" "manual", "message" "trace has been successfully deleted ", "resultcode" 200 }]