DaveGussin | 2017-06-30 15:56:22 UTC | #1
I'm trying to use the PostContentmanagementDocumentContent call to replace the contents of a document in a workspace, and I'm always getting a 409 error back with "Resource conflict". Why might this be happening?
tim.smith | 2017-06-30 15:59:04 UTC | #2
The value provided for changeNumber is probably incorrect. If you can provide the correlation ID from the response, I can see if there's any additional traces to clarify.
DaveGussin | 2017-06-30 16:01:42 UTC | #3
On that note, should the changeNumber reflect an incremental number, or should it reflect the current changeNumber? I've tried both and it doesn't seem to make a difference.
tim.smith | 2017-06-30 16:04:12 UTC | #4
I think it's supposed to be the same so you're telling the server you intend to update that version. Can you provide the correlation ID from the response header?
DaveGussin | 2017-06-30 16:04:30 UTC | #5
The exception data doesn't seem to provide a correlationId, but there is a contextId. Here's an example of the error message (Note that this command was executed in the staging environment):
{"status":409,"code":"conflict","message":"Resource conflict update document: d8597740-fc2f-4582-82e4-747b686036b8","contextId":"9757830e-65ff-4ab4-a7a2-c28751358bf2","details":[],"errors":[]}
DaveGussin | 2017-06-30 16:06:13 UTC | #6
Okay, I do have it set to the same changeNumber value as the current version.
tim.smith | 2017-06-30 16:07:01 UTC | #7
The correlation ID and context ID are the same thing. The correlation ID is found in the response headers: https://developer.mypurecloud.com/api/rest/tips/index.html#8. I'll take a look.
tim.smith | 2017-06-30 16:10:05 UTC | #8
Here's the source error for that correlation ID: Change number resource conflict updating document: d8597740-fc2f-4582-82e4-747b686036b8: requested: 0, current: 2
DaveGussin | 2017-06-30 16:12:17 UTC | #9
Hmmm... it may be that the logic I'm using to keep track of the changeNumber is incorrect. Thanks for that tip, I'll look into it.
system | 2017-07-31 16:12:25 UTC | #10
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 1488