Hi Irek,
This happens when there are any conflicting edits made by another user between the REST GET request and PUT request.
To resolve this error, you can use GET/PUT calls:
a. Get the latest incident data using the REST GET endpoint
b. Make your changes to the retuned data
c. Invoke REST PUT with modified incident data
Thanks
-Ram
------------------------------
Ram Badvelu
------------------------------
Original Message:
Sent: Thu May 12, 2022 12:29 PM
From: Irek Romaniuk
Subject: REST API update expected version
Getting "Expected version is 9; actual version is 8." when trying to PUT https://{{host}}/rest/orgs/{{org_id}}/incidents/{{last_inc_id}} with body
{
"resolution_summary": {
"format": "html",
"content": "<div class=\"rte\"><div>test only</div></div>"
},
"vers":"9"
}
response below
{
"success": false,
"title": null,
"message": "Expected version is 9; actual version is 8.",
"hints": [],
"error_code": "generic"
}
------------------------------
Irek Romaniuk
------------------------------