REST API - Discard Artifacts Request
11 min
/api/v1/vc/discard description discards changes to the specified artifact(s) url structure \[blueprint uri]/api/v1/vc/discard supported methods post docid\ hsi lzxs8g rx ydudzkg request body the list of artifacts that you want to publish must be included in the body of the request read more about how to specify a list of artifacts in the request body 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) successfully discarded the artifact 404 (not found) artifact not found in the project artifact type not found 413 (nothing to discard) the artifact does not have any changes to discard 415 (not all dependent artifacts included) this operation does not include all dependent artifacts to be published or discarded 500 (error) a system error has occurred 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 examples request uri https //production blueprintcloud com/api/v1/vc/discard? request body \<?xml version="1 0" ?>\<artifacts xmlns\ i="http //www w3 org/2001/xmlschema instance" xmlns="http //www blueprintsys com/blueprint/api/v1"> \<artifact> \<id>220914\</id> \<projectid>220870\</projectid> \</artifact>\</artifacts> response header {'content length' '318', 'pragma' 'no cache', 'cache control' 'no cache', 'date' 'sat, 04 may 2013 14 59 04 gmt', 'expires' ' 1', 'content type' 'application/xml; charset=utf 8', 'server' 'blueprint'} response body \<?xml version="1 0" ?>\<discardresultlog xmlns="http //www blueprintsys com/blueprint/api/v1" xmlns\ i="http //www w3 org/2001/xmlschema instance"> \<discardresultlogentry> \<artifactid>220914\</artifactid> \<message>discarded successfully\</message> \<projectid>220870\</projectid> \<resultcode>200\</resultcode> \</discardresultlogentry>\</discardresultlog> json example request uri https //production blueprintcloud com/api/v1/vc/discard? request body \[ { "id" "220914", "projectid" "220870" }] response header {'content length' '94', 'pragma' 'no cache', 'cache control' 'no cache', 'date' 'sat, 04 may 2013 10 47 45 gmt', 'expires' ' 1', 'content type' 'application/json; charset=utf 8', 'server' 'blueprint'} response body \[ { "projectid" 220870, "resultcode" 200, "message" "discarded successfully", "artifactid" 220914 }]