REST API - Publish Artifact Request
12 min
/api/v1/vc/publish description publishes changes of the specified artifact(s) url structure \[blueprint uri]/api/v1/vc/publish 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 docid\ iabyqhikpch2vzwbezcpy in the request body request uri parameters keeplock (optional) defines whether or not to keep the lock after publishing the artifacts this parameter can be set to true or false the default is false if not specified the default is true if the parameter is included in the uri with no given value 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 404 (not found) artifact not found in the project artifact type not found 412 (nothing to publish) the artifact does not have any changes to publish 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 example request uri https //production blueprintcloud com/api/v1/vc/publish? 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 08 gmt', 'expires' ' 1', 'content type' 'application/xml; charset=utf 8', 'server' 'blueprint'} response body \<?xml version="1 0" ?>\<publishresultlog xmlns="http //www blueprintsys com/blueprint/api/v1" xmlns\ i="http //www w3 org/2001/xmlschema instance"> \<publishresultlogentry> \<artifactid>220914\</artifactid> \<message>published successfully\</message> \<projectid>220870\</projectid> \<resultcode>200\</resultcode> \</publishresultlogentry>\</publishresultlog> json example request uri https //production blueprintcloud com/api/v1/vc/publish? 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 50 gmt', 'expires' ' 1', 'content type' 'application/json; charset=utf 8', 'server' 'blueprint'} response body \[ { "projectid" 220870, "resultcode" 200, "message" "published successfully", "artifactid" 220914 }]