Updating an Attachment on a Change Issue
For the updation of an attachment on a change object, one method is to first delete the attachment and then use the three stage upload process to upload another attachment. However for attachments that are at an external URL you can use a PUT request to update the attachment.
The following example shows how to update an existing attachment at an external location using a PUT request with the request body. Before running this request reserve the change object.
URI
PUT: /Windchill/servlet/odata/ChangeMgmt/Variances('VR%3Awt.change2.WTVariance%3A256355')/Attachments('OR:wt.content.ExternalStoredData:262001') HTTP/1.1
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Description": "Google URL",
"DisplayName": "Google attachment",
"ExternalLocation": "www.google.com",
"Comments": "test external location"
}