Home > Forum > Actions > Rest API 409 Conflict Error

Rest API 409 Conflict Error
0

Hello,

At the moment I've split up a bigger project into smaller pieces so I can test out everything I need separately.

I'm trying to add a new attachment to an instance using this API /api/data/v4.0/db/{dbid}/elements/{id}/attachments. I have 2 fields into this form: contentBASE64 and fileName. All I'm trying to do is to use these values from my fields together with the API action so I end up with an instance in a final state having an attachment into attachemnts section.

I have already checked this post https://daniels-notes.de/posts/2023/copy-attachment-to-other-workflow as is probabily 75% or more from what I need to do, but still mine doesn't work. OAuth2 App is configured.. same as the connection.. same as the action. Everything looks fine but no. :)

Anyone have any idea how to sort out this little thing?

Thank you!

In reply to: Joanna

Hi,

I've made some screenshots, maybe they're helpful..

Thank you

Hi Joanna,
There should be more details in the action logs in the response from the API. Looking at the configuration screenshots, I suspect that the reason for the error is that you are performing a rest action on an instance that tries to modify the same instance. You will most likely get an instance checkout error in the details, but underneath the instance waits to save until the action is completed, and the rest action is waiting for the instance to finish saving and be free.