REST API - Update Artifacts Request
13 min
/api/v1/projects/{projectid}/artifacts description updates properties of the specified artifact(s) you can update any artifact property that is not read only typically, name, description and any custom properties are not read only and can be modified you cannot, however, modify data that is always read only, such as the date the artifact was last updated reused artifacts may be read only or contain read only properties instance administrators can enable a setting that only allows you to modify certain properties, attachments or traces in a reused artifact url structure \[blueprint uri]/api/v1/projects/{projectid}/artifacts projectid the id of the project that contains the artifact with the attachment you want to retrieve supported methods patch docid\ rcjvhrlby6de zgkehxui you can override the patch docid\ rcjvhrlby6de zgkehxui method and use the post docid\ hsi lzxs8g rx ydudzkg method instead 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 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 401 (unauthorized) the user does not have edit permissions for the artifact 404 (not found) artifact not found in the project artifact type not found 410 (invalid value) this error can occur for a variety of reasons, such as some of artifact properties have invalid values (the error is on the artifact level if any artifact properties have errors ) no properties are specified to be updated the property value cannot be empty custom value and choices cannot be specified simultaneously property does not support custom values only single choice is allowed specified choice value does not exist value must be less than the maximum value value must be greater than the minimum value limited count of decimal places invalid rich text property value specified user or group does not exist 411 (newer revision exists) a newer artifact version exists 414 (locked by another user) artifact is locked by another user cannot check out the artifact 416 (cannot update read only property) read only property cannot be changed id property cannot be updated 417 (invalid artifact property type) unsupported artifact property type property not found the property type has been removed image property update is not supported 418 (specified version exceeds the latest one) the specified version is greater than the latest one 500 (error) a system error has occurred 502 (concurrency exception) another operation is being executed on the artifact 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/projects/220870/artifacts/? 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> \<properties> \<property> \<propertytypeid>9988\</propertytypeid> \<textorchoicevalue>traveler booking 1\</textorchoicevalue> \</property> \</properties> \</artifact>\</artifacts> response header {'content length' '282', 'pragma' 'no cache', 'cache control' 'no cache', 'date' 'sat, 04 may 2013 14 59 02 gmt', 'expires' ' 1', 'content type' 'application/xml; charset=utf 8', 'server' 'blueprint'} response body \<?xml version="1 0" ?>\<artifactupdateresults xmlns="http //www blueprintsys com/blueprint/api/v1" xmlns\ i="http //www w3 org/2001/xmlschema instance"> \<artifactupdateresult> \<artifactid>220914\</artifactid> \<message>success\</message> \<resultcode>200\</resultcode> \</artifactupdateresult>\</artifactupdateresults> json example request uri https //production blueprintcloud com/api/v1/projects/220870/artifacts/? request body \[ { "id" 220914, "properties" \[ { "propertytypeid" 9988, "textorchoicevalue" "traveler booking 1" } ] }] response header {'content length' '60', 'pragma' 'no cache', 'cache control' 'no cache', 'date' 'sat, 04 may 2013 10 47 42 gmt', 'expires' ' 1', 'content type' 'application/json; charset=utf 8', 'server' 'blueprint'} response body \[ { "message" "success", "resultcode" 200, "artifactid" 220914 }]