<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PUT Request Returning 409 Error in Fusion Manage Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-manage-forum/put-request-returning-409-error/m-p/7122364#M3405</link>
    <description>&lt;P&gt;Here was the problem:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We weren't copying the versionID when doing the PUT.&amp;nbsp; I still don't understand the reasoning behind this field, but it works now.&amp;nbsp; When copying the versionID, we got a 500 error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the docs:&lt;/P&gt;&lt;P&gt;"The array must have a key=value pair for each custom field in the workspace that is editable, including fields with unchanged values. If you omit an editable field, the field's value is set to null.&amp;nbsp; "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We left out some editable fields that weren't changing and the request was failing.&amp;nbsp; Thanks for the help&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jun 2017 13:43:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-06-01T13:43:00Z</dc:date>
    <item>
      <title>PUT Request Returning 409 Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/put-request-returning-409-error/m-p/7117166#M3403</link>
      <description>&lt;P&gt;I am trying to perform a PUT request to update a workspace item. I used the method call:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var request = new RestRequest("/api/rest/v1/workspaces/" + workspaceID + "/items/" + projectID, Method.PUT);&lt;/PRE&gt;&lt;P&gt;and created an object to add to the&amp;nbsp;request body:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; Rootobject root = new Rootobject
            {
                metaFields = new Metafields
                {
                    entry = new List&amp;lt;Entry&amp;gt;()
                }
            };&lt;/PRE&gt;&lt;P&gt;Then set the entry fields with key value pairs, and the version number of the root object. I got back this 409 error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{"httpStatusCode":409,"error":[{"message":"The data you are attempting to edit has since been modified by another user, for details see the Change Log. You may attempt to perform your modification again."}]}&lt;/PRE&gt;&lt;P&gt;And can't find any documentation on what may be the problem. Any help would be appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 15:08:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/put-request-returning-409-error/m-p/7117166#M3403</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-30T15:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: PUT Request Returning 409 Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/put-request-returning-409-error/m-p/7119868#M3404</link>
      <description>&lt;P&gt;409 means that the server thinks the request cannot be completed because if conflicts with&amp;nbsp;some established rule, in this case the server is saying that the object has been concurrently updated (which I don't think is the case).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think that the payload is incorrect. &amp;nbsp;From the help, the request should look like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="pre codeblock prettyprint prettyprinted"&gt;&lt;SPAN class="str"&gt;'{
    "versionID":0,
    "metaFields":{
        "entry": [ 
            {"key": "INSPECTION_TYPE", "value": "5"},
            {"key": "INSPECTED_BY", "value": "1"},
            {"key": "INSPECTED_ITEM", "value": "249"}
            ]
    }
}'&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perform a get and then try to reuse that payload to perform the update.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried the following with a PUT and I get a 204 back (no content but the update works) -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt; &lt;A href="https://adskmandatt.autodeskplm360.net/api/rest/v1/workspaces/64/items/7797" target="_blank"&gt;https://adskmandatt.autodeskplm360.net/api/rest/v1/workspaces/64/items/7797&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{
    "versionID":0,
    "metaFields":{
        "entry": [ 
            {"key": "DESCRIPTION", "value": "Sample4"}
            ]
    }
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 14:59:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/put-request-returning-409-error/m-p/7119868#M3404</guid>
      <dc:creator>tony.mandatori</dc:creator>
      <dc:date>2017-05-31T14:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: PUT Request Returning 409 Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/put-request-returning-409-error/m-p/7122364#M3405</link>
      <description>&lt;P&gt;Here was the problem:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We weren't copying the versionID when doing the PUT.&amp;nbsp; I still don't understand the reasoning behind this field, but it works now.&amp;nbsp; When copying the versionID, we got a 500 error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the docs:&lt;/P&gt;&lt;P&gt;"The array must have a key=value pair for each custom field in the workspace that is editable, including fields with unchanged values. If you omit an editable field, the field's value is set to null.&amp;nbsp; "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We left out some editable fields that weren't changing and the request was failing.&amp;nbsp; Thanks for the help&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 13:43:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/put-request-returning-409-error/m-p/7122364#M3405</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-01T13:43:00Z</dc:date>
    </item>
  </channel>
</rss>

